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..1c1896e22cdc 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 @@ -106,6 +106,56 @@ } } } + }, + "patch": { + "tags": [ + "BillingAccounts" + ], + "operationId": "BillingAccounts_Update", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "description": "The operation to update a billing account.", + "x-ms-examples": { + "UpdateBillingAccount": { + "$ref": "./examples/UpdateBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BillingAccountUpdateProperties" + }, + "description": "Parameters supplied to the update billing account operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/BillingAccount" + } + }, + "202": { + "description": "Accepted. Billing account update is in progress." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } } }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/availableBalance/default": { @@ -3743,6 +3793,16 @@ } } }, + "BillingAccountUpdateProperties": { + "description": "The properties of the billing account that can be updated.", + "properties": { + "properties": { + "description": "A billing property.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/BillingAccountProperties" + } + } + }, "BillingProperty": { "description": "A billing property resource.", "type": "object", diff --git a/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/UpdateBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/UpdateBillingAccount.json new file mode 100644 index 000000000000..693af0eb8693 --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/preview/2018-11-01-preview/examples/UpdateBillingAccount.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2018-11-01-preview", + "billingAccountName": "{billingAccountName}", + "parameters": { + "properties": { + "address": { + "companyName": "Contoso", + "firstName": "Test", + "lastName": "User", + "addressLine1": "1 Microsoft Way", + "city": "Redmond", + "postalCode": "98052", + "region": "WA", + "country": "US" + } + } + } + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/operationStatus/65e1f2bf-c31c-4b89-a599-25d9d4172af9?api-version=2018-11-01-preview", + "Retry-After": "10" + } + }, + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}", + "name": "{billingAccountName}", + "type": "Microsoft.Billing/billingAccounts", + "properties": { + "displayName": "Test Account", + "accountType": "Organization", + "address": { + "companyName": "Contoso", + "firstName": "Test", + "lastName": "User", + "addressLine1": "1 Microsoft Way", + "addressLine2": "", + "addressLine3": "", + "city": "Redmond", + "postalCode": "98052", + "region": "WA", + "country": "US" + }, + "hasReadAccess": true + } + } + } + } +} \ No newline at end of file