Skip to main content

user_assigned_identities

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

Overview

Nameuser_assigned_identities
TypeResource
Idazure.managed_identity.user_assigned_identities

Fields

NameDatatypeDescription
principalIdstringThe principal ID of resource identity. The value must be an UUID.
tenantIdstringThe tenant ID of resource. The value must be an UUID.
typestringThe identity type.

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, resourceName, subscriptionIdGets the identity.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists all the userAssignedIdentities available under the specified ResourceGroup.
list_by_subscriptionSELECTsubscriptionIdLists all the userAssignedIdentities available under the specified subscription.
create_or_updateINSERTresourceGroupName, resourceName, subscriptionIdCreate or update an identity in the specified subscription and resource group.
deleteDELETEresourceGroupName, resourceName, subscriptionIdDeletes the identity.
updateUPDATEresourceGroupName, resourceName, subscriptionIdUpdate an identity in the specified subscription and resource group.

SELECT examples

Lists all the userAssignedIdentities available under the specified subscription.

SELECT
principalId,
tenantId,
type
FROM azure.managed_identity.user_assigned_identities
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.managed_identity.user_assigned_identities (
resourceGroupName,
resourceName,
subscriptionId,
type
)
SELECT
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ subscriptionId }}',
'{{ type }}'
;

UPDATE example

Updates a user_assigned_identities resource.

/*+ update */
UPDATE azure.managed_identity.user_assigned_identities
SET
location = '{{ location }}',
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified user_assigned_identities resource.

/*+ delete */
DELETE FROM azure.managed_identity.user_assigned_identities
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';