Show / Hide Table of Contents

Class InstanceProfile

Provides an IAM instance profile.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var role = new Aws.Iam.Role("role", new Aws.Iam.RoleArgs
    {
        AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
    {
        ""Action"": ""sts:AssumeRole"",
        ""Principal"": {
           ""Service"": ""ec2.amazonaws.com""
        },
        ""Effect"": ""Allow"",
        ""Sid"": """"
    }
]
}

",
        Path = "/",
    });
    var testProfile = new Aws.Iam.InstanceProfile("testProfile", new Aws.Iam.InstanceProfileArgs
    {
        Role = role.Name,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
InstanceProfile
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
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 class InstanceProfile : CustomResource

Constructors

View Source

InstanceProfile(String, InstanceProfileArgs, CustomResourceOptions)

Create a InstanceProfile resource with the given unique name, arguments, and options.

Declaration
public InstanceProfile(string name, InstanceProfileArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

InstanceProfileArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The ARN assigned by AWS to the instance profile.

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

CreateDate

The creation timestamp of the instance profile.

Declaration
public Output<string> CreateDate { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The profile's name. If omitted, this provider will assign a random, unique name.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

NamePrefix

Creates a unique name beginning with the specified prefix. Conflicts with name.

Declaration
public Output<string> NamePrefix { get; }
Property Value
Type Description
Output<System.String>
View Source

Path

Path in which to create the profile.

Declaration
public Output<string> Path { get; }
Property Value
Type Description
Output<System.String>
View Source

Role

The role name to include in the profile.

Declaration
public Output<string> Role { get; }
Property Value
Type Description
Output<System.String>
View Source

Roles

A list of role names to include in the profile. The current default is 1. If you see an error message similar to Cannot exceed quota for InstanceSessionsPerInstanceProfile: 1, then you must contact AWS support and ask for a limit increase.

Declaration
public Output<ImmutableArray<string>> Roles { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

UniqueId

The [unique ID][1] assigned by AWS.

Declaration
public Output<string> UniqueId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, InstanceProfileState, CustomResourceOptions)

Get an existing InstanceProfile resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static InstanceProfile Get(string name, Input<string> id, InstanceProfileState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

InstanceProfileState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
InstanceProfile
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.