Skip to content

Commit 0f39a2d

Browse files
abhaygill338Abhay PratapKonrad Jamrozik
authored
S360 Item - Missing Get SubscriptionOperations for 2021-10-01 version. (#24395)
* Resolving S320 Item - Missing Get SubscriptionOperations for 2021-10-01 version. * Fix pipeline suggestions. * Minor fix. * Make Get Subscription operations sync in this version. * Added suppress rules for failing lint errors. * Fix suppression Issues. * Minor fix suppression GetOperation200. * Address minor fixes. * Address GetOperation200 changes. * Update readme.md: attempt suppression fix by adding ["202"] to "responses" to path --------- Co-authored-by: Abhay Pratap <[email protected]> Co-authored-by: Konrad Jamrozik <[email protected]>
1 parent 1968865 commit 0f39a2d

File tree

3 files changed

+88
-0
lines changed

3 files changed

+88
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"parameters": {
3+
"operationId": "e4b8d068-f574-462a-a76f-6fa0afc613c9",
4+
"api-version": "2021-10-01"
5+
},
6+
"responses": {
7+
"202": {
8+
"headers": {
9+
"Location": "/providers/Microsoft.Subscription/subscriptionOperations/e4b8d068-f574-462a-a76f-6fa0afc613c9?api-version=2021-10-01",
10+
"Retry-After": 8
11+
}
12+
},
13+
"200": {
14+
"body": {
15+
"subscriptionLink": "/subscriptions/4df8d5c2-1b7e-4dd5-bc61-640704bde633"
16+
}
17+
}
18+
}
19+
}

specification/subscription/resource-manager/Microsoft.Subscription/stable/2021-10-01/subscriptions.json

+61
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,57 @@
118118
}
119119
}
120120
},
121+
"/providers/Microsoft.Subscription/subscriptionOperations/{operationId}": {
122+
"get": {
123+
"description": "Get the status of the pending Microsoft.Subscription API operations.",
124+
"operationId": "SubscriptionOperation_Get",
125+
"x-ms-examples": {
126+
"getPendingSubscriptionOperations": {
127+
"$ref": "./examples/getSubscriptionOperation.json"
128+
}
129+
},
130+
"responses": {
131+
"200": {
132+
"description": "Successful completion of the asynchronous operation",
133+
"schema": {
134+
"$ref": "#/definitions/SubscriptionCreationResult"
135+
}
136+
},
137+
"202": {
138+
"description": "Accepted. Subscription update is in progress.",
139+
"headers": {
140+
"Location": {
141+
"description": "The URL where the status of the asynchronous operation can be checked.",
142+
"type": "string"
143+
},
144+
"Retry-After": {
145+
"description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.",
146+
"type": "integer",
147+
"format": "int64"
148+
}
149+
}
150+
},
151+
"default": {
152+
"description": "Error response describing why the operation failed.",
153+
"schema": {
154+
"$ref": "#/definitions/ErrorResponseBody"
155+
}
156+
}
157+
},
158+
"parameters": [
159+
{
160+
"name": "operationId",
161+
"in": "path",
162+
"description": "The operation ID, which can be found from the Location field in the generate recommendation response header.",
163+
"required": true,
164+
"type": "string"
165+
},
166+
{
167+
"$ref": "#/parameters/apiVersionParameter"
168+
}
169+
]
170+
}
171+
},
121172
"/providers/Microsoft.Subscription/operations": {
122173
"get": {
123174
"description": "Lists all of the available Microsoft.Subscription API operations.",
@@ -573,6 +624,16 @@
573624
}
574625
}
575626
},
627+
"SubscriptionCreationResult": {
628+
"description": "The created subscription object.",
629+
"type": "object",
630+
"properties": {
631+
"subscriptionLink": {
632+
"description": "The link to the new subscription. Use this link to check the status of subscription creation operation.",
633+
"type": "string"
634+
}
635+
}
636+
},
576637
"SubscriptionName": {
577638
"type": "object",
578639
"description": "The new name of the subscription.",

specification/subscription/resource-manager/readme.md

+8
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ To see additional help and options, run:
2323
``` yaml
2424
directive:
2525
- suppress: R2059
26+
- suppress: LroExtension
27+
from: subscriptions.json
28+
where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get
29+
reason: Avoid Lro changes on this api to return 202.
30+
- suppress: GetOperation200
31+
from: subscriptions.json
32+
where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get.responses["202"]
33+
reason: This api will return 200 and 202 response.
2634
```
2735
2836

0 commit comments

Comments
 (0)