Skip to content
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
@@ -0,0 +1,19 @@
{
"parameters": {
"operationId": "e4b8d068-f574-462a-a76f-6fa0afc613c9",
"api-version": "2021-10-01"
},
"responses": {
"202": {
"headers": {
"Location": "/providers/Microsoft.Subscription/subscriptionOperations/e4b8d068-f574-462a-a76f-6fa0afc613c9?api-version=2021-10-01",
"Retry-After": 8
}
},
"200": {
"body": {
"subscriptionLink": "/subscriptions/4df8d5c2-1b7e-4dd5-bc61-640704bde633"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,57 @@
}
}
},
"/providers/Microsoft.Subscription/subscriptionOperations/{operationId}": {
"get": {
"description": "Get the status of the pending Microsoft.Subscription API operations.",
"operationId": "SubscriptionOperation_Get",
"x-ms-examples": {
"getPendingSubscriptionOperations": {
"$ref": "./examples/getSubscriptionOperation.json"
}
},
"responses": {
"200": {
"description": "Successful completion of the asynchronous operation",
"schema": {
"$ref": "#/definitions/SubscriptionCreationResult"
}
},
"202": {
"description": "Accepted. Subscription update is in progress.",
"headers": {
"Location": {
"description": "The URL where the status of the asynchronous operation can be checked.",
"type": "string"
},
"Retry-After": {
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
"type": "integer",
"format": "int64"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ErrorResponseBody"
}
}
},
"parameters": [
{
"name": "operationId",
"in": "path",
"description": "The operation ID, which can be found from the Location field in the generate recommendation response header.",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/apiVersionParameter"
}
]
}
},
"/providers/Microsoft.Subscription/operations": {
"get": {
"description": "Lists all of the available Microsoft.Subscription API operations.",
Expand Down Expand Up @@ -573,6 +624,16 @@
}
}
},
"SubscriptionCreationResult": {
"description": "The created subscription object.",
"type": "object",
"properties": {
"subscriptionLink": {
"description": "The link to the new subscription. Use this link to check the status of subscription creation operation.",
"type": "string"
}
}
},
"SubscriptionName": {
"type": "object",
"description": "The new name of the subscription.",
Expand Down
8 changes: 8 additions & 0 deletions specification/subscription/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ To see additional help and options, run:
``` yaml
directive:
- suppress: R2059
- suppress: LroExtension
from: subscriptions.json
where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get
reason: Avoid Lro changes on this api to return 202.
- suppress: GetOperation200
from: subscriptions.json
where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get.responses["202"]
reason: This api will return 200 and 202 response.
```


Expand Down