Class: AWSCDK::APIGatewayv2::WebSocketStageProps
- Inherits:
-
StageOptions
- Object
- StageOptions
- AWSCDK::APIGatewayv2::WebSocketStageProps
- Defined in:
- api_gatewayv2/web_socket_stage_props.rb
Overview
Properties to initialize an instance of WebSocketStage.
Instance Attribute Summary collapse
-
#access_log_settings ⇒ AWSCDK::APIGatewayv2::IAccessLogSettings?
readonly
Settings for access logging.
-
#auto_deploy ⇒ Boolean?
readonly
Whether updates to an API automatically trigger a new deployment.
-
#description ⇒ String?
readonly
The description for the API stage.
-
#detailed_metrics_enabled ⇒ Boolean?
readonly
Specifies whether detailed metrics are enabled.
-
#domain_mapping ⇒ AWSCDK::APIGatewayv2::DomainMappingOptions?
readonly
The options for custom domain and api mapping.
-
#stage_name ⇒ String
readonly
The name of the stage.
-
#stage_variables ⇒ Hash{String => String}?
readonly
Stage variables for the stage.
-
#throttle ⇒ AWSCDK::APIGatewayv2::ThrottleSettings?
readonly
Throttle settings for the routes of this stage.
-
#web_socket_api ⇒ AWSCDK::APIGatewayv2::IWebSocketAPI
readonly
The WebSocket API to which this stage is associated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(access_log_settings: nil, auto_deploy: nil, description: nil, detailed_metrics_enabled: nil, domain_mapping: nil, stage_variables: nil, throttle: nil, stage_name:, web_socket_api:) ⇒ WebSocketStageProps
constructor
A new instance of WebSocketStageProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(access_log_settings: nil, auto_deploy: nil, description: nil, detailed_metrics_enabled: nil, domain_mapping: nil, stage_variables: nil, throttle: nil, stage_name:, web_socket_api:) ⇒ WebSocketStageProps
Returns a new instance of WebSocketStageProps.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 16 def initialize(access_log_settings: nil, auto_deploy: nil, description: nil, detailed_metrics_enabled: nil, domain_mapping: nil, stage_variables: nil, throttle: nil, stage_name:, web_socket_api:) @access_log_settings = access_log_settings Jsii::Type.check_type(@access_log_settings, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLklBY2Nlc3NMb2dTZXR0aW5ncyJ9")), "accessLogSettings") unless @access_log_settings.nil? @auto_deploy = auto_deploy Jsii::Type.check_type(@auto_deploy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "autoDeploy") unless @auto_deploy.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @detailed_metrics_enabled = detailed_metrics_enabled Jsii::Type.check_type(@detailed_metrics_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "detailedMetricsEnabled") unless @detailed_metrics_enabled.nil? @domain_mapping = domain_mapping.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::DomainMappingOptions.new(**domain_mapping.transform_keys(&:to_sym)) : domain_mapping Jsii::Type.check_type(@domain_mapping, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLkRvbWFpbk1hcHBpbmdPcHRpb25zIn0=")), "domainMapping") unless @domain_mapping.nil? @stage_variables = stage_variables Jsii::Type.check_type(@stage_variables, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "stageVariables") unless @stage_variables.nil? @throttle = throttle.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::ThrottleSettings.new(**throttle.transform_keys(&:to_sym)) : throttle Jsii::Type.check_type(@throttle, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLlRocm90dGxlU2V0dGluZ3MifQ==")), "throttle") unless @throttle.nil? @stage_name = stage_name Jsii::Type.check_type(@stage_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stageName") @web_socket_api = web_socket_api Jsii::Type.check_type(@web_socket_api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLklXZWJTb2NrZXRBcGkifQ==")), "webSocketApi") end |
Instance Attribute Details
#access_log_settings ⇒ AWSCDK::APIGatewayv2::IAccessLogSettings? (readonly)
Default: - No access logging
Settings for access logging.
41 42 43 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 41 def access_log_settings @access_log_settings end |
#auto_deploy ⇒ Boolean? (readonly)
Default: false
Whether updates to an API automatically trigger a new deployment.
46 47 48 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 46 def auto_deploy @auto_deploy end |
#description ⇒ String? (readonly)
Default: - no description
The description for the API stage.
51 52 53 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 51 def description @description end |
#detailed_metrics_enabled ⇒ Boolean? (readonly)
Default: false
Specifies whether detailed metrics are enabled.
56 57 58 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 56 def detailed_metrics_enabled @detailed_metrics_enabled end |
#domain_mapping ⇒ AWSCDK::APIGatewayv2::DomainMappingOptions? (readonly)
Default: - no custom domain and api mapping configuration
The options for custom domain and api mapping.
61 62 63 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 61 def domain_mapping @domain_mapping end |
#stage_name ⇒ String (readonly)
The name of the stage.
77 78 79 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 77 def stage_name @stage_name end |
#stage_variables ⇒ Hash{String => String}? (readonly)
Default: - No stage variables
Stage variables for the stage. These are key-value pairs that you can define and use in your API routes.
The allowed characters for variable names and the required pattern for variable values are specified here: https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-apigateway-stage.html#cfn-apigateway-stage-variables
68 69 70 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 68 def stage_variables @stage_variables end |
#throttle ⇒ AWSCDK::APIGatewayv2::ThrottleSettings? (readonly)
Default: - no throttling configuration
Throttle settings for the routes of this stage.
73 74 75 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 73 def throttle @throttle end |
#web_socket_api ⇒ AWSCDK::APIGatewayv2::IWebSocketAPI (readonly)
The WebSocket API to which this stage is associated.
81 82 83 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 81 def web_socket_api @web_socket_api end |
Class Method Details
.jsii_properties ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 83 def self.jsii_properties { :access_log_settings => "accessLogSettings", :auto_deploy => "autoDeploy", :description => "description", :detailed_metrics_enabled => "detailedMetricsEnabled", :domain_mapping => "domainMapping", :stage_variables => "stageVariables", :throttle => "throttle", :stage_name => "stageName", :web_socket_api => "webSocketApi", } end |
Instance Method Details
#to_jsii ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'api_gatewayv2/web_socket_stage_props.rb', line 97 def to_jsii result = {} result.merge!(super) result.merge!({ "accessLogSettings" => @access_log_settings, "autoDeploy" => @auto_deploy, "description" => @description, "detailedMetricsEnabled" => @detailed_metrics_enabled, "domainMapping" => @domain_mapping, "stageVariables" => @stage_variables, "throttle" => @throttle, "stageName" => @stage_name, "webSocketApi" => @web_socket_api, }) result.compact end |