forked from Azure/azure-rest-api-specs
-
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
Draft
gubalasu
wants to merge
10
commits into
cdn-swagger-2021-06-01
Choose a base branch
from
gubalasu/migration-swagger-2021-06-01
base: cdn-swagger-2021-06-01
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f3c63d1
Migration swagger
gubalasu 2daa8c5
More changes
gubalasu fc54342
More changes
gubalasu cb444aa
More changes from review
gubalasu f2d269e
Updates for migration
gubalasu 0b7830d
Add Waf mapping to migration input
gubalasu 4cb4fa8
Remove waf resource ids from migrationresult
gubalasu 914446b
update canmigrate and migrate apis
gubalasu cd26417
Remove profile name from can migrate input
gubalasu c95f51f
Add classic resource reference to the migrate api
gubalasu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -332,6 +332,147 @@ | |
"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_Create": { | ||
"$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": { | ||
"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 +2606,12 @@ | |
"Creating", | ||
"Active", | ||
"Deleting", | ||
"Disabled" | ||
"Disabled", | ||
"Migrating", | ||
"Migrated", | ||
"PendingMigrationCommit", | ||
"CommittingMigration", | ||
"AbortingMigration" | ||
], | ||
"type": "string", | ||
"x-ms-enum": { | ||
|
@@ -2478,6 +2624,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 +2669,151 @@ | |
}, | ||
"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" | ||
}, | ||
"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": { | ||
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 | ||
} | ||
}, | ||
"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-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", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...on/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_CanMigrate.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...ation/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Migrate.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can we use canMigrate as the name of the flag?