Class ApiKey.Builder

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

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

    • create

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

      @Stability(Stable) public ApiKey.Builder apiKeyName(String apiKeyName)
      A name for the API key.

      If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.

      Default: automatically generated name

      Parameters:
      apiKeyName - A name for the API key. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public ApiKey.Builder description(String description)
      A description of the purpose of the API key.

      Default: none

      Parameters:
      description - A description of the purpose of the API key. This parameter is required.
      Returns:
      this
    • value

      @Stability(Stable) public ApiKey.Builder value(String value)
      The value of the API key.

      Must be at least 20 characters long.

      Default: none

      Parameters:
      value - The value of the API key. This parameter is required.
      Returns:
      this
    • customerId

      @Stability(Stable) public ApiKey.Builder customerId(String customerId)
      An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.

      Default: none

      Parameters:
      customerId - An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. This parameter is required.
      Returns:
      this
    • enabled

      @Stability(Stable) public ApiKey.Builder enabled(Boolean enabled)
      Indicates whether the API key can be used by clients.

      Default: true

      Parameters:
      enabled - Indicates whether the API key can be used by clients. This parameter is required.
      Returns:
      this
    • generateDistinctId

      @Stability(Stable) public ApiKey.Builder generateDistinctId(Boolean generateDistinctId)
      Specifies whether the key identifier is distinct from the created API key value.

      Default: false

      Parameters:
      generateDistinctId - Specifies whether the key identifier is distinct from the created API key value. This parameter is required.
      Returns:
      this
    • build

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