invoice_sections
Creates, updates, deletes, gets or lists an invoice_sections resource.
Overview
| Name | invoice_sections |
| Type | Resource |
| Id | azure.billing.invoice_sections |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_billing_profile
| 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. |
displayName | string | The name of the invoice section. |
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) |
reasonCode | string | Reason for the specified invoice section status. Known values are: "Other", "PastDue", "UnusualActivity", "SpendingLimitReached", and "SpendingLimitExpired". (Other, PastDue, UnusualActivity, SpendingLimitReached, SpendingLimitExpired) |
state | string | Identifies the status of an invoice section. Known values are: "Other", "Active", "Deleted", "Disabled", "UnderReview", "Warned", and "Restricted". (Other, Active, Deleted, Disabled, UnderReview, Warned, Restricted) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
systemId | string | The system generated unique identifier for an invoice section. |
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 < > % & \ ? /. |
targetCloud | string | Identifies the cloud environments that are associated with an invoice section. This is a system managed optional field and gets updated as the invoice section 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. |
displayName | string | The name of the invoice section. |
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) |
reasonCode | string | Reason for the specified invoice section status. Known values are: "Other", "PastDue", "UnusualActivity", "SpendingLimitReached", and "SpendingLimitExpired". (Other, PastDue, UnusualActivity, SpendingLimitReached, SpendingLimitExpired) |
state | string | Identifies the status of an invoice section. Known values are: "Other", "Active", "Deleted", "Disabled", "UnderReview", "Warned", and "Restricted". (Other, Active, Deleted, Disabled, UnderReview, Warned, Restricted) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
systemId | string | The system generated unique identifier for an invoice section. |
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 < > % & \ ? /. |
targetCloud | string | Identifies the cloud environments that are associated with an invoice section. This is a system managed optional field and gets updated as the invoice section 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, invoice_section_name | Gets an invoice section by its ID. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. | |
list_by_billing_profile | select | billing_account_name, billing_profile_name | includeDeleted, filter, orderBy, top, skip, count, search | Lists the invoice sections that a user has access to. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. |
create_or_update | insert | billing_account_name, billing_profile_name, invoice_section_name | Creates or updates an invoice section. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. | |
create_or_update | replace | billing_account_name, billing_profile_name, invoice_section_name | Creates or updates an invoice section. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. | |
delete | delete | billing_account_name, billing_profile_name, invoice_section_name | Deletes an invoice section. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement. | |
validate_delete_eligibility | exec | billing_account_name, billing_profile_name, invoice_section_name | Validates if the invoice section can be deleted. The operation is supported for billing accounts with agreement type Microsoft Customer 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. |
invoice_section_name | string | The ID that uniquely identifies an invoice section. 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 invoice sections. 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_profile
Gets an invoice section by its ID. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
SELECT
id,
name,
displayName,
provisioningState,
reasonCode,
state,
systemData,
systemId,
tags,
targetCloud,
type
FROM azure.billing.invoice_sections
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND billing_profile_name = '{{ billing_profile_name }}' -- required
AND invoice_section_name = '{{ invoice_section_name }}' -- required
;
Lists the invoice sections that a user has access to. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
SELECT
id,
name,
displayName,
provisioningState,
reasonCode,
state,
systemData,
systemId,
tags,
targetCloud,
type
FROM azure.billing.invoice_sections
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND billing_profile_name = '{{ billing_profile_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 an invoice section. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
INSERT INTO azure.billing.invoice_sections (
properties,
tags,
billing_account_name,
billing_profile_name,
invoice_section_name
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ billing_account_name }}',
'{{ billing_profile_name }}',
'{{ invoice_section_name }}'
RETURNING
id,
name,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: invoice_sections
props:
- name: billing_account_name
value: "{{ billing_account_name }}"
description: Required parameter for the invoice_sections resource.
- name: billing_profile_name
value: "{{ billing_profile_name }}"
description: Required parameter for the invoice_sections resource.
- name: invoice_section_name
value: "{{ invoice_section_name }}"
description: Required parameter for the invoice_sections resource.
- name: properties
description: |
An invoice section.
value:
provisioningState: "{{ provisioningState }}"
displayName: "{{ displayName }}"
state: "{{ state }}"
reasonCode: "{{ reasonCode }}"
systemId: "{{ systemId }}"
targetCloud: "{{ targetCloud }}"
tags: "{{ tags }}"
- 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 an invoice section. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
REPLACE azure.billing.invoice_sections
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
billing_account_name = '{{ billing_account_name }}' --required
AND billing_profile_name = '{{ billing_profile_name }}' --required
AND invoice_section_name = '{{ invoice_section_name }}' --required
RETURNING
id,
name,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Deletes an invoice section. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement.
DELETE FROM azure.billing.invoice_sections
WHERE billing_account_name = '{{ billing_account_name }}' --required
AND billing_profile_name = '{{ billing_profile_name }}' --required
AND invoice_section_name = '{{ invoice_section_name }}' --required
;
Lifecycle Methods
- validate_delete_eligibility
Validates if the invoice section can be deleted. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement.
EXEC azure.billing.invoice_sections.validate_delete_eligibility
@billing_account_name='{{ billing_account_name }}' --required,
@billing_profile_name='{{ billing_profile_name }}' --required,
@invoice_section_name='{{ invoice_section_name }}' --required
;