associated_tenants
Creates, updates, deletes, gets or lists an associated_tenants resource.
Overview
| Name | associated_tenants |
| Type | Resource |
| Id | azure.billing.associated_tenants |
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. |
billingManagementState | string | The state determines whether users from the associated tenant can be assigned roles for commerce activities like viewing and downloading invoices, managing payments, and making purchases. Known values are: "Other", "NotAllowed", "Active", and "Revoked". (Other, NotAllowed, Active, Revoked) |
displayName | string | The name of the associated tenant. |
provisioningBillingRequestId | string | The unique identifier for the billing request that is created when enabling provisioning for an associated tenant. |
provisioningManagementState | string | The state determines whether subscriptions and licenses can be provisioned in the associated tenant. It can be set to 'Pending' to initiate a billing request. Known values are: "Other", "NotRequested", "Active", "Pending", "BillingRequestExpired", "BillingRequestDeclined", and "Revoked". (Other, NotRequested, Active, Pending, BillingRequestExpired, BillingRequestDeclined, Revoked) |
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) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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 < > % & \ ? /. |
tenantId | string | The ID that uniquely identifies a tenant. |
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. |
billingManagementState | string | The state determines whether users from the associated tenant can be assigned roles for commerce activities like viewing and downloading invoices, managing payments, and making purchases. Known values are: "Other", "NotAllowed", "Active", and "Revoked". (Other, NotAllowed, Active, Revoked) |
displayName | string | The name of the associated tenant. |
provisioningBillingRequestId | string | The unique identifier for the billing request that is created when enabling provisioning for an associated tenant. |
provisioningManagementState | string | The state determines whether subscriptions and licenses can be provisioned in the associated tenant. It can be set to 'Pending' to initiate a billing request. Known values are: "Other", "NotRequested", "Active", "Pending", "BillingRequestExpired", "BillingRequestDeclined", and "Revoked". (Other, NotRequested, Active, Pending, BillingRequestExpired, BillingRequestDeclined, Revoked) |
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) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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 < > % & \ ? /. |
tenantId | string | The ID that uniquely identifies a tenant. |
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, associated_tenant_name | Gets an associated tenant by ID. | |
list_by_billing_account | select | billing_account_name | includeRevoked, filter, orderBy, top, skip, count, search | Lists the associated tenants that can collaborate with the billing account on commerce activities like viewing and downloading invoices, managing payments, making purchases, and managing or provisioning licenses. |
create_or_update | insert | billing_account_name, associated_tenant_name | Create or update an associated tenant for the billing account. | |
create_or_update | replace | billing_account_name, associated_tenant_name | Create or update an associated tenant for the billing account. | |
delete | delete | billing_account_name, associated_tenant_name | Deletes an associated tenant for a billing account. |
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 |
|---|---|---|
associated_tenant_name | string | The ID that uniquely identifies a tenant. Required. |
billing_account_name | string | The ID that uniquely identifies a billing account. 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. |
includeRevoked | boolean | Can be used to get revoked associated tenants. 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 an associated tenant by ID.
SELECT
id,
name,
billingManagementState,
displayName,
provisioningBillingRequestId,
provisioningManagementState,
provisioningState,
systemData,
tags,
tenantId,
type
FROM azure.billing.associated_tenants
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND associated_tenant_name = '{{ associated_tenant_name }}' -- required
;
Lists the associated tenants that can collaborate with the billing account on commerce activities like viewing and downloading invoices, managing payments, making purchases, and managing or provisioning licenses.
SELECT
id,
name,
billingManagementState,
displayName,
provisioningBillingRequestId,
provisioningManagementState,
provisioningState,
systemData,
tags,
tenantId,
type
FROM azure.billing.associated_tenants
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND includeRevoked = '{{ includeRevoked }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND top = '{{ top }}'
AND skip = '{{ skip }}'
AND count = '{{ count }}'
AND search = '{{ search }}'
;
INSERT examples
- create_or_update
- Manifest
Create or update an associated tenant for the billing account.
INSERT INTO azure.billing.associated_tenants (
properties,
tags,
billing_account_name,
associated_tenant_name
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ billing_account_name }}',
'{{ associated_tenant_name }}'
RETURNING
id,
name,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: associated_tenants
props:
- name: billing_account_name
value: "{{ billing_account_name }}"
description: Required parameter for the associated_tenants resource.
- name: associated_tenant_name
value: "{{ associated_tenant_name }}"
description: Required parameter for the associated_tenants resource.
- name: properties
description: |
An associated tenant.
value:
provisioningState: "{{ provisioningState }}"
displayName: "{{ displayName }}"
tenantId: "{{ tenantId }}"
billingManagementState: "{{ billingManagementState }}"
provisioningManagementState: "{{ provisioningManagementState }}"
provisioningBillingRequestId: "{{ provisioningBillingRequestId }}"
- 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
Create or update an associated tenant for the billing account.
REPLACE azure.billing.associated_tenants
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
billing_account_name = '{{ billing_account_name }}' --required
AND associated_tenant_name = '{{ associated_tenant_name }}' --required
RETURNING
id,
name,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Deletes an associated tenant for a billing account.
DELETE FROM azure.billing.associated_tenants
WHERE billing_account_name = '{{ billing_account_name }}' --required
AND associated_tenant_name = '{{ associated_tenant_name }}' --required
;