Class: AWSCDK::APIGatewayv2::APIMappingProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gatewayv2/api_mapping_props.rb

Overview

Properties used to create the ApiMapping resource.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api:, domain_name:, api_mapping_key: nil, stage: nil) ⇒ APIMappingProps

Returns a new instance of APIMappingProps.

Parameters:



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

#apiAWSCDK::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_keyString? (readonly)

Note:

Default: - undefined for the root path mapping.

Api mapping key.

The path where this stage should be mapped to on the domain

Returns:

  • (String, nil)


36
37
38
# File 'api_gatewayv2/api_mapping_props.rb', line 36

def api_mapping_key
  @api_mapping_key
end

#domain_nameAWSCDK::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

#stageAWSCDK::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_propertiesObject



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_jsiiObject



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