Interface InstanceProfileProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
InstanceProfileProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.91.0 (build 1b1f239)",
date="2023-11-16T22:34:06.112Z")
@Stability(Stable)
public interface InstanceProfileProps
extends software.amazon.jsii.JsiiSerializable
Properties of an Instance Profile.
Example:
Role role = Role.Builder.create(this, "Role") .assumedBy(new ServicePrincipal("ec2.amazonaws.com")) .build(); InstanceProfile instanceProfile = InstanceProfile.Builder.create(this, "InstanceProfile") .role(role) .instanceProfileName("MyInstanceProfile") .path("/sample/path/") .build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forInstanceProfileProps
static final class
An implementation forInstanceProfileProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic InstanceProfileProps.Builder
builder()
default String
The name of the InstanceProfile to create.default String
getPath()
The path to the InstanceProfile.default IRole
getRole()
An IAM role to associate with the instance profile that is used by EC2 instances.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getInstanceProfileName
The name of the InstanceProfile to create.Default: - generated by CloudFormation
-
getPath
The path to the InstanceProfile.Default: /
-
getRole
An IAM role to associate with the instance profile that is used by EC2 instances.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
Example:
Role role = Role.Builder.create(this, "MyRole") .assumedBy(new ServicePrincipal("ec2.amazonaws.com")) .build();
-
builder
- Returns:
- a
InstanceProfileProps.Builder
ofInstanceProfileProps
-