Skip to main content

files

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

Overview

Namefiles
TypeResource
Idazure.data_migration.files

Fields

NameDatatypeDescription
idtextResource ID.
nametextResource name.
etagtextHTTP strong entity tag value. This is ignored if submitted.
extensiontextfield from the properties object
fileNametextfield from the properties object
file_pathtextfield from the properties object
groupNametextfield from the properties object
last_modifiedtextfield from the properties object
media_typetextfield from the properties object
projectNametextfield from the properties object
serviceNametextfield from the properties object
sizetextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
typetextResource type.

Methods

NameAccessible byRequired ParamsDescription
getSELECTfileName, groupName, projectName, serviceName, subscriptionIdThe files resource is a nested, proxy-only resource representing a file stored under the project resource. This method retrieves information about a file.
listSELECTgroupName, projectName, serviceName, subscriptionIdThe 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_updateINSERTfileName, groupName, projectName, serviceName, subscriptionIdThe PUT method creates a new file or updates an existing one.
deleteDELETEfileName, groupName, projectName, serviceName, subscriptionIdThis method deletes a file.
updateUPDATEfileName, groupName, projectName, serviceName, subscriptionIdThis method updates an existing file.
readEXECfileName, groupName, projectName, serviceName, subscriptionIdThis method is used for requesting storage information using which contents of the file can be downloaded.
read_writeEXECfileName, groupName, projectName, serviceName, subscriptionIdThis 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.

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

INSERT example

Use the following StackQL query and manifest file to create a new files resource.

/*+ create */
INSERT INTO azure.data_migration.files (
fileName,
groupName,
projectName,
serviceName,
subscriptionId,
etag,
properties
)
SELECT
'{{ fileName }}',
'{{ groupName }}',
'{{ projectName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ etag }}',
'{{ properties }}'
;

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