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 SourceInvokeAsync(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> |