Skip to main content

move_collections

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

Overview

Namemove_collections
TypeResource
Idazure.resource_mover.move_collections

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
sourceIdsarrayGets or sets the list of source Ids for which the input resource is required.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_required_forselectresource_group_name, move_collection_name, subscription_id, sourceIdList of the move resources for which an arm resource is required for.
getselectresource_group_name, move_collection_name, subscription_idGets the move collection.
list_move_collections_by_resource_groupselectresource_group_name, subscription_idGet all Move Collections. Get all the Move Collections in the resource group.
list_move_collections_by_subscriptionselectsubscription_idGet all Move Collections. Get all the Move Collections in the subscription.
createinsertresource_group_name, move_collection_name, subscription_idCreates or updates a move collection.
updateupdateresource_group_name, move_collection_name, subscription_idUpdates a move collection.
deletedeleteresource_group_name, move_collection_name, subscription_idDeletes a move collection.
prepareexecresource_group_name, move_collection_name, subscription_id, moveResourcesInitiates prepare for the set of resources included in the request body. The prepare operation is on the moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.
initiate_moveexecresource_group_name, move_collection_name, subscription_id, moveResourcesMoves the set of resources included in the request body. The move operation is triggered after the moveResources are in the moveState 'MovePending' or 'MoveFailed', on a successful completion the moveResource moveState do a transition to CommitPending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.
commitexecresource_group_name, move_collection_name, subscription_id, moveResourcesCommits the set of resources included in the request body. The commit operation is triggered on the moveResources in the moveState 'CommitPending' or 'CommitFailed', on a successful completion the moveResource moveState do a transition to Committed. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.
discardexecresource_group_name, move_collection_name, subscription_id, moveResourcesDiscards the set of resources included in the request body. The discard operation is triggered on the moveResources in the moveState 'CommitPending' or 'DiscardFailed', on a successful completion the moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.
resolve_dependenciesexecresource_group_name, move_collection_name, subscription_idComputes, resolves and validate the dependencies of the moveResources in the move collection.
bulk_removeexecresource_group_name, move_collection_name, subscription_idRemoves the set of move resources included in the request body from move collection. The orchestration is done by service. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.

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
move_collection_namestringRequired.
resource_group_namestringRequired.
sourceIdstringThe sourceId for which the api is invoked. Required.
subscription_idstring

SELECT examples

List of the move resources for which an arm resource is required for.

SELECT
sourceIds
FROM azure.resource_mover.move_collections
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND move_collection_name = '{{ move_collection_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND sourceId = '{{ sourceId }}' -- required
;

INSERT examples

Creates or updates a move collection.

INSERT INTO azure.resource_mover.move_collections (
tags,
location,
identity,
properties,
resource_group_name,
move_collection_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}',
'{{ identity }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ move_collection_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates a move collection.

UPDATE azure.resource_mover.move_collections
SET
tags = '{{ tags }}',
identity = '{{ identity }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND move_collection_name = '{{ move_collection_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a move collection.

DELETE FROM azure.resource_mover.move_collections
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND move_collection_name = '{{ move_collection_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Initiates prepare for the set of resources included in the request body. The prepare operation is on the moveResources that are in the moveState 'PreparePending' or 'PrepareFailed', on a successful completion the moveResource moveState do a transition to MovePending. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.

EXEC azure.resource_mover.move_collections.prepare 
@resource_group_name='{{ resource_group_name }}' --required,
@move_collection_name='{{ move_collection_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"validateOnly": {{ validateOnly }},
"moveResources": "{{ moveResources }}",
"moveResourceInputType": "{{ moveResourceInputType }}"
}'
;