diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptOwnershipStatus.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptOwnershipStatus.json new file mode 100644 index 000000000000..cdfe7b865093 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptOwnershipStatus.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "acceptOwnershipState": "Pending", + "provisioningState": "Accepted", + "billingOwner": "abc@test.com", + "subscriptionTenantId": "6c541ca7-1cab-4ea0-adde-6305e1d534e2", + "displayName": "Test Subscription", + "tags": { + "tag1": "TagValue1" + } + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptSubscriptionOwnership.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptSubscriptionOwnership.json new file mode 100644 index 000000000000..27cf0eb1731d --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptSubscriptionOwnership.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "subscriptionId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "api-version": "2024-08-01-preview", + "body": { + "properties": { + "displayName": "Test Subscription", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Subscription/subscriptionOperations/ODdmYTU0MDktODc5YS00ZTEzLTg2MWItNTQ4ZjYxNzBlOTQw?api-version=2021-10-01", + "Retry-After": 8 + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json new file mode 100644 index 000000000000..57c38e41ba67 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/acceptTargetDirectory.json @@ -0,0 +1,9 @@ +{ + "parameters": { + "subscriptionId": "6c3c85bc-5366-4eaa-8055-a10529eafd03", + "api-version": "2024-08-01-preview" + }, + "responses": { + "204": {} + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/cancelSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/cancelSubscription.json new file mode 100644 index 000000000000..e8bab156f3e3 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/cancelSubscription.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad" + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/changeTenantPolicy.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/changeTenantPolicy.json new file mode 100644 index 000000000000..94be325d52dd --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/changeTenantPolicy.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2024-08-01-preview", + "body": { + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] + } + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Subscription/policies/default", + "name": "default", + "type": "providers/Microsoft.Subscription/policies", + "properties": { + "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] + } + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/createAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/createAlias.json new file mode 100644 index 000000000000..8d2366f88cd8 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/createAlias.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "aliasName": "dummyalias", + "api-version": "2024-08-01-preview", + "body": { + "properties": { + "displayName": "Test Subscription", + "workload": "Production", + "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", + "subscriptionId": null, + "additionalProperties": { + "managementGroupId": null, + "subscriptionTenantId": "66f6e4d6-07dc-4aea-94ea-e12d3026a3c8", + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", + "displayName": "Test Subscription", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", + "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", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + } + }, + "201": { + "body": { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", + "displayName": "Test Subscription", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", + "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", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteAlias.json new file mode 100644 index 000000000000..3fa3f70a91bd --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/deleteAlias.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "aliasName": "dummyalias", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/enableSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/enableSubscription.json new file mode 100644 index 000000000000..5bc4403336c0 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/enableSubscription.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "7948bcee-488c-47ce-941c-38e20ede803d", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "subscriptionId": "7948bcee-488c-47ce-941c-38e20ede803d" + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getAlias.json new file mode 100644 index 000000000000..14c330cf2f4d --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getAlias.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "aliasName": "dummyalias", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", + "displayName": "Test Subscription", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", + "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", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getBillingAccountPolicy.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getBillingAccountPolicy.json new file mode 100644 index 000000000000..c48102dc2d82 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getBillingAccountPolicy.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "billingAccountId": "testBillingAccountId", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Subscription/Policies/policyForBillingAccount", + "name": "testBillingAccountId", + "type": "Microsoft.Subscription/policies", + "properties": { + "serviceTenants": [ + { + "tenantName": "testServiceTenant", + "tenantId": "b8ed2088-c458-4e77-bd61-9e048d96a1c0" + } + ], + "allowTransfers": true + } + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getOperations.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getOperations.json new file mode 100644 index 000000000000..aa3c6fda7d66 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getOperations.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Subscription/createOperation/action", + "display": { + "provider": "Microsoft Subscription", + "resource": "Resources", + "operation": "Create a subscription" + } + } + ] + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getSubscriptionOperation.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getSubscriptionOperation.json new file mode 100644 index 000000000000..2fa777c2e51c --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getSubscriptionOperation.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "operationId": "e4b8d068-f574-462a-a76f-6fa0afc613c9", + "api-version": "2024-08-01-preview" + }, + "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" + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json new file mode 100644 index 000000000000..69dade87bcbf --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTargetDirectory.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "subscriptionId": "ebe4f8fd-d8b3-4867-bcf4-b2407edd196d", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/ebe4f8fd-d8b3-4867-bcf4-b2407edd196d/providers/Microsoft.Subscription/changeTenantRequest/default", + "name": "default", + "type": "Microsoft.Subscription/changeTenantRequest", + "properties": { + "destinationTenantId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cb", + "destinationOwnerId": "45ffe2da-b7a4-460f-9e4c-51afd47b94cc", + "status": "Initiated", + "expiresOn": "2024-07-19T17:57:40.0278346Z" + } + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicy.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicy.json new file mode 100644 index 000000000000..893a3d9292a8 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicy.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "providers/Microsoft.Subscription/policies/default", + "name": "default", + "type": "providers/Microsoft.Subscription/policies", + "properties": { + "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] + } + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicyList.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicyList.json new file mode 100644 index 000000000000..98092ff15dbc --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/getTenantPolicyList.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Subscription/policies/default", + "name": "default", + "type": "providers/Microsoft.Subscription/policies", + "properties": { + "policyId": "291bba3f-e0a5-47bc-a099-3bdcb2a50a05", + "blockSubscriptionsLeavingTenant": true, + "blockSubscriptionsIntoTenant": true, + "exemptedPrincipals": [ + "e879cf0f-2b4d-5431-109a-f72fc9868693", + "9792da87-c97b-410d-a97d-27021ba09ce6" + ] + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listAlias.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listAlias.json new file mode 100644 index 000000000000..c4c557fdef9c --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/listAlias.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "e2283d0f-acad-4904-b803-627dd74cc072", + "displayName": "Test Subscription", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/e2283d0f-acad-4904-b803-627dd74cc072/acceptOwnership", + "acceptOwnershipState": "Pending", + "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", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi", + "tag2": "Ronaldo", + "tag3": "Lebron" + } + } + }, + { + "id": "string", + "name": "string", + "type": "string", + "properties": { + "subscriptionId": "091c6e56-a835-4422-a082-0427308ca9ee", + "displayName": "Test Subscription 2", + "provisioningState": "Accepted", + "acceptOwnershipUrl": "/providers/Microsoft.Subscription/091c6e56-a835-4422-a082-0427308ca9ee/acceptOwnership", + "acceptOwnershipState": "Pending", + "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", + "workload": "Production", + "resellerId": null, + "subscriptionOwnerId": "f09b39eb-c496-482c-9ab9-afd799572f4c", + "managementGroupId": null, + "tags": { + "tag1": "Messi2", + "tag2": "Ronaldo2", + "tag3": "Lebron2" + } + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json new file mode 100644 index 000000000000..367bd34aed03 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/putTargetDirectory.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "ecce7b25-862b-44a2-9e21-a1baa50618eb", + "api-version": "2024-08-01-preview", + "body": { + "properties": { + "destinationOwnerId": "abhaypratap@live.com", + "destinationTenantId": "111a82eb-4c7b-48bb-962b-49363c510130" + } + } + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/ecce7b25-862b-44a2-9e21-a1baa50618eb/providers/Microsoft.Subscription/changeTenantRequest/default", + "name": "default", + "type": "Microsoft.Subscription/changeTenantRequest", + "properties": { + "destinationTenantId": "111a82eb-4c7b-48bb-962b-49363c510130", + "destinationOwnerId": "abhaypratap@live.com", + "status": "Initiated", + "expiresOn": "2024-07-19T17:57:40.0278346Z" + } + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/renameSubscription.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/renameSubscription.json new file mode 100644 index 000000000000..016012b95947 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/renameSubscription.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad", + "api-version": "2024-08-01-preview", + "body": { + "subscriptionName": "Test Sub" + } + }, + "responses": { + "200": { + "body": { + "subscriptionId": "83aa47df-e3e9-49ff-877b-94304bf3d3ad" + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json new file mode 100644 index 000000000000..de1f6c01ef19 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/examples/targetDirectoryStatus.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "e1084a54-27ab-4b72-a3ba-89fac9548f49", + "api-version": "2024-08-01-preview" + }, + "responses": { + "200": { + "body": { + "status": "Completed" + } + } + } +} diff --git a/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json new file mode 100644 index 000000000000..f5a54e5dfd76 --- /dev/null +++ b/specification/subscription/resource-manager/Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json @@ -0,0 +1,1364 @@ +{ + "swagger": "2.0", + "info": { + "version": "2024-08-01-preview", + "title": "SubscriptionClient", + "description": "Subscription client provides an interface to create and manage Azure subscriptions programmatically." + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel": { + "post": { + "operationId": "Subscription_Cancel", + "x-ms-examples": { + "cancelSubscription": { + "$ref": "./examples/cancelSubscription.json" + } + }, + "description": "The operation to cancel a subscription", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/CanceledSubscriptionId" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename": { + "post": { + "operationId": "Subscription_Rename", + "x-ms-examples": { + "renameSubscription": { + "$ref": "./examples/renameSubscription.json" + } + }, + "description": "The operation to rename a subscription", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/subscriptionNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/RenamedSubscriptionId" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/enable": { + "post": { + "operationId": "Subscription_Enable", + "x-ms-examples": { + "enableSubscription": { + "$ref": "./examples/enableSubscription.json" + } + }, + "description": "The operation to enable a subscription", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/EnabledSubscriptionId" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/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": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "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.", + "operationId": "Operations_List", + "x-ms-examples": { + "getOperations": { + "$ref": "./examples/getOperations.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Subscription/aliases/{aliasName}": { + "put": { + "description": "Create Alias Subscription.", + "operationId": "Alias_Create", + "x-ms-examples": { + "CreateAlias": { + "$ref": "./examples/createAlias.json" + } + }, + "x-ms-long-running-operation": true, + "responses": { + "200": { + "description": "Normal response for a successful query.", + "schema": { + "$ref": "#/definitions/SubscriptionAliasResponse" + } + }, + "201": { + "description": "Accepted. Subscription creation is in progress.", + "schema": { + "$ref": "#/definitions/SubscriptionAliasResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/aliasNameParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PutAliasRequest" + } + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] + }, + "get": { + "description": "Get Alias Subscription.", + "operationId": "Alias_Get", + "x-ms-examples": { + "GetAlias": { + "$ref": "./examples/getAlias.json" + } + }, + "responses": { + "200": { + "description": "Subscription details.", + "schema": { + "$ref": "#/definitions/SubscriptionAliasResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/aliasNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] + }, + "delete": { + "description": "Delete Alias.", + "operationId": "Alias_Delete", + "x-ms-examples": { + "DeleteAlias": { + "$ref": "./examples/deleteAlias.json" + } + }, + "responses": { + "200": { + "description": "Deleted the alias" + }, + "204": { + "description": "Alias does not exist" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/aliasNameParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] + } + }, + "/providers/Microsoft.Subscription/aliases": { + "get": { + "description": "List Alias Subscription.", + "operationId": "Alias_List", + "x-ms-examples": { + "ListAlias": { + "$ref": "./examples/listAlias.json" + } + }, + "responses": { + "200": { + "description": "Subscription details.", + "schema": { + "$ref": "#/definitions/SubscriptionAliasListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnership": { + "post": { + "description": "Accept subscription ownership.", + "operationId": "Subscription_AcceptOwnership", + "x-ms-examples": { + "AcceptOwnership": { + "$ref": "./examples/acceptSubscriptionOwnership.json" + } + }, + "x-ms-long-running-operation": true, + "responses": { + "202": { + "description": "Accept Subscription ownership is in progress", + "headers": { + "Location": { + "description": "GET this URL to retrieve the status of the asynchronous operation.", + "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": "int32" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AcceptOwnershipRequest" + } + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] + } + }, + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnershipStatus": { + "get": { + "description": "Accept subscription ownership status.", + "operationId": "Subscription_AcceptOwnershipStatus", + "x-ms-examples": { + "AcceptOwnershipStatus": { + "$ref": "./examples/acceptOwnershipStatus.json" + } + }, + "responses": { + "200": { + "description": "Subscription details.", + "schema": { + "$ref": "#/definitions/AcceptOwnershipStatusResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] + } + }, + "/providers/Microsoft.Subscription/policies/default": { + "put": { + "description": "Create or Update Subscription tenant policy for user's tenant.", + "operationId": "SubscriptionPolicy_AddUpdatePolicyForTenant", + "x-ms-examples": { + "TenantPolicy": { + "$ref": "./examples/changeTenantPolicy.json" + } + }, + "responses": { + "200": { + "description": "Subscription tenant policy has been successfully created/updated.", + "schema": { + "$ref": "#/definitions/GetTenantPolicyResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PutTenantPolicyRequestProperties" + } + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] + }, + "get": { + "description": "Get the subscription tenant policy for the user's tenant.", + "operationId": "SubscriptionPolicy_GetPolicyForTenant", + "x-ms-examples": { + "getTenantPolicy": { + "$ref": "./examples/getTenantPolicy.json" + } + }, + "responses": { + "200": { + "description": "Subscription tenant policy details for user's tenant.", + "schema": { + "$ref": "#/definitions/GetTenantPolicyResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ] + } + }, + "/providers/Microsoft.Subscription/policies": { + "get": { + "description": "Get the subscription tenant policy for the user's tenant.", + "operationId": "SubscriptionPolicy_ListPolicyForTenant", + "x-ms-examples": { + "getTenantPolicyList": { + "$ref": "./examples/getTenantPolicyList.json" + } + }, + "responses": { + "200": { + "description": "Subscription tenant policy details for user's tenant.", + "schema": { + "$ref": "#/definitions/GetTenantPolicyListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ] + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Subscription/policies/default": { + "get": { + "description": "Get Billing Account Policy.", + "operationId": "BillingAccount_GetPolicy", + "x-ms-examples": { + "GetBillingAccountPolicy": { + "$ref": "./examples/getBillingAccountPolicy.json" + } + }, + "responses": { + "200": { + "description": "Normal response for a successful query.", + "schema": { + "$ref": "#/definitions/BillingAccountPoliciesResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "parameters": [ + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ] + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/changeTenantRequest/default": { + "put": { + "operationId": "Subscriptions_PutTargetDirectory", + "x-ms-examples": { + "putTargetDirectory": { + "$ref": "./examples/putTargetDirectory.json" + } + }, + "description": "The operation to initiate Subscription Changed Request", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/targetDirectoryRequestParameters" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TargetDirectoryResult" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "get": { + "operationId": "Subscriptions_GetTargetDirectory", + "x-ms-examples": { + "getTargetDirectory": { + "$ref": "./examples/getTargetDirectory.json" + } + }, + "description": "The operation to view Initiator Subscription Changed Request", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TargetDirectoryResult" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptChangeTenant": { + "post": { + "operationId": "Subscriptions_AcceptTargetDirectory", + "x-ms-examples": { + "acceptTargetDirectory": { + "$ref": "./examples/acceptTargetDirectory.json" + } + }, + "description": "The operation to accept Subscription Changed Request", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Subscription Accepted properly with No Content." + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/changeTenantStatus": { + "post": { + "operationId": "Subscriptions_TargetDirectoryStatus", + "x-ms-examples": { + "targetDirectoryStatus": { + "$ref": "./examples/targetDirectoryStatus.json" + } + }, + "description": "The operation for Acceptor to view the accepted request", + "parameters": [ + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/TargetDirectoryStatusResult" + } + }, + "default": { + "description": "Describes the error if the operation is not successful.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "CanceledSubscriptionId": { + "description": "The ID of the canceled subscription", + "type": "object", + "properties": { + "subscriptionId": { + "description": "The ID of the canceled subscription", + "type": "string", + "readOnly": true + } + } + }, + "RenamedSubscriptionId": { + "description": "The ID of the subscriptions that is being renamed", + "type": "object", + "properties": { + "subscriptionId": { + "description": "The ID of the subscriptions that is being renamed", + "type": "string", + "readOnly": true + } + } + }, + "EnabledSubscriptionId": { + "description": "The ID of the subscriptions that is being enabled", + "type": "object", + "properties": { + "subscriptionId": { + "description": "The ID of the subscriptions that is being enabled", + "type": "string", + "readOnly": true + } + } + }, + "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.", + "properties": { + "subscriptionName": { + "type": "string", + "description": "New subscription name" + } + } + }, + "PutAliasRequest": { + "description": "The parameters required to create a new subscription.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/PutAliasRequestProperties", + "description": "Put alias request properties." + } + } + }, + "PutAliasRequestProperties": { + "description": "Put subscription properties.", + "type": "object", + "properties": { + "displayName": { + "description": "The friendly name of the subscription.", + "type": "string" + }, + "workload": { + "$ref": "#/definitions/Workload" + }, + "billingScope": { + "$ref": "#/definitions/BillingScope" + }, + "subscriptionId": { + "description": "This parameter can be used to create alias for existing subscription Id", + "type": "string" + }, + "resellerId": { + "description": "Reseller Id", + "type": "string" + }, + "additionalProperties": { + "$ref": "#/definitions/PutAliasRequestAdditionalProperties", + "description": "Put alias request additional properties." + } + } + }, + "PutAliasRequestAdditionalProperties": { + "description": "Put subscription additional properties.", + "type": "object", + "properties": { + "managementGroupId": { + "description": "Management group Id for the subscription.", + "type": "string" + }, + "subscriptionTenantId": { + "description": "Tenant Id of the subscription", + "type": "string" + }, + "subscriptionOwnerId": { + "description": "Owner Id of the subscription", + "type": "string" + }, + "tags": { + "description": "Tags for the subscription", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "SubscriptionAliasResponse": { + "description": "Subscription Information with the alias.", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified ID for the alias resource.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Alias ID.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Resource type, Microsoft.Subscription/aliases.", + "readOnly": true, + "type": "string" + }, + "properties": { + "$ref": "#/definitions/SubscriptionAliasResponseProperties", + "description": "Subscription Alias response properties." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "SubscriptionAliasResponseProperties": { + "description": "Put subscription creation result properties.", + "type": "object", + "properties": { + "subscriptionId": { + "description": "Newly created subscription Id.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "The display name of the subscription.", + "type": "string" + }, + "provisioningState": { + "type": "string", + "description": "The provisioning state of the resource.", + "readOnly": true, + "enum": [ + "Accepted", + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "acceptOwnershipUrl": { + "description": "Url to accept ownership of the subscription.", + "type": "string", + "readOnly": true + }, + "acceptOwnershipState": { + "$ref": "#/definitions/AcceptOwnershipState" + }, + "billingScope": { + "$ref": "#/definitions/BillingScope" + }, + "workload": { + "$ref": "#/definitions/Workload" + }, + "resellerId": { + "description": "Reseller Id", + "type": "string" + }, + "subscriptionOwnerId": { + "description": "Owner Id of the subscription", + "type": "string" + }, + "managementGroupId": { + "description": "The Management Group Id.", + "type": "string" + }, + "createdTime": { + "description": "Created Time", + "type": "string" + }, + "tags": { + "description": "Tags for the subscription", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "SubscriptionAliasListResult": { + "description": "The list of aliases.", + "type": "object", + "properties": { + "value": { + "description": "The list of alias.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SubscriptionAliasResponse" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "AcceptOwnershipRequest": { + "description": "The parameters required to accept subscription ownership.", + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/AcceptOwnershipRequestProperties", + "description": "Accept subscription ownership request properties." + } + } + }, + "AcceptOwnershipRequestProperties": { + "description": "Accept subscription ownership request properties.", + "type": "object", + "required": [ + "displayName" + ], + "properties": { + "displayName": { + "description": "The friendly name of the subscription.", + "type": "string" + }, + "managementGroupId": { + "description": "Management group Id for the subscription.", + "type": "string" + }, + "tags": { + "description": "Tags for the subscription", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "AcceptOwnershipStatusResponse": { + "description": "Subscription Accept Ownership Response", + "type": "object", + "properties": { + "subscriptionId": { + "description": "Newly created subscription Id.", + "readOnly": true, + "type": "string" + }, + "acceptOwnershipState": { + "$ref": "#/definitions/AcceptOwnershipState" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState" + }, + "billingOwner": { + "description": "UPN of the billing owner", + "readOnly": true, + "type": "string" + }, + "subscriptionTenantId": { + "description": "Tenant Id of the subscription", + "type": "string" + }, + "displayName": { + "description": "The display name of the subscription.", + "type": "string" + }, + "tags": { + "description": "Tags for the subscription", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "PutTenantPolicyRequestProperties": { + "description": "Put tenant policy request properties.", + "type": "object", + "properties": { + "blockSubscriptionsLeavingTenant": { + "description": "Blocks the leaving of subscriptions from user's tenant.", + "type": "boolean" + }, + "blockSubscriptionsIntoTenant": { + "description": "Blocks the entering of subscriptions into user's tenant.", + "type": "boolean" + }, + "exemptedPrincipals": { + "description": "List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant.", + "type": "array", + "items": { + "format": "uuid", + "type": "string", + "example": "00000000-0000-0000-0000-000000000000" + } + } + } + }, + "GetTenantPolicyResponse": { + "description": "Tenant policy Information.", + "type": "object", + "properties": { + "id": { + "description": "Policy Id.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Policy name.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Resource type.", + "readOnly": true, + "type": "string" + }, + "properties": { + "$ref": "#/definitions/TenantPolicy", + "description": "Tenant policy properties." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "GetTenantPolicyListResponse": { + "description": "Tenant policy information list.", + "type": "object", + "properties": { + "value": { + "description": "The list of tenant policies.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/GetTenantPolicyResponse" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "BillingAccountPoliciesResponse": { + "description": "Billing account policies information.", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified ID for the policy.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Policy name.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Resource type.", + "readOnly": true, + "type": "string" + }, + "properties": { + "$ref": "#/definitions/BillingAccountPoliciesResponseProperties", + "description": "Billing account policies response properties." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "BillingAccountPoliciesResponseProperties": { + "description": "Put billing account policies response properties.", + "type": "object", + "properties": { + "serviceTenants": { + "description": "Service tenant for the billing account.", + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ServiceTenantResponse", + "description": "Billing account service tenant." + } + }, + "allowTransfers": { + "description": "Determine if the transfers are allowed for the billing account", + "type": "boolean" + } + } + }, + "TenantPolicy": { + "description": "Tenant policy.", + "type": "object", + "properties": { + "policyId": { + "description": "Policy Id.", + "type": "string", + "readOnly": true + }, + "blockSubscriptionsLeavingTenant": { + "description": "Blocks the leaving of subscriptions from user's tenant.", + "type": "boolean" + }, + "blockSubscriptionsIntoTenant": { + "description": "Blocks the entering of subscriptions into user's tenant.", + "type": "boolean" + }, + "exemptedPrincipals": { + "description": "List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant.", + "type": "array", + "items": { + "format": "uuid", + "type": "string", + "example": "00000000-0000-0000-0000-000000000000" + } + } + } + }, + "Workload": { + "description": "The workload type of the subscription. It can be either Production or DevTest.", + "type": "string", + "x-ms-enum": { + "name": "workload", + "modelAsString": true + }, + "enum": [ + "Production", + "DevTest" + ] + }, + "BillingScope": { + "description": "Billing scope of the subscription.\nFor CustomerLed and FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}\nFor PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName}\nFor Legacy EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}", + "type": "string" + }, + "AcceptOwnershipState": { + "readOnly": true, + "type": "string", + "description": "The accept ownership state of the resource.", + "enum": [ + "Pending", + "Completed", + "Expired" + ], + "x-ms-enum": { + "name": "AcceptOwnership", + "modelAsString": true + } + }, + "ProvisioningState": { + "readOnly": true, + "type": "string", + "description": "The provisioning state of the resource.", + "enum": [ + "Pending", + "Accepted", + "Succeeded" + ], + "x-ms-enum": { + "name": "Provisioning", + "modelAsString": true + } + }, + "ServiceTenantResponse": { + "description": "Billing account service tenant.", + "type": "object", + "properties": { + "tenantId": { + "description": "Service tenant id.", + "type": "string" + }, + "tenantName": { + "description": "Service tenant name.", + "type": "string" + } + } + }, + "TargetDirectoryRequest": { + "type": "object", + "description": "Subscription Request for Changed Target Directory.", + "properties": { + "properties": { + "$ref": "#/definitions/TargetDirectoryRequestProperties", + "description": "Target Directory request properties." + } + } + }, + "TargetDirectoryRequestProperties": { + "type": "object", + "description": "Properties of subscription Request for Changed Target Directory.", + "properties": { + "destinationOwnerId": { + "description": "The destination OwnerId, can be object id or email address", + "type": "string" + }, + "destinationTenantId": { + "description": "The destination Tenant id where subscription needs to be accepted", + "type": "string" + } + } + }, + "TargetDirectoryStatusResult": { + "type": "object", + "description": "Subscription Status for accepted request.", + "properties": { + "status": { + "description": "Subscription Status", + "type": "string" + } + } + }, + "TargetDirectoryResult": { + "type": "object", + "x-ms-azure-resource": true, + "description": "Subscription Response for Changed Target Directory.", + "properties": { + "id": { + "description": "Fully qualified ID for the Subscription Changed Directory resource.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Subscription Name.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Resource type, Microsoft.Subscription/changeTenantRequest.", + "readOnly": true, + "type": "string" + }, + "properties": { + "$ref": "#/definitions/TargetDirectoryResultProperties", + "description": "Subscription Changed Target Directory response properties." + } + } + }, + "TargetDirectoryResultProperties": { + "type": "object", + "description": "Properties of subscription Response for Changed Target Directory.", + "properties": { + "destinationTenantId": { + "description": "Destination Tenant Id where Subscription will be accepted.", + "readOnly": true, + "type": "string" + }, + "destinationOwnerId": { + "description": "Destination Owner Id where Subscription will be accepted.", + "readOnly": true, + "type": "string" + }, + "status": { + "description": "Subscription Status.", + "readOnly": true, + "type": "string" + }, + "expiresOn": { + "description": "Subscription Initiate Request Expiry time", + "readOnly": true, + "type": "string", + "format": "date-time" + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "x-ms-parameter-location": "method", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request. Current version is 2024-08-01-preview" + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription Id." + }, + "subscriptionNameParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Subscription Name", + "schema": { + "$ref": "#/definitions/SubscriptionName" + } + }, + "aliasNameParameter": { + "name": "aliasName", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "AliasName is the name for the subscription creation request. Note that this is not the same as subscription name and this doesn’t have any other lifecycle need beyond the request for subscription creation." + }, + "billingAccountIdParameter": { + "name": "billingAccountId", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "Billing Account Id." + }, + "targetDirectoryRequestParameters": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Target Directory Request", + "schema": { + "$ref": "#/definitions/TargetDirectoryRequest" + } + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + } +} diff --git a/specification/subscription/resource-manager/readme.md b/specification/subscription/resource-manager/readme.md index 3d1df3b12eea..87bb8863fa8a 100644 --- a/specification/subscription/resource-manager/readme.md +++ b/specification/subscription/resource-manager/readme.md @@ -23,6 +23,13 @@ To see additional help and options, run: ``` yaml directive: - suppress: R2059 + - suppress: PutResponseCodes + from: subscriptions.json + where: $.paths["/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/changeTenantRequest/default"].put + reason: Not supposed to return 201 as the response code for the below API since existing api with new version change, got exceptions from ARM reviewer. + - suppress: PutRequestResponseSchemeArm + from: subscriptions.json + reason: The models designed in new version of this existing api in which put request, need not be same in response, but creating workitem - "https://msazure.visualstudio.com/One/_workitems/edit/29042001", to take this item in future ref for next set of changes. - suppress: LroExtension from: subscriptions.json where: $.paths["/providers/Microsoft.Subscription/subscriptionOperations/{operationId}"].get @@ -42,6 +49,17 @@ openapi-type: arm tag: package-2021-10 ``` +### Tag: package-2024-08-preview + +These settings apply only when `--tag=package-2024-08-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2024-08-preview' +input-file: +- Microsoft.Subscription/preview/2024-08-01-preview/subscriptions.json +title: Initiate, Get and Accept Subscription Changed Directory +description: Initiate, Get and Accept Subscription Changed Directory +``` + ### Tag: package-2021-10 These settings apply only when `--tag=package-2021-10` is specified on the command line.