Policies - Update Customer
Updates the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.
PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default?api-version=2019-10-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
billing
|
path | True |
string |
The ID that uniquely identifies a billing account. |
customer
|
path | True |
string |
The ID that uniquely identifies a customer. |
api-version
|
query | True |
string |
The version of the API to be used with the client request. The current version is 2019-10-01-preview. |
Request Body
Name | Type | Description |
---|---|---|
properties.viewCharges |
The policy that controls whether the users in customer's organization can view charges at pay-as-you-go prices. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. The request has succeeded. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
UpdateCustomer
Sample Request
PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default?api-version=2019-10-01-preview
{
"properties": {
"viewCharges": "NotAllowed"
}
}
Sample Response
{
"id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default",
"name": "default",
"type": "Microsoft.Billing/billingAccounts/customers/policies",
"properties": {
"viewCharges": "NotAllowed"
}
}
Definitions
Name | Description |
---|---|
Customer |
The customer's Policy. |
Error |
The details of the error. |
Error |
Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. |
Error |
|
View |
The policy that controls whether the users in customer's organization can view charges at pay-as-you-go prices. |
CustomerPolicy
The customer's Policy.
Name | Type | Description |
---|---|---|
id |
string |
Resource Id. |
name |
string |
Resource name. |
properties.viewCharges |
The policy that controls whether the users in customer's organization can view charges at pay-as-you-go prices. |
|
type |
string |
Resource type. |
ErrorDetails
The details of the error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
details |
The sub details of the error. |
|
message |
string |
Error message indicating why the operation failed. |
target |
string |
The target of the particular error. |
ErrorResponse
Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
Name | Type | Description |
---|---|---|
error |
The details of the error. |
ErrorSubDetails
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message indicating why the operation failed. |
target |
string |
The target of the particular error. |
ViewCharges
The policy that controls whether the users in customer's organization can view charges at pay-as-you-go prices.
Name | Type | Description |
---|---|---|
Allowed |
string |
|
NotAllowed |
string |