Class DistributionConfig
java.lang.Object
com.amazonaws.services.cloudfront.model.DistributionConfig
- All Implemented Interfaces:
Serializable
,Cloneable
A distribution Configuration.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for DistributionConfig object.DistributionConfig
(String callerReference, Boolean enabled) Constructs a new DistributionConfig object. -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.A complex type that contains zero or more CacheBehavior elements.A unique number that ensures the request can't be replayed.Any comments you want to include about the distribution.A complex type that contains zero or more CustomErrorResponse elements.A complex type that describes the default cache behavior if you do not 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.The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/index.html).Whether the distribution is enabled to accept end user requests for content.A complex type that controls whether access logs are written for the distribution.A complex type that contains information about origins for this distribution.A complex type that contains information about price class for this distribution.(Optional) If you're using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.int
hashCode()
Whether the distribution is enabled to accept end user requests for content.void
setAliases
(Aliases aliases) A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.void
setCacheBehaviors
(CacheBehaviors cacheBehaviors) A complex type that contains zero or more CacheBehavior elements.void
setCallerReference
(String callerReference) A unique number that ensures the request can't be replayed.void
setComment
(String comment) Any comments you want to include about the distribution.void
setCustomErrorResponses
(CustomErrorResponses customErrorResponses) A complex type that contains zero or more CustomErrorResponse elements.void
setDefaultCacheBehavior
(DefaultCacheBehavior defaultCacheBehavior) A complex type that describes the default cache behavior if you do not 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.void
setDefaultRootObject
(String defaultRootObject) The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/index.html).void
setEnabled
(Boolean enabled) Whether the distribution is enabled to accept end user requests for content.void
setLogging
(LoggingConfig logging) A complex type that controls whether access logs are written for the distribution.void
setOrigins
(Origins origins) A complex type that contains information about origins for this distribution.void
setPriceClass
(PriceClass priceClass) A complex type that contains information about price class for this distribution.void
setPriceClass
(String priceClass) A complex type that contains information about price class for this distribution.void
setRestrictions
(Restrictions restrictions) void
setViewerCertificate
(ViewerCertificate viewerCertificate) void
setWebACLId
(String webACLId) (Optional) If you're using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.toString()
Returns a string representation of this object; useful for testing and debugging.withAliases
(Aliases aliases) A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.withCacheBehaviors
(CacheBehaviors cacheBehaviors) A complex type that contains zero or more CacheBehavior elements.withCallerReference
(String callerReference) A unique number that ensures the request can't be replayed.withComment
(String comment) Any comments you want to include about the distribution.withCustomErrorResponses
(CustomErrorResponses customErrorResponses) A complex type that contains zero or more CustomErrorResponse elements.withDefaultCacheBehavior
(DefaultCacheBehavior defaultCacheBehavior) A complex type that describes the default cache behavior if you do not 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.withDefaultRootObject
(String defaultRootObject) The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/index.html).withEnabled
(Boolean enabled) Whether the distribution is enabled to accept end user requests for content.withLogging
(LoggingConfig logging) A complex type that controls whether access logs are written for the distribution.withOrigins
(Origins origins) A complex type that contains information about origins for this distribution.withPriceClass
(PriceClass priceClass) A complex type that contains information about price class for this distribution.withPriceClass
(String priceClass) A complex type that contains information about price class for this distribution.withRestrictions
(Restrictions restrictions) withViewerCertificate
(ViewerCertificate viewerCertificate) withWebACLId
(String webACLId) (Optional) If you're using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.
-
Constructor Details
-
DistributionConfig
public DistributionConfig()Default constructor for DistributionConfig object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it. -
DistributionConfig
Constructs a new DistributionConfig object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
callerReference
- A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the DistributionConfig object), a new distribution is created. If the CallerReference is a value you already sent in a previous request to create a distribution, and the content of the DistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a distribution but the content of the DistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.enabled
- Whether the distribution is enabled to accept end user requests for content.
-
-
Method Details
-
setCallerReference
A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the DistributionConfig object), a new distribution is created. If the CallerReference is a value you already sent in a previous request to create a distribution, and the content of the DistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a distribution but the content of the DistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.- Parameters:
callerReference
- A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the DistributionConfig object), a new distribution is created. If the CallerReference is a value you already sent in a previous request to create a distribution, and the content of the DistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a distribution but the content of the DistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.
-
getCallerReference
A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the DistributionConfig object), a new distribution is created. If the CallerReference is a value you already sent in a previous request to create a distribution, and the content of the DistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a distribution but the content of the DistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.- Returns:
- A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the DistributionConfig object), a new distribution is created. If the CallerReference is a value you already sent in a previous request to create a distribution, and the content of the DistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a distribution but the content of the DistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.
-
withCallerReference
A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the DistributionConfig object), a new distribution is created. If the CallerReference is a value you already sent in a previous request to create a distribution, and the content of the DistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a distribution but the content of the DistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.- Parameters:
callerReference
- A unique number that ensures the request can't be replayed. If the CallerReference is new (no matter the content of the DistributionConfig object), a new distribution is created. If the CallerReference is a value you already sent in a previous request to create a distribution, and the content of the DistributionConfig is identical to the original request (ignoring white space), the response includes the same information returned to the original request. If the CallerReference is a value you already sent in a previous request to create a distribution but the content of the DistributionConfig is different from the original request, CloudFront returns a DistributionAlreadyExists error.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAliases
A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.- Parameters:
aliases
- A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.
-
getAliases
A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.- Returns:
- A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.
-
withAliases
A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.- Parameters:
aliases
- A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDefaultRootObject
The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/index.html). Specifying a default root object avoids exposing the contents of your distribution. 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.- Parameters:
defaultRootObject
- The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/index.html). Specifying a default root object avoids exposing the contents of your distribution. 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.
-
getDefaultRootObject
The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/index.html). Specifying a default root object avoids exposing the contents of your distribution. 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.- Returns:
- The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/index.html). Specifying a default root object avoids exposing the contents of your distribution. 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.
-
withDefaultRootObject
The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/index.html). Specifying a default root object avoids exposing the contents of your distribution. 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.- Parameters:
defaultRootObject
- The object that you want CloudFront to return (for example, index.html) when an end user requests the root URL for your distribution (http://www.example.com) instead of an object in your distribution (http://www.example.com/index.html). Specifying a default root object avoids exposing the contents of your distribution. 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setOrigins
A complex type that contains information about origins for this distribution.- Parameters:
origins
- A complex type that contains information about origins for this distribution.
-
getOrigins
A complex type that contains information about origins for this distribution.- Returns:
- A complex type that contains information about origins for this distribution.
-
withOrigins
A complex type that contains information about origins for this distribution.- Parameters:
origins
- A complex type that contains information about origins for this distribution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDefaultCacheBehavior
A complex type that describes the default cache behavior if you do not 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.- Parameters:
defaultCacheBehavior
- A complex type that describes the default cache behavior if you do not 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.
-
getDefaultCacheBehavior
A complex type that describes the default cache behavior if you do not 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.- Returns:
- A complex type that describes the default cache behavior if you do not 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.
-
withDefaultCacheBehavior
A complex type that describes the default cache behavior if you do not 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.- Parameters:
defaultCacheBehavior
- A complex type that describes the default cache behavior if you do not 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCacheBehaviors
A complex type that contains zero or more CacheBehavior elements.- Parameters:
cacheBehaviors
- A complex type that contains zero or more CacheBehavior elements.
-
getCacheBehaviors
A complex type that contains zero or more CacheBehavior elements.- Returns:
- A complex type that contains zero or more CacheBehavior elements.
-
withCacheBehaviors
A complex type that contains zero or more CacheBehavior elements.- Parameters:
cacheBehaviors
- A complex type that contains zero or more CacheBehavior elements.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCustomErrorResponses
A complex type that contains zero or more CustomErrorResponse elements.- Parameters:
customErrorResponses
- A complex type that contains zero or more CustomErrorResponse elements.
-
getCustomErrorResponses
A complex type that contains zero or more CustomErrorResponse elements.- Returns:
- A complex type that contains zero or more CustomErrorResponse elements.
-
withCustomErrorResponses
A complex type that contains zero or more CustomErrorResponse elements.- Parameters:
customErrorResponses
- A complex type that contains zero or more CustomErrorResponse elements.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setComment
Any comments you want to include about the distribution.- Parameters:
comment
- Any comments you want to include about the distribution.
-
getComment
Any comments you want to include about the distribution.- Returns:
- Any comments you want to include about the distribution.
-
withComment
Any comments you want to include about the distribution.- Parameters:
comment
- Any comments you want to include about the distribution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLogging
A complex type that controls whether access logs are written for the distribution.- Parameters:
logging
- A complex type that controls whether access logs are written for the distribution.
-
getLogging
A complex type that controls whether access logs are written for the distribution.- Returns:
- A complex type that controls whether access logs are written for the distribution.
-
withLogging
A complex type that controls whether access logs are written for the distribution.- Parameters:
logging
- A complex type that controls whether access logs are written for the distribution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPriceClass
A complex type that contains information about price class for this distribution.- Parameters:
priceClass
- A complex type that contains information about price class for this distribution.- See Also:
-
getPriceClass
A complex type that contains information about price class for this distribution.- Returns:
- A complex type that contains information about price class for this distribution.
- See Also:
-
withPriceClass
A complex type that contains information about price class for this distribution.- Parameters:
priceClass
- A complex type that contains information about price class for this distribution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setPriceClass
A complex type that contains information about price class for this distribution.- Parameters:
priceClass
- A complex type that contains information about price class for this distribution.- See Also:
-
withPriceClass
A complex type that contains information about price class for this distribution.- Parameters:
priceClass
- A complex type that contains information about price class for this distribution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setEnabled
Whether the distribution is enabled to accept end user requests for content.- Parameters:
enabled
- Whether the distribution is enabled to accept end user requests for content.
-
getEnabled
Whether the distribution is enabled to accept end user requests for content.- Returns:
- Whether the distribution is enabled to accept end user requests for content.
-
withEnabled
Whether the distribution is enabled to accept end user requests for content.- Parameters:
enabled
- Whether the distribution is enabled to accept end user requests for content.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isEnabled
Whether the distribution is enabled to accept end user requests for content.- Returns:
- Whether the distribution is enabled to accept end user requests for content.
-
setViewerCertificate
- Parameters:
viewerCertificate
-
-
getViewerCertificate
- Returns:
-
withViewerCertificate
- Parameters:
viewerCertificate
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRestrictions
- Parameters:
restrictions
-
-
getRestrictions
- Returns:
-
withRestrictions
- Parameters:
restrictions
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setWebACLId
(Optional) If you're using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.- Parameters:
webACLId
- (Optional) If you're using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.
-
getWebACLId
(Optional) If you're using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.- Returns:
- (Optional) If you're using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.
-
withWebACLId
(Optional) If you're using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.- Parameters:
webACLId
- (Optional) If you're using AWS WAF to filter CloudFront requests, the Id of the AWS WAF web ACL that is associated with the distribution.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-