Skip to content
v2.274.0

IHttpStage Interface ​

Represents the HttpStage.

Properties ​

The API this stage is associated to.
domainUrlstringdomain_urlstrdomainUrlStringDomainUrlstringDomainUrl*stringrequired#
The custom domain URL to this stage.
The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

isHttpStagebooleanis_http_stageboolisHttpStageBooleanIsHttpStageboolIsHttpStage*boolrequired#
Indicates that this is an HTTP Stage.

Will always return true, but is necessary to prevent accidental structural equality in TypeScript.

nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this resource is defined.
stageNamestringstage_namestrstageNameStringStageNamestringStageName*stringrequired#
The name of the stage;

its primary identifier.

stageRefStageReferencestage_refStageReferencestageRefStageReferenceStageRefStageReferenceStageRefStageReferencerequired#
A reference to a Stage resource.
urlstringurlstrurlStringUrlstringUrl*stringrequired#
The URL to this stage.

Methods ​

addStageVariable(name: string, value: string): voiddef add_stage_variable(self, name: str, value: str) -> Nonepublic void addStageVariable(String name, String value)public void AddStageVariable(string name, string value)func AddStageVariable(Name *string, Value *string)#
Adds a stage variable to this stage.
2 parameters

Parameters

  • namenamenamenameName — The name of the stage variable.
  • valuevaluevaluevalueValue — The value of the stage variable.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

metric(metricName: string, props?: MetricOptions): Metricdef metric(self, metric_name: str, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metric(String metricName, MetricOptions props)public Metric Metric(string metricName, MetricOptions? props = null)func Metric(MetricName *string, Props MetricOptions) Metric#
Return the given named metric for this HTTP Api Gateway Stage.
metricClientError(props?: MetricOptions): Metricdef metric_client_error(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricClientError(MetricOptions props)public Metric MetricClientError(MetricOptions? props = null)func MetricClientError(Props MetricOptions) Metric#
Metric for the number of client-side errors captured in a given period.
metricCount(props?: MetricOptions): Metricdef metric_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricCount(MetricOptions props)public Metric MetricCount(MetricOptions? props = null)func MetricCount(Props MetricOptions) Metric#
Metric for the total number API requests in a given period.
metricDataProcessed(props?: MetricOptions): Metricdef metric_data_processed(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricDataProcessed(MetricOptions props)public Metric MetricDataProcessed(MetricOptions? props = null)func MetricDataProcessed(Props MetricOptions) Metric#
Metric for the amount of data processed in bytes.
metricIntegrationLatency(props?: MetricOptions): Metricdef metric_integration_latency(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricIntegrationLatency(MetricOptions props)public Metric MetricIntegrationLatency(MetricOptions? props = null)func MetricIntegrationLatency(Props MetricOptions) Metric#
Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend.
metricLatency(props?: MetricOptions): Metricdef metric_latency(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricLatency(MetricOptions props)public Metric MetricLatency(MetricOptions? props = null)func MetricLatency(Props MetricOptions) Metric#
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.

metricServerError(props?: MetricOptions): Metricdef metric_server_error(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricServerError(MetricOptions props)public Metric MetricServerError(MetricOptions? props = null)func MetricServerError(Props MetricOptions) Metric#
Metric for the number of server-side errors captured in a given period.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining