az sig identity
Manage Identity.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az sig identity assign |
Assign the user or system managed identities. |
Core | GA |
| az sig identity remove |
Remove the user or system managed identities. |
Core | GA |
| az sig identity show |
Show the details of managed identities. |
Core | GA |
az sig identity assign
Assign the user or system managed identities.
az sig identity assign --gallery-name
--resource-group
[--acquire-policy-token]
[--change-reference]
[--mi-system-assigned --system-assigned]
[--mi-user-assigned --user-assigned]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
Examples
Enable the system assigned identity.
az sig identity assign -g MyResourceGroup -r MyGalleryName --system-assigned
Add a user assigned identity.
az sig identity assign -g MyResourceGroup -r MyGalleryName --user-assigned id1
Add 2 user assigned identities.
az sig identity assign -g MyResourceGroup -r MyGalleryName --user-assigned id1 id2
Enable system assigned identity and add a user assigned identity.
az sig identity assign -g MyResourceGroup -r MyGalleryName --system-assigned --user-assigned id1
Required Parameters
The name of the Shared Image Gallery.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Set the system managed identity.
| Property | Value |
|---|---|
| Parameter group: | Gallery.identity Arguments |
Set the user managed identities. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Gallery.identity Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az sig identity remove
Remove the user or system managed identities.
az sig identity remove --gallery-name
--resource-group
[--acquire-policy-token]
[--change-reference]
[--mi-system-assigned --system-assigned]
[--mi-user-assigned --user-assigned]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
Examples
Remove the system assigned identity.
az sig identity remove -g myResourceGroup -r myGalleryName --system-assigned
Remove a user assigned identity.
az sig identity remove -g myResourceGroup -r myGalleryName --user-assigned id1
Remove 2 user assigned identities.
az sig identity remove -g myResourceGroup -r myGalleryName --user-assigned id1 id2
Remove all user assigned identities.
az sig identity remove -g myResourceGroup -r myGalleryName --user-assigned
Remove the system assigned ientity and user assigned identity.
az sig identity remove -g myResourceGroup -r myGalleryName --system-assigned --user-assigned
Required Parameters
The name of the Shared Image Gallery.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
Set the system managed identity.
| Property | Value |
|---|---|
| Parameter group: | Gallery.identity Arguments |
Set the user managed identities. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
| Property | Value |
|---|---|
| Parameter group: | Gallery.identity Arguments |
Do not wait for the long-running operation to finish.
| Property | Value |
|---|---|
| Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |
az sig identity show
Show the details of managed identities.
az sig identity show --gallery-name
--resource-group
Examples
Show the managed identity.
az sig identity show -g myResourceGroup -r myGalleryName
Required Parameters
The name of the Shared Image Gallery.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Global Parameters
Increase logging verbosity to show all debug logs.
| Property | Value |
|---|---|
| Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
| Property | Value |
|---|---|
| Default value: | False |
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
| Property | Value |
|---|---|
| Default value: | False |