Class: AWSCDK::APIGateway::DomainNameOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGateway::DomainNameOptions
- Defined in:
- api_gateway/domain_name_options.rb
Direct Known Subclasses
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.
-
#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) ⇒ DomainNameOptions
constructor
A new instance of DomainNameOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(certificate:, domain_name:, base_path: nil, endpoint_access_mode: nil, endpoint_type: nil, mtls: nil, security_policy: nil) ⇒ DomainNameOptions
Returns a new instance of DomainNameOptions.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'api_gateway/domain_name_options.rb', line 13 def initialize(certificate:, domain_name:, base_path: nil, endpoint_access_mode: nil, endpoint_type: nil, mtls: nil, security_policy: 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? 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.
47 48 49 |
# File 'api_gateway/domain_name_options.rb', line 47 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.
36 37 38 |
# File 'api_gateway/domain_name_options.rb', line 36 def certificate @certificate end |
#domain_name ⇒ String (readonly)
The custom domain name for your API.
Uppercase letters are not supported.
42 43 44 |
# File 'api_gateway/domain_name_options.rb', line 42 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.
57 58 59 |
# File 'api_gateway/domain_name_options.rb', line 57 def endpoint_access_mode @endpoint_access_mode end |
#endpoint_type ⇒ AWSCDK::APIGateway::EndpointType? (readonly)
Default: REGIONAL
The type of endpoint for this DomainName.
62 63 64 |
# File 'api_gateway/domain_name_options.rb', line 62 def endpoint_type @endpoint_type end |
#mtls ⇒ AWSCDK::APIGateway::MTLSConfig? (readonly)
Default: - mTLS is not configured.
The mutual TLS authentication configuration for a custom domain name.
67 68 69 |
# File 'api_gateway/domain_name_options.rb', line 67 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.
73 74 75 |
# File 'api_gateway/domain_name_options.rb', line 73 def security_policy @security_policy end |
Class Method Details
.jsii_properties ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 |
# File 'api_gateway/domain_name_options.rb', line 75 def self.jsii_properties { :certificate => "certificate", :domain_name => "domainName", :base_path => "basePath", :endpoint_access_mode => "endpointAccessMode", :endpoint_type => "endpointType", :mtls => "mtls", :security_policy => "securityPolicy", } end |
Instance Method Details
#to_jsii ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'api_gateway/domain_name_options.rb', line 87 def to_jsii result = {} result.merge!({ "certificate" => @certificate, "domainName" => @domain_name, "basePath" => @base_path, "endpointAccessMode" => @endpoint_access_mode, "endpointType" => @endpoint_type, "mtls" => @mtls, "securityPolicy" => @security_policy, }) result.compact end |