Move-AzCdnProfileToAFD
Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile.
This step prepares the profile for migration and will be followed by Commit to finalize the migration.
Syntax
MigrateExpanded (Default)
Move-AzCdnProfileToAFD
-ProfileName <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-IdentityType <String>]
[-MigrationEndpointMapping <IMigrationEndpointMapping[]>]
[-SkuName <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Migrate
Move-AzCdnProfileToAFD
-ProfileName <String>
-ResourceGroupName <String>
-MigrationParameter <ICdnMigrationToAfdParameters>
[-SubscriptionId <String>]
[-IdentityType <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
MigrateViaJsonFilePath
Move-AzCdnProfileToAFD
-ProfileName <String>
-ResourceGroupName <String>
-JsonFilePath <String>
[-SubscriptionId <String>]
[-IdentityType <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
MigrateViaJsonString
Move-AzCdnProfileToAFD
-ProfileName <String>
-ResourceGroupName <String>
-JsonString <String>
[-SubscriptionId <String>]
[-IdentityType <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
MigrateViaIdentity
Move-AzCdnProfileToAFD
-InputObject <ICdnIdentity>
-MigrationParameter <ICdnMigrationToAfdParameters>
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
MigrateViaIdentityExpanded
Move-AzCdnProfileToAFD
-InputObject <ICdnIdentity>
[-MigrationEndpointMapping <IMigrationEndpointMapping[]>]
[-SkuName <String>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile.
This step prepares the profile for migration and will be followed by Commit to finalize the migration.
Examples
Example 1: Start a migration
$map1 = New-AzCdnMigrationEndpointMappingObject -MigratedFrom maxtestendpointcli-test-profile1.azureedge.net -MigratedTo maxtestendpointcli-test-profile2
Move-AzCdnProfileToAFD -ProfileName cli-test-profile -ResourceGroupName cli-test-rg -SkuName Premium_AzureFrontDoor -MigrationEndpointMapping @($map1)
Start the initial progress of migration of CDN profile to Azure Front Door.
Migration of endpoint completed.
MigratedProfileResourceId
-------------------------
/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/cli-test-rg/providers/Microsoft.Cdn/profiles/cli-test-profile
Now you can commit the migration to finalize the migration process.
The MigrationEndpointMapping parameter used in situation that users want to migrate an endpoint with and old name to a new endpoint name.
Example 2: Start a migration with managed identity settings.
$map1 = New-AzCdnMigrationEndpointMappingObject -MigratedFrom maxtestendpointcli-test-profile1.azureedge.net -MigratedTo maxtestendpointcli-test-profile2
Move-AzCdnProfileToAFD -ProfileName cli-test-profile -ResourceGroupName cli-test-rg -SkuName Premium_AzureFrontDoor -MigrationEndpointMapping @($map1) -IdentityType "SystemAssigned"
Start the initial progress of migration of CDN profile to Azure Front Door.
Migration of endpoint completed.
Now enabling managed identity.
MigratedProfileResourceId
-------------------------
/subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourceGroups/cli-test-rg/providers/Microsoft.Cdn/profiles/cli-test-profile
ExtendedProperty : {
"Sku": "Premium_AzureFrontDoor"
}
FrontDoorId :
Id : /subscriptions/27cafca8-b9a4-4264-b399-45d0c9cca1ab/resourcegroups/cli-test-rg/providers/Microsoft.Cdn/profiles/cli-test-profile
IdentityPrincipalId : 97fdf684-e1c7-431d-af54-a11c7443707d
IdentityTenantId : 72f988bf-86f1-41af-91ab-2d7cd011db47
IdentityType : SystemAssigned
IdentityUserAssignedIdentity : {
}
Kind : cdn
Location : Global
LogScrubbingRule :
LogScrubbingState :
Name : cli-test-profile
OriginResponseTimeoutSecond :
ProvisioningState : Succeeded
ResourceGroupName : cli-test-rg
ResourceState : Migrating
SkuName : Standard_Microsoft
SystemData : {
}
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Tag : {
}
Type : Microsoft.Cdn/profiles
Now you can commit the migration to finalize the migration process.
The MigrationEndpointMapping parameter used in situation that users want to migrate an endpoint with and old name to a new endpoint name.
Parameters
-AsJob
Run the command as a job
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IdentityType
Azure Subscription ID.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
MigrateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Migrate
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaJsonFilePath
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaJsonString
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
Type: ICdnIdentity
Default value: None
Supports wildcards: False
DontShow: False
MigrateViaIdentity
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaIdentityExpanded
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-JsonFilePath
Path of Json file supplied to the Migrate operation
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
MigrateViaJsonFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-JsonString
Json string supplied to the Migrate operation
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
MigrateViaJsonString
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MigrationEndpointMapping
A name map between classic CDN endpoints and AFD Premium/Standard endpoints.
Parameter properties
Parameter sets
MigrateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaIdentityExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MigrationParameter
Request body for Migrate operation.
Parameter properties
Parameter sets
Migrate
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaIdentity
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-NoWait
Run the command asynchronously
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ProfileName
Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
MigrateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Migrate
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaJsonFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaJsonString
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the resource group.
The name is case insensitive.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
MigrateExpanded
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Migrate
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaJsonFilePath
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaJsonString
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SkuName
Name of the pricing tier.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
MigrateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaIdentityExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
Azure Subscription ID.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
MigrateExpanded
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Migrate
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaJsonFilePath
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
MigrateViaJsonString
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs