Skip to content
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

[CDN][2023-05-01] Fix async operation options for migrate related APIs #24164

Merged
merged 8 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -469,7 +469,7 @@
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
"final-state-via": "location"
}
}
},
Expand Down Expand Up @@ -2880,6 +2880,26 @@
"CanMigrateResult": {
"type": "object",
"description": "Result for canMigrate operation.",
"properties": {
"id": {
"description": "Resource ID.",
"readOnly": true,
"type": "string"
},
"type": {
"description": "Resource type.",
"readOnly": true,
"type": "string"
},
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/CanMigrateProperties"
}
},
"x-ms-azure-resource": true
},
"CanMigrateProperties": {
"type": "object",
"properties": {
"canMigrate": {
"readOnly": true,
Expand Down Expand Up @@ -2907,8 +2927,7 @@
"type": "array",
"x-ms-identifiers": []
}
},
"x-ms-azure-resource": true
}
},
"MigrationErrorType": {
"description": "Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message.",
Expand Down Expand Up @@ -3001,22 +3020,33 @@
"type": "object",
"description": "Result for migrate operation.",
"properties": {
"migratedProfileResourceId": {
"id": {
"description": "Resource ID.",
"readOnly": true,
"description": "Arm resource id of the migrated profile",
"$ref": "#/definitions/ResourceReference"
"type": "string"
},
"errors": {
"items": {
"description": "List of migration errors",
"$ref": "#/definitions/MigrationErrorType"
},
"type": "array",
"x-ms-identifiers": []
"type": {
"description": "Resource type.",
"readOnly": true,
"type": "string"
},
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/MigrateResultProperties"
}
},
"x-ms-azure-resource": true
},
"MigrateResultProperties": {
"type": "object",
"properties": {
"migratedProfileResourceId": {
"readOnly": true,
"description": "Arm resource id of the migrated profile",
"$ref": "#/definitions/ResourceReference"
}
}
},
"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 @@ -13,14 +13,18 @@
"responses": {
"200": {
"body": {
"canMigrate": true,
"defaultSku": "Standard_AzureFrontDoor",
"errors": null
"id": "/subscriptions/subid/resourcegroups/yaoshitest/providers/Microsoft.Cdn/operationresults/operationid/profileresults/DummyProfile/canmigrateresults/DummyProfile",
"type": "Microsoft.Cdn/canmigrate",
"properties": {
"canMigrate": true,
"defaultSku": "Standard_AzureFrontDoor",
"errors": null
}
}
},
"202": {
"headers": {
"azure-asyncoperation": "https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2022-05-01-preview"
"azure-asyncoperation": "https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2023-05-01"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,27 @@
"responses": {
"200": {
"body": {
"migratedProfileResourceId": {
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1"
},
"errors": null
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/operationresults/operationid/profileresults/profile1/migrateresults/profile1",
"type": "Microsoft.Cdn/migrate",
"properties": {
"migratedProfileResourceId": {
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1"
}
}
}
},
"202": {
"headers": {
"azure-asyncoperation": "https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2023-05-01"
},
"body": {
"migratedProfileResourceId": {
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1"
},
"errors": null
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/operationresults/operationid/profileresults/profile1/migrateresults/profile1",
"type": "Microsoft.Cdn/migrate",
"properties": {
"migratedProfileResourceId": {
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1"
}
}
}
}
}
Expand Down