Class CfnAccessKey.Builder

java.lang.Object
software.amazon.awscdk.services.iam.CfnAccessKey.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAccessKey>
Enclosing class:
CfnAccessKey

@Stability(Stable) public static final class CfnAccessKey.Builder extends Object implements software.amazon.jsii.Builder<CfnAccessKey>
A fluent builder for CfnAccessKey.
  • Method Details

    • create

      @Stability(Stable) public static CfnAccessKey.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnAccessKey.Builder.
    • userName

      @Stability(Stable) public CfnAccessKey.Builder userName(String userName)
      The name of the IAM user that the new key will belong to.

      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: _+=,.@-

      Parameters:
      userName - The name of the IAM user that the new key will belong to. This parameter is required.
      Returns:
      this
    • serial

      @Stability(Stable) public CfnAccessKey.Builder serial(Number 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.

      Parameters:
      serial - This value is specific to CloudFormation and can only be incremented . This parameter is required.
      Returns:
      this
    • status

      @Stability(Stable) public CfnAccessKey.Builder status(String status)
      The status of the access key.

      Active means that the key is valid for API calls, while Inactive means it is not.

      Parameters:
      status - The status of the access key. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public CfnAccessKey build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnAccessKey>
      Returns:
      a newly built instance of CfnAccessKey.