Policies - Get By Billing Profile

Lists the policies for a billing profile. This operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default?api-version=2020-05-01

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

The ID that uniquely identifies a billing account.

billingProfileName
path True

string

The ID that uniquely identifies a billing profile.

api-version
query True

string

The version of the API to be used with the client request. The current version is 2020-05-01.

Responses

Name Type Description
200 OK

Policy

OK. The request has succeeded.

Other Status Codes

ErrorResponse

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

PolicyByBillingProfile

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default?api-version=2020-05-01

Sample Response

{
  "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default",
  "name": "default",
  "type": "Microsoft.Billing/billingAccounts/billingProfiles/policies",
  "properties": {
    "marketplacePurchases": "AllAllowed",
    "reservationPurchases": "Allowed",
    "viewCharges": "Allowed"
  }
}

Definitions

Name Description
ErrorDetails

The details of the error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

ErrorSubDetails
MarketplacePurchasesPolicy

The policy that controls whether Azure marketplace purchases are allowed for a billing profile.

Policy

A policy.

ReservationPurchasesPolicy

The policy that controls whether Azure reservation purchases are allowed for a billing profile.

ViewChargesPolicy

The policy that controls whether users with Azure RBAC access to a subscription can view its charges.

ErrorDetails

The details of the error.

Name Type Description
code

string

Error code.

details

ErrorSubDetails[]

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

ErrorDetails

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.

MarketplacePurchasesPolicy

The policy that controls whether Azure marketplace purchases are allowed for a billing profile.

Name Type Description
AllAllowed

string

NotAllowed

string

OnlyFreeAllowed

string

Policy

A policy.

Name Type Description
id

string

Resource Id.

name

string

Resource name.

properties.marketplacePurchases

MarketplacePurchasesPolicy

The policy that controls whether Azure marketplace purchases are allowed for a billing profile.

properties.reservationPurchases

ReservationPurchasesPolicy

The policy that controls whether Azure reservation purchases are allowed for a billing profile.

properties.viewCharges

ViewChargesPolicy

The policy that controls whether users with Azure RBAC access to a subscription can view its charges.

type

string

Resource type.

ReservationPurchasesPolicy

The policy that controls whether Azure reservation purchases are allowed for a billing profile.

Name Type Description
Allowed

string

NotAllowed

string

ViewChargesPolicy

The policy that controls whether users with Azure RBAC access to a subscription can view its charges.

Name Type Description
Allowed

string

NotAllowed

string