Skip to main content

associated_tenants

Creates, updates, deletes, gets or lists an associated_tenants resource.

Overview

Nameassociated_tenants
TypeResource
Idazure.billing.associated_tenants

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.
billingManagementStatestringThe 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)
displayNamestringThe name of the associated tenant.
provisioningBillingRequestIdstringThe unique identifier for the billing request that is created when enabling provisioning for an associated tenant.
provisioningManagementStatestringThe 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)
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)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
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 < > % & \ ? /.
tenantIdstringThe ID that uniquely identifies a tenant.
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, associated_tenant_nameGets an associated tenant by ID.
list_by_billing_accountselectbilling_account_nameincludeRevoked, filter, orderBy, top, skip, count, searchLists 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_updateinsertbilling_account_name, associated_tenant_nameCreate or update an associated tenant for the billing account.
create_or_updatereplacebilling_account_name, associated_tenant_nameCreate or update an associated tenant for the billing account.
deletedeletebilling_account_name, associated_tenant_nameDeletes 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.

NameDatatypeDescription
associated_tenant_namestringThe ID that uniquely identifies a tenant. Required.
billing_account_namestringThe ID that uniquely identifies a billing account. 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.
includeRevokedbooleanCan be used to get revoked associated tenants. 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 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
;

INSERT examples

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
;

REPLACE examples

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

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
;