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:

An associated tenant.

NameDatatypeDescription
propertiesobjectAn associated tenant.
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 < > % & \ ? /

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbillingAccountName, associatedTenantNameGets an associated tenant by ID.
list_by_billing_accountselectbillingAccountNameincludeRevoked, 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_updateinsertbillingAccountName, associatedTenantNameCreate or update an associated tenant for the billing account.
deletedeletebillingAccountName, associatedTenantNameDeletes 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
associatedTenantNamestringThe ID that uniquely identifies a tenant.
billingAccountNamestringThe ID that uniquely identifies a billing account.
countbooleanThe count query option allows clients to request a count of the matching resources included with the resources in the response.
filterstringThe filter query option allows clients to filter a collection of resources that are addressed by a request URL.
includeRevokedbooleanCan be used to get revoked associated tenants.
orderBystringThe orderby query option allows clients to request resources in a particular order.
skipinteger (int64)The skip query option requests the number of items in the queried collection that are to be skipped and not included in the result.
topinteger (int64)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.

SELECT examples

Gets an associated tenant by ID.

SELECT
properties,
tags
FROM azure.billing.associated_tenants
WHERE billingAccountName = '{{ billingAccountName }}' -- required
AND associatedTenantName = '{{ associatedTenantName }}' -- required
;

INSERT examples

Create or update an associated tenant for the billing account.

INSERT INTO azure.billing.associated_tenants (
data__tags,
data__properties,
billingAccountName,
associatedTenantName
)
SELECT
'{{ tags }}',
'{{ properties }}',
'{{ billingAccountName }}',
'{{ associatedTenantName }}'
RETURNING
properties,
tags
;

DELETE examples

Deletes an associated tenant for a billing account.

DELETE FROM azure.billing.associated_tenants
WHERE billingAccountName = '{{ billingAccountName }}' --required
AND associatedTenantName = '{{ associatedTenantName }}' --required
;