Skip to main content

files

Creates, updates, deletes, gets or lists a files resource.

Overview

Namefiles
TypeResource
Idazure.data_migration.files

Fields

The following fields are returned by SELECT queries:

A file resource

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
etagstringHTTP strong entity tag value. This is ignored if submitted.
propertiesobjectCustom file properties
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectThe files resource is a nested, proxy-only resource representing a file stored under the project resource. This method retrieves information about a file.
listselectsubscriptionId, groupName, serviceName, projectNameapi-versionThe 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_updateinsertThe PUT method creates a new file or updates an existing one.
updateupdateThis method updates an existing file.
deletedeleteThis method deletes a file.
readexecsubscriptionId, groupName, serviceName, projectName, fileNameapi-versionThis method is used for requesting storage information using which contents of the file can be downloaded.
read_writeexecsubscriptionId, groupName, serviceName, projectName, fileNameapi-versionThis 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.

NameDatatypeDescription
fileNamestringName of the File
groupNamestringName of the resource group
projectNamestringName of the project
serviceNamestringName of the service
subscriptionIdstringSubscription ID that identifies an Azure subscription.
api-versionstringVersion of the API

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

This method deletes a file.

DELETE FROM azure.data_migration.files
;

Lifecycle Methods

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 }}'
;