Skip to content

Commit c833e51

Browse files
OchirkhuyagOchi
authored andcommitted
A new API version 2021-10-01 on MS.Subscription (Azure#16687)
* Copied the last item from private repo and renamed to 2021-10-01 * Updated the version to 2021-10-01 * Error response is updated. It is required by OpenAPI Validation Tools(linter) * http status response on post method is updated to 201 from 202; required by OpenAPI Validation Tools(linter) * description is added in #definitions.Operation.properties.display; required by OpenAPI Validation Tools(linter) * updated error response to match it previous * systemData properties are added; required by Swagger validation on the PR * updated readme.md for the new version * removed a file getSubscriptionOperation.json as long as it is not referenced; required by Swagger Avocado on the PR * Modified style by npm prettier * executed npm run prettier; required by prettier check on PR * added type:object; required by swagger LintDiff * added type:object; required by swagger LintDiff * reverted back the post response of acceptOwnership to 202 * http status response on post method is updated to 201 from 202; required by OpenAPI Validation Tools(linter) * reverted back the post response of acceptOwnership to 202 Co-authored-by: Ochi <ochisamand@microsoft.com>
1 parent a877b65 commit c833e51

16 files changed

+1536
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05",
4+
"api-version": "2021-10-01"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05",
10+
"acceptOwnershipState": "Pending",
11+
"billingOwner": "abc@test.com",
12+
"subscriptionTenantId": "6c541ca7-1cab-4ea0-adde-6305e1d534e2",
13+
"displayName": "Test Subscription",
14+
"tags": {
15+
"tag1": "TagValue1"
16+
}
17+
}
18+
}
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05",
4+
"api-version": "2021-10-01",
5+
"body": {
6+
"properties": {
7+
"displayName": "Test Subscription",
8+
"managementGroupId": null,
9+
"tags": {
10+
"tag1": "Messi",
11+
"tag2": "Ronaldo",
12+
"tag3": "Lebron"
13+
}
14+
}
15+
}
16+
},
17+
"responses": {
18+
"202": {
19+
"headers": {
20+
"Location": "https://management.azure.com/providers/Microsoft.Subscription/subscriptionOperations/ODdmYTU0MDktODc5YS00ZTEzLTg2MWItNTQ4ZjYxNzBlOTQw?api-version=2021-10-01",
21+
"Retry-After": 8
22+
}
23+
}
24+
}
25+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad",
4+
"api-version": "2021-10-01"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": "83aa47df-e3e9-49ff-877b-94304bf3d3ad"
10+
}
11+
}
12+
}
13+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01",
4+
"body": {
5+
"blockSubscriptionsLeavingTenant": true,
6+
"blockSubscriptionsIntoTenant": true,
7+
"exemptedPrincipals": [
8+
"e879cf0f-2b4d-5431-109a-f72fc9868693",
9+
"9792da87-c97b-410d-a97d-27021ba09ce6"
10+
]
11+
}
12+
},
13+
"responses": {
14+
"201": {
15+
"body": {
16+
"id": "providers/Microsoft.Subscription/policies/default",
17+
"name": "default",
18+
"type": "providers/Microsoft.Subscription/policies",
19+
"properties": {
20+
"policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05",
21+
"blockSubscriptionsLeavingTenant": true,
22+
"blockSubscriptionsIntoTenant": true,
23+
"exemptedPrincipals": [
24+
"e879cf0f-2b4d-5431-109a-f72fc9868693",
25+
"9792da87-c97b-410d-a97d-27021ba09ce6"
26+
]
27+
}
28+
}
29+
}
30+
}
31+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"parameters": {
3+
"aliasName": "aliasForNewSub",
4+
"api-version": "2021-10-01",
5+
"body": {
6+
"properties": {
7+
"displayName": "Test Subscription",
8+
"workload": "Production",
9+
"billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH",
10+
"subscriptionId": null,
11+
"additionalProperties": {
12+
"managementGroupId": null,
13+
"subscriptionTenantId": "66f6e4d6-07dc-4aea-94ea-e12d3026a3c8",
14+
"subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c",
15+
"tags": {
16+
"tag1": "Messi",
17+
"tag2": "Ronaldo",
18+
"tag3": "Lebron"
19+
}
20+
}
21+
}
22+
}
23+
},
24+
"responses": {
25+
"200": {
26+
"body": {
27+
"id": "string",
28+
"name": "string",
29+
"type": "string",
30+
"properties": {
31+
"subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072",
32+
"displayName": "Test Subscription",
33+
"provisioningState": "Accepted",
34+
"acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership",
35+
"acceptOwnershipState": "Pending",
36+
"billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH",
37+
"workload": "Production",
38+
"resellerId": null,
39+
"subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c",
40+
"managementGroupId": null,
41+
"tags": {
42+
"tag1": "Messi",
43+
"tag2": "Ronaldo",
44+
"tag3": "Lebron"
45+
}
46+
}
47+
}
48+
},
49+
"201": {
50+
"body": {
51+
"id": "string",
52+
"name": "string",
53+
"type": "string",
54+
"properties": {
55+
"subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072",
56+
"displayName": "Test Subscription",
57+
"provisioningState": "Accepted",
58+
"acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership",
59+
"acceptOwnershipState": "Pending",
60+
"billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH",
61+
"workload": "Production",
62+
"resellerId": null,
63+
"subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c",
64+
"managementGroupId": null,
65+
"tags": {
66+
"tag1": "Messi",
67+
"tag2": "Ronaldo",
68+
"tag3": "Lebron"
69+
}
70+
}
71+
}
72+
}
73+
}
74+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"parameters": {
3+
"aliasName": "aliasForNewSub",
4+
"api-version": "2021-10-01"
5+
},
6+
"responses": {
7+
"200": {},
8+
"204": {}
9+
}
10+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "7948bcee-488c-47ce-941c-38e20ede803d",
4+
"api-version": "2021-10-01"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": "7948bcee-488c-47ce-941c-38e20ede803d"
10+
}
11+
}
12+
}
13+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"parameters": {
3+
"aliasName": "aliasForNewSub",
4+
"api-version": "2021-10-01"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"id": "string",
10+
"name": "string",
11+
"type": "string",
12+
"properties": {
13+
"subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072",
14+
"displayName": "Test Subscription",
15+
"provisioningState": "Accepted",
16+
"acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership",
17+
"acceptOwnershipState": "Pending",
18+
"billingScope": "/billingAccounts/af6231a7-7f8d-4fcc-a993-dd8466108d07:c663dac6-a9a5-405a-8938-cd903e12ab5b_2019_05_31/billingProfiles/QWDQ-QWHI-AUW-SJDO-DJH/invoiceSections/FEUF-EUHE-ISJ-SKDW-DJH",
19+
"workload": "Production",
20+
"resellerId": null,
21+
"subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c",
22+
"managementGroupId": null,
23+
"tags": {
24+
"tag1": "Messi",
25+
"tag2": "Ronaldo",
26+
"tag3": "Lebron"
27+
}
28+
}
29+
}
30+
}
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"parameters": {
3+
"billingAccountId": "testBillingAccountId",
4+
"api-version": "2021-10-01"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"id": "/providers/Microsoft.Subscription/Policies/policyForBillingAccount",
10+
"name": "testBillingAccountId",
11+
"type": "Microsoft.Subscription/policies",
12+
"properties": {
13+
"serviceTenants": [
14+
{
15+
"tenantName": "testServiceTenant",
16+
"tenantId": "b8ed2088-c458-4e77-bd61-9e048d96a1c0"
17+
}
18+
],
19+
"allowTransfers": true
20+
}
21+
}
22+
}
23+
}
24+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-10-01"
4+
},
5+
"responses": {
6+
"200": {
7+
"body": {
8+
"value": [
9+
{
10+
"name": "Microsoft.Subscription/createOperation/action",
11+
"isDataAction": false,
12+
"display": {
13+
"provider": "Microsoft Subscription",
14+
"resource": "Resources",
15+
"operation": "Create a subscription"
16+
}
17+
}
18+
]
19+
}
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)