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,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Iam
Assembly: Pulumi.Aws.dll
Syntax
public class InstanceProfile : CustomResource
Constructors
View SourceInstanceProfile(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 SourceArn
The ARN assigned by AWS to the instance profile.
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CreateDate
The creation timestamp of the instance profile.
Declaration
public Output<string> CreateDate { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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> |
Path
Path in which to create the profile.
Declaration
public Output<string> Path { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Role
The role name to include in the profile.
Declaration
public Output<string> Role { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
UniqueId
The [unique ID][1] assigned by AWS.
Declaration
public Output<string> UniqueId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(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 |