You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cost-management-billing/manage/programmatically-create-subscription-microsoft-customer-agreement.md
# Programmatically create Azure subscriptions for a Microsoft Customer Agreement with the latest APIs
15
15
16
-
This article helps you programmatically create Azure subscriptions for a Microsoft Customer Agreement using the most recent API versions. If you are still using the older preview version, see [Programmatically create Azure subscriptions with legacy APIs](programmatically-create-subscription-preview.md).
16
+
This article helps you programmatically create Azure subscriptions for a Microsoft Customer Agreement using the most recent API versions. If you're still using the older preview version, see [Programmatically create Azure subscriptions with legacy APIs](programmatically-create-subscription-preview.md).
17
17
18
18
In this article, you learn how to create subscriptions programmatically using Azure Resource Manager.
19
19
@@ -77,7 +77,7 @@ Use the `displayName` property to identify the billing account for which you wan
77
77
```azurepowershell
78
78
Get-AzBillingAccount
79
79
```
80
-
You will get back a list of all billing accounts that you have access to
80
+
You'll get back a list of all billing accounts that you have access to
81
81
82
82
```json
83
83
Name : 5e98e158-xxxx-xxxx-xxxx-xxxxxxxxxxxx:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxx-xx-xx
@@ -95,7 +95,7 @@ Use the `displayName` property to identify the billing account for which you wan
95
95
```azurecli
96
96
az billing account list
97
97
```
98
-
You will get back a list of all billing accounts that you have access to
98
+
You'll get back a list of all billing accounts that you have access to.
99
99
100
100
```json
101
101
[
@@ -120,7 +120,7 @@ You will get back a list of all billing accounts that you have access to
120
120
]
121
121
```
122
122
123
-
Use the `displayName` property to identify the billing account for which you want to create subscriptions. Ensure, the agreementType of the account is *MicrosoftCustomerAgreement*. Copy the `name` of the account. For example, to create a subscription for the `Contoso` billing account, copy `5e98e158-xxxx-xxxx-xxxx-xxxxxxxxxxxx:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxx-xx-xx`. Paste the value somewhere so that you can use it in the next step.
123
+
Use the `displayName` property to identify the billing account for which you want to create subscriptions. Ensure, the agreementType of the account is *MicrosoftCustomerAgreement*. Copy the `name` of the account. For example, to create a subscription for the `Contoso` billing account, copy `5e98e158-xxxx-xxxx-xxxx-xxxxxxxxxxxx:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxx-xx-xx`. Paste the value somewhere so that you can use it in the next step.
124
124
125
125
---
126
126
@@ -218,7 +218,7 @@ Use the `id` property to identify the invoice section for which you want to crea
You will get the list of billing profiles under this account as part of the response.
221
+
You'll get the list of billing profiles under this account as part of the response.
222
222
223
223
```json
224
224
Name : AW4F-xxxx-xxx-xxx
@@ -240,28 +240,28 @@ Country : US
240
240
PostalCode : 98052
241
241
```
242
242
243
-
Note the `name` of the billing profile from the above response. The next step is to get the invoice section that you have access to underneath this billing profile. You will need the `name` of the billing account and billing profile
243
+
Note the `name` of the billing profile from the above response. The next step is to get the invoice section that you have access to underneath this billing profile. You'll need the `name` of the billing account and billing profile.
The `name` above is the Invoice section name you need to create a subscription under. Construct your billing scope using the format `/providers/Microsoft.Billing/billingAccounts/<BillingAccountName>/billingProfiles/<BillingProfileName>/invoiceSections/<InvoiceSectionName>`. In this example, this value will equate to `"/providers/Microsoft.Billing/billingAccounts/5e98e158-xxxx-xxxx-xxxx-xxxxxxxxxxxx:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxx-xx-xx/billingProfiles/AW4F-xxxx-xxx-xxx/invoiceSections/SH3V-xxxx-xxx-xxx"`.
256
+
The `name` above is the Invoice section name you need to create a subscription under. Construct your billing scope using the format `/providers/Microsoft.Billing/billingAccounts/<BillingAccountName>/billingProfiles/<BillingProfileName>/invoiceSections/<InvoiceSectionName>`. In this example, this value equates to `"/providers/Microsoft.Billing/billingAccounts/5e98e158-xxxx-xxxx-xxxx-xxxxxxxxxxxx:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxx-xx-xx/billingProfiles/AW4F-xxxx-xxx-xxx/invoiceSections/SH3V-xxxx-xxx-xxx"`.
257
257
258
258
### [Azure CLI](#tab/azure-cli)
259
259
260
260
```azurecli
261
261
az billing profile list --account-name "5e98e158-xxxx-xxxx-xxxx-xxxxxxxxxxxx:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_xxxx-xx-xx" --expand "InvoiceSections"
262
262
```
263
263
264
-
This API will return the list of billing profiles and invoice sections under the provided billing account.
264
+
This API returns the list of billing profiles and invoice sections under the provided billing account.
265
265
266
266
```json
267
267
[
@@ -336,7 +336,7 @@ The following example creates a subscription named *Dev Team subscription* for t
336
336
### [REST](#tab/rest)
337
337
338
338
```json
339
-
PUT https://management.azure.com/providers/Microsoft.Subscription/aliases/sampleAlias?api-version=2021-10-01
339
+
PUT https://management.azure.com/providers/Microsoft.Subscription/aliases/{{guid}}?api-version=2021-10-01
0 commit comments