Class: AWSCDK::APIGatewayv2::APIMappingProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2::APIMappingProps
- Defined in:
- api_gatewayv2/api_mapping_props.rb
Overview
Properties used to create the ApiMapping resource.
Instance Attribute Summary collapse
-
#api ⇒ AWSCDK::Interfaces::AWSApigatewayv2::IAPIRef
readonly
The Api to which this mapping is applied.
-
#api_mapping_key ⇒ String?
readonly
Api mapping key.
-
#domain_name ⇒ AWSCDK::Interfaces::AWSApigatewayv2::IDomainNameRef
readonly
custom domain name of the mapping target.
-
#stage ⇒ AWSCDK::APIGatewayv2::IStage?
readonly
stage for the ApiMapping resource required for WebSocket API defaults to default stage of an HTTP API.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api:, domain_name:, api_mapping_key: nil, stage: nil) ⇒ APIMappingProps
constructor
A new instance of APIMappingProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(api:, domain_name:, api_mapping_key: nil, stage: nil) ⇒ APIMappingProps
Returns a new instance of APIMappingProps.
11 12 13 14 15 16 17 18 19 20 |
# File 'api_gatewayv2/api_mapping_props.rb', line 11 def initialize(api:, domain_name:, api_mapping_key: nil, stage: nil) @api = api Jsii::Type.check_type(@api, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5djIuSUFwaVJlZiJ9")), "api") @domain_name = domain_name Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19hcGlnYXRld2F5djIuSURvbWFpbk5hbWVSZWYifQ==")), "domainName") @api_mapping_key = api_mapping_key Jsii::Type.check_type(@api_mapping_key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "apiMappingKey") unless @api_mapping_key.nil? @stage = stage Jsii::Type.check_type(@stage, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLklTdGFnZSJ9")), "stage") unless @stage.nil? end |
Instance Attribute Details
#api ⇒ AWSCDK::Interfaces::AWSApigatewayv2::IAPIRef (readonly)
The Api to which this mapping is applied.
25 26 27 |
# File 'api_gatewayv2/api_mapping_props.rb', line 25 def api @api end |
#api_mapping_key ⇒ String? (readonly)
Note:
Default: - undefined for the root path mapping.
Api mapping key.
The path where this stage should be mapped to on the domain
36 37 38 |
# File 'api_gatewayv2/api_mapping_props.rb', line 36 def api_mapping_key @api_mapping_key end |
#domain_name ⇒ AWSCDK::Interfaces::AWSApigatewayv2::IDomainNameRef (readonly)
custom domain name of the mapping target.
29 30 31 |
# File 'api_gatewayv2/api_mapping_props.rb', line 29 def domain_name @domain_name end |
#stage ⇒ AWSCDK::APIGatewayv2::IStage? (readonly)
Note:
Default: - Default stage of the passed API for HTTP API, required for WebSocket API
stage for the ApiMapping resource required for WebSocket API defaults to default stage of an HTTP API.
41 42 43 |
# File 'api_gatewayv2/api_mapping_props.rb', line 41 def stage @stage end |
Class Method Details
.jsii_properties ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'api_gatewayv2/api_mapping_props.rb', line 43 def self.jsii_properties { :api => "api", :domain_name => "domainName", :api_mapping_key => "apiMappingKey", :stage => "stage", } end |
Instance Method Details
#to_jsii ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'api_gatewayv2/api_mapping_props.rb', line 52 def to_jsii result = {} result.merge!({ "api" => @api, "domainName" => @domain_name, "apiMappingKey" => @api_mapping_key, "stage" => @stage, }) result.compact end |