Skip to content

Commit

Permalink
Afd Migration Swagger updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gubalasu committed Apr 20, 2022
1 parent 46642ff commit 52959df
Show file tree
Hide file tree
Showing 6 changed files with 372 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4165,6 +4165,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 @@ -335,6 +335,146 @@
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/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"
},
{
"$ref": "#/parameters/subscriptionIdParameter"
},
{
"$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": {
"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/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_Migrate": {
"$ref": "./examples/Profiles_Migrate.json"
}
},
"parameters": [
{
"$ref": "#/parameters/resourceGroupNameParameter"
},
{
"$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": "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"
}
}
}
}
},
"/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_MigrationCommit": {
"$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 @@ -2482,7 +2622,12 @@
"Creating",
"Active",
"Deleting",
"Disabled"
"Disabled",
"Migrating",
"Migrated",
"PendingMigrationCommit",
"CommittingMigration",
"AbortingMigration"
],
"type": "string",
"x-ms-enum": {
Expand All @@ -2495,6 +2640,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 @@ -2557,6 +2709,154 @@
}
}
},
"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": {
"description": "List of migration errors",
"$ref": "#/definitions/MigrationErrorType"
},
"type": "array",
"x-ms-identifiers": []
}
}
},
"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"
}
}
},
"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.",
"properties": {
"sku": {
"description": "Sku for the migration",
"type": "string",
"enum": [
"Standard_AzureFrontDoor",
"Premium_AzureFrontDoor"
],
"x-ms-enum": {
"name": "MigrationSku",
"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"
},
"migrationWafMappings": {
"description": "Waf mapping for the migrated profile",
"type": "array",
"items": {
"description": "List of waf mappings",
"$ref": "#/definitions/MigrationWafMapping"
},
"x-ms-identifiers": []
}
},
"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"
},
"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 @@ -402,6 +402,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,22 @@
{
"parameters": {
"api-version": "2021-06-01",
"subscriptionId": "subid",
"resourceGroupName": "RG",
"profileName": "profile1",
"canMigrateParameters": {
"classicResourceReference": {
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoors/frontdoorname"
}
}
},
"responses": {
"200": {
"body": {
"canMigrate": true,
"defaultSku": "Standard_AzureFrontDoor",
"errors": null
}
}
}
}
Loading

0 comments on commit 52959df

Please sign in to comment.