diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json index 9d2b4d8db7d7..ffd1ebd12afd 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/billing.json @@ -233,6 +233,67 @@ } } } + }, + "post": { + "tags": [ + "BillingProfiles" + ], + "operationId": "BillingProfiles_Create", + "x-ms-long-running-operation": true, + "description": "The operation to create a BillingProfile.", + "x-ms-examples": { + "CreateBillingProfile": { + "$ref": "./examples/CreateBillingProfile.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BillingProfileCreationParameters" + }, + "description": "Parameters supplied to the Create BillingProfile operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingProfile" + } + }, + "202": { + "description": "Accepted", + "headers": { + "Location": { + "description": "Location URI to poll for result", + "type": "string" + }, + "Retry-After": { + "description": "Recommends the retryable time after receiving this.", + "type": "integer" + }, + "Azure-AsyncOperation": { + "description": "URI to poll for the operation status", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } } }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}": { @@ -4060,6 +4121,34 @@ } } }, + "BillingProfileCreationParameters": { + "description": "The parameters for creating a new billing profile.", + "properties": { + "displayName": { + "description": "The billing profile name.", + "type": "string" + }, + "poNumber": { + "description": "Purchase order number.", + "type": "string" + }, + "address": { + "description": "Billing address.", + "$ref": "#/definitions/Address" + }, + "invoiceEmailOptIn": { + "description": "If the billing profile is opted in to receive invoices via email.", + "type": "boolean" + }, + "enableAzureSKUs": { + "description": "Azure skus to enable for this billing profile..", + "type": "array", + "items": { + "$ref": "#/definitions/EnabledAzureSKUs" + } + } + } + }, "BillingProfileProperties": { "description": "The properties of the billing profile.", "properties": { @@ -4211,8 +4300,7 @@ "properties": { "skuId": { "description": "The sku id.", - "type": "string", - "readOnly": true + "type": "string" }, "skuDescription": { "description": "The sku description.", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CreateBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CreateBillingProfile.json new file mode 100644 index 000000000000..03f7cd3e77a5 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/CreateBillingProfile.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "parameters": { + "displayName": "Finance", + "address": { + "firstName": "Test", + "lastName": "User", + "addressLine1": "1 Microsoft Way", + "city": "Redmond", + "postalCode": "98052", + "region": "WA", + "country": "US" + }, + "enableAzureSKUs": [ + { + "skuId": "0001" + }, + { + "skuId": "0002" + } + ], + "invoiceEmailOptIn": true, + "poNumber": "ABC12345" + } + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/operationResults/ed2975a8-8f77-43bb-a717-ace54326b14b?api-version=2018-07-31", + "Retry-After": "60", + "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/operationStatus/ed2975a8-8f77-43bb-a717-ace54326b14b?api-version=2018-07-31" + } + }, + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/billingProfileId1", + "name": "billingProfileId1", + "type": "Microsoft.Billing/billingProfiles", + "properties": { + "displayName": "Finance", + "address": { + "firstName": "Test", + "lastName": "User", + "addressLine1": "1 Microsoft Way", + "city": "Redmond", + "postalCode": "98052", + "region": "WA", + "country": "US" + }, + "currency": "USD", + "enabledAzureSKUs": [ + { + "skuId": "0001", + "skuDescription": "Microsoft Azure Dev/Test" + }, + { + "skuId": "0002", + "skuDescription": "Microsoft Azure Standard" + } + ], + "isClassic": false, + "invoiceDay": 5, + "invoiceEmailOptIn": true, + "poNumber": "ABC12345" + } + } + } + } +} \ No newline at end of file