policies
Creates, updates, deletes, gets or lists a policies
resource.
Overview
Name | policies |
Type | Resource |
Id | azure.billing.policies |
Fields
The following fields are returned by SELECT
queries:
- get_by_customer
- get_by_billing_profile
- get_by_customer_at_billing_account
- get_by_billing_account
- get_by_subscription
A policy at customer scope.
Name | Datatype | Description |
---|---|---|
properties | object | A policy at customer scope. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
A policy at billing profile scope.
Name | Datatype | Description |
---|---|---|
properties | object | A policy at billing profile scope. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
A policy at customer scope.
Name | Datatype | Description |
---|---|---|
properties | object | A policy at customer scope. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
A policy at billing account scope.
Name | Datatype | Description |
---|---|---|
properties | object | A policy at billing account scope. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
A policy at subscription scope.
Name | Datatype | Description |
---|---|---|
properties | object | A policy at subscription scope. |
tags | object | Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? / |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_by_customer | select | billingAccountName , billingProfileName , customerName , policyName | Lists the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. | |
get_by_billing_profile | select | billingAccountName , billingProfileName | Lists the policies for a billing profile. This operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. | |
get_by_customer_at_billing_account | select | billingAccountName , customerName | Lists the policies for a customer at billing account scope. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement. | |
get_by_billing_account | select | billingAccountName | Get the policies for a billing account of Enterprise Agreement type. | |
get_by_subscription | select | subscriptionId | Lists the policies that are managed by the Billing Admin for the defined subscriptions. This is supported for Microsoft Online Services Program, Microsoft Customer Agreement and Microsoft Partner Agreement. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
billingAccountName | string | The ID that uniquely identifies a billing account. |
billingProfileName | string | The ID that uniquely identifies a billing profile. |
customerName | string | The ID that uniquely identifies a customer. |
policyName | string | Service-defined resource names such as 'default' which are reserved resource names. |
subscriptionId | string | The ID that uniquely identifies a billing subscription. |
SELECT
examples
- get_by_customer
- get_by_billing_profile
- get_by_customer_at_billing_account
- get_by_billing_account
- get_by_subscription
Lists the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.
SELECT
properties,
tags
FROM azure.billing.policies
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND billingProfileName = '{{ billingProfileName }}' -- required
AND customerName = '{{ customerName }}' -- required
AND policyName = '{{ policyName }}' -- required
;
Lists the policies for a billing profile. This operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
SELECT
properties,
tags
FROM azure.billing.policies
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND billingProfileName = '{{ billingProfileName }}' -- required
;
Lists the policies for a customer at billing account scope. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.
SELECT
properties,
tags
FROM azure.billing.policies
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND customerName = '{{ customerName }}' -- required
;
Get the policies for a billing account of Enterprise Agreement type.
SELECT
properties,
tags
FROM azure.billing.policies
WHERE billingAccountName = '{{ billingAccountName }}' -- required
;
Lists the policies that are managed by the Billing Admin for the defined subscriptions. This is supported for Microsoft Online Services Program, Microsoft Customer Agreement and Microsoft Partner Agreement.
SELECT
properties,
tags
FROM azure.billing.policies
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;