files
Creates, updates, deletes, gets or lists a files
resource.
Overview
Name | files |
Type | Resource |
Id | azure.data_migration.files |
Fields
The following fields are returned by SELECT
queries:
- get
- list
A file resource
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | HTTP strong entity tag value. This is ignored if submitted. |
properties | object | Custom file properties |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
List of files
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | HTTP strong entity tag value. This is ignored if submitted. |
properties | object | Custom file properties |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | 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 | subscriptionId , groupName , serviceName , projectName | api-version | 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 | The PUT method creates a new file or updates an existing one. | ||
update | update | This method updates an existing file. | ||
delete | delete | This method deletes a file. | ||
read | exec | subscriptionId , groupName , serviceName , projectName , fileName | api-version | This method is used for requesting storage information using which contents of the file can be downloaded. |
read_write | exec | subscriptionId , groupName , serviceName , projectName , fileName | api-version | This method is used for requesting information for reading and writing the file content. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
fileName | string | Name of the File |
groupName | string | Name of the resource group |
projectName | string | Name of the project |
serviceName | string | Name of the service |
subscriptionId | string | Subscription ID that identifies an Azure subscription. |
api-version | string | Version of the API |
SELECT
examples
- get
- list
The files resource is a nested, proxy-only resource representing a file stored under the project resource. This method retrieves information about a file.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.data_migration.files
;
The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.data_migration.files
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND groupName = '{{ groupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND projectName = '{{ projectName }}' -- required
AND api-version = '{{ api-version }}'
;
INSERT
examples
- create_or_update
- Manifest
The PUT method creates a new file or updates an existing one.
INSERT INTO azure.data_migration.files (
data__etag,
data__properties
)
SELECT
'{{ etag }}',
'{{ properties }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: files
props:
- name: etag
value: string
description: |
HTTP strong entity tag value. This is ignored if submitted.
- name: properties
value: object
description: |
Custom file properties
UPDATE
examples
- update
This method updates an existing file.
UPDATE azure.data_migration.files
SET
data__etag = '{{ etag }}',
data__properties = '{{ properties }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type;
DELETE
examples
- delete
This method deletes a file.
DELETE FROM azure.data_migration.files
;
Lifecycle Methods
- read
- read_write
This method is used for requesting storage information using which contents of the file can be downloaded.
EXEC azure.data_migration.files.read
@subscriptionId='{{ subscriptionId }}' --required,
@groupName='{{ groupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@projectName='{{ projectName }}' --required,
@fileName='{{ fileName }}' --required,
@api-version='{{ api-version }}'
;
This method is used for requesting information for reading and writing the file content.
EXEC azure.data_migration.files.read_write
@subscriptionId='{{ subscriptionId }}' --required,
@groupName='{{ groupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@projectName='{{ projectName }}' --required,
@fileName='{{ fileName }}' --required,
@api-version='{{ api-version }}'
;