Class: AWSCDK::CloudFrontOrigins::VPCOriginWithEndpointProps
- Inherits:
-
VPCOriginProps
- Object
- VPCOriginProps
- AWSCDK::CloudFrontOrigins::VPCOriginWithEndpointProps
- Defined in:
- cloud_front_origins/vpc_origin_with_endpoint_props.rb
Overview
Properties to define a VPC origin with endpoint.
Instance Attribute Summary collapse
-
#connection_attempts ⇒ Numeric?
readonly
The number of times that CloudFront attempts to connect to the origin;.
-
#connection_timeout ⇒ AWSCDK::Duration?
readonly
The number of seconds that CloudFront waits when trying to establish a connection to the origin.
-
#custom_headers ⇒ Hash{String => String}?
readonly
A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.
-
#domain_name ⇒ String?
readonly
The domain name associated with your VPC origin.
-
#http_port ⇒ Numeric?
readonly
The HTTP port for the CloudFront VPC origin endpoint configuration.
-
#https_port ⇒ Numeric?
readonly
The HTTPS port of the CloudFront VPC origin endpoint configuration.
-
#keepalive_timeout ⇒ AWSCDK::Duration?
readonly
Specifies how long, in seconds, CloudFront persists its connection to the origin.
-
#origin_access_control_id ⇒ String?
readonly
The unique identifier of an origin access control for this origin.
-
#origin_id ⇒ String?
readonly
A unique identifier for the origin.
-
#origin_path ⇒ String?
readonly
An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.
-
#origin_shield_enabled ⇒ Boolean?
readonly
Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false.
-
#origin_shield_region ⇒ String?
readonly
When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.
-
#origin_ssl_protocols ⇒ Array<AWSCDK::CloudFront::OriginSSLPolicy>?
readonly
A list that contains allowed SSL/TLS protocols for this distribution.
-
#protocol_policy ⇒ AWSCDK::CloudFront::OriginProtocolPolicy?
readonly
The origin protocol policy for the CloudFront VPC origin endpoint configuration.
-
#read_timeout ⇒ AWSCDK::Duration?
readonly
Specifies how long, in seconds, CloudFront waits for a response from the origin, also known as the origin response timeout.
-
#response_completion_timeout ⇒ AWSCDK::Duration?
readonly
The time that a request from CloudFront to the origin can stay open and wait for a response.
-
#vpc_origin_name ⇒ String?
readonly
The name of the CloudFront VPC origin endpoint configuration.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(connection_attempts: nil, connection_timeout: nil, custom_headers: nil, origin_access_control_id: nil, origin_id: nil, origin_shield_enabled: nil, origin_shield_region: nil, response_completion_timeout: nil, origin_path: nil, domain_name: nil, keepalive_timeout: nil, read_timeout: nil, http_port: nil, https_port: nil, origin_ssl_protocols: nil, protocol_policy: nil, vpc_origin_name: nil) ⇒ VPCOriginWithEndpointProps
constructor
A new instance of VPCOriginWithEndpointProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(connection_attempts: nil, connection_timeout: nil, custom_headers: nil, origin_access_control_id: nil, origin_id: nil, origin_shield_enabled: nil, origin_shield_region: nil, response_completion_timeout: nil, origin_path: nil, domain_name: nil, keepalive_timeout: nil, read_timeout: nil, http_port: nil, https_port: nil, origin_ssl_protocols: nil, protocol_policy: nil, vpc_origin_name: nil) ⇒ VPCOriginWithEndpointProps
Returns a new instance of VPCOriginWithEndpointProps.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 25 def initialize(connection_attempts: nil, connection_timeout: nil, custom_headers: nil, origin_access_control_id: nil, origin_id: nil, origin_shield_enabled: nil, origin_shield_region: nil, response_completion_timeout: nil, origin_path: nil, domain_name: nil, keepalive_timeout: nil, read_timeout: nil, http_port: nil, https_port: nil, origin_ssl_protocols: nil, protocol_policy: nil, vpc_origin_name: nil) @connection_attempts = connection_attempts Jsii::Type.check_type(@connection_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "connectionAttempts") unless @connection_attempts.nil? @connection_timeout = connection_timeout Jsii::Type.check_type(@connection_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "connectionTimeout") unless @connection_timeout.nil? @custom_headers = custom_headers Jsii::Type.check_type(@custom_headers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "customHeaders") unless @custom_headers.nil? @origin_access_control_id = origin_access_control_id Jsii::Type.check_type(@origin_access_control_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "originAccessControlId") unless @origin_access_control_id.nil? @origin_id = origin_id Jsii::Type.check_type(@origin_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "originId") unless @origin_id.nil? @origin_shield_enabled = origin_shield_enabled Jsii::Type.check_type(@origin_shield_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "originShieldEnabled") unless @origin_shield_enabled.nil? @origin_shield_region = origin_shield_region Jsii::Type.check_type(@origin_shield_region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "originShieldRegion") unless @origin_shield_region.nil? @response_completion_timeout = response_completion_timeout Jsii::Type.check_type(@response_completion_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "responseCompletionTimeout") unless @response_completion_timeout.nil? @origin_path = origin_path Jsii::Type.check_type(@origin_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "originPath") unless @origin_path.nil? @domain_name = domain_name Jsii::Type.check_type(@domain_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domainName") unless @domain_name.nil? @keepalive_timeout = keepalive_timeout Jsii::Type.check_type(@keepalive_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "keepaliveTimeout") unless @keepalive_timeout.nil? @read_timeout = read_timeout Jsii::Type.check_type(@read_timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "readTimeout") unless @read_timeout.nil? @http_port = http_port Jsii::Type.check_type(@http_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "httpPort") unless @http_port.nil? @https_port = https_port Jsii::Type.check_type(@https_port, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "httpsPort") unless @https_port.nil? @origin_ssl_protocols = origin_ssl_protocols Jsii::Type.check_type(@origin_ssl_protocols, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250Lk9yaWdpblNzbFBvbGljeSJ9LCJraW5kIjoiYXJyYXkifX0=")), "originSslProtocols") unless @origin_ssl_protocols.nil? @protocol_policy = protocol_policy Jsii::Type.check_type(@protocol_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udC5PcmlnaW5Qcm90b2NvbFBvbGljeSJ9")), "protocolPolicy") unless @protocol_policy.nil? @vpc_origin_name = vpc_origin_name Jsii::Type.check_type(@vpc_origin_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "vpcOriginName") unless @vpc_origin_name.nil? end |
Instance Attribute Details
#connection_attempts ⇒ Numeric? (readonly)
Default: 3
The number of times that CloudFront attempts to connect to the origin;
valid values are 1, 2, or 3 attempts.
68 69 70 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 68 def connection_attempts @connection_attempts end |
#connection_timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(10)
The number of seconds that CloudFront waits when trying to establish a connection to the origin.
Valid values are 1-10 seconds, inclusive.
75 76 77 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 75 def connection_timeout @connection_timeout end |
#custom_headers ⇒ Hash{String => String}? (readonly)
Default: {}
A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.
80 81 82 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 80 def custom_headers @custom_headers end |
#domain_name ⇒ String? (readonly)
Default: - The default domain name of the endpoint.
The domain name associated with your VPC origin.
125 126 127 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 125 def domain_name @domain_name end |
#http_port ⇒ Numeric? (readonly)
Default: 80
The HTTP port for the CloudFront VPC origin endpoint configuration.
150 151 152 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 150 def http_port @http_port end |
#https_port ⇒ Numeric? (readonly)
Default: 443
The HTTPS port of the CloudFront VPC origin endpoint configuration.
155 156 157 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 155 def https_port @https_port end |
#keepalive_timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(5)
Specifies how long, in seconds, CloudFront persists its connection to the origin.
The valid range is from 1 to 180 seconds, inclusive.
Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time.
135 136 137 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 135 def keepalive_timeout @keepalive_timeout end |
#origin_access_control_id ⇒ String? (readonly)
Default: - no origin access control
The unique identifier of an origin access control for this origin.
85 86 87 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 85 def origin_access_control_id @origin_access_control_id end |
#origin_id ⇒ String? (readonly)
Default: - an originid will be generated for you
A unique identifier for the origin.
This value must be unique within the distribution.
92 93 94 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 92 def origin_id @origin_id end |
#origin_path ⇒ String? (readonly)
Default: '/'
An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.
Must begin, but not end, with '/' (e.g., '/production/images').
120 121 122 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 120 def origin_path @origin_path end |
#origin_shield_enabled ⇒ Boolean? (readonly)
Default: - true
Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false.
97 98 99 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 97 def origin_shield_enabled @origin_shield_enabled end |
#origin_shield_region ⇒ String? (readonly)
Default: - origin shield not enabled
When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.
103 104 105 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 103 def origin_shield_region @origin_shield_region end |
#origin_ssl_protocols ⇒ Array<AWSCDK::CloudFront::OriginSSLPolicy>? (readonly)
Default: - TLSv1.2
A list that contains allowed SSL/TLS protocols for this distribution.
160 161 162 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 160 def origin_ssl_protocols @origin_ssl_protocols end |
#protocol_policy ⇒ AWSCDK::CloudFront::OriginProtocolPolicy? (readonly)
Default: OriginProtocolPolicy.MATCH_VIEWER
The origin protocol policy for the CloudFront VPC origin endpoint configuration.
165 166 167 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 165 def protocol_policy @protocol_policy end |
#read_timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.seconds(30)
Specifies how long, in seconds, CloudFront waits for a response from the origin, also known as the origin response timeout.
The valid range is from 1 to 180 seconds, inclusive.
Note that values over 60 seconds are possible only after a limit increase request for the origin response timeout quota has been approved in the target account; otherwise, values over 60 seconds will produce an error at deploy time.
145 146 147 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 145 def read_timeout @read_timeout end |
#response_completion_timeout ⇒ AWSCDK::Duration? (readonly)
Default: undefined - AWS CloudFront default is not enforcing a maximum value
The time that a request from CloudFront to the origin can stay open and wait for a response.
If the complete response isn't received from the origin by this time, CloudFront ends the connection.
Valid values are 1-3600 seconds, inclusive.
113 114 115 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 113 def response_completion_timeout @response_completion_timeout end |
#vpc_origin_name ⇒ String? (readonly)
Default: - generated from the id
The name of the CloudFront VPC origin endpoint configuration.
170 171 172 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 170 def vpc_origin_name @vpc_origin_name end |
Class Method Details
.jsii_properties ⇒ Object
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 172 def self.jsii_properties { :connection_attempts => "connectionAttempts", :connection_timeout => "connectionTimeout", :custom_headers => "customHeaders", :origin_access_control_id => "originAccessControlId", :origin_id => "originId", :origin_shield_enabled => "originShieldEnabled", :origin_shield_region => "originShieldRegion", :response_completion_timeout => "responseCompletionTimeout", :origin_path => "originPath", :domain_name => "domainName", :keepalive_timeout => "keepaliveTimeout", :read_timeout => "readTimeout", :http_port => "httpPort", :https_port => "httpsPort", :origin_ssl_protocols => "originSslProtocols", :protocol_policy => "protocolPolicy", :vpc_origin_name => "vpcOriginName", } end |
Instance Method Details
#to_jsii ⇒ Object
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'cloud_front_origins/vpc_origin_with_endpoint_props.rb', line 194 def to_jsii result = {} result.merge!(super) result.merge!({ "connectionAttempts" => @connection_attempts, "connectionTimeout" => @connection_timeout, "customHeaders" => @custom_headers, "originAccessControlId" => @origin_access_control_id, "originId" => @origin_id, "originShieldEnabled" => @origin_shield_enabled, "originShieldRegion" => @origin_shield_region, "responseCompletionTimeout" => @response_completion_timeout, "originPath" => @origin_path, "domainName" => @domain_name, "keepaliveTimeout" => @keepalive_timeout, "readTimeout" => @read_timeout, "httpPort" => @http_port, "httpsPort" => @https_port, "originSslProtocols" => @origin_ssl_protocols, "protocolPolicy" => @protocol_policy, "vpcOriginName" => @vpc_origin_name, }) result.compact end |