GetInstanceProfile
This data source can be used to fetch information about a specific IAM instance profile. By using this data source, you can reference IAM instance profile properties without having to hard code ARNs as input.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(Aws.Iam.GetInstanceProfile.InvokeAsync(new Aws.Iam.GetInstanceProfileArgs
{
Name = "an_example_instance_profile_name",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := iam.LookupInstanceProfile(ctx, &iam.LookupInstanceProfileArgs{
Name: "an_example_instance_profile_name",
}, nil)
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.iam.get_instance_profile(name="an_example_instance_profile_name")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.iam.getInstanceProfile({
name: "an_example_instance_profile_name",
}, { async: true }));Using GetInstanceProfile
function getInstanceProfile(args: GetInstanceProfileArgs, opts?: InvokeOptions): Promise<GetInstanceProfileResult>function get_instance_profile(name=None, opts=None)func LookupInstanceProfile(ctx *Context, args *LookupInstanceProfileArgs, opts ...InvokeOption) (*LookupInstanceProfileResult, error)Note: This function is named
LookupInstanceProfilein the Go SDK.
public static class GetInstanceProfile {
public static Task<GetInstanceProfileResult> InvokeAsync(GetInstanceProfileArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
GetInstanceProfile Result
The following output properties are available:
- Arn string
The Amazon Resource Name (ARN) specifying the instance profile.
- Create
Date string The string representation of the date the instance profile was created.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Path string
The path to the instance profile.
- Role
Arn string The role arn associated with this instance profile.
- Role
Id string The role id associated with this instance profile.
- Role
Name string The role name associated with this instance profile.
- Arn string
The Amazon Resource Name (ARN) specifying the instance profile.
- Create
Date string The string representation of the date the instance profile was created.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Path string
The path to the instance profile.
- Role
Arn string The role arn associated with this instance profile.
- Role
Id string The role id associated with this instance profile.
- Role
Name string The role name associated with this instance profile.
- arn string
The Amazon Resource Name (ARN) specifying the instance profile.
- create
Date string The string representation of the date the instance profile was created.
- id string
The provider-assigned unique ID for this managed resource.
- name string
- path string
The path to the instance profile.
- role
Arn string The role arn associated with this instance profile.
- role
Id string The role id associated with this instance profile.
- role
Name string The role name associated with this instance profile.
- arn str
The Amazon Resource Name (ARN) specifying the instance profile.
- create_
date str The string representation of the date the instance profile was created.
- id str
The provider-assigned unique ID for this managed resource.
- name str
- path str
The path to the instance profile.
- role_
arn str The role arn associated with this instance profile.
- role_
id str The role id associated with this instance profile.
- role_
name str The role name associated with this instance profile.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.