Skip to main content

policies

Creates, updates, deletes, gets or lists a policies resource.

Overview

Namepolicies
TypeResource
Idazure.billing.policies

Fields

The following fields are returned by SELECT queries:

A policy at customer scope.

NameDatatypeDescription
propertiesobjectA policy at customer scope.
tagsobjectDictionary 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_customerselectbillingAccountName, billingProfileName, customerName, policyNameLists the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement.
get_by_billing_profileselectbillingAccountName, billingProfileNameLists 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_accountselectbillingAccountName, customerNameLists 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_accountselectbillingAccountNameGet the policies for a billing account of Enterprise Agreement type.
get_by_subscriptionselectsubscriptionIdLists 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.

NameDatatypeDescription
billingAccountNamestringThe ID that uniquely identifies a billing account.
billingProfileNamestringThe ID that uniquely identifies a billing profile.
customerNamestringThe ID that uniquely identifies a customer.
policyNamestringService-defined resource names such as 'default' which are reserved resource names.
subscriptionIdstringThe ID that uniquely identifies a billing subscription.

SELECT examples

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
;