Show / Hide Table of Contents

Class GetCallerIdentity

Inheritance
System.Object
GetCallerIdentity
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud
Assembly: Pulumi.AliCloud.dll
Syntax
public static class GetCallerIdentity

Methods

View Source

InvokeAsync(InvokeOptions)

This data source provides the identity of the current user.

NOTE: Available in 1.65.0+.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
public MyStack()
{
    var current = Output.Create(AliCloud.GetCallerIdentity.InvokeAsync());
    this.CurrentUserArn = current.Apply(current => current.Id);
}

[Output("currentUserArn")]
public Output<string> CurrentUserArn { get; set; }
}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetCallerIdentityResult> InvokeAsync(InvokeOptions options = null)
Parameters
Type Name Description
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetCallerIdentityResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.