billing_profiles
Creates, updates, deletes, gets or lists a billing_profiles resource.
Overview
| Name | billing_profiles |
| Type | Resource |
| Id | azure.billing.billing_profiles |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_billing_account
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
billTo | object | Billing address. |
billingRelationshipType | string | Identifies the billing relationship represented by the billing profile. The billing relationship may be between Microsoft, the customer, and/or a third-party. Known values are: "Other", "Direct", "IndirectCustomer", "IndirectPartner", "CSPPartner", and "CSPCustomer". (Other, Direct, IndirectCustomer, IndirectPartner, CSPPartner, CSPCustomer) |
currency | string | The currency in which the charges for the billing profile are billed. |
currentPaymentTerm | object | The current payment term of the billing profile. |
displayName | string | The name of the billing profile. |
enabledAzurePlans | array | Information about the enabled azure plans. |
hasReadAccess | boolean | Indicates whether user has read access to the billing profile. |
indirectRelationshipInfo | object | Identifies the billing profile that is linked to another billing profile in indirect purchase motion. |
invoiceDay | integer | The day of the month when the invoice for the billing profile is generated. |
invoiceEmailOptIn | boolean | Flag controlling whether the invoices for the billing profile are sent through email. |
invoiceRecipients | array | The list of email addresses to receive invoices by email for the billing profile. |
otherPaymentTerms | array | The other payment terms of the billing profile. |
poNumber | string | The default purchase order number that will appear on the invoices generated for the billing profile. |
provisioningState | string | The provisioning state of the resource during a long-running operation. Known values are: "Succeeded", "Canceled", "Failed", "New", "Pending", "Provisioning", "PendingBilling", "ConfirmedBilling", "Creating", "Created", and "Expired". (Succeeded, Canceled, Failed, New, Pending, Provisioning, PendingBilling, ConfirmedBilling, Creating, Created, Expired) |
shipTo | object | The default address where the products are shipped, or the services are being used. If a ship to is not specified for a product or a subscription, then this address will be used. |
soldTo | object | The address of the individual or organization that is responsible for the billing account. |
spendingLimit | string | The billing profile spending limit. Known values are: "Off" and "On". (Off, On) |
spendingLimitDetails | array | The details of billing profile spending limit. |
status | string | The status of the billing profile. Known values are: "Other", "Active", "Disabled", "Warned", "Deleted", and "UnderReview". (Other, Active, Disabled, Warned, Deleted, UnderReview) |
statusReasonCode | string | Reason for the specified billing profile status. Known values are: "Other", "PastDue", "UnusualActivity", "SpendingLimitReached", and "SpendingLimitExpired". (Other, PastDue, UnusualActivity, SpendingLimitReached, SpendingLimitExpired) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
systemId | string | The system generated unique identifier for a billing profile. |
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 < > % & \ ? /. |
targetClouds | array | Identifies the cloud environments that are associated with a billing profile. This is a system managed optional field and gets updated as the billing profile gets associated with accounts in various clouds. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
billTo | object | Billing address. |
billingRelationshipType | string | Identifies the billing relationship represented by the billing profile. The billing relationship may be between Microsoft, the customer, and/or a third-party. Known values are: "Other", "Direct", "IndirectCustomer", "IndirectPartner", "CSPPartner", and "CSPCustomer". (Other, Direct, IndirectCustomer, IndirectPartner, CSPPartner, CSPCustomer) |
currency | string | The currency in which the charges for the billing profile are billed. |
currentPaymentTerm | object | The current payment term of the billing profile. |
displayName | string | The name of the billing profile. |
enabledAzurePlans | array | Information about the enabled azure plans. |
hasReadAccess | boolean | Indicates whether user has read access to the billing profile. |
indirectRelationshipInfo | object | Identifies the billing profile that is linked to another billing profile in indirect purchase motion. |
invoiceDay | integer | The day of the month when the invoice for the billing profile is generated. |
invoiceEmailOptIn | boolean | Flag controlling whether the invoices for the billing profile are sent through email. |
invoiceRecipients | array | The list of email addresses to receive invoices by email for the billing profile. |
otherPaymentTerms | array | The other payment terms of the billing profile. |
poNumber | string | The default purchase order number that will appear on the invoices generated for the billing profile. |
provisioningState | string | The provisioning state of the resource during a long-running operation. Known values are: "Succeeded", "Canceled", "Failed", "New", "Pending", "Provisioning", "PendingBilling", "ConfirmedBilling", "Creating", "Created", and "Expired". (Succeeded, Canceled, Failed, New, Pending, Provisioning, PendingBilling, ConfirmedBilling, Creating, Created, Expired) |
shipTo | object | The default address where the products are shipped, or the services are being used. If a ship to is not specified for a product or a subscription, then this address will be used. |
soldTo | object | The address of the individual or organization that is responsible for the billing account. |
spendingLimit | string | The billing profile spending limit. Known values are: "Off" and "On". (Off, On) |
spendingLimitDetails | array | The details of billing profile spending limit. |
status | string | The status of the billing profile. Known values are: "Other", "Active", "Disabled", "Warned", "Deleted", and "UnderReview". (Other, Active, Disabled, Warned, Deleted, UnderReview) |
statusReasonCode | string | Reason for the specified billing profile status. Known values are: "Other", "PastDue", "UnusualActivity", "SpendingLimitReached", and "SpendingLimitExpired". (Other, PastDue, UnusualActivity, SpendingLimitReached, SpendingLimitExpired) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
systemId | string | The system generated unique identifier for a billing profile. |
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 < > % & \ ? /. |
targetClouds | array | Identifies the cloud environments that are associated with a billing profile. This is a system managed optional field and gets updated as the billing profile gets associated with accounts in various clouds. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account_name, billing_profile_name | Gets a billing profile by its ID. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement. | |
list_by_billing_account | select | billing_account_name | includeDeleted, filter, orderBy, top, skip, count, search | Lists the billing profiles that a user has access to. The operation is supported for billing accounts with agreement of type Microsoft Customer Agreement and Microsoft Partner Agreement. |
create_or_update | insert | billing_account_name, billing_profile_name | Creates or updates a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement. If you are a MCA Individual (Pay-as-you-go) customer, then please use the Azure portal experience to create the billing profile. | |
create_or_update | replace | billing_account_name, billing_profile_name | Creates or updates a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement. If you are a MCA Individual (Pay-as-you-go) customer, then please use the Azure portal experience to create the billing profile. | |
delete | delete | billing_account_name, billing_profile_name | Deletes a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement. | |
validate_delete_eligibility | exec | billing_account_name, billing_profile_name | Validates if the billing profile can be deleted. The operation is supported for billing accounts with agreement type 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 |
|---|---|---|
billing_account_name | string | The ID that uniquely identifies a billing account. Required. |
billing_profile_name | string | The ID that uniquely identifies a billing profile. Required. |
count | boolean | The count query option allows clients to request a count of the matching resources included with the resources in the response. Default value is None. |
filter | string | The filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None. |
includeDeleted | boolean | Can be used to get deleted billing profiles. Default value is False. |
orderBy | string | The orderby query option allows clients to request resources in a particular order. Default value is None. |
search | string | The search query option allows clients to request items within a collection matching a free-text search expression. search is only supported for string fields. Default value is None. |
skip | integer | The skip query option requests the number of items in the queried collection that are to be skipped and not included in the result. Default value is None. |
top | integer | The top query option requests the number of items in the queried collection to be included in the result. The maximum supported value for top is 50. Default value is None. |
SELECT examples
- get
- list_by_billing_account
Gets a billing profile by its ID. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement.
SELECT
id,
name,
billTo,
billingRelationshipType,
currency,
currentPaymentTerm,
displayName,
enabledAzurePlans,
hasReadAccess,
indirectRelationshipInfo,
invoiceDay,
invoiceEmailOptIn,
invoiceRecipients,
otherPaymentTerms,
poNumber,
provisioningState,
shipTo,
soldTo,
spendingLimit,
spendingLimitDetails,
status,
statusReasonCode,
systemData,
systemId,
tags,
targetClouds,
type
FROM azure.billing.billing_profiles
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND billing_profile_name = '{{ billing_profile_name }}' -- required
;
Lists the billing profiles that a user has access to. The operation is supported for billing accounts with agreement of type Microsoft Customer Agreement and Microsoft Partner Agreement.
SELECT
id,
name,
billTo,
billingRelationshipType,
currency,
currentPaymentTerm,
displayName,
enabledAzurePlans,
hasReadAccess,
indirectRelationshipInfo,
invoiceDay,
invoiceEmailOptIn,
invoiceRecipients,
otherPaymentTerms,
poNumber,
provisioningState,
shipTo,
soldTo,
spendingLimit,
spendingLimitDetails,
status,
statusReasonCode,
systemData,
systemId,
tags,
targetClouds,
type
FROM azure.billing.billing_profiles
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND includeDeleted = '{{ includeDeleted }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND count = '{{ count }}'
AND search = '{{ search }}'
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement. If you are a MCA Individual (Pay-as-you-go) customer, then please use the Azure portal experience to create the billing profile.
INSERT INTO azure.billing.billing_profiles (
properties,
tags,
billing_account_name,
billing_profile_name
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ billing_account_name }}',
'{{ billing_profile_name }}'
RETURNING
id,
name,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: billing_profiles
props:
- name: billing_account_name
value: "{{ billing_account_name }}"
description: Required parameter for the billing_profiles resource.
- name: billing_profile_name
value: "{{ billing_profile_name }}"
description: Required parameter for the billing_profiles resource.
- name: properties
description: |
A billing profile.
value:
provisioningState: "{{ provisioningState }}"
billingRelationshipType: "{{ billingRelationshipType }}"
billTo:
addressLine1: "{{ addressLine1 }}"
addressLine2: "{{ addressLine2 }}"
addressLine3: "{{ addressLine3 }}"
city: "{{ city }}"
companyName: "{{ companyName }}"
country: "{{ country }}"
district: "{{ district }}"
email: "{{ email }}"
firstName: "{{ firstName }}"
lastName: "{{ lastName }}"
middleName: "{{ middleName }}"
phoneNumber: "{{ phoneNumber }}"
postalCode: "{{ postalCode }}"
region: "{{ region }}"
isValidAddress: {{ isValidAddress }}
currency: "{{ currency }}"
displayName: "{{ displayName }}"
enabledAzurePlans:
- productId: "{{ productId }}"
skuId: "{{ skuId }}"
skuDescription: "{{ skuDescription }}"
hasReadAccess: {{ hasReadAccess }}
indirectRelationshipInfo:
billingAccountName: "{{ billingAccountName }}"
billingProfileName: "{{ billingProfileName }}"
displayName: "{{ displayName }}"
invoiceDay: {{ invoiceDay }}
invoiceEmailOptIn: {{ invoiceEmailOptIn }}
invoiceRecipients:
- "{{ invoiceRecipients }}"
poNumber: "{{ poNumber }}"
shipTo:
addressLine1: "{{ addressLine1 }}"
addressLine2: "{{ addressLine2 }}"
addressLine3: "{{ addressLine3 }}"
city: "{{ city }}"
companyName: "{{ companyName }}"
country: "{{ country }}"
district: "{{ district }}"
email: "{{ email }}"
firstName: "{{ firstName }}"
lastName: "{{ lastName }}"
middleName: "{{ middleName }}"
phoneNumber: "{{ phoneNumber }}"
postalCode: "{{ postalCode }}"
region: "{{ region }}"
isValidAddress: {{ isValidAddress }}
soldTo:
addressLine1: "{{ addressLine1 }}"
addressLine2: "{{ addressLine2 }}"
addressLine3: "{{ addressLine3 }}"
city: "{{ city }}"
companyName: "{{ companyName }}"
country: "{{ country }}"
district: "{{ district }}"
email: "{{ email }}"
firstName: "{{ firstName }}"
lastName: "{{ lastName }}"
middleName: "{{ middleName }}"
phoneNumber: "{{ phoneNumber }}"
postalCode: "{{ postalCode }}"
region: "{{ region }}"
isValidAddress: {{ isValidAddress }}
spendingLimit: "{{ spendingLimit }}"
spendingLimitDetails:
- amount: {{ amount }}
currency: "{{ currency }}"
startDate: "{{ startDate }}"
endDate: "{{ endDate }}"
type: "{{ type }}"
status: "{{ status }}"
status: "{{ status }}"
statusReasonCode: "{{ statusReasonCode }}"
systemId: "{{ systemId }}"
tags: "{{ tags }}"
targetClouds:
- "{{ targetClouds }}"
currentPaymentTerm:
term: "{{ term }}"
startDate: "{{ startDate }}"
endDate: "{{ endDate }}"
isDefault: {{ isDefault }}
otherPaymentTerms:
- term: "{{ term }}"
startDate: "{{ startDate }}"
endDate: "{{ endDate }}"
isDefault: {{ isDefault }}
- name: tags
value: "{{ tags }}"
description: |
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 < > % & ? /.
REPLACE examples
- create_or_update
Creates or updates a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement. If you are a MCA Individual (Pay-as-you-go) customer, then please use the Azure portal experience to create the billing profile.
REPLACE azure.billing.billing_profiles
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
billing_account_name = '{{ billing_account_name }}' --required
AND billing_profile_name = '{{ billing_profile_name }}' --required
RETURNING
id,
name,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Deletes a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement.
DELETE FROM azure.billing.billing_profiles
WHERE billing_account_name = '{{ billing_account_name }}' --required
AND billing_profile_name = '{{ billing_profile_name }}' --required
;
Lifecycle Methods
- validate_delete_eligibility
Validates if the billing profile can be deleted. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement.
EXEC azure.billing.billing_profiles.validate_delete_eligibility
@billing_account_name='{{ billing_account_name }}' --required,
@billing_profile_name='{{ billing_profile_name }}' --required
;