Share via


Move Resources - Create

Creates or updates a Move Resource in the move collection.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}?api-version=2023-08-01

URI Parameters

Name In Required Type Description
moveCollectionName
path True

string

The Move Collection Name.

moveResourceName
path True

string

The Move Resource Name.

resourceGroupName
path True

string

The Resource Group Name.

subscriptionId
path True

string

The Subscription ID.

api-version
query True

string

Client Api Version.

Request Body

Name Type Description
properties

MoveResourceProperties

Defines the move resource properties.

Responses

Name Type Description
200 OK

MoveResource

OK

202 Accepted

Accepted

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

MoveResources_Create

Sample request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/moveCollections/movecollection1/moveResources/moveresourcename1?api-version=2023-08-01

{
  "properties": {
    "sourceId": "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.Compute/virtualMachines/eastusvm1",
    "dependsOnOverrides": [
      {
        "id": "/subscriptions/c4488a3f-a7f7-4ad4-aa72-0e1f4d9c0756/resourceGroups/eastusRG/providers/Microsoft.Network/networkInterfaces/eastusvm140",
        "targetId": "/subscriptions/c4488a3f-a7f7-4ad4-aa72-0e1f4d9c0756/resourceGroups/westusRG/providers/Microsoft.Network/networkInterfaces/eastusvm140"
      }
    ],
    "resourceSettings": {
      "resourceType": "Microsoft.Compute/virtualMachines",
      "targetResourceName": "westusvm1",
      "targetAvailabilityZone": "2",
      "targetVmSize": null,
      "targetAvailabilitySetId": "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.Compute/availabilitySets/avset1",
      "userManagedIdentities": [
        "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi1"
      ]
    }
  }
}

Sample response

{
  "name": "moveresourcename1",
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1",
  "type": "Microsoft.Migrate/MoveCollections/MoveResources",
  "properties": {
    "sourceId": "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.Compute/virtualMachines/eastusvm1",
    "dependsOn": [
      {
        "id": "/subscriptions/c4488a3f-a7f7-4ad4-aa72-0e1f4d9c0756/resourceGroups/eastusRG/providers/Microsoft.Network/networkInterfaces/eastusvm140",
        "resolutionType": "Automatic",
        "resolutionStatus": "Unresolved"
      }
    ],
    "dependsOnOverrides": [
      {
        "id": "/subscriptions/c4488a3f-a7f7-4ad4-aa72-0e1f4d9c0756/resourceGroups/eastusRG/providers/Microsoft.Network/networkInterfaces/eastusvm140",
        "targetId": "/subscriptions/c4488a3f-a7f7-4ad4-aa72-0e1f4d9c0756/resourceGroups/westusRG/providers/Microsoft.Network/networkInterfaces/eastusvm140"
      }
    ],
    "resourceSettings": {
      "resourceType": "Microsoft.Compute/virtualMachines",
      "targetResourceName": "westusvm1",
      "targetResourceGroupName": "rg1",
      "targetAvailabilityZone": "2",
      "targetVmSize": null,
      "targetAvailabilitySetId": "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.Compute/availabilitySets/avset1",
      "userManagedIdentities": [
        "/subscriptions/subid/resourceGroups/eastusRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/umi1"
      ]
    },
    "provisioningState": "Succeeded"
  },
  "systemData": {
    "createdBy": "user@microsoft.com",
    "createdByType": "User",
    "createdAt": "2021-08-01T15:06:54.2757906Z",
    "lastModifiedBy": "user@microsoft.com",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-08-27T17:16:24.3644126Z"
  }
}
Location: https://some.endpoint.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1?api-version=2022-11-01

Definitions

Name Description
AutomaticResolutionProperties

Defines the properties for automatic resolution.

AvailabilitySetResourceSettings

Gets or sets the availability set resource settings.

CloudError

An error response from the service.

CloudErrorBody

An error response from the service.

createdByType

The type of identity that created the resource.

DependencyType

Defines the dependency type.

DiskEncryptionSetResourceSettings

Defines the disk encryption set resource settings.

Errors

Defines the move resource errors.

JobName

Defines the job name.

JobStatus

Defines the job status.

KeyVaultResourceSettings

Defines the key vault resource settings.

LBBackendAddressPoolResourceSettings

Defines load balancer backend address pool properties.

LBFrontendIPConfigurationResourceSettings

Defines load balancer frontend IP configuration properties.

LoadBalancerBackendAddressPoolReference

Defines reference to load balancer backend address pools.

LoadBalancerNatRuleReference

Defines reference to load balancer NAT rules.

LoadBalancerResourceSettings

Defines the load balancer resource settings.

ManualResolutionProperties

Defines the properties for manual resolution.

MoveResource

Defines the move resource.

MoveResourceDependency

Defines the dependency of the move resource.

MoveResourceDependencyOverride

Defines the dependency override of the move resource.

MoveResourceError

An error response from the azure resource mover service.

MoveResourceErrorBody

An error response from the Azure Migrate service.

MoveResourceProperties

Defines the move resource properties.

MoveState

Defines the MoveResource states.

MoveStatus

Defines the move resource status.

NetworkInterfaceResourceSettings

Defines the network interface resource settings.

NetworkSecurityGroupResourceSettings

Defines the NSG resource settings.

NicIpConfigurationResourceSettings

Defines NIC IP configuration properties.

NsgReference

Defines reference to NSG.

NsgSecurityRule

Security Rule data model for Network Security Groups.

ProvisioningState

Defines the provisioning states.

PublicIPAddressResourceSettings

Defines the public IP address resource settings.

PublicIpReference

Defines reference to a public IP.

ResolutionType

Defines the resolution type.

ResourceGroupResourceSettings

Defines the resource group resource settings.

SqlDatabaseResourceSettings

Defines the Sql Database resource settings.

SqlElasticPoolResourceSettings

Defines the Sql ElasticPool resource settings.

SqlServerResourceSettings

Defines the SQL Server resource settings.

SubnetReference

Defines reference to subnet.

SubnetResourceSettings

Defines the virtual network subnets resource settings.

systemData

Metadata pertaining to creation and last modification of the resource.

TargetAvailabilityZone

Gets or sets the target availability zone.

VirtualMachineResourceSettings

Gets or sets the virtual machine resource settings.

VirtualNetworkResourceSettings

Defines the virtual network resource settings.

ZoneRedundant

Defines the zone redundant resource setting.

AutomaticResolutionProperties

Defines the properties for automatic resolution.

Name Type Description
moveResourceId

string

Gets the MoveResource ARM ID of the dependent resource if the resolution type is Automatic.

AvailabilitySetResourceSettings

Gets or sets the availability set resource settings.

Name Type Description
faultDomain

integer (int32)

minimum: 1

Gets or sets the target fault domain.

resourceType string:

Microsoft.Compute/availabilitySets

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

tags

object

Gets or sets the Resource tags.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

updateDomain

integer (int32)

minimum: 1
maximum: 20

Gets or sets the target update domain.

CloudError

An error response from the service.

Name Type Description
error

CloudErrorBody

Cloud error body.

CloudErrorBody

An error response from the service.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

CloudErrorBody[]

A list of additional details about the error.

message

string

A message describing the error, intended to be suitable for display in a user interface.

target

string

The target of the particular error. For example, the name of the property in error.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

DependencyType

Defines the dependency type.

Value Description
RequiredForPrepare
RequiredForMove

DiskEncryptionSetResourceSettings

Defines the disk encryption set resource settings.

Name Type Description
resourceType string:

Microsoft.Compute/diskEncryptionSets

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

Errors

Defines the move resource errors.

Name Type Description
properties

MoveResourceErrorBody

The move resource error body.

JobName

Defines the job name.

Value Description
InitialSync

JobStatus

Defines the job status.

Name Type Description
jobName

JobName

Defines the job name.

jobProgress

string

Gets or sets the monitoring job percentage.

KeyVaultResourceSettings

Defines the key vault resource settings.

Name Type Description
resourceType string:

Microsoft.KeyVault/vaults

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

LBBackendAddressPoolResourceSettings

Defines load balancer backend address pool properties.

Name Type Description
name

string

Gets or sets the backend address pool name.

LBFrontendIPConfigurationResourceSettings

Defines load balancer frontend IP configuration properties.

Name Type Description
name

string

Gets or sets the frontend IP configuration name.

privateIpAddress

string

Gets or sets the IP address of the Load Balancer.This is only specified if a specific private IP address shall be allocated from the subnet specified in subnetRef.

privateIpAllocationMethod

string

Gets or sets PrivateIP allocation method (Static/Dynamic).

subnet

SubnetReference

Defines reference to subnet.

zones

string

Gets or sets the csv list of zones.

LoadBalancerBackendAddressPoolReference

Defines reference to load balancer backend address pools.

Name Type Description
name

string

Gets the name of the proxy resource on the target side.

sourceArmResourceId

string

Gets the ARM resource ID of the tracked resource being referenced.

LoadBalancerNatRuleReference

Defines reference to load balancer NAT rules.

Name Type Description
name

string

Gets the name of the proxy resource on the target side.

sourceArmResourceId

string

Gets the ARM resource ID of the tracked resource being referenced.

LoadBalancerResourceSettings

Defines the load balancer resource settings.

Name Type Description
backendAddressPools

LBBackendAddressPoolResourceSettings[]

Gets or sets the backend address pools of the load balancer.

frontendIPConfigurations

LBFrontendIPConfigurationResourceSettings[]

Gets or sets the frontend IP configurations of the load balancer.

resourceType string:

Microsoft.Network/loadBalancers

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

sku

string

Gets or sets load balancer sku (Basic/Standard).

tags

object

Gets or sets the Resource tags.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

zones

string

Gets or sets the csv list of zones common for all frontend IP configurations. Note this is given precedence only if frontend IP configurations settings are not present.

ManualResolutionProperties

Defines the properties for manual resolution.

Name Type Description
targetId

string

Gets or sets the target resource ARM ID of the dependent resource if the resource type is Manual.

MoveResource

Defines the move resource.

Name Type Description
id

string

Fully qualified resource Id for the resource.

name

string

The name of the resource

properties

MoveResourceProperties

Defines the move resource properties.

systemData

systemData

Metadata pertaining to creation and last modification of the resource.

type

string

The type of the resource.

MoveResourceDependency

Defines the dependency of the move resource.

Name Type Description
automaticResolution

AutomaticResolutionProperties

Defines the properties for automatic resolution.

dependencyType

DependencyType

Defines the dependency type.

id

string

Gets the source ARM ID of the dependent resource.

isOptional

string

Gets or sets a value indicating whether the dependency is optional.

manualResolution

ManualResolutionProperties

Defines the properties for manual resolution.

resolutionStatus

string

Gets the dependency resolution status.

resolutionType

ResolutionType

Defines the resolution type.

MoveResourceDependencyOverride

Defines the dependency override of the move resource.

Name Type Description
id

string

Gets or sets the ARM ID of the dependent resource.

targetId

string

Gets or sets the resource ARM id of either the MoveResource or the resource ARM ID of the dependent resource.

MoveResourceError

An error response from the azure resource mover service.

Name Type Description
properties

MoveResourceErrorBody

The move resource error body.

MoveResourceErrorBody

An error response from the Azure Migrate service.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

MoveResourceErrorBody[]

A list of additional details about the error.

message

string

A message describing the error, intended to be suitable for display in a user interface.

target

string

The target of the particular error. For example, the name of the property in error.

MoveResourceProperties

Defines the move resource properties.

Name Type Description
dependsOn

MoveResourceDependency[]

Gets or sets the move resource dependencies.

dependsOnOverrides

MoveResourceDependencyOverride[]

Gets or sets the move resource dependencies overrides.

errors

Errors

Defines the move resource errors.

existingTargetId

string

Gets or sets the existing target ARM Id of the resource.

isResolveRequired

boolean

Gets a value indicating whether the resolve action is required over the move collection.

moveStatus

MoveStatus

Defines the move resource status.

provisioningState

ProvisioningState

Defines the provisioning states.

resourceSettings ResourceSettings:

Gets or sets the resource settings.

sourceId

string

Gets or sets the Source ARM Id of the resource.

sourceResourceSettings ResourceSettings:

Gets or sets the source resource settings.

targetId

string

Gets or sets the Target ARM Id of the resource.

MoveState

Defines the MoveResource states.

Value Description
AssignmentPending
PreparePending
PrepareInProgress
PrepareFailed
MovePending
MoveInProgress
MoveFailed
DiscardInProgress
DiscardFailed
CommitPending
CommitInProgress
CommitFailed
Committed
DeleteSourcePending
ResourceMoveCompleted

MoveStatus

Defines the move resource status.

Name Type Description
errors

MoveResourceError

An error response from the azure resource mover service.

jobStatus

JobStatus

Defines the job status.

moveState

MoveState

Defines the MoveResource states.

NetworkInterfaceResourceSettings

Defines the network interface resource settings.

Name Type Description
enableAcceleratedNetworking

boolean

Gets or sets a value indicating whether accelerated networking is enabled.

ipConfigurations

NicIpConfigurationResourceSettings[]

Gets or sets the IP configurations of the NIC.

resourceType string:

Microsoft.Network/networkInterfaces

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

tags

object

Gets or sets the Resource tags.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

NetworkSecurityGroupResourceSettings

Defines the NSG resource settings.

Name Type Description
resourceType string:

Microsoft.Network/networkSecurityGroups

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

securityRules

NsgSecurityRule[]

Gets or sets Security rules of network security group.

tags

object

Gets or sets the Resource tags.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

NicIpConfigurationResourceSettings

Defines NIC IP configuration properties.

Name Type Description
loadBalancerBackendAddressPools

LoadBalancerBackendAddressPoolReference[]

Gets or sets the references of the load balancer backend address pools.

loadBalancerNatRules

LoadBalancerNatRuleReference[]

Gets or sets the references of the load balancer NAT rules.

name

string

Gets or sets the IP configuration name.

primary

boolean

Gets or sets a value indicating whether this IP configuration is the primary.

privateIpAddress

string

Gets or sets the private IP address of the network interface IP Configuration.

privateIpAllocationMethod

string

Gets or sets the private IP address allocation method.

publicIp

PublicIpReference

Defines reference to a public IP.

subnet

SubnetReference

Defines reference to subnet.

NsgReference

Defines reference to NSG.

Name Type Description
sourceArmResourceId

string

Gets the ARM resource ID of the tracked resource being referenced.

NsgSecurityRule

Security Rule data model for Network Security Groups.

Name Type Description
access

string

Gets or sets whether network traffic is allowed or denied. Possible values are “Allow” and “Deny”.

description

string

Gets or sets a description for this rule. Restricted to 140 chars.

destinationAddressPrefix

string

Gets or sets destination address prefix. CIDR or source IP range. A “*” can also be used to match all source IPs. Default tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used.

destinationPortRange

string

Gets or sets Destination Port or Range. Integer or range between 0 and 65535. A “*” can also be used to match all ports.

direction

string

Gets or sets the direction of the rule.InBound or Outbound. The direction specifies if rule will be evaluated on incoming or outgoing traffic.

name

string

Gets or sets the Security rule name.

priority

integer (int32)

Gets or sets the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.

protocol

string

Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*).

sourceAddressPrefix

string

Gets or sets source address prefix. CIDR or source IP range. A “*” can also be used to match all source IPs. Default tags such as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used. If this is an ingress rule, specifies where network traffic originates from.

sourcePortRange

string

Gets or sets Source Port or Range. Integer or range between 0 and 65535. A “*” can also be used to match all ports.

ProvisioningState

Defines the provisioning states.

Value Description
Succeeded
Updating
Creating
Failed

PublicIPAddressResourceSettings

Defines the public IP address resource settings.

Name Type Description
domainNameLabel

string

Gets or sets the domain name label.

fqdn

string

Gets or sets the fully qualified domain name.

publicIpAllocationMethod

string

Gets or sets public IP allocation method.

resourceType string:

Microsoft.Network/publicIPAddresses

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

sku

string

Gets or sets public IP sku.

tags

object

Gets or sets the Resource tags.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

zones

string

Gets or sets public IP zones.

PublicIpReference

Defines reference to a public IP.

Name Type Description
sourceArmResourceId

string

Gets the ARM resource ID of the tracked resource being referenced.

ResolutionType

Defines the resolution type.

Value Description
Manual
Automatic

ResourceGroupResourceSettings

Defines the resource group resource settings.

Name Type Description
resourceType string:

resourceGroups

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

SqlDatabaseResourceSettings

Defines the Sql Database resource settings.

Name Type Description
resourceType string:

Microsoft.Sql/servers/databases

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

tags

object

Gets or sets the Resource tags.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

zoneRedundant

ZoneRedundant

Defines the zone redundant resource setting.

SqlElasticPoolResourceSettings

Defines the Sql ElasticPool resource settings.

Name Type Description
resourceType string:

Microsoft.Sql/servers/elasticPools

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

tags

object

Gets or sets the Resource tags.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

zoneRedundant

ZoneRedundant

Defines the zone redundant resource setting.

SqlServerResourceSettings

Defines the SQL Server resource settings.

Name Type Description
resourceType string:

Microsoft.Sql/servers

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

SubnetReference

Defines reference to subnet.

Name Type Description
name

string

Gets the name of the proxy resource on the target side.

sourceArmResourceId

string

Gets the ARM resource ID of the tracked resource being referenced.

SubnetResourceSettings

Defines the virtual network subnets resource settings.

Name Type Description
addressPrefix

string

Gets or sets address prefix for the subnet.

name

string

Gets or sets the Subnet name.

networkSecurityGroup

NsgReference

Defines reference to NSG.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

TargetAvailabilityZone

Gets or sets the target availability zone.

Value Description
1
2
3
NA

VirtualMachineResourceSettings

Gets or sets the virtual machine resource settings.

Name Type Description
resourceType string:

Microsoft.Compute/virtualMachines

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

tags

object

Gets or sets the Resource tags.

targetAvailabilitySetId

string

Gets or sets the target availability set id for virtual machines not in an availability set at source.

targetAvailabilityZone

TargetAvailabilityZone

Gets or sets the target availability zone.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

targetVmSize

string

Gets or sets the target virtual machine size.

userManagedIdentities

string[]

Gets or sets user-managed identities

VirtualNetworkResourceSettings

Defines the virtual network resource settings.

Name Type Description
addressSpace

string[]

Gets or sets the address prefixes for the virtual network.

dnsServers

string[]

Gets or sets DHCPOptions that contains an array of DNS servers available to VMs deployed in the virtual network.

enableDdosProtection

boolean

Gets or sets a value indicating whether gets or sets whether the DDOS protection should be switched on.

resourceType string:

Microsoft.Network/virtualNetworks

The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

subnets

SubnetResourceSettings[]

Gets or sets List of subnets in a VirtualNetwork.

tags

object

Gets or sets the Resource tags.

targetResourceGroupName

string

Gets or sets the target resource group name.

targetResourceName

string

Gets or sets the target Resource name.

ZoneRedundant

Defines the zone redundant resource setting.

Value Description
Enable
Disable