Skip to content

Commit

Permalink
[CDN][2023-05-01] Fix async operation options for migrate related APIs (
Browse files Browse the repository at this point in the history
Azure#24164)

Co-authored-by: yaoshi <yaoshi@microsoft.com>
  • Loading branch information
2 people authored and harryli0108 committed Jul 28, 2023
1 parent 8041857 commit 3b9baa8
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 25 deletions.
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

0 comments on commit 3b9baa8

Please sign in to comment.