Class: AWSCDK::APIGateway::DomainNameProps
- Inherits:
-
DomainNameOptions
- Object
- DomainNameOptions
- AWSCDK::APIGateway::DomainNameProps
- Defined in:
- api_gateway/domain_name_props.rb
Instance Attribute Summary collapse
-
#base_path ⇒ String?
readonly
The base path name that callers of the API must provide in the URL after the domain name (e.g.
example.com/base-path). -
#certificate ⇒ AWSCDK::Interfaces::AWSCertificatemanager::ICertificateRef
readonly
The reference to an AWS-managed certificate for use by the edge-optimized endpoint for the domain name.
-
#domain_name ⇒ String
readonly
The custom domain name for your API.
-
#endpoint_access_mode ⇒ AWSCDK::APIGateway::EndpointAccessMode?
readonly
The endpoint access mode for this domain name.
-
#endpoint_type ⇒ AWSCDK::APIGateway::EndpointType?
readonly
The type of endpoint for this DomainName.
-
#mapping ⇒ AWSCDK::APIGateway::IRestAPI?
readonly
If specified, all requests to this domain will be mapped to the production deployment of this API.
-
#mtls ⇒ AWSCDK::APIGateway::MTLSConfig?
readonly
The mutual TLS authentication configuration for a custom domain name.
-
#security_policy ⇒ AWSCDK::APIGateway::SecurityPolicy?
readonly
The Transport Layer Security (TLS) version + cipher suite for this domain name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(certificate:, domain_name:, base_path: nil, endpoint_access_mode: nil, endpoint_type: nil, mtls: nil, security_policy: nil, mapping: nil) ⇒ DomainNameProps
constructor
A new instance of DomainNameProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(certificate:, domain_name:, base_path: nil, endpoint_access_mode: nil, endpoint_type: nil, mtls: nil, security_policy: nil, mapping: nil) ⇒ DomainNameProps
Returns a new instance of DomainNameProps.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'api_gateway/domain_name_props.rb', line 14 def initialize(certificate:, domain_name:, base_path: nil, endpoint_access_mode: nil, endpoint_type: nil, mtls: nil, security_policy: nil, mapping: nil) @certificate = certificate Jsii::Type.check_type(@certificate, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19jZXJ0aWZpY2F0ZW1hbmFnZXIuSUNlcnRpZmljYXRlUmVmIn0=")), "certificate") @domain_name = domain_name Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName") @base_path = base_path Jsii::Type.check_type(@base_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "basePath") unless @base_path.nil? @endpoint_access_mode = endpoint_access_mode Jsii::Type.check_type(@endpoint_access_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5FbmRwb2ludEFjY2Vzc01vZGUifQ==")), "endpointAccessMode") unless @endpoint_access_mode.nil? @endpoint_type = endpoint_type Jsii::Type.check_type(@endpoint_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5FbmRwb2ludFR5cGUifQ==")), "endpointType") unless @endpoint_type.nil? @mtls = mtls.is_a?(Hash) ? ::AWSCDK::APIGateway::MTLSConfig.new(**mtls.transform_keys(&:to_sym)) : mtls Jsii::Type.check_type(@mtls, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5NVExTQ29uZmlnIn0=")), "mtls") unless @mtls.nil? @security_policy = security_policy Jsii::Type.check_type(@security_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5TZWN1cml0eVBvbGljeSJ9")), "securityPolicy") unless @security_policy.nil? @mapping = mapping Jsii::Type.check_type(@mapping, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheS5JUmVzdEFwaSJ9")), "mapping") unless @mapping.nil? end |
Instance Attribute Details
#base_path ⇒ String? (readonly)
Default: - map requests from the domain root (e.g. example.com).
The base path name that callers of the API must provide in the URL after the domain name (e.g. example.com/base-path). If you specify this property, it can't be an empty string.
50 51 52 |
# File 'api_gateway/domain_name_props.rb', line 50 def base_path @base_path end |
#certificate ⇒ AWSCDK::Interfaces::AWSCertificatemanager::ICertificateRef (readonly)
The reference to an AWS-managed certificate for use by the edge-optimized endpoint for the domain name.
For "EDGE" domain names, the certificate needs to be in the US East (N. Virginia) region.
39 40 41 |
# File 'api_gateway/domain_name_props.rb', line 39 def certificate @certificate end |
#domain_name ⇒ String (readonly)
The custom domain name for your API.
Uppercase letters are not supported.
45 46 47 |
# File 'api_gateway/domain_name_props.rb', line 45 def domain_name @domain_name end |
#endpoint_access_mode ⇒ AWSCDK::APIGateway::EndpointAccessMode? (readonly)
Default: - No endpoint access mode is configured. Required for enhanced security policies.
The endpoint access mode for this domain name.
When using enhanced security policies (those starting with SecurityPolicy_),
you must specify this property. STRICT is recommended for production workloads,
but BASIC may be needed during migration or for certain application architectures.
60 61 62 |
# File 'api_gateway/domain_name_props.rb', line 60 def endpoint_access_mode @endpoint_access_mode end |
#endpoint_type ⇒ AWSCDK::APIGateway::EndpointType? (readonly)
Default: REGIONAL
The type of endpoint for this DomainName.
65 66 67 |
# File 'api_gateway/domain_name_props.rb', line 65 def endpoint_type @endpoint_type end |
#mapping ⇒ AWSCDK::APIGateway::IRestAPI? (readonly)
Default: - you will have to call addBasePathMapping to map this domain to API endpoints.
If specified, all requests to this domain will be mapped to the production deployment of this API.
If you wish to map this domain to multiple APIs
with different base paths, use add_base_path_mapping or add_api_mapping.
84 85 86 |
# File 'api_gateway/domain_name_props.rb', line 84 def mapping @mapping end |
#mtls ⇒ AWSCDK::APIGateway::MTLSConfig? (readonly)
Default: - mTLS is not configured.
The mutual TLS authentication configuration for a custom domain name.
70 71 72 |
# File 'api_gateway/domain_name_props.rb', line 70 def mtls @mtls end |
#security_policy ⇒ AWSCDK::APIGateway::SecurityPolicy? (readonly)
Default: SecurityPolicy.TLS_1_2
The Transport Layer Security (TLS) version + cipher suite for this domain name.
76 77 78 |
# File 'api_gateway/domain_name_props.rb', line 76 def security_policy @security_policy end |
Class Method Details
.jsii_properties ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'api_gateway/domain_name_props.rb', line 86 def self.jsii_properties { :certificate => "certificate", :domain_name => "domainName", :base_path => "basePath", :endpoint_access_mode => "endpointAccessMode", :endpoint_type => "endpointType", :mtls => "mtls", :security_policy => "securityPolicy", :mapping => "mapping", } end |
Instance Method Details
#to_jsii ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'api_gateway/domain_name_props.rb', line 99 def to_jsii result = {} result.merge!(super) result.merge!({ "certificate" => @certificate, "domainName" => @domain_name, "basePath" => @base_path, "endpointAccessMode" => @endpoint_access_mode, "endpointType" => @endpoint_type, "mtls" => @mtls, "securityPolicy" => @security_policy, "mapping" => @mapping, }) result.compact end |