/
getUserAssignedIdentity.ts
84 lines (78 loc) · 2.65 KB
/
getUserAssignedIdentity.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
import * as utilities from "../utilities";
/**
* Use this data source to access information about an existing User Assigned Identity.
*
* ## Example Usage (reference an existing)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
*
* const example = azure.authorization.getUserAssignedIdentity({
* name: "nameOfUserAssignedIdentity",
* resourceGroupName: "nameOfResourceGroup",
* });
*
* export const uaiClientId = example.clientId;
* export const uaiPrincipalId = example.principalId;
* ```
*
* > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/d/user_assigned_identity_legacy.html.markdown.
*/
export function getUserAssignedIdentity(args: GetUserAssignedIdentityArgs, opts?: pulumi.InvokeOptions): Promise<GetUserAssignedIdentityResult> & GetUserAssignedIdentityResult {
if (!opts) {
opts = {}
}
if (!opts.version) {
opts.version = utilities.getVersion();
}
const promise: Promise<GetUserAssignedIdentityResult> = pulumi.runtime.invoke("azure:core/getUserAssignedIdentity:getUserAssignedIdentity", {
"name": args.name,
"resourceGroupName": args.resourceGroupName,
}, opts);
return pulumi.utils.liftProperties(promise, opts);
}
/**
* A collection of arguments for invoking getUserAssignedIdentity.
*/
export interface GetUserAssignedIdentityArgs {
/**
* The name of the User Assigned Identity.
*/
readonly name: string;
/**
* The name of the Resource Group in which the User Assigned Identity exists.
*/
readonly resourceGroupName: string;
}
/**
* A collection of values returned by getUserAssignedIdentity.
*/
export interface GetUserAssignedIdentityResult {
/**
* The Client ID of the User Assigned Identity.
*/
readonly clientId: string;
/**
* The Azure location where the User Assigned Identity exists.
*/
readonly location: string;
readonly name: string;
/**
* The Service Principal ID of the User Assigned Identity.
*/
readonly principalId: string;
readonly resourceGroupName: string;
/**
* A mapping of tags assigned to the User Assigned Identity.
*/
readonly tags: {[key: string]: string};
/**
* id is the provider-assigned unique ID for this managed resource.
*/
readonly id: string;
}