Module: AWSCDK::APIGatewayv2::IHttpStage
Overview
Represents the HttpStage.
Class Method Summary collapse
Instance Method Summary collapse
-
#add_stage_variable(name, value) ⇒ void
Adds a stage variable to this stage.
-
#api ⇒ AWSCDK::APIGatewayv2::IHttpAPI
The API this stage is associated to.
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#domain_url ⇒ String
The custom domain URL to this stage.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#is_http_stage ⇒ Boolean
Indicates that this is an HTTP Stage.
-
#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric for this HTTP Api Gateway Stage.
-
#metric_client_error(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Metric for the number of client-side errors captured in a given period.
-
#metric_count(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Metric for the total number API requests in a given period.
-
#metric_data_processed(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Metric for the amount of data processed in bytes.
-
#metric_integration_latency(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend.
-
#metric_latency(props = nil) ⇒ AWSCDK::CloudWatch::Metric
The time between when API Gateway receives a request from a client and when it returns a response to the client.
-
#metric_server_error(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Metric for the number of server-side errors captured in a given period.
-
#node ⇒ Constructs::Node
The tree node.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#stage_name ⇒ String
The name of the stage;.
-
#stage_ref ⇒ AWSCDK::Interfaces::AWSApigatewayv2::StageReference
A reference to a Stage resource.
-
#url ⇒ String
The URL to this stage.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Class Method Details
.jsii_overridable_methods ⇒ Object
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'api_gatewayv2/i_http_stage.rb', line 208 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :stage_ref => { kind: :property, name: "stageRef", is_optional: false }, :stage_name => { kind: :property, name: "stageName", is_optional: false }, :url => { kind: :property, name: "url", is_optional: false }, :is_http_stage => { kind: :property, name: "isHttpStage", is_optional: false }, :api => { kind: :property, name: "api", is_optional: false }, :domain_url => { kind: :property, name: "domainUrl", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :add_stage_variable => { kind: :method, name: "addStageVariable", is_optional: false }, :metric => { kind: :method, name: "metric", is_optional: false }, :metric_client_error => { kind: :method, name: "metricClientError", is_optional: false }, :metric_count => { kind: :method, name: "metricCount", is_optional: false }, :metric_data_processed => { kind: :method, name: "metricDataProcessed", is_optional: false }, :metric_integration_latency => { kind: :method, name: "metricIntegrationLatency", is_optional: false }, :metric_latency => { kind: :method, name: "metricLatency", is_optional: false }, :metric_server_error => { kind: :method, name: "metricServerError", is_optional: false }, } end |
Instance Method Details
#add_stage_variable(name, value) ⇒ void
This method returns an undefined value.
Adds a stage variable to this stage.
121 122 123 124 125 |
# File 'api_gatewayv2/i_http_stage.rb', line 121 def add_stage_variable(name, value) Jsii::Type.check_type(name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value") jsii_call_method("addStageVariable", [name, value]) end |
#api ⇒ AWSCDK::APIGatewayv2::IHttpAPI
The API this stage is associated to.
74 75 76 |
# File 'api_gatewayv2/i_http_stage.rb', line 74 def api() jsii_get_property("api") end |
#apply_removal_policy(policy) ⇒ void
This method returns an undefined value.
Apply the given removal policy to this resource.
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).
111 112 113 114 |
# File 'api_gatewayv2/i_http_stage.rb', line 111 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#domain_url ⇒ String
The custom domain URL to this stage.
81 82 83 |
# File 'api_gatewayv2/i_http_stage.rb', line 81 def domain_url() jsii_get_property("domainUrl") end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
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.
27 28 29 |
# File 'api_gatewayv2/i_http_stage.rb', line 27 def env() jsii_get_property("env") end |
#is_http_stage ⇒ Boolean
Indicates that this is an HTTP Stage.
Will always return true, but is necessary to prevent accidental structural equality in TypeScript.
67 68 69 |
# File 'api_gatewayv2/i_http_stage.rb', line 67 def is_http_stage() jsii_get_property("isHttpStage") end |
#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Default: - average over 5 minutes
Return the given named metric for this HTTP Api Gateway Stage.
133 134 135 136 137 138 |
# File 'api_gatewayv2/i_http_stage.rb', line 133 def metric(metric_name, props = nil) Jsii::Type.check_type(metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metric", [metric_name, props]) end |
#metric_client_error(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Default: - sum over 5 minutes
Metric for the number of client-side errors captured in a given period.
145 146 147 148 149 |
# File 'api_gatewayv2/i_http_stage.rb', line 145 def metric_client_error(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricClientError", [props]) end |
#metric_count(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Default: - SampleCount over 5 minutes
Metric for the total number API requests in a given period.
156 157 158 159 160 |
# File 'api_gatewayv2/i_http_stage.rb', line 156 def metric_count(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricCount", [props]) end |
#metric_data_processed(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Default: - sum over 5 minutes
Metric for the amount of data processed in bytes.
167 168 169 170 171 |
# File 'api_gatewayv2/i_http_stage.rb', line 167 def metric_data_processed(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricDataProcessed", [props]) end |
#metric_integration_latency(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Default: - no statistic
Metric for the time between when API Gateway relays a request to the backend and when it receives a response from the backend.
178 179 180 181 182 |
# File 'api_gatewayv2/i_http_stage.rb', line 178 def metric_integration_latency(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricIntegrationLatency", [props]) end |
#metric_latency(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Default: - no statistic
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.
191 192 193 194 195 |
# File 'api_gatewayv2/i_http_stage.rb', line 191 def metric_latency(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricLatency", [props]) end |
#metric_server_error(props = nil) ⇒ AWSCDK::CloudWatch::Metric
Default: - sum over 5 minutes
Metric for the number of server-side errors captured in a given period.
202 203 204 205 206 |
# File 'api_gatewayv2/i_http_stage.rb', line 202 def metric_server_error(props = nil) props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil? jsii_call_method("metricServerError", [props]) end |
#node ⇒ Constructs::Node
The tree node.
12 13 14 |
# File 'api_gatewayv2/i_http_stage.rb', line 12 def node() jsii_get_property("node") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
34 35 36 |
# File 'api_gatewayv2/i_http_stage.rb', line 34 def stack() jsii_get_property("stack") end |
#stage_name ⇒ String
The name of the stage;
its primary identifier.
50 51 52 |
# File 'api_gatewayv2/i_http_stage.rb', line 50 def stage_name() jsii_get_property("stageName") end |
#stage_ref ⇒ AWSCDK::Interfaces::AWSApigatewayv2::StageReference
A reference to a Stage resource.
41 42 43 |
# File 'api_gatewayv2/i_http_stage.rb', line 41 def stage_ref() jsii_get_property("stageRef") end |
#url ⇒ String
The URL to this stage.
57 58 59 |
# File 'api_gatewayv2/i_http_stage.rb', line 57 def url() jsii_get_property("url") end |
#with(*mixins) ⇒ Constructs::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.
92 93 94 95 96 97 |
# File 'api_gatewayv2/i_http_stage.rb', line 92 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |