database_migrations_mongo_to_cosmos_db_ru_mongo
Creates, updates, deletes, gets or lists a database_migrations_mongo_to_cosmos_db_ru_mongo resource.
Overview
| Name | database_migrations_mongo_to_cosmos_db_ru_mongo |
| Type | Resource |
| Id | azure.data_migration.database_migrations_mongo_to_cosmos_db_ru_mongo |
Fields
The following fields are returned by SELECT queries:
- get
- get_for_scope
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
collectionList | array | List of Mongo Collections to be migrated. |
endedOn | string (date-time) | Database migration end time. |
kind | string | Required. MongoToCosmosDbMongo. |
migrationFailureError | object | Error details in case of migration failure. |
migrationOperationId | string | ID for current migration operation. |
migrationService | string | Resource Id of the Migration Service. |
migrationStatus | string | Migration status. |
provisioningError | string | Error message for migration provisioning failure, if any. |
provisioningState | string | Provisioning State of migration. ProvisioningState as Succeeded implies that validations have been performed and migration has started. Known values are: "Provisioning", "Updating", "Succeeded", "Failed", and "Canceled". (Provisioning, Updating, Succeeded, Failed, Canceled) |
scope | string | Resource Id of the target resource. |
sourceMongoConnection | object | Source Mongo connection details. |
startedOn | string (date-time) | Database migration start time. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetMongoConnection | object | Target Cosmos DB Mongo connection details. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
collectionList | array | List of Mongo Collections to be migrated. |
endedOn | string (date-time) | Database migration end time. |
kind | string | Required. MongoToCosmosDbMongo. |
migrationFailureError | object | Error details in case of migration failure. |
migrationOperationId | string | ID for current migration operation. |
migrationService | string | Resource Id of the Migration Service. |
migrationStatus | string | Migration status. |
provisioningError | string | Error message for migration provisioning failure, if any. |
provisioningState | string | Provisioning State of migration. ProvisioningState as Succeeded implies that validations have been performed and migration has started. Known values are: "Provisioning", "Updating", "Succeeded", "Failed", and "Canceled". (Provisioning, Updating, Succeeded, Failed, Canceled) |
scope | string | Resource Id of the target resource. |
sourceMongoConnection | object | Source Mongo connection details. |
startedOn | string (date-time) | Database migration start time. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetMongoConnection | object | Target Cosmos DB Mongo connection details. |
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 | resource_group_name, target_resource_name, migration_name, subscription_id | Get Database Migration resource. | |
get_for_scope | select | resource_group_name, target_resource_name, subscription_id | Get Database Migration resources for the scope. | |
create | insert | resource_group_name, target_resource_name, migration_name, subscription_id | Create or Update Database Migration resource. | |
delete | delete | resource_group_name, target_resource_name, migration_name, subscription_id | force | Delete Database Migration resource. |
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 |
|---|---|---|
migration_name | string | Name of the migration. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
target_resource_name | string | The name of the target resource/account. Required. |
force | boolean | Optional force delete boolean. If this is provided as true, migration will be deleted even if active. Default value is None. |
SELECT examples
- get
- get_for_scope
Get Database Migration resource.
SELECT
id,
name,
collectionList,
endedOn,
kind,
migrationFailureError,
migrationOperationId,
migrationService,
migrationStatus,
provisioningError,
provisioningState,
scope,
sourceMongoConnection,
startedOn,
systemData,
targetMongoConnection,
type
FROM azure.data_migration.database_migrations_mongo_to_cosmos_db_ru_mongo
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND target_resource_name = '{{ target_resource_name }}' -- required
AND migration_name = '{{ migration_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get Database Migration resources for the scope.
SELECT
id,
name,
collectionList,
endedOn,
kind,
migrationFailureError,
migrationOperationId,
migrationService,
migrationStatus,
provisioningError,
provisioningState,
scope,
sourceMongoConnection,
startedOn,
systemData,
targetMongoConnection,
type
FROM azure.data_migration.database_migrations_mongo_to_cosmos_db_ru_mongo
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND target_resource_name = '{{ target_resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Create or Update Database Migration resource.
INSERT INTO azure.data_migration.database_migrations_mongo_to_cosmos_db_ru_mongo (
properties,
resource_group_name,
target_resource_name,
migration_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ target_resource_name }}',
'{{ migration_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: database_migrations_mongo_to_cosmos_db_ru_mongo
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the database_migrations_mongo_to_cosmos_db_ru_mongo resource.
- name: target_resource_name
value: "{{ target_resource_name }}"
description: Required parameter for the database_migrations_mongo_to_cosmos_db_ru_mongo resource.
- name: migration_name
value: "{{ migration_name }}"
description: Required parameter for the database_migrations_mongo_to_cosmos_db_ru_mongo resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the database_migrations_mongo_to_cosmos_db_ru_mongo resource.
- name: properties
description: |
Database Migration Resource properties for CosmosDb for Mongo.
value:
kind: "{{ kind }}"
scope: "{{ scope }}"
provisioningState: "{{ provisioningState }}"
migrationStatus: "{{ migrationStatus }}"
startedOn: "{{ startedOn }}"
endedOn: "{{ endedOn }}"
migrationService: "{{ migrationService }}"
migrationOperationId: "{{ migrationOperationId }}"
migrationFailureError:
code: "{{ code }}"
message: "{{ message }}"
provisioningError: "{{ provisioningError }}"
sourceMongoConnection:
host: "{{ host }}"
port: {{ port }}
userName: "{{ userName }}"
password: "{{ password }}"
useSsl: {{ useSsl }}
connectionString: "{{ connectionString }}"
targetMongoConnection:
host: "{{ host }}"
port: {{ port }}
userName: "{{ userName }}"
password: "{{ password }}"
useSsl: {{ useSsl }}
connectionString: "{{ connectionString }}"
collectionList:
- sourceDatabase: "{{ sourceDatabase }}"
sourceCollection: "{{ sourceCollection }}"
targetDatabase: "{{ targetDatabase }}"
targetCollection: "{{ targetCollection }}"
migrationProgressDetails:
migrationStatus: "{{ migrationStatus }}"
migrationError: "{{ migrationError }}"
sourceDocumentCount: {{ sourceDocumentCount }}
processedDocumentCount: {{ processedDocumentCount }}
durationInSeconds: {{ durationInSeconds }}
DELETE examples
- delete
Delete Database Migration resource.
DELETE FROM azure.data_migration.database_migrations_mongo_to_cosmos_db_ru_mongo
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND target_resource_name = '{{ target_resource_name }}' --required
AND migration_name = '{{ migration_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND force = '{{ force }}'
;