java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.apigatewayv2.HttpStage
All Implemented Interfaces:
IResource, IHttpStage, IStage, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.109.0 (build c221850)", date="2025-03-19T18:01:28.711Z") @Stability(Stable) public class HttpStage extends Resource implements IHttpStage, IStage
Represents a stage where an instance of the API is deployed.

Example:

 HttpApi api;
 HttpStage.Builder.create(this, "Stage")
         .httpApi(api)
         .stageName("beta")
         .description("My Stage")
         .build();
 
  • Constructor Details

    • HttpStage

      protected HttpStage(software.amazon.jsii.JsiiObjectRef objRef)
    • HttpStage

      protected HttpStage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • HttpStage

      @Stability(Stable) public HttpStage(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HttpStageProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props - This parameter is required.
  • Method Details

    • fromHttpStageAttributes

      @Stability(Stable) @NotNull public static IHttpStage fromHttpStageAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HttpStageAttributes attrs)
      Import an existing stage into this CDK app.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      attrs - This parameter is required.
    • metric

      @Stability(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
      Return the given named metric for this HTTP Api Gateway Stage.

      Specified by:
      metric in interface IStage
      Parameters:
      metricName - This parameter is required.
      props -
    • metric

      @Stability(Stable) @NotNull public Metric metric(@NotNull String metricName)
      Return the given named metric for this HTTP Api Gateway Stage.

      Specified by:
      metric in interface IStage
      Parameters:
      metricName - This parameter is required.
    • metricClientError

      @Stability(Stable) @NotNull public Metric metricClientError(@Nullable MetricOptions props)
      Metric for the number of client-side errors captured in a given period.

      Specified by:
      metricClientError in interface IHttpStage
      Parameters:
      props -
    • metricClientError

      @Stability(Stable) @NotNull public Metric metricClientError()
      Metric for the number of client-side errors captured in a given period.
      Specified by:
      metricClientError in interface IHttpStage
    • metricCount

      @Stability(Stable) @NotNull public Metric metricCount(@Nullable MetricOptions props)
      Metric for the total number API requests in a given period.

      Specified by:
      metricCount in interface IHttpStage
      Parameters:
      props -
    • metricCount

      @Stability(Stable) @NotNull public Metric metricCount()
      Metric for the total number API requests in a given period.
      Specified by:
      metricCount in interface IHttpStage
    • metricDataProcessed

      @Stability(Stable) @NotNull public Metric metricDataProcessed(@Nullable MetricOptions props)
      Metric for the amount of data processed in bytes.

      Specified by:
      metricDataProcessed in interface IHttpStage
      Parameters:
      props -
    • metricDataProcessed

      @Stability(Stable) @NotNull public Metric metricDataProcessed()
      Metric for the amount of data processed in bytes.
      Specified by:
      metricDataProcessed in interface IHttpStage
    • metricIntegrationLatency

      @Stability(Stable) @NotNull public Metric metricIntegrationLatency(@Nullable MetricOptions props)
      Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend.

      Specified by:
      metricIntegrationLatency in interface IHttpStage
      Parameters:
      props -
    • metricIntegrationLatency

      @Stability(Stable) @NotNull public Metric metricIntegrationLatency()
      Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend.
      Specified by:
      metricIntegrationLatency in interface IHttpStage
    • metricLatency

      @Stability(Stable) @NotNull public Metric metricLatency(@Nullable MetricOptions props)
      The time between when API Gateway receives a request from a client and when it returns a response to the client.

      The latency includes the integration latency and other API Gateway overhead.

      Specified by:
      metricLatency in interface IHttpStage
      Parameters:
      props -
    • metricLatency

      @Stability(Stable) @NotNull public Metric metricLatency()
      The time between when API Gateway receives a request from a client and when it returns a response to the client.

      The latency includes the integration latency and other API Gateway overhead.

      Specified by:
      metricLatency in interface IHttpStage
    • metricServerError

      @Stability(Stable) @NotNull public Metric metricServerError(@Nullable MetricOptions props)
      Metric for the number of server-side errors captured in a given period.

      Specified by:
      metricServerError in interface IHttpStage
      Parameters:
      props -
    • metricServerError

      @Stability(Stable) @NotNull public Metric metricServerError()
      Metric for the number of server-side errors captured in a given period.
      Specified by:
      metricServerError in interface IHttpStage
    • getApi

      @Stability(Stable) @NotNull public IHttpApi getApi()
      The API this stage is associated to.
      Specified by:
      getApi in interface IHttpStage
    • getBaseApi

      @Stability(Stable) @NotNull protected IApi getBaseApi()
    • getDomainUrl

      @Stability(Stable) @NotNull public String getDomainUrl()
      The custom domain URL to this stage.
      Specified by:
      getDomainUrl in interface IHttpStage
    • getStageName

      @Stability(Stable) @NotNull public String getStageName()
      The name of the stage;

      its primary identifier.

      Specified by:
      getStageName in interface IStage
    • getUrl

      @Stability(Stable) @NotNull public String getUrl()
      The URL to this stage.
      Specified by:
      getUrl in interface IStage