Show / Hide Table of Contents

Class GetRole

Inheritance
System.Object
GetRole
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.Aws.Iam
Assembly: Pulumi.Aws.dll
Syntax
public static class GetRole

Methods

View Source

InvokeAsync(GetRoleArgs, InvokeOptions)

This data source can be used to fetch information about a specific IAM role. By using this data source, you can reference IAM role properties without having to hard code ARNs as input.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = Output.Create(Aws.Iam.GetRole.InvokeAsync(new Aws.Iam.GetRoleArgs
    {
        Name = "an_example_role_name",
    }));
}

}

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

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