Skip to main content

user_assigned_identities

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

Overview

Nameuser_assigned_identities
TypeResource
Idazure.msi.user_assigned_identities

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.
assignmentRestrictionsobjectRestrictions on which resource providers this identity can be assigned to.
clientIdstringThe id of the app associated with the identity. This is a random generated UUID by MSI.
isolationScopestringEnum to configure regional restrictions on identity assignment, as necessary. Known values are: "None" and "Regional". (None, Regional)
locationstringThe geo-location where the resource lives. Required.
principalIdstringThe id of the service principal object associated with the created identity.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
tenantIdstringThe id of the tenant which the identity belongs to.
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
getselectresource_group_name, resource_name, subscription_idGets the identity.
list_by_resource_groupselectresource_group_name, subscription_idLists all the userAssignedIdentities available under the specified ResourceGroup.
list_by_subscriptionselectsubscription_idLists all the userAssignedIdentities available under the specified subscription.
create_or_updateinsertresource_group_name, resource_name, subscription_id, locationCreate or update an identity in the specified subscription and resource group.
updateupdateresource_group_name, resource_name, subscription_idUpdate an identity in the specified subscription and resource group.
create_or_updatereplaceresource_group_name, resource_name, subscription_id, locationCreate or update an identity in the specified subscription and resource group.
deletedeleteresource_group_name, resource_name, subscription_idDeletes the identity.

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
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the identity resource. Required.
subscription_idstring

SELECT examples

Gets the identity.

SELECT
id,
name,
assignmentRestrictions,
clientId,
isolationScope,
location,
principalId,
systemData,
tags,
tenantId,
type
FROM azure.msi.user_assigned_identities
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update an identity in the specified subscription and resource group.

INSERT INTO azure.msi.user_assigned_identities (
tags,
location,
properties,
resource_group_name,
resource_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update an identity in the specified subscription and resource group.

UPDATE azure.msi.user_assigned_identities
SET
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create or update an identity in the specified subscription and resource group.

REPLACE azure.msi.user_assigned_identities
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes the identity.

DELETE FROM azure.msi.user_assigned_identities
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;