GetUserAssignedIdentity
Use this data source to access information about an existing User Assigned Identity.
Example Usage
Reference An Existing)
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Azure.Authorization.GetUserAssignedIdentity.InvokeAsync(new Azure.Authorization.GetUserAssignedIdentityArgs
{
Name = "name_of_user_assigned_identity",
ResourceGroupName = "name_of_resource_group",
}));
this.UaiClientId = example.Apply(example => example.ClientId);
this.UaiPrincipalId = example.Apply(example => example.PrincipalId);
}
[Output("uaiClientId")]
public Output<string> UaiClientId { get; set; }
[Output("uaiPrincipalId")]
public Output<string> UaiPrincipalId { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/authorization"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := authorization.LookupUserAssignedIdentity(ctx, &authorization.LookupUserAssignedIdentityArgs{
Name: "name_of_user_assigned_identity",
ResourceGroupName: "name_of_resource_group",
}, nil)
if err != nil {
return err
}
ctx.Export("uaiClientId", example.ClientId)
ctx.Export("uaiPrincipalId", example.PrincipalId)
return nil
})
}import pulumi
import pulumi_azure as azure
example = azure.authorization.get_user_assigned_identity(name="name_of_user_assigned_identity",
resource_group_name="name_of_resource_group")
pulumi.export("uaiClientId", example.client_id)
pulumi.export("uaiPrincipalId", example.principal_id)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.authorization.getUserAssignedIdentity({
name: "name_of_user_assigned_identity",
resourceGroupName: "name_of_resource_group",
});
export const uaiClientId = example.then(example => example.clientId);
export const uaiPrincipalId = example.then(example => example.principalId);Deprecated: azure.core.getUserAssignedIdentity has been deprecated in favor of azure.authorization.getUserAssignedIdentity
Using GetUserAssignedIdentity
function getUserAssignedIdentity(args: GetUserAssignedIdentityArgs, opts?: InvokeOptions): Promise<GetUserAssignedIdentityResult>function get_user_assigned_identity(name=None, resource_group_name=None, opts=None)func GetUserAssignedIdentity(ctx *Context, args *GetUserAssignedIdentityArgs, opts ...InvokeOption) (*GetUserAssignedIdentityResult, error)public static class GetUserAssignedIdentity {
public static Task<GetUserAssignedIdentityResult> InvokeAsync(GetUserAssignedIdentityArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Name string
The name of the User Assigned Identity.
- Resource
Group stringName The name of the Resource Group in which the User Assigned Identity exists.
- Name string
The name of the User Assigned Identity.
- Resource
Group stringName The name of the Resource Group in which the User Assigned Identity exists.
- name string
The name of the User Assigned Identity.
- resource
Group stringName The name of the Resource Group in which the User Assigned Identity exists.
- name str
The name of the User Assigned Identity.
- resource_
group_ strname The name of the Resource Group in which the User Assigned Identity exists.
GetUserAssignedIdentity Result
The following output properties are available:
- Client
Id string The Client ID of the User Assigned Identity.
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
The Azure location where the User Assigned Identity exists.
- Name string
- Principal
Id string The Service Principal ID of the User Assigned Identity.
- Resource
Group stringName - Dictionary<string, string>
A mapping of tags assigned to the User Assigned Identity.
- Client
Id string The Client ID of the User Assigned Identity.
- Id string
The provider-assigned unique ID for this managed resource.
- Location string
The Azure location where the User Assigned Identity exists.
- Name string
- Principal
Id string The Service Principal ID of the User Assigned Identity.
- Resource
Group stringName - map[string]string
A mapping of tags assigned to the User Assigned Identity.
- client
Id string The Client ID of the User Assigned Identity.
- id string
The provider-assigned unique ID for this managed resource.
- location string
The Azure location where the User Assigned Identity exists.
- name string
- principal
Id string The Service Principal ID of the User Assigned Identity.
- resource
Group stringName - {[key: string]: string}
A mapping of tags assigned to the User Assigned Identity.
- client_
id str The Client ID of the User Assigned Identity.
- id str
The provider-assigned unique ID for this managed resource.
- location str
The Azure location where the User Assigned Identity exists.
- name str
- principal_
id str The Service Principal ID of the User Assigned Identity.
- resource_
group_ strname - Dict[str, str]
A mapping of tags assigned to the User Assigned Identity.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.