Interface IInstanceProfileProps
Properties of an Instance Profile.
Namespace: Amazon.CDK.AWS.IAM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IInstanceProfileProps
Syntax (vb)
Public Interface IInstanceProfileProps
Remarks
ExampleMetadata: infused
Examples
var role = new Role(this, "Role", new RoleProps {
AssumedBy = new ServicePrincipal("ec2.amazonaws.com")
});
var instanceProfile = new InstanceProfile(this, "InstanceProfile", new InstanceProfileProps {
Role = role,
InstanceProfileName = "MyInstanceProfile",
Path = "/sample/path/"
});
Synopsis
Properties
InstanceProfileName | The name of the InstanceProfile to create. |
Path | The path to the InstanceProfile. |
Role | An IAM role to associate with the instance profile that is used by EC2 instances. |
Properties
InstanceProfileName
The name of the InstanceProfile to create.
virtual string InstanceProfileName { get; }
Property Value
System.String
Remarks
Default: - generated by CloudFormation
Path
The path to the InstanceProfile.
virtual string Path { get; }
Property Value
System.String
Remarks
Default: /
Role
An IAM role to associate with the instance profile that is used by EC2 instances.
virtual IRole Role { get; }
Property Value
Remarks
The role must be assumable by the service principal ec2.amazonaws.com
:
Default: - a role will be automatically created, it can be accessed via the role
property
Examples
var role = new Role(this, "MyRole", new RoleProps {
AssumedBy = new ServicePrincipal("ec2.amazonaws.com")
});