Skip to content
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,152 @@
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/canMigrate": {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check if canMigrate is common practice

"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"
}
}
}
}
},
"/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": {
"202": {
"description": "Accepted and the operation will complete asynchronously.",
"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_MigrationCommit",
"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": {
"202": {
"description": "Accepted and the operation will complete asynchronously."
},
"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": [
Expand Down Expand Up @@ -2465,7 +2611,12 @@
"Creating",
"Active",
"Deleting",
"Disabled"
"Disabled",
"Migrating",
"Migrated",
"PendingMigrationCommit",
"CommittingMigration",
"AbortingMigration"
],
"type": "string",
"x-ms-enum": {
Expand All @@ -2478,6 +2629,13 @@
"description": "Provisioning status of the profile.",
"type": "string"
},
"extendedProperties": {
"description": "Key-Value pair representing additional properties for profiles.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"frontdoorId": {
"readOnly": true,
"type": "string",
Expand Down Expand Up @@ -2516,6 +2674,144 @@
},
"x-ms-azure-resource": true
},
"CanMigrateResult": {
"type": "object",
"description": "Result for canMigrate operation.",
"properties": {
"canMigrate": {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use canMigrate as the name of the flag?

"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"
},
"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"
}
}
},
"MigrationParameters": {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Customer should be able to specify name

"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
}
},
"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.",
"properties": {
"MigratedProfileArmResourceId": {
"readOnly": true,
"description": "Arm resource id of the migrated profile",
"$ref": "#/definitions/ResourceReference"
},
"MigratedWafArmResourceIds": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this MigratedWafArmResourceIds for MigrationResult per our discussion.

"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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,13 @@
"$ref": "#/definitions/CdnEndpoint"
}
},
"extendedProperties": {
"description": "Key-Value pair representing additional properties for Web Application Firewall policy.",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"provisioningState": {
"readOnly": true,
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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
}
}
}
}
}
Loading