From f3c63d16d2d974c64c2a3186c249b392fb91454e Mon Sep 17 00:00:00 2001 From: gubalasu Date: Wed, 5 May 2021 01:32:31 -0700 Subject: [PATCH 01/10] Migration swagger --- .../Microsoft.Cdn/stable/2021-06-01/afdx.json | 7 + .../Microsoft.Cdn/stable/2021-06-01/cdn.json | 263 +++++++++++++++++- .../2021-06-01/cdnwebapplicationfirewall.json | 6 + .../examples/Profiles_CanMigrate.json | 19 ++ .../2021-06-01/examples/Profiles_Migrate.json | 22 ++ .../examples/Profiles_MigrationCommit.json | 11 + 6 files changed, 327 insertions(+), 1 deletion(-) create mode 100644 specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_CanMigrate.json create mode 100644 specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Migrate.json create mode 100644 specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_MigrationCommit.json diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json index 25cd230155ce..b1b5a5405999 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json @@ -4183,6 +4183,13 @@ "description": "The host name of the domain. Must be a domain name.", "type": "string" }, + "extendedProperties": { + "description": "Key-Value pair representing migration properties for domains.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "validationProperties": { "description": "Values the customer needs to validate domain ownership", "readOnly": true, diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json index c640247257f4..dc8761401d88 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json @@ -332,6 +332,153 @@ "x-ms-long-running-operation": true } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/canMigrate": { + "post": { + "tags": [ + "Profiles" + ], + "description": "Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile.", + "operationId": "Profiles_CanMigrate", + "x-ms-examples": { + "Profiles_CanMigrate": { + "$ref": "./examples/Profiles_CanMigrate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile which is unique within the resource group.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CanMigrateResult" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrate": { + "post": { + "tags": [ + "Profiles" + ], + "description": "Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this.", + "operationId": "Profiles_Migrate", + "x-ms-examples": { + "Profiles_Create": { + "$ref": "./examples/Profiles_Migrate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile which is unique within the resource group.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "description": "Properties needed to migrate the profile.", + "in": "body", + "name": "migrationParameters", + "required": true, + "schema": { + "$ref": "#/definitions/MigrationParameters" + } + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/MigrateResult" + } + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationCommit": { + "post": { + "tags": [ + "Profiles" + ], + "description": "Commit the migrated Azure Frontdoor(Standard/Premium) profile.", + "operationId": "Profiles_Migrate", + "x-ms-examples": { + "Profiles_Create": { + "$ref": "./examples/Profiles_MigrationCommit.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "profileName", + "in": "path", + "description": "Name of the CDN profile which is unique within the resource group.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "CDN error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri": { "post": { "tags": [ @@ -2465,7 +2612,9 @@ "Creating", "Active", "Deleting", - "Disabled" + "Disabled", + "Migrating", + "Migrated" ], "type": "string", "x-ms-enum": { @@ -2478,6 +2627,16 @@ "description": "Provisioning status of the profile.", "type": "string" }, + "migratedTo": { + "readOnly": true, + "description": "Reference of the Profile this is migrated to.", + "$ref": "#/definitions/ResourceReference" + }, + "migratedFrom": { + "readOnly": true, + "description": "Reference of the Profile this is migrated from.", + "$ref": "#/definitions/ResourceReference" + }, "frontdoorId": { "readOnly": true, "type": "string", @@ -2516,6 +2675,108 @@ }, "x-ms-azure-resource": true }, + "CanMigrateResult": { + "type": "object", + "description": "Result for canMigrate operation.", + "properties": { + "canMigrate": { + "readOnly": true, + "description": "Flag that says if the profile can be migrated", + "type": "boolean" + }, + "defaultSku": { + "readOnly": true, + "description": "Recommended sku for the migration", + "type": "string", + "enum": [ + "Standard_AzureFrontDoor", + "Premium_AzureFrontDoor" + ], + "x-ms-enum": { + "name": "CanMigrateDefaultSku", + "modelAsString": true + } + }, + "errors": { + "readOnly": true, + "description": "List of validation errors", + "$ref": "#/definitions/MigrationErrorsListResponse" + } + }, + "x-ms-azure-resource": true + }, + "MigrationErrorsListResponse": { + "description": "Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "errors":{ + "items": { + "$ref": "#/definitions/MigrationErrorType" + }, + "type": "array" + } + } + }, + "MigrationErrorType": { + "description": "Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "code": { + "description": "Error code.", + "readOnly": true, + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "readOnly": true, + "type": "string" + } + } + }, + "MigrationParameters": { + "type": "object", + "description": "Request body for Migrate operation.", + "properties": { + "Sku": { + "description": "Sku for the migration", + "type": "string", + "enum": [ + "Standard_AzureFrontDoor", + "Premium_AzureFrontDoor" + ], + "x-ms-enum": { + "name": "MigrationSku", + "modelAsString": true + } + } + }, + "x-ms-azure-resource": true + }, + "MigrateResult": { + "type": "object", + "description": "Result for canMigrate operation.", + "properties": { + "MigratedProfileArmResourceId": { + "readOnly": true, + "description": "Arm resource id of the migrated profile", + "$ref": "#/definitions/ResourceReference" + }, + "MigratedWafArmResourceIds": { + "description": "Arm resource ids of the waf resources", + "type": "array", + "items": { + "description": "A reference to a origin.", + "$ref": "#/definitions/ResourceReference" + } + }, + "errors": { + "readOnly": true, + "description": "List of validation errors", + "$ref": "#/definitions/MigrationErrorsListResponse" + } + }, + "x-ms-azure-resource": true + }, "SsoUri": { "description": "The URI required to login to the supplemental portal from the Azure portal.", "type": "object", diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdnwebapplicationfirewall.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdnwebapplicationfirewall.json index 6983ad6cc1ab..b6c29eb06135 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdnwebapplicationfirewall.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdnwebapplicationfirewall.json @@ -396,6 +396,12 @@ "$ref": "#/definitions/CdnEndpoint" } }, + "migratedTo": { + "readOnly": true, + "description": "Reference of the Profile this is migrated to.", + "type": "object", + "$ref": "./cdn.json#/definitions/ResourceReference" + }, "provisioningState": { "readOnly": true, "type": "string", diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_CanMigrate.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_CanMigrate.json new file mode 100644 index 000000000000..59c22c9c00e6 --- /dev/null +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_CanMigrate.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-06-01", + "subscriptionId": "subid", + "resourceGroupName": "RG", + "profileName": "profile1" + }, + "responses": { + "200": { + "body": { + "properties": { + "canMigrate": true, + "defaultSku": "Standard_AzureFrontDoor", + "errors": null + } + } + } + } +} diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Migrate.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Migrate.json new file mode 100644 index 000000000000..ec6baa4493e1 --- /dev/null +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Migrate.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2021-06-01", + "subscriptionId": "subid", + "resourceGroupName": "RG", + "profileName": "profile1", + "properties":{ + "sku": "Standard_AzureFrontDoor" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "MigratedProfileArmResourceId": {"id":"/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/migratedprofile1"}, + "MigratedWafArmResourceIds": null, + "errors": null + } + } + } + } +} diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_MigrationCommit.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_MigrationCommit.json new file mode 100644 index 000000000000..751861823865 --- /dev/null +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_MigrationCommit.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2021-06-01", + "subscriptionId": "subid", + "resourceGroupName": "RG", + "profileName": "profile1" + }, + "responses": { + "200": {} + } +} From 2daa8c564a4369229ba9cb7996c21c9be861a3d6 Mon Sep 17 00:00:00 2001 From: gubalasu Date: Wed, 12 May 2021 17:33:50 -0700 Subject: [PATCH 02/10] More changes --- .../Microsoft.Cdn/stable/2021-06-01/cdn.json | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json index dc8761401d88..16abf372fdd1 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json @@ -375,8 +375,7 @@ "$ref": "#/definitions/ErrorResponse" } } - }, - "x-ms-long-running-operation": true + } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrate": { @@ -419,8 +418,8 @@ } ], "responses": { - "200": { - "description": "OK. The request has succeeded.", + "202": { + "description": "Accepted and the operation will complete asynchronously.", "schema": { "$ref": "#/definitions/MigrateResult" } @@ -466,8 +465,8 @@ } ], "responses": { - "200": { - "description": "OK. The request has succeeded." + "202": { + "description": "Accepted and the operation will complete asynchronously." }, "default": { "description": "CDN error response describing why the operation failed.", @@ -2614,7 +2613,8 @@ "Deleting", "Disabled", "Migrating", - "Migrated" + "Migrated", + "PendingMigrationCommit" ], "type": "string", "x-ms-enum": { @@ -2726,10 +2726,20 @@ "readOnly": true, "type": "string" }, - "message": { + "resourceName": { + "description": "Resource which has the problem.", + "readOnly": true, + "type": "string" + }, + "errorMessage": { "description": "Error message indicating why the operation failed.", "readOnly": true, "type": "string" + }, + "nextSteps": { + "description": "Describes what needs to be done to fix the problem", + "readOnly": true, + "type": "string" } } }, From fc54342a79db0a6b4882a6ca012fe353027104bc Mon Sep 17 00:00:00 2001 From: gubalasu Date: Thu, 13 May 2021 15:47:01 -0700 Subject: [PATCH 03/10] More changes --- .../resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json index 16abf372fdd1..b8241504ed47 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json @@ -440,7 +440,7 @@ "Profiles" ], "description": "Commit the migrated Azure Frontdoor(Standard/Premium) profile.", - "operationId": "Profiles_Migrate", + "operationId": "Profiles_MigrationCommit", "x-ms-examples": { "Profiles_Create": { "$ref": "./examples/Profiles_MigrationCommit.json" From cb444aaa1187bdd497a77ab20cac7a25e06e5eb1 Mon Sep 17 00:00:00 2001 From: gubalasu Date: Mon, 17 May 2021 00:47:13 -0700 Subject: [PATCH 04/10] More changes from review --- .../Microsoft.Cdn/stable/2021-06-01/cdn.json | 19 ++++++++++--------- .../2021-06-01/cdnwebapplicationfirewall.json | 9 +++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json index b8241504ed47..c0095395425a 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json @@ -2627,15 +2627,12 @@ "description": "Provisioning status of the profile.", "type": "string" }, - "migratedTo": { - "readOnly": true, - "description": "Reference of the Profile this is migrated to.", - "$ref": "#/definitions/ResourceReference" - }, - "migratedFrom": { - "readOnly": true, - "description": "Reference of the Profile this is migrated from.", - "$ref": "#/definitions/ResourceReference" + "extendedProperties": { + "description": "Key-Value pair representing additional properties for profiles.", + "type": "object", + "additionalProperties": { + "type": "string" + } }, "frontdoorId": { "readOnly": true, @@ -2758,6 +2755,10 @@ "name": "MigrationSku", "modelAsString": true } + }, + "ProfileName": { + "description": "Name of the new profile that need to be created.", + "type": "string" } }, "x-ms-azure-resource": true diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdnwebapplicationfirewall.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdnwebapplicationfirewall.json index b6c29eb06135..386c0a772e5b 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdnwebapplicationfirewall.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdnwebapplicationfirewall.json @@ -396,11 +396,12 @@ "$ref": "#/definitions/CdnEndpoint" } }, - "migratedTo": { - "readOnly": true, - "description": "Reference of the Profile this is migrated to.", + "extendedProperties": { + "description": "Key-Value pair representing additional properties for Web Application Firewall policy.", "type": "object", - "$ref": "./cdn.json#/definitions/ResourceReference" + "additionalProperties": { + "type": "string" + } }, "provisioningState": { "readOnly": true, From f2d269e801df8fd2a6c1ef34c17b04f4207260ce Mon Sep 17 00:00:00 2001 From: gubalasu Date: Mon, 2 Aug 2021 15:51:44 -0700 Subject: [PATCH 05/10] Updates for migration --- .../resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json index c0095395425a..a9a7806a411a 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json @@ -2614,7 +2614,9 @@ "Disabled", "Migrating", "Migrated", - "PendingMigrationCommit" + "PendingMigrationCommit", + "CommittingMigration", + "AbortingMigration" ], "type": "string", "x-ms-enum": { From 0b7830d6501d3b2c2681c5c6557d0807088b7a37 Mon Sep 17 00:00:00 2001 From: gubalasu Date: Tue, 3 Aug 2021 01:50:44 -0700 Subject: [PATCH 06/10] Add Waf mapping to migration input --- .../Microsoft.Cdn/stable/2021-06-01/cdn.json | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json index a9a7806a411a..38562ba48617 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json @@ -2761,10 +2761,32 @@ "ProfileName": { "description": "Name of the new profile that need to be created.", "type": "string" + }, + "MigrationWafMappings": { + "description": "Waf mapping for the migrated profile", + "type": "array", + "items": { + "description": "List of waf mappings", + "$ref": "#/definitions/MigrationWafMapping" + } } }, "x-ms-azure-resource": true }, + "MigrationWafMapping": { + "description": "Waf mapping", + "type":"object", + "properties": { + "MigratedFrom": { + "description": "Migration From Waf policy", + "$ref": "#/definitions/ResourceReference" + }, + "MigratedTo": { + "description": "Migration to Waf policy", + "$ref": "#/definitions/ResourceReference" + } + } + }, "MigrateResult": { "type": "object", "description": "Result for canMigrate operation.", From 4cb4fa82b32156028e65e86caccadcb99ceb95d8 Mon Sep 17 00:00:00 2001 From: gubalasu Date: Wed, 4 Aug 2021 00:29:56 -0700 Subject: [PATCH 07/10] Remove waf resource ids from migrationresult --- .../Microsoft.Cdn/stable/2021-06-01/cdn.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json index 38562ba48617..338afe065c58 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json @@ -2796,14 +2796,6 @@ "description": "Arm resource id of the migrated profile", "$ref": "#/definitions/ResourceReference" }, - "MigratedWafArmResourceIds": { - "description": "Arm resource ids of the waf resources", - "type": "array", - "items": { - "description": "A reference to a origin.", - "$ref": "#/definitions/ResourceReference" - } - }, "errors": { "readOnly": true, "description": "List of validation errors", From 914446bf193925adaf430e10e5e7a4203109f77e Mon Sep 17 00:00:00 2001 From: gubalasu Date: Wed, 4 Aug 2021 01:40:18 -0700 Subject: [PATCH 08/10] update canmigrate and migrate apis --- .../Microsoft.Cdn/stable/2021-06-01/cdn.json | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json index 338afe065c58..f61b680bae78 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json @@ -332,7 +332,7 @@ "x-ms-long-running-operation": true } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/canMigrate": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate": { "post": { "tags": [ "Profiles" @@ -360,6 +360,15 @@ }, { "$ref": "#/parameters/apiVersionParameter" + }, + { + "description": "Properties needed to check if cdn profile or classic frontdoor can be migrated.", + "in": "body", + "name": "canmigrateParameters", + "required": true, + "schema": { + "$ref": "#/definitions/CanMigrateParameters" + } } ], "responses": { @@ -378,7 +387,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrate": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/migrate": { "post": { "tags": [ "Profiles" @@ -394,13 +403,6 @@ { "$ref": "#/parameters/resourceGroupNameParameter" }, - { - "name": "profileName", - "in": "path", - "description": "Name of the CDN profile which is unique within the resource group.", - "required": true, - "type": "string" - }, { "$ref": "#/parameters/subscriptionIdParameter" }, @@ -2742,6 +2744,17 @@ } } }, + "CanMigrateParameters": { + "type": "object", + "description": "Request body for CanMigrate operation.", + "properties": { + "ClassicResourceReference": { + "description": "Resource reference of the classic cdn profile or classic frontdoor that need to be migrated.", + "$ref": "#/definitions/ResourceReference" + } + }, + "x-ms-azure-resource": true + }, "MigrationParameters": { "type": "object", "description": "Request body for Migrate operation.", From cd264177385640f3a314a7d5be9f7c30716a8622 Mon Sep 17 00:00:00 2001 From: gubalasu Date: Wed, 4 Aug 2021 03:40:37 -0700 Subject: [PATCH 09/10] Remove profile name from can migrate input --- .../Microsoft.Cdn/stable/2021-06-01/cdn.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json index f61b680bae78..43a532e1f121 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json @@ -348,13 +348,6 @@ { "$ref": "#/parameters/resourceGroupNameParameter" }, - { - "name": "profileName", - "in": "path", - "description": "Name of the CDN profile which is unique within the resource group.", - "required": true, - "type": "string" - }, { "$ref": "#/parameters/subscriptionIdParameter" }, From c95f51f65753d4505b30a9c746c475f9d28c3965 Mon Sep 17 00:00:00 2001 From: gubalasu Date: Wed, 4 Aug 2021 14:23:29 -0700 Subject: [PATCH 10/10] Add classic resource reference to the migrate api --- .../resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json index 43a532e1f121..e336d99d4637 100644 --- a/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json +++ b/specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json @@ -2764,6 +2764,10 @@ "modelAsString": true } }, + "ClassicResourceReference": { + "description": "Resource reference of the classic cdn profile or classic frontdoor that need to be migrated.", + "$ref": "#/definitions/ResourceReference" + }, "ProfileName": { "description": "Name of the new profile that need to be created.", "type": "string"