Class CfnAccessKeyProps.Builder
java.lang.Object
software.amazon.awscdk.services.iam.CfnAccessKeyProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAccessKeyProps>
- Enclosing interface:
- CfnAccessKeyProps
@Stability(Stable)
public static final class CfnAccessKeyProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAccessKeyProps>
A builder for
CfnAccessKeyProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnAccessKeyProps.getSerial()Sets the value ofCfnAccessKeyProps.getStatus()Sets the value ofCfnAccessKeyProps.getUserName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
userName
Sets the value ofCfnAccessKeyProps.getUserName()- Parameters:
userName- The name of the IAM user that the new key will belong to. This parameter is required. 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
-
serial
Sets the value ofCfnAccessKeyProps.getSerial()- Parameters:
serial- This value is specific to CloudFormation and can only be incremented . Incrementing this value notifies CloudFormation that you want to rotate your access key. When you update your stack, CloudFormation will replace the existing access key with a new key.- Returns:
this
-
status
Sets the value ofCfnAccessKeyProps.getStatus()- Parameters:
status- The status of the access key.Activemeans that the key is valid for API calls, whileInactivemeans it is not.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnAccessKeyProps>- Returns:
- a new instance of
CfnAccessKeyProps - Throws:
NullPointerException- if any required attribute was not provided
-