Class AccessKey.Builder

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

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

    • create

      @Stability(Stable) public static AccessKey.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of AccessKey.Builder.
    • user

      @Stability(Stable) public AccessKey.Builder user(IUser user)
      The IAM user this key will belong to.

      Changing this value will result in the access key being deleted and a new access key (with a different ID and secret value) being assigned to the new user.

      Parameters:
      user - The IAM user this key will belong to. This parameter is required.
      Returns:
      this
    • serial

      @Stability(Stable) public AccessKey.Builder serial(Number serial)
      A CloudFormation-specific value that signifies the access key should be replaced/rotated.

      This value can only be incremented. Incrementing this value will cause CloudFormation to replace the Access Key resource.

      Default: - No serial value

      Parameters:
      serial - A CloudFormation-specific value that signifies the access key should be replaced/rotated. This parameter is required.
      Returns:
      this
    • status

      @Stability(Stable) public AccessKey.Builder status(AccessKeyStatus status)
      The status of the access key.

      An Active access key is allowed to be used to make API calls; An Inactive key cannot.

      Default: - The access key is active

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

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