files
Creates, updates, deletes, gets or lists a files
resource.
Overview
Name | files |
Type | Resource |
Id | azure.data_migration.files |
Fields
- vw_files
- files
Name | Datatype | Description |
---|---|---|
id | text | Resource ID. |
name | text | Resource name. |
etag | text | HTTP strong entity tag value. This is ignored if submitted. |
extension | text | field from the properties object |
fileName | text | field from the properties object |
file_path | text | field from the properties object |
groupName | text | field from the properties object |
last_modified | text | field from the properties object |
media_type | text | field from the properties object |
projectName | text | field from the properties object |
serviceName | text | field from the properties object |
size | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
type | text | Resource type. |
Name | Datatype | Description |
---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
etag | string | HTTP strong entity tag value. This is ignored if submitted. |
properties | object | Base class for file properties. |
systemData | object | |
type | string | Resource type. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | fileName, groupName, projectName, serviceName, subscriptionId | The files resource is a nested, proxy-only resource representing a file stored under the project resource. This method retrieves information about a file. |
list | SELECT | groupName, projectName, serviceName, subscriptionId | The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource. |
create_or_update | INSERT | fileName, groupName, projectName, serviceName, subscriptionId | The PUT method creates a new file or updates an existing one. |
delete | DELETE | fileName, groupName, projectName, serviceName, subscriptionId | This method deletes a file. |
update | UPDATE | fileName, groupName, projectName, serviceName, subscriptionId | This method updates an existing file. |
read | EXEC | fileName, groupName, projectName, serviceName, subscriptionId | This method is used for requesting storage information using which contents of the file can be downloaded. |
read_write | EXEC | fileName, groupName, projectName, serviceName, subscriptionId | This method is used for requesting information for reading and writing the file content. |
SELECT
examples
The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource.
- vw_files
- files
SELECT
id,
name,
etag,
extension,
fileName,
file_path,
groupName,
last_modified,
media_type,
projectName,
serviceName,
size,
subscriptionId,
system_data,
type
FROM azure.data_migration.vw_files
WHERE groupName = '{{ groupName }}'
AND projectName = '{{ projectName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.data_migration.files
WHERE groupName = '{{ groupName }}'
AND projectName = '{{ projectName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new files
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.data_migration.files (
fileName,
groupName,
projectName,
serviceName,
subscriptionId,
etag,
properties
)
SELECT
'{{ fileName }}',
'{{ groupName }}',
'{{ projectName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ etag }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: etag
value: string
- name: properties
value:
- name: extension
value: string
- name: filePath
value: string
- name: lastModified
value: string
- name: mediaType
value: string
- name: size
value: integer
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
UPDATE
example
Updates a files
resource.
/*+ update */
UPDATE azure.data_migration.files
SET
etag = '{{ etag }}',
properties = '{{ properties }}'
WHERE
fileName = '{{ fileName }}'
AND groupName = '{{ groupName }}'
AND projectName = '{{ projectName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified files
resource.
/*+ delete */
DELETE FROM azure.data_migration.files
WHERE fileName = '{{ fileName }}'
AND groupName = '{{ groupName }}'
AND projectName = '{{ projectName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';