-
Notifications
You must be signed in to change notification settings - Fork 2
Gubalasu/migration swagger 2021 06 01 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: cdn-swagger-2021-06-01
Are you sure you want to change the base?
Changes from 6 commits
f3c63d1
2daa8c5
fc54342
cb444aa
f2d269e
0b7830d
4cb4fa8
914446b
cd26417
c95f51f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -332,6 +332,152 @@ | |
"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" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/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": [ | ||
|
@@ -2465,7 +2611,12 @@ | |
"Creating", | ||
"Active", | ||
"Deleting", | ||
"Disabled" | ||
"Disabled", | ||
"Migrating", | ||
"Migrated", | ||
"PendingMigrationCommit", | ||
"CommittingMigration", | ||
"AbortingMigration" | ||
], | ||
"type": "string", | ||
"x-ms-enum": { | ||
|
@@ -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", | ||
|
@@ -2516,6 +2674,144 @@ | |
}, | ||
"x-ms-azure-resource": true | ||
}, | ||
"CanMigrateResult": { | ||
"type": "object", | ||
"description": "Result for canMigrate operation.", | ||
"properties": { | ||
"canMigrate": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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", | ||
|
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 | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
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