Module: AWSCDK::APIGatewayv2::IWebSocketStage
Overview
Represents the WebSocketStage.
Class Method Summary collapse
Instance Method Summary collapse
-
#add_stage_variable(name, value) ⇒ void
Adds a stage variable to this stage.
-
#api ⇒ AWSCDK::APIGatewayv2::IWebSocketAPI
The API this stage is associated to.
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#callback_url ⇒ String
The callback URL to this stage.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
-
#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric
Return the given named metric for this HTTP Api Gateway Stage.
-
#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
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 133 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 }, :api => { kind: :property, name: "api", is_optional: false }, :callback_url => { kind: :property, name: "callbackUrl", 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 }, } end |
Instance Method Details
#add_stage_variable(name, value) ⇒ void
This method returns an undefined value.
Adds a stage variable to this stage.
114 115 116 117 118 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 114 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::IWebSocketAPI
The API this stage is associated to.
63 64 65 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 63 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).
104 105 106 107 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 104 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#callback_url ⇒ String
The callback URL to this stage.
You can use the callback URL to send messages to the client from the backend system. https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-basic-concept.html https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-how-to-call-websocket-api-connections.html
74 75 76 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 74 def callback_url() jsii_get_property("callbackUrl") 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.
26 27 28 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 26 def env() jsii_get_property("env") 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.
126 127 128 129 130 131 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 126 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 |
#node ⇒ Constructs::Node
The tree node.
11 12 13 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 11 def node() jsii_get_property("node") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
33 34 35 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 33 def stack() jsii_get_property("stack") end |
#stage_name ⇒ String
The name of the stage;
its primary identifier.
49 50 51 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 49 def stage_name() jsii_get_property("stageName") end |
#stage_ref ⇒ AWSCDK::Interfaces::AWSApigatewayv2::StageReference
A reference to a Stage resource.
40 41 42 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 40 def stage_ref() jsii_get_property("stageRef") end |
#url ⇒ String
The URL to this stage.
56 57 58 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 56 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.
85 86 87 88 89 90 |
# File 'api_gatewayv2/i_web_socket_stage.rb', line 85 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 |