All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.awsconnector.outputs.DistributionConfigResponse Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.awsconnector.outputs;

import com.pulumi.azurenative.awsconnector.outputs.CacheBehaviorResponse;
import com.pulumi.azurenative.awsconnector.outputs.CustomErrorResponseResponse;
import com.pulumi.azurenative.awsconnector.outputs.DefaultCacheBehaviorResponse;
import com.pulumi.azurenative.awsconnector.outputs.LegacyCustomOriginResponse;
import com.pulumi.azurenative.awsconnector.outputs.LegacyS3OriginResponse;
import com.pulumi.azurenative.awsconnector.outputs.LoggingResponse;
import com.pulumi.azurenative.awsconnector.outputs.OriginGroupsResponse;
import com.pulumi.azurenative.awsconnector.outputs.OriginResponse;
import com.pulumi.azurenative.awsconnector.outputs.RestrictionsResponse;
import com.pulumi.azurenative.awsconnector.outputs.ViewerCertificateResponse;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class DistributionConfigResponse {
    /**
     * @return A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.
     * 
     */
    private @Nullable List aliases;
    /**
     * @return A complex type that contains zero or more ``CacheBehavior`` elements.
     * 
     */
    private @Nullable List cacheBehaviors;
    /**
     * @return Property cnamEs
     * 
     */
    private @Nullable List cnamEs;
    /**
     * @return A comment to describe the distribution. The comment cannot be longer than 128 characters.
     * 
     */
    private @Nullable String comment;
    /**
     * @return The identifier of a continuous deployment policy. For more information, see ``CreateContinuousDeploymentPolicy``.
     * 
     */
    private @Nullable String continuousDeploymentPolicyId;
    /**
     * @return 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](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) in the *Amazon CloudFront Developer Guide*.
     * 
     */
    private @Nullable List customErrorResponses;
    /**
     * @return Property customOrigin
     * 
     */
    private @Nullable LegacyCustomOriginResponse customOrigin;
    /**
     * @return 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. A complex type that describes the default cache behavior if you don't specify a ``CacheBehavior`` element or if request URLs don't match any of the values of ``PathPattern`` in ``CacheBehavior`` elements. You must create exactly one default cache behavior.
     * 
     */
    private @Nullable DefaultCacheBehaviorResponse defaultCacheBehavior;
    /**
     * @return The object that you want CloudFront to request from your origin (for example, ``index.html``) when a viewer requests the root URL for your distribution (``https://www.example.com``) instead of an object in your distribution (``https://www.example.com/product-description.html``). Specifying a default root object avoids exposing the contents of your distribution. Specify only the object name, for example, ``index.html``. Don't add a ``/`` before the object name. 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 [Creating a Default Root Object](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html) in the *Amazon CloudFront Developer Guide*.
     * 
     */
    private @Nullable String defaultRootObject;
    /**
     * @return From this field, you can enable or disable the selected distribution.
     * 
     */
    private @Nullable Boolean enabled;
    /**
     * @return (Optional) Specify the maximum HTTP version(s) that you want viewers to use to communicate with CF. The default value for new distributions is ``http1.1``. For viewers and CF to use HTTP/2, viewers must support TLSv1.2 or later, and must support Server Name Indication (SNI). For viewers and CF to use HTTP/3, viewers must support TLSv1.3 and Server Name Indication (SNI). CF supports HTTP/3 connection migration to allow the viewer to switch networks without losing connection. For more information about connection migration, see [Connection Migration](https://docs.aws.amazon.com/https://www.rfc-editor.org/rfc/rfc9000.html#name-connection-migration) at RFC 9000. For more information about supported TLSv1.3 ciphers, see [Supported protocols and ciphers between viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html).
     * 
     */
    private @Nullable String httpVersion;
    /**
     * @return 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](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html) in the *Amazon CloudFront Developer Guide*. If you're using an R53AWSIntlong 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](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html) in the *Developer Guide*. If you created a CNAME resource record set, either with R53AWSIntlong 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.
     * 
     */
    private @Nullable Boolean ipV6Enabled;
    /**
     * @return A complex type that controls whether access logs are written for the distribution. For more information about logging, see [Access Logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) in the *Amazon CloudFront Developer Guide*. A complex type that controls whether access logs are written for the distribution.
     * 
     */
    private @Nullable LoggingResponse logging;
    /**
     * @return A complex type that contains information about origin groups for this distribution. A complex data type for the origin groups specified for a distribution.
     * 
     */
    private @Nullable OriginGroupsResponse originGroups;
    /**
     * @return A complex type that contains information about origins for this distribution.
     * 
     */
    private @Nullable List origins;
    /**
     * @return 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](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) 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](https://docs.aws.amazon.com/cloudfront/pricing/).
     * 
     */
    private @Nullable String priceClass;
    /**
     * @return A complex type that identifies ways in which you want to restrict distribution of your content. A complex type that identifies ways in which you want to restrict distribution of your content.
     * 
     */
    private @Nullable RestrictionsResponse restrictions;
    /**
     * @return Property s3Origin
     * 
     */
    private @Nullable LegacyS3OriginResponse s3Origin;
    /**
     * @return 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.
     * 
     */
    private @Nullable Boolean staging;
    /**
     * @return A complex type that determines the distribution's SSL/TLS configuration for communicating with viewers. A complex type that determines the distribution's SSL/TLS configuration for communicating with viewers. If the distribution doesn't use ``Aliases`` (also known as alternate domain names or CNAMEs)—that is, if the distribution uses the CloudFront domain name such as ``d111111abcdef8.cloudfront.net``—set ``CloudFrontDefaultCertificate`` to ``true`` and leave all other fields empty. If the distribution uses ``Aliases`` (alternate domain names or CNAMEs), use the fields in this type to specify the following settings:  +  Which viewers the distribution accepts HTTPS connections from: only viewers that support [server name indication (SNI)](https://docs.aws.amazon.com/https://en.wikipedia.org/wiki/Server_Name_Indication) (recommended), or all viewers including those that don't support SNI.  +  To accept HTTPS connections from only viewers that support SNI, set ``SSLSupportMethod`` to ``sni-only``. This is recommended. Most browsers and clients support SNI. (In CloudFormation, the field name is ``SslSupportMethod``. Note the different capitalization.)  +  To accept HTTPS connections from all viewers, including those that don't support SNI, set ``SSLSupportMethod`` to ``vip``. This is not recommended, and results in additional monthly charges from CloudFront. (In CloudFormation, the field name is ``SslSupportMethod``. Note the different capitalization.)    +  The minimum SSL/TLS protocol version that the distribution can use to communicate with viewers. To specify a minimum version, choose a value for ``MinimumProtocolVersion``. For more information, see [Security Policy](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValues-security-policy) in the *Amazon CloudFront Developer Guide*.  +  The location of the SSL/TLS certificate, [(ACM)](https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html) (recommended) or [(IAM)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html). You specify the location by setting a value in one of the following fields (not both):  +   ``ACMCertificateArn`` (In CloudFormation, this field name is ``AcmCertificateArn``. Note the different capitalization.)  +   ``IAMCertificateId`` (In CloudFormation, this field name is ``IamCertificateId``. Note the different capitalization.)     All distributions support HTTPS connections from viewers. To require viewers to use HTTPS only, or to redirect them from HTTP to HTTPS, use ``ViewerProtocolPolicy`` in the ``CacheBehavior`` or ``DefaultCacheBehavior``. To specify how CloudFront should use SSL/TLS to communicate with your custom origin, use ``CustomOriginConfig``. For more information, see [Using HTTPS with CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https.html) and [Using Alternate Domain Names and HTTPS](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-alternate-domain-names.html) in the *Amazon CloudFront Developer Guide*.
     * 
     */
    private @Nullable ViewerCertificateResponse viewerCertificate;
    /**
     * @return A unique identifier that specifies the WAF web ACL, if any, to associate with this distribution. To specify a web ACL created using the latest version of WAF, use the ACL ARN, for example ``arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a``. To specify a web ACL created using WAF Classic, use the ACL ID, for example ``473e64fd-f30b-4765-81a0-62ad96dd167a``.  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 WAF, see the [Developer Guide](https://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html).
     * 
     */
    private @Nullable String webACLId;

    private DistributionConfigResponse() {}
    /**
     * @return A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.
     * 
     */
    public List aliases() {
        return this.aliases == null ? List.of() : this.aliases;
    }
    /**
     * @return A complex type that contains zero or more ``CacheBehavior`` elements.
     * 
     */
    public List cacheBehaviors() {
        return this.cacheBehaviors == null ? List.of() : this.cacheBehaviors;
    }
    /**
     * @return Property cnamEs
     * 
     */
    public List cnamEs() {
        return this.cnamEs == null ? List.of() : this.cnamEs;
    }
    /**
     * @return A comment to describe the distribution. The comment cannot be longer than 128 characters.
     * 
     */
    public Optional comment() {
        return Optional.ofNullable(this.comment);
    }
    /**
     * @return The identifier of a continuous deployment policy. For more information, see ``CreateContinuousDeploymentPolicy``.
     * 
     */
    public Optional continuousDeploymentPolicyId() {
        return Optional.ofNullable(this.continuousDeploymentPolicyId);
    }
    /**
     * @return 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](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) in the *Amazon CloudFront Developer Guide*.
     * 
     */
    public List customErrorResponses() {
        return this.customErrorResponses == null ? List.of() : this.customErrorResponses;
    }
    /**
     * @return Property customOrigin
     * 
     */
    public Optional customOrigin() {
        return Optional.ofNullable(this.customOrigin);
    }
    /**
     * @return 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. A complex type that describes the default cache behavior if you don't specify a ``CacheBehavior`` element or if request URLs don't match any of the values of ``PathPattern`` in ``CacheBehavior`` elements. You must create exactly one default cache behavior.
     * 
     */
    public Optional defaultCacheBehavior() {
        return Optional.ofNullable(this.defaultCacheBehavior);
    }
    /**
     * @return The object that you want CloudFront to request from your origin (for example, ``index.html``) when a viewer requests the root URL for your distribution (``https://www.example.com``) instead of an object in your distribution (``https://www.example.com/product-description.html``). Specifying a default root object avoids exposing the contents of your distribution. Specify only the object name, for example, ``index.html``. Don't add a ``/`` before the object name. 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 [Creating a Default Root Object](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html) in the *Amazon CloudFront Developer Guide*.
     * 
     */
    public Optional defaultRootObject() {
        return Optional.ofNullable(this.defaultRootObject);
    }
    /**
     * @return From this field, you can enable or disable the selected distribution.
     * 
     */
    public Optional enabled() {
        return Optional.ofNullable(this.enabled);
    }
    /**
     * @return (Optional) Specify the maximum HTTP version(s) that you want viewers to use to communicate with CF. The default value for new distributions is ``http1.1``. For viewers and CF to use HTTP/2, viewers must support TLSv1.2 or later, and must support Server Name Indication (SNI). For viewers and CF to use HTTP/3, viewers must support TLSv1.3 and Server Name Indication (SNI). CF supports HTTP/3 connection migration to allow the viewer to switch networks without losing connection. For more information about connection migration, see [Connection Migration](https://docs.aws.amazon.com/https://www.rfc-editor.org/rfc/rfc9000.html#name-connection-migration) at RFC 9000. For more information about supported TLSv1.3 ciphers, see [Supported protocols and ciphers between viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html).
     * 
     */
    public Optional httpVersion() {
        return Optional.ofNullable(this.httpVersion);
    }
    /**
     * @return 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](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html) in the *Amazon CloudFront Developer Guide*. If you're using an R53AWSIntlong 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](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html) in the *Developer Guide*. If you created a CNAME resource record set, either with R53AWSIntlong 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.
     * 
     */
    public Optional ipV6Enabled() {
        return Optional.ofNullable(this.ipV6Enabled);
    }
    /**
     * @return A complex type that controls whether access logs are written for the distribution. For more information about logging, see [Access Logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) in the *Amazon CloudFront Developer Guide*. A complex type that controls whether access logs are written for the distribution.
     * 
     */
    public Optional logging() {
        return Optional.ofNullable(this.logging);
    }
    /**
     * @return A complex type that contains information about origin groups for this distribution. A complex data type for the origin groups specified for a distribution.
     * 
     */
    public Optional originGroups() {
        return Optional.ofNullable(this.originGroups);
    }
    /**
     * @return A complex type that contains information about origins for this distribution.
     * 
     */
    public List origins() {
        return this.origins == null ? List.of() : this.origins;
    }
    /**
     * @return 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](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) 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](https://docs.aws.amazon.com/cloudfront/pricing/).
     * 
     */
    public Optional priceClass() {
        return Optional.ofNullable(this.priceClass);
    }
    /**
     * @return A complex type that identifies ways in which you want to restrict distribution of your content. A complex type that identifies ways in which you want to restrict distribution of your content.
     * 
     */
    public Optional restrictions() {
        return Optional.ofNullable(this.restrictions);
    }
    /**
     * @return Property s3Origin
     * 
     */
    public Optional s3Origin() {
        return Optional.ofNullable(this.s3Origin);
    }
    /**
     * @return 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.
     * 
     */
    public Optional staging() {
        return Optional.ofNullable(this.staging);
    }
    /**
     * @return A complex type that determines the distribution's SSL/TLS configuration for communicating with viewers. A complex type that determines the distribution's SSL/TLS configuration for communicating with viewers. If the distribution doesn't use ``Aliases`` (also known as alternate domain names or CNAMEs)—that is, if the distribution uses the CloudFront domain name such as ``d111111abcdef8.cloudfront.net``—set ``CloudFrontDefaultCertificate`` to ``true`` and leave all other fields empty. If the distribution uses ``Aliases`` (alternate domain names or CNAMEs), use the fields in this type to specify the following settings:  +  Which viewers the distribution accepts HTTPS connections from: only viewers that support [server name indication (SNI)](https://docs.aws.amazon.com/https://en.wikipedia.org/wiki/Server_Name_Indication) (recommended), or all viewers including those that don't support SNI.  +  To accept HTTPS connections from only viewers that support SNI, set ``SSLSupportMethod`` to ``sni-only``. This is recommended. Most browsers and clients support SNI. (In CloudFormation, the field name is ``SslSupportMethod``. Note the different capitalization.)  +  To accept HTTPS connections from all viewers, including those that don't support SNI, set ``SSLSupportMethod`` to ``vip``. This is not recommended, and results in additional monthly charges from CloudFront. (In CloudFormation, the field name is ``SslSupportMethod``. Note the different capitalization.)    +  The minimum SSL/TLS protocol version that the distribution can use to communicate with viewers. To specify a minimum version, choose a value for ``MinimumProtocolVersion``. For more information, see [Security Policy](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValues-security-policy) in the *Amazon CloudFront Developer Guide*.  +  The location of the SSL/TLS certificate, [(ACM)](https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html) (recommended) or [(IAM)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html). You specify the location by setting a value in one of the following fields (not both):  +   ``ACMCertificateArn`` (In CloudFormation, this field name is ``AcmCertificateArn``. Note the different capitalization.)  +   ``IAMCertificateId`` (In CloudFormation, this field name is ``IamCertificateId``. Note the different capitalization.)     All distributions support HTTPS connections from viewers. To require viewers to use HTTPS only, or to redirect them from HTTP to HTTPS, use ``ViewerProtocolPolicy`` in the ``CacheBehavior`` or ``DefaultCacheBehavior``. To specify how CloudFront should use SSL/TLS to communicate with your custom origin, use ``CustomOriginConfig``. For more information, see [Using HTTPS with CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https.html) and [Using Alternate Domain Names and HTTPS](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-alternate-domain-names.html) in the *Amazon CloudFront Developer Guide*.
     * 
     */
    public Optional viewerCertificate() {
        return Optional.ofNullable(this.viewerCertificate);
    }
    /**
     * @return A unique identifier that specifies the WAF web ACL, if any, to associate with this distribution. To specify a web ACL created using the latest version of WAF, use the ACL ARN, for example ``arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a``. To specify a web ACL created using WAF Classic, use the ACL ID, for example ``473e64fd-f30b-4765-81a0-62ad96dd167a``.  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 WAF, see the [Developer Guide](https://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html).
     * 
     */
    public Optional webACLId() {
        return Optional.ofNullable(this.webACLId);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(DistributionConfigResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List aliases;
        private @Nullable List cacheBehaviors;
        private @Nullable List cnamEs;
        private @Nullable String comment;
        private @Nullable String continuousDeploymentPolicyId;
        private @Nullable List customErrorResponses;
        private @Nullable LegacyCustomOriginResponse customOrigin;
        private @Nullable DefaultCacheBehaviorResponse defaultCacheBehavior;
        private @Nullable String defaultRootObject;
        private @Nullable Boolean enabled;
        private @Nullable String httpVersion;
        private @Nullable Boolean ipV6Enabled;
        private @Nullable LoggingResponse logging;
        private @Nullable OriginGroupsResponse originGroups;
        private @Nullable List origins;
        private @Nullable String priceClass;
        private @Nullable RestrictionsResponse restrictions;
        private @Nullable LegacyS3OriginResponse s3Origin;
        private @Nullable Boolean staging;
        private @Nullable ViewerCertificateResponse viewerCertificate;
        private @Nullable String webACLId;
        public Builder() {}
        public Builder(DistributionConfigResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.aliases = defaults.aliases;
    	      this.cacheBehaviors = defaults.cacheBehaviors;
    	      this.cnamEs = defaults.cnamEs;
    	      this.comment = defaults.comment;
    	      this.continuousDeploymentPolicyId = defaults.continuousDeploymentPolicyId;
    	      this.customErrorResponses = defaults.customErrorResponses;
    	      this.customOrigin = defaults.customOrigin;
    	      this.defaultCacheBehavior = defaults.defaultCacheBehavior;
    	      this.defaultRootObject = defaults.defaultRootObject;
    	      this.enabled = defaults.enabled;
    	      this.httpVersion = defaults.httpVersion;
    	      this.ipV6Enabled = defaults.ipV6Enabled;
    	      this.logging = defaults.logging;
    	      this.originGroups = defaults.originGroups;
    	      this.origins = defaults.origins;
    	      this.priceClass = defaults.priceClass;
    	      this.restrictions = defaults.restrictions;
    	      this.s3Origin = defaults.s3Origin;
    	      this.staging = defaults.staging;
    	      this.viewerCertificate = defaults.viewerCertificate;
    	      this.webACLId = defaults.webACLId;
        }

        @CustomType.Setter
        public Builder aliases(@Nullable List aliases) {

            this.aliases = aliases;
            return this;
        }
        public Builder aliases(String... aliases) {
            return aliases(List.of(aliases));
        }
        @CustomType.Setter
        public Builder cacheBehaviors(@Nullable List cacheBehaviors) {

            this.cacheBehaviors = cacheBehaviors;
            return this;
        }
        public Builder cacheBehaviors(CacheBehaviorResponse... cacheBehaviors) {
            return cacheBehaviors(List.of(cacheBehaviors));
        }
        @CustomType.Setter
        public Builder cnamEs(@Nullable List cnamEs) {

            this.cnamEs = cnamEs;
            return this;
        }
        public Builder cnamEs(String... cnamEs) {
            return cnamEs(List.of(cnamEs));
        }
        @CustomType.Setter
        public Builder comment(@Nullable String comment) {

            this.comment = comment;
            return this;
        }
        @CustomType.Setter
        public Builder continuousDeploymentPolicyId(@Nullable String continuousDeploymentPolicyId) {

            this.continuousDeploymentPolicyId = continuousDeploymentPolicyId;
            return this;
        }
        @CustomType.Setter
        public Builder customErrorResponses(@Nullable List customErrorResponses) {

            this.customErrorResponses = customErrorResponses;
            return this;
        }
        public Builder customErrorResponses(CustomErrorResponseResponse... customErrorResponses) {
            return customErrorResponses(List.of(customErrorResponses));
        }
        @CustomType.Setter
        public Builder customOrigin(@Nullable LegacyCustomOriginResponse customOrigin) {

            this.customOrigin = customOrigin;
            return this;
        }
        @CustomType.Setter
        public Builder defaultCacheBehavior(@Nullable DefaultCacheBehaviorResponse defaultCacheBehavior) {

            this.defaultCacheBehavior = defaultCacheBehavior;
            return this;
        }
        @CustomType.Setter
        public Builder defaultRootObject(@Nullable String defaultRootObject) {

            this.defaultRootObject = defaultRootObject;
            return this;
        }
        @CustomType.Setter
        public Builder enabled(@Nullable Boolean enabled) {

            this.enabled = enabled;
            return this;
        }
        @CustomType.Setter
        public Builder httpVersion(@Nullable String httpVersion) {

            this.httpVersion = httpVersion;
            return this;
        }
        @CustomType.Setter
        public Builder ipV6Enabled(@Nullable Boolean ipV6Enabled) {

            this.ipV6Enabled = ipV6Enabled;
            return this;
        }
        @CustomType.Setter
        public Builder logging(@Nullable LoggingResponse logging) {

            this.logging = logging;
            return this;
        }
        @CustomType.Setter
        public Builder originGroups(@Nullable OriginGroupsResponse originGroups) {

            this.originGroups = originGroups;
            return this;
        }
        @CustomType.Setter
        public Builder origins(@Nullable List origins) {

            this.origins = origins;
            return this;
        }
        public Builder origins(OriginResponse... origins) {
            return origins(List.of(origins));
        }
        @CustomType.Setter
        public Builder priceClass(@Nullable String priceClass) {

            this.priceClass = priceClass;
            return this;
        }
        @CustomType.Setter
        public Builder restrictions(@Nullable RestrictionsResponse restrictions) {

            this.restrictions = restrictions;
            return this;
        }
        @CustomType.Setter
        public Builder s3Origin(@Nullable LegacyS3OriginResponse s3Origin) {

            this.s3Origin = s3Origin;
            return this;
        }
        @CustomType.Setter
        public Builder staging(@Nullable Boolean staging) {

            this.staging = staging;
            return this;
        }
        @CustomType.Setter
        public Builder viewerCertificate(@Nullable ViewerCertificateResponse viewerCertificate) {

            this.viewerCertificate = viewerCertificate;
            return this;
        }
        @CustomType.Setter
        public Builder webACLId(@Nullable String webACLId) {

            this.webACLId = webACLId;
            return this;
        }
        public DistributionConfigResponse build() {
            final var _resultValue = new DistributionConfigResponse();
            _resultValue.aliases = aliases;
            _resultValue.cacheBehaviors = cacheBehaviors;
            _resultValue.cnamEs = cnamEs;
            _resultValue.comment = comment;
            _resultValue.continuousDeploymentPolicyId = continuousDeploymentPolicyId;
            _resultValue.customErrorResponses = customErrorResponses;
            _resultValue.customOrigin = customOrigin;
            _resultValue.defaultCacheBehavior = defaultCacheBehavior;
            _resultValue.defaultRootObject = defaultRootObject;
            _resultValue.enabled = enabled;
            _resultValue.httpVersion = httpVersion;
            _resultValue.ipV6Enabled = ipV6Enabled;
            _resultValue.logging = logging;
            _resultValue.originGroups = originGroups;
            _resultValue.origins = origins;
            _resultValue.priceClass = priceClass;
            _resultValue.restrictions = restrictions;
            _resultValue.s3Origin = s3Origin;
            _resultValue.staging = staging;
            _resultValue.viewerCertificate = viewerCertificate;
            _resultValue.webACLId = webACLId;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy