Class Stage.Builder

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

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

    • create

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

      @Stability(Stable) public Stage.Builder cacheDataEncrypted(Boolean cacheDataEncrypted)
      Indicates whether the cached responses are encrypted.

      Default: false

      Parameters:
      cacheDataEncrypted - Indicates whether the cached responses are encrypted. This parameter is required.
      Returns:
      this
    • cacheTtl

      @Stability(Stable) public Stage.Builder cacheTtl(Duration cacheTtl)
      Specifies the time to live (TTL), in seconds, for cached responses.

      The higher the TTL, the longer the response will be cached.

      Default: Duration.minutes(5)

      Parameters:
      cacheTtl - Specifies the time to live (TTL), in seconds, for cached responses. This parameter is required.
      Returns:
      this
      See Also:
    • cachingEnabled

      @Stability(Stable) public Stage.Builder cachingEnabled(Boolean cachingEnabled)
      Specifies whether responses should be cached and returned for requests.

      A cache cluster must be enabled on the stage for responses to be cached.

      Default: - Caching is Disabled.

      Parameters:
      cachingEnabled - Specifies whether responses should be cached and returned for requests. This parameter is required.
      Returns:
      this
    • dataTraceEnabled

      @Stability(Stable) public Stage.Builder dataTraceEnabled(Boolean dataTraceEnabled)
      Specifies whether data trace logging is enabled for this method.

      When enabled, API gateway will log the full API requests and responses. This can be useful to troubleshoot APIs, but can result in logging sensitive data. We recommend that you don't enable this feature for production APIs.

      Default: false

      Parameters:
      dataTraceEnabled - Specifies whether data trace logging is enabled for this method. This parameter is required.
      Returns:
      this
    • loggingLevel

      @Stability(Stable) public Stage.Builder loggingLevel(MethodLoggingLevel loggingLevel)
      Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs.

      Default: - Off

      Parameters:
      loggingLevel - Specifies the logging level for this method, which effects the log entries pushed to Amazon CloudWatch Logs. This parameter is required.
      Returns:
      this
    • metricsEnabled

      @Stability(Stable) public Stage.Builder metricsEnabled(Boolean metricsEnabled)
      Specifies whether Amazon CloudWatch metrics are enabled for this method.

      Default: false

      Parameters:
      metricsEnabled - Specifies whether Amazon CloudWatch metrics are enabled for this method. This parameter is required.
      Returns:
      this
    • throttlingBurstLimit

      @Stability(Stable) public Stage.Builder throttlingBurstLimit(Number throttlingBurstLimit)
      Specifies the throttling burst limit.

      The total rate of all requests in your AWS account is limited to 5,000 requests.

      Default: - No additional restriction.

      Parameters:
      throttlingBurstLimit - Specifies the throttling burst limit. This parameter is required.
      Returns:
      this
      See Also:
    • throttlingRateLimit

      @Stability(Stable) public Stage.Builder throttlingRateLimit(Number throttlingRateLimit)
      Specifies the throttling rate limit.

      The total rate of all requests in your AWS account is limited to 10,000 requests per second (rps).

      Default: - No additional restriction.

      Parameters:
      throttlingRateLimit - Specifies the throttling rate limit. This parameter is required.
      Returns:
      this
      See Also:
    • accessLogDestination

      @Stability(Stable) public Stage.Builder accessLogDestination(IAccessLogDestination accessLogDestination)
      The CloudWatch Logs log group.

      Default: - No destination

      Parameters:
      accessLogDestination - The CloudWatch Logs log group. This parameter is required.
      Returns:
      this
    • accessLogFormat

      @Stability(Stable) public Stage.Builder accessLogFormat(AccessLogFormat accessLogFormat)
      A single line format of access logs of data, as specified by selected $content variables.

      The format must include at least AccessLogFormat.contextRequestId().

      Default: - Common Log Format

      Parameters:
      accessLogFormat - A single line format of access logs of data, as specified by selected $content variables. This parameter is required.
      Returns:
      this
      See Also:
    • cacheClusterEnabled

      @Stability(Stable) public Stage.Builder cacheClusterEnabled(Boolean cacheClusterEnabled)
      Indicates whether cache clustering is enabled for the stage.

      Default: - Disabled for the stage.

      Parameters:
      cacheClusterEnabled - Indicates whether cache clustering is enabled for the stage. This parameter is required.
      Returns:
      this
    • cacheClusterSize

      @Stability(Stable) public Stage.Builder cacheClusterSize(String cacheClusterSize)
      The stage's cache cluster size.

      Default: 0.5

      Parameters:
      cacheClusterSize - The stage's cache cluster size. This parameter is required.
      Returns:
      this
    • clientCertificateId

      @Stability(Stable) public Stage.Builder clientCertificateId(String clientCertificateId)
      The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage.

      Default: - None.

      Parameters:
      clientCertificateId - The identifier of the client certificate that API Gateway uses to call your integration endpoints in the stage. This parameter is required.
      Returns:
      this
    • description

      @Stability(Stable) public Stage.Builder description(String description)
      A description of the purpose of the stage.

      Default: - No description.

      Parameters:
      description - A description of the purpose of the stage. This parameter is required.
      Returns:
      this
    • documentationVersion

      @Stability(Stable) public Stage.Builder documentationVersion(String documentationVersion)
      The version identifier of the API documentation snapshot.

      Default: - No documentation version.

      Parameters:
      documentationVersion - The version identifier of the API documentation snapshot. This parameter is required.
      Returns:
      this
    • methodOptions

      @Stability(Stable) public Stage.Builder methodOptions(Map<String,? extends MethodDeploymentOptions> methodOptions)
      Method deployment options for specific resources/methods.

      These will override common options defined in StageOptions#methodOptions.

      Default: - Common options will be used.

      Parameters:
      methodOptions - Method deployment options for specific resources/methods. This parameter is required.
      Returns:
      this
    • stageName

      @Stability(Stable) public Stage.Builder stageName(String stageName)
      The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI).

      Default: - "prod"

      Parameters:
      stageName - The name of the stage, which API Gateway uses as the first path segment in the invoked Uniform Resource Identifier (URI). This parameter is required.
      Returns:
      this
    • tracingEnabled

      @Stability(Stable) public Stage.Builder tracingEnabled(Boolean tracingEnabled)
      Specifies whether Amazon X-Ray tracing is enabled for this method.

      Default: false

      Parameters:
      tracingEnabled - Specifies whether Amazon X-Ray tracing is enabled for this method. This parameter is required.
      Returns:
      this
    • variables

      @Stability(Stable) public Stage.Builder variables(Map<String,String> variables)
      A map that defines the stage variables.

      Variable names must consist of alphanumeric characters, and the values must match the following regular expression: [A-Za-z0-9-._~:/?#&=,]+.

      Default: - No stage variables.

      Parameters:
      variables - A map that defines the stage variables. This parameter is required.
      Returns:
      this
    • deployment

      @Stability(Stable) public Stage.Builder deployment(Deployment deployment)
      The deployment that this stage points to [disable-awslint:ref-via-interface].

      Parameters:
      deployment - The deployment that this stage points to [disable-awslint:ref-via-interface]. This parameter is required.
      Returns:
      this
    • build

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