Skip to main content

billing_profiles

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

Overview

Namebilling_profiles
TypeResource
Idazure.billing.billing_profiles

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
billToobjectBilling address.
billingRelationshipTypestringIdentifies 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)
currencystringThe currency in which the charges for the billing profile are billed.
currentPaymentTermobjectThe current payment term of the billing profile.
displayNamestringThe name of the billing profile.
enabledAzurePlansarrayInformation about the enabled azure plans.
hasReadAccessbooleanIndicates whether user has read access to the billing profile.
indirectRelationshipInfoobjectIdentifies the billing profile that is linked to another billing profile in indirect purchase motion.
invoiceDayintegerThe day of the month when the invoice for the billing profile is generated.
invoiceEmailOptInbooleanFlag controlling whether the invoices for the billing profile are sent through email.
invoiceRecipientsarrayThe list of email addresses to receive invoices by email for the billing profile.
otherPaymentTermsarrayThe other payment terms of the billing profile.
poNumberstringThe default purchase order number that will appear on the invoices generated for the billing profile.
provisioningStatestringThe 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)
shipToobjectThe 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.
soldToobjectThe address of the individual or organization that is responsible for the billing account.
spendingLimitstringThe billing profile spending limit. Known values are: "Off" and "On". (Off, On)
spendingLimitDetailsarrayThe details of billing profile spending limit.
statusstringThe status of the billing profile. Known values are: "Other", "Active", "Disabled", "Warned", "Deleted", and "UnderReview". (Other, Active, Disabled, Warned, Deleted, UnderReview)
statusReasonCodestringReason for the specified billing profile status. Known values are: "Other", "PastDue", "UnusualActivity", "SpendingLimitReached", and "SpendingLimitExpired". (Other, PastDue, UnusualActivity, SpendingLimitReached, SpendingLimitExpired)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
systemIdstringThe system generated unique identifier for a billing profile.
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 < > % & \ ? /.
targetCloudsarrayIdentifies 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.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbilling_account_name, billing_profile_nameGets 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_accountselectbilling_account_nameincludeDeleted, filter, orderBy, top, skip, count, searchLists 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_updateinsertbilling_account_name, billing_profile_nameCreates 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_updatereplacebilling_account_name, billing_profile_nameCreates 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.
deletedeletebilling_account_name, billing_profile_nameDeletes a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement.
validate_delete_eligibilityexecbilling_account_name, billing_profile_nameValidates 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.

NameDatatypeDescription
billing_account_namestringThe ID that uniquely identifies a billing account. Required.
billing_profile_namestringThe ID that uniquely identifies a billing profile. Required.
countbooleanThe count query option allows clients to request a count of the matching resources included with the resources in the response. Default value is None.
filterstringThe filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None.
includeDeletedbooleanCan be used to get deleted billing profiles. Default value is False.
orderBystringThe orderby query option allows clients to request resources in a particular order. Default value is None.
skipintegerThe 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.
topintegerThe 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

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
;

INSERT examples

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
;

REPLACE examples

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

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

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
;