Class InstanceProfileProps.Builder
java.lang.Object
software.amazon.awscdk.services.iam.InstanceProfileProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<InstanceProfileProps>
- Enclosing interface:
InstanceProfileProps
@Stability(Stable)
public static final class InstanceProfileProps.Builder
extends Object
implements software.amazon.jsii.Builder<InstanceProfileProps>
A builder for
InstanceProfileProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.instanceProfileName(String instanceProfileName) Sets the value ofInstanceProfileProps.getInstanceProfileName()Sets the value ofInstanceProfileProps.getPath()Sets the value ofInstanceProfileProps.getRole()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instanceProfileName
@Stability(Stable) public InstanceProfileProps.Builder instanceProfileName(String instanceProfileName) Sets the value ofInstanceProfileProps.getInstanceProfileName()- Parameters:
instanceProfileName- The name of the InstanceProfile to create.- Returns:
this
-
path
Sets the value ofInstanceProfileProps.getPath()- Parameters:
path- The path to the InstanceProfile.- Returns:
this
-
role
Sets the value ofInstanceProfileProps.getRole()- Parameters:
role- An IAM role to associate with the instance profile that is used by EC2 instances. The role must be assumable by the service principalec2.amazonaws.com:- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<InstanceProfileProps>- Returns:
- a new instance of
InstanceProfileProps - Throws:
NullPointerException- if any required attribute was not provided
-