Class: AWSCDK::CloudFront::CfnDistribution::DistributionConfigProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnDistribution::DistributionConfigProperty
- Defined in:
- cloud_front/cfn_distribution.rb
Overview
A distribution configuration.
Instance Attribute Summary collapse
-
#aliases ⇒ Array<String>?
readonly
This field only supports standard distributions.
-
#anycast_ip_list_id ⇒ String?
readonly
To use this field for a multi-tenant distribution, use a connection group instead.
-
#cache_behaviors ⇒ AWSCDK::IResolvable, ...
readonly
A complex type that contains zero or more
CacheBehaviorelements. -
#cache_tag_config ⇒ AWSCDK::IResolvable, ...
readonly
A complex type that specifies the HTTP header name from which CloudFront extracts cache tags from origin responses.
-
#cnam_es ⇒ Array<String>?
readonly
An alias for the CloudFront distribution's domain name.
-
#comment ⇒ String?
readonly
A comment to describe the distribution.
-
#connection_function_association ⇒ AWSCDK::IResolvable, ...
readonly
The distribution's connection function association.
-
#connection_mode ⇒ String?
readonly
This field specifies whether the connection mode is through a standard distribution (direct) or a multi-tenant distribution with distribution tenants (tenant-only).
-
#continuous_deployment_policy_id ⇒ String?
readonly
This field only supports standard distributions.
-
#custom_error_responses ⇒ AWSCDK::IResolvable, ...
readonly
A complex type that controls the following:.
-
#custom_origin ⇒ AWSCDK::IResolvable, ...
readonly
The user-defined HTTP server that serves as the origin for content that CloudFront distributes.
-
#default_cache_behavior ⇒ AWSCDK::IResolvable, AWSCDK::CloudFront::CfnDistribution::DefaultCacheBehaviorProperty
readonly
A complex type that describes the default cache behavior if you don't specify a
CacheBehaviorelement or if files don't match any of the values ofPathPatterninCacheBehaviorelements. -
#default_root_object ⇒ String?
readonly
When a viewer requests the root URL for your distribution, the default root object is the object that you want CloudFront to request from your origin.
-
#enabled ⇒ Boolean, AWSCDK::IResolvable
readonly
From this field, you can enable or disable the selected distribution.
-
#http_version ⇒ String?
readonly
(Optional) Specify the HTTP version(s) that you want viewers to use to communicate with CloudFront .
-
#ipv6_enabled ⇒ Boolean, ...
readonly
To use this field for a multi-tenant distribution, use a connection group instead.
-
#logging ⇒ AWSCDK::IResolvable, ...
readonly
A complex type that controls whether access logs are written for the distribution.
-
#origin_groups ⇒ AWSCDK::IResolvable, ...
readonly
A complex type that contains information about origin groups for this distribution.
-
#origins ⇒ AWSCDK::IResolvable, ...
readonly
A complex type that contains information about origins for this distribution.
-
#price_class ⇒ String?
readonly
This field only supports standard distributions.
-
#restrictions ⇒ AWSCDK::IResolvable, ...
readonly
A complex type that identifies ways in which you want to restrict distribution of your content.
-
#s3_origin ⇒ AWSCDK::IResolvable, ...
readonly
The origin as an Amazon S3 bucket.
-
#staging ⇒ Boolean, ...
readonly
This field only supports standard distributions.
-
#tenant_config ⇒ AWSCDK::IResolvable, ...
readonly
This field only supports multi-tenant distributions.
-
#viewer_certificate ⇒ AWSCDK::IResolvable, ...
readonly
A complex type that determines the distribution's SSL/TLS configuration for communicating with viewers.
-
#viewer_mtls_config ⇒ AWSCDK::IResolvable, ...
readonly
The distribution's viewer mTLS configuration.
-
#web_acl_id ⇒ String?
readonly
Multi-tenant distributions only support AWS WAF V2 web ACLs.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(default_cache_behavior:, enabled:, aliases: nil, anycast_ip_list_id: nil, cache_behaviors: nil, cache_tag_config: nil, cnam_es: nil, comment: nil, connection_function_association: nil, connection_mode: nil, continuous_deployment_policy_id: nil, custom_error_responses: nil, custom_origin: nil, default_root_object: nil, http_version: nil, ipv6_enabled: nil, logging: nil, origin_groups: nil, origins: nil, price_class: nil, restrictions: nil, s3_origin: nil, staging: nil, tenant_config: nil, viewer_certificate: nil, viewer_mtls_config: nil, web_acl_id: nil) ⇒ DistributionConfigProperty
constructor
A new instance of DistributionConfigProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(default_cache_behavior:, enabled:, aliases: nil, anycast_ip_list_id: nil, cache_behaviors: nil, cache_tag_config: nil, cnam_es: nil, comment: nil, connection_function_association: nil, connection_mode: nil, continuous_deployment_policy_id: nil, custom_error_responses: nil, custom_origin: nil, default_root_object: nil, http_version: nil, ipv6_enabled: nil, logging: nil, origin_groups: nil, origins: nil, price_class: nil, restrictions: nil, s3_origin: nil, staging: nil, tenant_config: nil, viewer_certificate: nil, viewer_mtls_config: nil, web_acl_id: nil) ⇒ DistributionConfigProperty
Returns a new instance of DistributionConfigProperty.
1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 |
# File 'cloud_front/cfn_distribution.rb', line 1627 def initialize(default_cache_behavior:, enabled:, aliases: nil, anycast_ip_list_id: nil, cache_behaviors: nil, cache_tag_config: nil, cnam_es: nil, comment: nil, connection_function_association: nil, connection_mode: nil, continuous_deployment_policy_id: nil, custom_error_responses: nil, custom_origin: nil, default_root_object: nil, http_version: nil, ipv6_enabled: nil, logging: nil, origin_groups: nil, origins: nil, price_class: nil, restrictions: nil, s3_origin: nil, staging: nil, tenant_config: nil, viewer_certificate: nil, viewer_mtls_config: nil, web_acl_id: nil) @default_cache_behavior = default_cache_behavior.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::DefaultCacheBehaviorProperty.new(**default_cache_behavior.transform_keys(&:to_sym)) : default_cache_behavior Jsii::Type.check_type(@default_cache_behavior, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5EZWZhdWx0Q2FjaGVCZWhhdmlvclByb3BlcnR5In1dfX0=")), "defaultCacheBehavior") @enabled = enabled Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") @aliases = aliases Jsii::Type.check_type(@aliases, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "aliases") unless @aliases.nil? @anycast_ip_list_id = anycast_ip_list_id Jsii::Type.check_type(@anycast_ip_list_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "anycastIpListId") unless @anycast_ip_list_id.nil? @cache_behaviors = cache_behaviors Jsii::Type.check_type(@cache_behaviors, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udC5DZm5EaXN0cmlidXRpb24uQ2FjaGVCZWhhdmlvclByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "cacheBehaviors") unless @cache_behaviors.nil? @cache_tag_config = cache_tag_config.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::CacheTagConfigProperty.new(**cache_tag_config.transform_keys(&:to_sym)) : cache_tag_config Jsii::Type.check_type(@cache_tag_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5DYWNoZVRhZ0NvbmZpZ1Byb3BlcnR5In1dfX0=")), "cacheTagConfig") unless @cache_tag_config.nil? @cnam_es = cnam_es Jsii::Type.check_type(@cnam_es, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "cnamEs") unless @cnam_es.nil? @comment = comment Jsii::Type.check_type(@comment, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "comment") unless @comment.nil? @connection_function_association = connection_function_association.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::ConnectionFunctionAssociationProperty.new(**connection_function_association.transform_keys(&:to_sym)) : connection_function_association Jsii::Type.check_type(@connection_function_association, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5Db25uZWN0aW9uRnVuY3Rpb25Bc3NvY2lhdGlvblByb3BlcnR5In1dfX0=")), "connectionFunctionAssociation") unless @connection_function_association.nil? @connection_mode = connection_mode Jsii::Type.check_type(@connection_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "connectionMode") unless @connection_mode.nil? @continuous_deployment_policy_id = continuous_deployment_policy_id Jsii::Type.check_type(@continuous_deployment_policy_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "continuousDeploymentPolicyId") unless @continuous_deployment_policy_id.nil? @custom_error_responses = custom_error_responses Jsii::Type.check_type(@custom_error_responses, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udC5DZm5EaXN0cmlidXRpb24uQ3VzdG9tRXJyb3JSZXNwb25zZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "customErrorResponses") unless @custom_error_responses.nil? @custom_origin = custom_origin.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::LegacyCustomOriginProperty.new(**custom_origin.transform_keys(&:to_sym)) : custom_origin Jsii::Type.check_type(@custom_origin, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5MZWdhY3lDdXN0b21PcmlnaW5Qcm9wZXJ0eSJ9XX19")), "customOrigin") unless @custom_origin.nil? @default_root_object = default_root_object Jsii::Type.check_type(@default_root_object, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "defaultRootObject") unless @default_root_object.nil? @http_version = http_version Jsii::Type.check_type(@http_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "httpVersion") unless @http_version.nil? @ipv6_enabled = ipv6_enabled Jsii::Type.check_type(@ipv6_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "ipv6Enabled") unless @ipv6_enabled.nil? @logging = logging.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::LoggingProperty.new(**logging.transform_keys(&:to_sym)) : logging Jsii::Type.check_type(@logging, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5Mb2dnaW5nUHJvcGVydHkifV19fQ==")), "logging") unless @logging.nil? @origin_groups = origin_groups.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::OriginGroupsProperty.new(**origin_groups.transform_keys(&:to_sym)) : origin_groups Jsii::Type.check_type(@origin_groups, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5PcmlnaW5Hcm91cHNQcm9wZXJ0eSJ9XX19")), "originGroups") unless @origin_groups.nil? @origins = origins Jsii::Type.check_type(@origins, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udC5DZm5EaXN0cmlidXRpb24uT3JpZ2luUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "origins") unless @origins.nil? @price_class = price_class Jsii::Type.check_type(@price_class, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "priceClass") unless @price_class.nil? @restrictions = restrictions.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::RestrictionsProperty.new(**restrictions.transform_keys(&:to_sym)) : restrictions Jsii::Type.check_type(@restrictions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5SZXN0cmljdGlvbnNQcm9wZXJ0eSJ9XX19")), "restrictions") unless @restrictions.nil? @s3_origin = s3_origin.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::LegacyS3OriginProperty.new(**s3_origin.transform_keys(&:to_sym)) : s3_origin Jsii::Type.check_type(@s3_origin, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5MZWdhY3lTM09yaWdpblByb3BlcnR5In1dfX0=")), "s3Origin") unless @s3_origin.nil? @staging = staging Jsii::Type.check_type(@staging, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "staging") unless @staging.nil? @tenant_config = tenant_config.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::TenantConfigProperty.new(**tenant_config.transform_keys(&:to_sym)) : tenant_config Jsii::Type.check_type(@tenant_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5UZW5hbnRDb25maWdQcm9wZXJ0eSJ9XX19")), "tenantConfig") unless @tenant_config.nil? @viewer_certificate = viewer_certificate.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::ViewerCertificateProperty.new(**viewer_certificate.transform_keys(&:to_sym)) : viewer_certificate Jsii::Type.check_type(@viewer_certificate, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5WaWV3ZXJDZXJ0aWZpY2F0ZVByb3BlcnR5In1dfX0=")), "viewerCertificate") unless @viewer_certificate.nil? @viewer_mtls_config = viewer_mtls_config.is_a?(Hash) ? ::AWSCDK::CloudFront::CfnDistribution::ViewerMtlsConfigProperty.new(**viewer_mtls_config.transform_keys(&:to_sym)) : viewer_mtls_config Jsii::Type.check_type(@viewer_mtls_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZGZyb250LkNmbkRpc3RyaWJ1dGlvbi5WaWV3ZXJNdGxzQ29uZmlnUHJvcGVydHkifV19fQ==")), "viewerMtlsConfig") unless @viewer_mtls_config.nil? @web_acl_id = web_acl_id Jsii::Type.check_type(@web_acl_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "webAclId") unless @web_acl_id.nil? end |
Instance Attribute Details
#aliases ⇒ Array<String>? (readonly)
This field only supports standard distributions.
You can't specify this field for multi-tenant distributions. For more information, see Unsupported features for SaaS Manager for Amazon CloudFront in the Amazon CloudFront Developer Guide .
A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.
1704 1705 1706 |
# File 'cloud_front/cfn_distribution.rb', line 1704 def aliases @aliases end |
#anycast_ip_list_id ⇒ String? (readonly)
To use this field for a multi-tenant distribution, use a connection group instead.
For more information, see ConnectionGroup .
ID of the Anycast static IP list that is associated with the distribution.
1713 1714 1715 |
# File 'cloud_front/cfn_distribution.rb', line 1713 def anycast_ip_list_id @anycast_ip_list_id end |
#cache_behaviors ⇒ AWSCDK::IResolvable, ... (readonly)
A complex type that contains zero or more CacheBehavior elements.
1718 1719 1720 |
# File 'cloud_front/cfn_distribution.rb', line 1718 def cache_behaviors @cache_behaviors end |
#cache_tag_config ⇒ AWSCDK::IResolvable, ... (readonly)
A complex type that specifies the HTTP header name from which CloudFront extracts cache tags from origin responses.
When you add CacheTagConfig to a distribution, CloudFront reads the specified header from origin responses, parses the comma-separated tag values, and stores them with the cached object. You can then invalidate cached objects by tag using the CreateInvalidation API.
1725 1726 1727 |
# File 'cloud_front/cfn_distribution.rb', line 1725 def cache_tag_config @cache_tag_config end |
#cnam_es ⇒ Array<String>? (readonly)
An alias for the CloudFront distribution's domain name.
This property is legacy. We recommend that you use Aliases instead.
1732 1733 1734 |
# File 'cloud_front/cfn_distribution.rb', line 1732 def cnam_es @cnam_es end |
#comment ⇒ String? (readonly)
Default: - ""
A comment to describe the distribution.
The comment cannot be longer than 128 characters.
1740 1741 1742 |
# File 'cloud_front/cfn_distribution.rb', line 1740 def comment @comment end |
#connection_function_association ⇒ AWSCDK::IResolvable, ... (readonly)
The distribution's connection function association.
1745 1746 1747 |
# File 'cloud_front/cfn_distribution.rb', line 1745 def connection_function_association @connection_function_association end |
#connection_mode ⇒ String? (readonly)
This field specifies whether the connection mode is through a standard distribution (direct) or a multi-tenant distribution with distribution tenants (tenant-only).
1750 1751 1752 |
# File 'cloud_front/cfn_distribution.rb', line 1750 def connection_mode @connection_mode end |
#continuous_deployment_policy_id ⇒ String? (readonly)
This field only supports standard distributions.
You can't specify this field for multi-tenant distributions. For more information, see Unsupported features for SaaS Manager for Amazon CloudFront in the Amazon CloudFront Developer Guide .
The identifier of a continuous deployment policy. For more information, see CreateContinuousDeploymentPolicy .
1759 1760 1761 |
# File 'cloud_front/cfn_distribution.rb', line 1759 def continuous_deployment_policy_id @continuous_deployment_policy_id end |
#custom_error_responses ⇒ AWSCDK::IResolvable, ... (readonly)
A complex type that controls the following:.
- Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with custom error messages before returning the response to the viewer.
- How long CloudFront caches HTTP status codes in the 4xx and 5xx range.
For more information about custom error pages, see Customizing Error Responses in the Amazon CloudFront Developer Guide .
1769 1770 1771 |
# File 'cloud_front/cfn_distribution.rb', line 1769 def custom_error_responses @custom_error_responses end |
#custom_origin ⇒ AWSCDK::IResolvable, ... (readonly)
The user-defined HTTP server that serves as the origin for content that CloudFront distributes.
This property is legacy. We recommend that you use Origin instead.
1776 1777 1778 |
# File 'cloud_front/cfn_distribution.rb', line 1776 def custom_origin @custom_origin end |
#default_cache_behavior ⇒ AWSCDK::IResolvable, AWSCDK::CloudFront::CfnDistribution::DefaultCacheBehaviorProperty (readonly)
A complex type that describes the default cache behavior if you don't specify a CacheBehavior element or if files don't match any of the values of PathPattern in CacheBehavior elements.
You must create exactly one default cache behavior.
1690 1691 1692 |
# File 'cloud_front/cfn_distribution.rb', line 1690 def default_cache_behavior @default_cache_behavior end |
#default_root_object ⇒ String? (readonly)
Default: - ""
When a viewer requests the root URL for your distribution, the default root object is the object that you want CloudFront to request from your origin.
For example, if your root URL is https://www.example.com , you can specify CloudFront to return the index.html file as the default root object. You can specify a default root object so that viewers see a specific file or object, instead of another object in your distribution (for example, https://www.example.com/product-description.html ). A default root object avoids exposing the contents of your distribution.
You can specify the object name or a path to the object name (for example, index.html or exampleFolderName/index.html ). Your string can't begin with a forward slash ( / ). Only specify the object name or the path to the object.
If you don't want to specify a default root object when you create a distribution, include an empty DefaultRootObject element.
To delete the default root object from an existing distribution, update the distribution configuration and include an empty DefaultRootObject element.
To replace the default root object, update the distribution configuration and specify the new object.
For more information about the default root object, see Specify a default root object in the Amazon CloudFront Developer Guide .
1794 1795 1796 |
# File 'cloud_front/cfn_distribution.rb', line 1794 def default_root_object @default_root_object end |
#enabled ⇒ Boolean, AWSCDK::IResolvable (readonly)
From this field, you can enable or disable the selected distribution.
1695 1696 1697 |
# File 'cloud_front/cfn_distribution.rb', line 1695 def enabled @enabled end |
#http_version ⇒ String? (readonly)
Default: - "http1.1"
(Optional) Specify the HTTP version(s) that you want viewers to use to communicate with CloudFront .
The default value for new distributions is http1.1 .
For viewers and CloudFront to use HTTP/2, viewers must support TLSv1.2 or later, and must support Server Name Indication (SNI).
For viewers and CloudFront to use HTTP/3, viewers must support TLSv1.3 and Server Name Indication (SNI). CloudFront supports HTTP/3 connection migration to allow the viewer to switch networks without losing connection. For more information about connection migration, see Connection Migration at RFC 9000. For more information about supported TLSv1.3 ciphers, see Supported protocols and ciphers between viewers and CloudFront .
1806 1807 1808 |
# File 'cloud_front/cfn_distribution.rb', line 1806 def http_version @http_version end |
#ipv6_enabled ⇒ Boolean, ... (readonly)
To use this field for a multi-tenant distribution, use a connection group instead.
For more information, see ConnectionGroup .
If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution, specify true . If you specify false , CloudFront responds to IPv6 DNS requests with the DNS response code NOERROR and with no IP addresses. This allows viewers to submit a second request, for an IPv4 address for your distribution.
In general, you should enable IPv6 if you have users on IPv6 networks who want to access your content. However, if you're using signed URLs or signed cookies to restrict access to your content, and if you're using a custom policy that includes the IpAddress parameter to restrict the IP addresses that can access your content, don't enable IPv6. If you want to restrict access to some content by IP address and not restrict access to other content (or restrict access but not by IP address), you can create two distributions. For more information, see Creating a Signed URL Using a Custom Policy in the Amazon CloudFront Developer Guide .
If you're using an Amazon Route 53 AWS Integration alias resource record set to route traffic to your CloudFront distribution, you need to create a second alias resource record set when both of the following are true:
- You enable IPv6 for the distribution
- You're using alternate domain names in the URLs for your objects
For more information, see Routing Traffic to an Amazon CloudFront Web Distribution by Using Your Domain Name in the Amazon Route 53 AWS Integration Developer Guide .
If you created a CNAME resource record set, either with Amazon Route 53 AWS Integration or with another DNS service, you don't need to make any changes. A CNAME record will route traffic to your distribution regardless of the IP address format of the viewer request.
1826 1827 1828 |
# File 'cloud_front/cfn_distribution.rb', line 1826 def ipv6_enabled @ipv6_enabled end |
#logging ⇒ AWSCDK::IResolvable, ... (readonly)
A complex type that controls whether access logs are written for the distribution.
For more information about logging, see Access Logs in the Amazon CloudFront Developer Guide .
1833 1834 1835 |
# File 'cloud_front/cfn_distribution.rb', line 1833 def logging @logging end |
#origin_groups ⇒ AWSCDK::IResolvable, ... (readonly)
A complex type that contains information about origin groups for this distribution.
Specify a value for either the Origins or OriginGroups property.
1840 1841 1842 |
# File 'cloud_front/cfn_distribution.rb', line 1840 def origin_groups @origin_groups end |
#origins ⇒ AWSCDK::IResolvable, ... (readonly)
A complex type that contains information about origins for this distribution.
Specify a value for either the Origins or OriginGroups property.
1847 1848 1849 |
# File 'cloud_front/cfn_distribution.rb', line 1847 def origins @origins end |
#price_class ⇒ String? (readonly)
Default: - "PriceClass_All"
This field only supports standard distributions.
You can't specify this field for multi-tenant distributions. For more information, see Unsupported features for SaaS Manager for Amazon CloudFront in the Amazon CloudFront Developer Guide .
The price class that corresponds with the maximum price that you want to pay for CloudFront service. If you specify PriceClass_All , CloudFront responds to requests for your objects from all CloudFront edge locations.
If you specify a price class other than PriceClass_All , CloudFront serves your objects from the CloudFront edge location that has the lowest latency among the edge locations in your price class. Viewers who are in or near regions that are excluded from your specified price class may encounter slower performance.
For more information about price classes, see Choosing the Price Class for a CloudFront Distribution in the Amazon CloudFront Developer Guide . For information about CloudFront pricing, including how price classes (such as Price Class 100) map to CloudFront regions, see Amazon CloudFront Pricing .
1861 1862 1863 |
# File 'cloud_front/cfn_distribution.rb', line 1861 def price_class @price_class end |
#restrictions ⇒ AWSCDK::IResolvable, ... (readonly)
A complex type that identifies ways in which you want to restrict distribution of your content.
1866 1867 1868 |
# File 'cloud_front/cfn_distribution.rb', line 1866 def restrictions @restrictions end |
#s3_origin ⇒ AWSCDK::IResolvable, ... (readonly)
The origin as an Amazon S3 bucket.
This property is legacy. We recommend that you use Origin instead.
1873 1874 1875 |
# File 'cloud_front/cfn_distribution.rb', line 1873 def s3_origin @s3_origin end |
#staging ⇒ Boolean, ... (readonly)
This field only supports standard distributions.
You can't specify this field for multi-tenant distributions. For more information, see Unsupported features for SaaS Manager for Amazon CloudFront in the Amazon CloudFront Developer Guide .
A Boolean that indicates whether this is a staging distribution. When this value is true , this is a staging distribution. When this value is false , this is not a staging distribution.
1882 1883 1884 |
# File 'cloud_front/cfn_distribution.rb', line 1882 def staging @staging end |
#tenant_config ⇒ AWSCDK::IResolvable, ... (readonly)
This field only supports multi-tenant distributions.
You can't specify this field for standard distributions. For more information, see Unsupported features for SaaS Manager for Amazon CloudFront in the Amazon CloudFront Developer Guide .
A distribution tenant configuration.
1891 1892 1893 |
# File 'cloud_front/cfn_distribution.rb', line 1891 def tenant_config @tenant_config end |
#viewer_certificate ⇒ AWSCDK::IResolvable, ... (readonly)
A complex type that determines the distribution's SSL/TLS configuration for communicating with viewers.
1896 1897 1898 |
# File 'cloud_front/cfn_distribution.rb', line 1896 def viewer_certificate @viewer_certificate end |
#viewer_mtls_config ⇒ AWSCDK::IResolvable, ... (readonly)
The distribution's viewer mTLS configuration.
1901 1902 1903 |
# File 'cloud_front/cfn_distribution.rb', line 1901 def viewer_mtls_config @viewer_mtls_config end |
#web_acl_id ⇒ String? (readonly)
Default: - ""
Multi-tenant distributions only support AWS WAF V2 web ACLs.
A unique identifier that specifies the AWS WAF web ACL, if any, to associate with this distribution. To specify a web ACL created using the latest version of AWS WAF , use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 . To specify a web ACL created using AWS WAF Classic, use the ACL ID, for example a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 .
AWS WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to CloudFront, and lets you control access to your content. Based on conditions that you specify, such as the IP addresses that requests originate from or the values of query strings, CloudFront responds to requests either with the requested content or with an HTTP 403 status code (Forbidden). You can also configure CloudFront to return a custom error page when a request is blocked. For more information about AWS WAF , see the AWS WAF Developer Guide .
1911 1912 1913 |
# File 'cloud_front/cfn_distribution.rb', line 1911 def web_acl_id @web_acl_id end |
Class Method Details
.jsii_properties ⇒ Object
1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 |
# File 'cloud_front/cfn_distribution.rb', line 1913 def self.jsii_properties { :default_cache_behavior => "defaultCacheBehavior", :enabled => "enabled", :aliases => "aliases", :anycast_ip_list_id => "anycastIpListId", :cache_behaviors => "cacheBehaviors", :cache_tag_config => "cacheTagConfig", :cnam_es => "cnamEs", :comment => "comment", :connection_function_association => "connectionFunctionAssociation", :connection_mode => "connectionMode", :continuous_deployment_policy_id => "continuousDeploymentPolicyId", :custom_error_responses => "customErrorResponses", :custom_origin => "customOrigin", :default_root_object => "defaultRootObject", :http_version => "httpVersion", :ipv6_enabled => "ipv6Enabled", :logging => "logging", :origin_groups => "originGroups", :origins => "origins", :price_class => "priceClass", :restrictions => "restrictions", :s3_origin => "s3Origin", :staging => "staging", :tenant_config => "tenantConfig", :viewer_certificate => "viewerCertificate", :viewer_mtls_config => "viewerMtlsConfig", :web_acl_id => "webAclId", } end |
Instance Method Details
#to_jsii ⇒ Object
1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 |
# File 'cloud_front/cfn_distribution.rb', line 1945 def to_jsii result = {} result.merge!({ "defaultCacheBehavior" => @default_cache_behavior, "enabled" => @enabled, "aliases" => @aliases, "anycastIpListId" => @anycast_ip_list_id, "cacheBehaviors" => @cache_behaviors, "cacheTagConfig" => @cache_tag_config, "cnamEs" => @cnam_es, "comment" => @comment, "connectionFunctionAssociation" => @connection_function_association, "connectionMode" => @connection_mode, "continuousDeploymentPolicyId" => @continuous_deployment_policy_id, "customErrorResponses" => @custom_error_responses, "customOrigin" => @custom_origin, "defaultRootObject" => @default_root_object, "httpVersion" => @http_version, "ipv6Enabled" => @ipv6_enabled, "logging" => @logging, "originGroups" => @origin_groups, "origins" => @origins, "priceClass" => @price_class, "restrictions" => @restrictions, "s3Origin" => @s3_origin, "staging" => @staging, "tenantConfig" => @tenant_config, "viewerCertificate" => @viewer_certificate, "viewerMtlsConfig" => @viewer_mtls_config, "webAclId" => @web_acl_id, }) result.compact end |