Class CfnInstanceProfileProps.Builder
java.lang.Object
software.amazon.awscdk.services.iam.CfnInstanceProfileProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstanceProfileProps>
- Enclosing interface:
CfnInstanceProfileProps
@Stability(Stable)
public static final class CfnInstanceProfileProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstanceProfileProps>
A builder for
CfnInstanceProfileProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.instanceProfileName
(String instanceProfileName) Sets the value ofCfnInstanceProfileProps.getInstanceProfileName()
Sets the value ofCfnInstanceProfileProps.getPath()
Sets the value ofCfnInstanceProfileProps.getRoles()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
roles
Sets the value ofCfnInstanceProfileProps.getRoles()
- Parameters:
roles
- The name of the role to associate with the instance profile. This parameter is required. Only one role can be assigned to an EC2 instance at a time, and all applications on the instance share the same role and permissions.- Returns:
this
-
instanceProfileName
@Stability(Stable) public CfnInstanceProfileProps.Builder instanceProfileName(String instanceProfileName) Sets the value ofCfnInstanceProfileProps.getInstanceProfileName()
- Parameters:
instanceProfileName
- The name of the instance profile to create. This parameter allows (through its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-- Returns:
this
-
path
Sets the value ofCfnInstanceProfileProps.getPath()
- Parameters:
path
- The path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide .This parameter is optional. If it is not included, it defaults to a slash (/).
This parameter allows (through its regex pattern ) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (
!
) through the DEL character (
), including most punctuation characters, digits, and upper and lowercased letters.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnInstanceProfileProps>
- Returns:
- a new instance of
CfnInstanceProfileProps
- Throws:
NullPointerException
- if any required attribute was not provided
-