Skip to main content

projects

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

Overview

Nameprojects
TypeResource
Idazure.data_migration.projects

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
azureAuthenticationInfoobjectField that defines the Azure active directory application info, used to connect to the target Azure resource.
creationTimestring (date-time)UTC Date and time when project was created.
databasesInfoarrayList of DatabaseInfo.
etagstringHTTP strong entity tag value. This is ignored if submitted.
locationstring:vartype location: str
provisioningStatestringThe project's provisioning state. Known values are: "Deleting" and "Succeeded". (Deleting, Succeeded)
sourceConnectionInfoobjectInformation for connecting to source.
sourcePlatformstringSource platform for the project. Required. Known values are: "SQL", "MySQL", "PostgreSql", "MongoDb", and "Unknown". (SQL, MySQL, PostgreSql, MongoDb, Unknown)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobject:vartype tags: dict[str, str]
targetConnectionInfoobjectInformation for connecting to target.
targetPlatformstringTarget platform for the project. Required. Known values are: "SQLDB", "SQLMI", "AzureDbForMySql", "AzureDbForPostgreSql", "MongoDb", and "Unknown". (SQLDB, SQLMI, AzureDbForMySql, AzureDbForPostgreSql, MongoDb, Unknown)
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
getselectgroup_name, service_name, project_name, subscription_idGet project information. The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project.
listselectgroup_name, service_name, subscription_idGet projects in a service. The project resource is a nested resource representing a stored migration project. This method returns a list of projects owned by a service resource.
create_or_updateinsertgroup_name, service_name, project_name, subscription_idCreate or update project. The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one.
updateupdategroup_name, service_name, project_name, subscription_idUpdate project. The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project.
create_or_updatereplacegroup_name, service_name, project_name, subscription_idCreate or update project. The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one.
deletedeletegroup_name, service_name, project_name, subscription_iddeleteRunningTasksDelete project. The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project.

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
group_namestringName of the resource group. Required.
project_namestringName of the project. Required.
service_namestringName of the service. Required.
subscription_idstring
deleteRunningTasksbooleanDelete the resource even if it contains running tasks. Default value is None.

SELECT examples

Get project information. The project resource is a nested resource representing a stored migration project. The GET method retrieves information about a project.

SELECT
id,
name,
azureAuthenticationInfo,
creationTime,
databasesInfo,
etag,
location,
provisioningState,
sourceConnectionInfo,
sourcePlatform,
systemData,
tags,
targetConnectionInfo,
targetPlatform,
type
FROM azure.data_migration.projects
WHERE group_name = '{{ group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND project_name = '{{ project_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update project. The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one.

INSERT INTO azure.data_migration.projects (
properties,
etag,
location,
tags,
group_name,
service_name,
project_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ etag }}',
'{{ location }}',
'{{ tags }}',
'{{ group_name }}',
'{{ service_name }}',
'{{ project_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update project. The project resource is a nested resource representing a stored migration project. The PATCH method updates an existing project.

UPDATE azure.data_migration.projects
SET
properties = '{{ properties }}',
etag = '{{ etag }}',
location = '{{ location }}',
tags = '{{ tags }}'
WHERE
group_name = '{{ group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND project_name = '{{ project_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create or update project. The project resource is a nested resource representing a stored migration project. The PUT method creates a new project or updates an existing one.

REPLACE azure.data_migration.projects
SET
properties = '{{ properties }}',
etag = '{{ etag }}',
location = '{{ location }}',
tags = '{{ tags }}'
WHERE
group_name = '{{ group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND project_name = '{{ project_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete project. The project resource is a nested resource representing a stored migration project. The DELETE method deletes a project.

DELETE FROM azure.data_migration.projects
WHERE group_name = '{{ group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND project_name = '{{ project_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND deleteRunningTasks = '{{ deleteRunningTasks }}'
;