Skip to main content

directory_tenants

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

Overview

Namedirectory_tenants
TypeResource
Idazure_stack.subscriptions_admin.directory_tenants

Fields

NameDatatypeDescription
idtextURI of the resource.
nametextName of the resource.
locationtextLocation of the resource
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextList of key-value pairs.
tenanttextfield from the properties object
tenant_idtextfield from the properties object
typetextType of resource.

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, subscriptionId, tenantGet a directory tenant by name.
listSELECTresourceGroupName, subscriptionIdLists all the directory tenants under the current subscription and given resource group name.
create_or_updateINSERTresourceGroupName, subscriptionId, tenantCreate or updates a directory tenant.
deleteDELETEresourceGroupName, subscriptionId, tenantDelete a directory tenant under a resource group.

SELECT examples

Lists all the directory tenants under the current subscription and given resource group name.

SELECT
id,
name,
location,
resourceGroupName,
subscriptionId,
tags,
tenant,
tenant_id,
type
FROM azure_stack.subscriptions_admin.vw_directory_tenants
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new directory_tenants resource.

/*+ create */
INSERT INTO azure_stack.subscriptions_admin.directory_tenants (
resourceGroupName,
subscriptionId,
tenant,
properties,
location
)
SELECT
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ tenant }}',
'{{ properties }}',
'{{ location }}'
;

DELETE example

Deletes the specified directory_tenants resource.

/*+ delete */
DELETE FROM azure_stack.subscriptions_admin.directory_tenants
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tenant = '{{ tenant }}';