public class DistributionConfig extends Object
A distribution Configuration.
Constructor and Description |
---|
DistributionConfig()
Default constructor for a new DistributionConfig object.
|
DistributionConfig(String callerReference,
Boolean enabled)
Constructs a new DistributionConfig object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
CachingBehavior |
getCachingBehavior()
Determines the minimum TTL for objects in the CloudFront cache.
|
String |
getCallerReference()
A unique number that ensures the request can't be replayed.
|
List<String> |
getCNAME()
A CNAME alias you want to associate with this distribution.
|
String |
getComment()
Any comments you want to include about the distribution.
|
CustomOrigin |
getCustomOrigin()
Origin information to associate with the distribution.
|
String |
getDefaultRootObject()
Designates a default root object.
|
Boolean |
getEnabled()
Whether the distribution is enabled to accept end user requests for
content.
|
LoggingConfig |
getLogging()
A complex type that controls whether access logs are written for the
distribution.
|
RequiredProtocols |
getRequiredProtocols()
Defines the protocols required for your distribution.
|
S3Origin |
getS3Origin()
Origin information to associate with the distribution.
|
TrustedSigners |
getTrustedSigners()
A complex type that specifies any AWS accounts you want to permit to
create signed URLs for private content.
|
int |
hashCode() |
Boolean |
isEnabled()
Whether the distribution is enabled to accept end user requests for
content.
|
void |
setCachingBehavior(CachingBehavior cachingBehavior)
Determines the minimum TTL for objects in the CloudFront cache.
|
void |
setCallerReference(String callerReference)
A unique number that ensures the request can't be replayed.
|
void |
setCNAME(Collection<String> cNAME)
A CNAME alias you want to associate with this distribution.
|
void |
setComment(String comment)
Any comments you want to include about the distribution.
|
void |
setCustomOrigin(CustomOrigin customOrigin)
Origin information to associate with the distribution.
|
void |
setDefaultRootObject(String defaultRootObject)
Designates a default root object.
|
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 |
setRequiredProtocols(RequiredProtocols requiredProtocols)
Defines the protocols required for your distribution.
|
void |
setS3Origin(S3Origin s3Origin)
Origin information to associate with the distribution.
|
void |
setTrustedSigners(TrustedSigners trustedSigners)
A complex type that specifies any AWS accounts you want to permit to
create signed URLs for private content.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DistributionConfig |
withCachingBehavior(CachingBehavior cachingBehavior)
Determines the minimum TTL for objects in the CloudFront cache.
|
DistributionConfig |
withCallerReference(String callerReference)
A unique number that ensures the request can't be replayed.
|
DistributionConfig |
withCNAME(Collection<String> cNAME)
A CNAME alias you want to associate with this distribution.
|
DistributionConfig |
withCNAME(String... cNAME)
A CNAME alias you want to associate with this distribution.
|
DistributionConfig |
withComment(String comment)
Any comments you want to include about the distribution.
|
DistributionConfig |
withCustomOrigin(CustomOrigin customOrigin)
Origin information to associate with the distribution.
|
DistributionConfig |
withDefaultRootObject(String defaultRootObject)
Designates a default root object.
|
DistributionConfig |
withEnabled(Boolean enabled)
Whether the distribution is enabled to accept end user requests for
content.
|
DistributionConfig |
withLogging(LoggingConfig logging)
A complex type that controls whether access logs are written for the
distribution.
|
DistributionConfig |
withRequiredProtocols(RequiredProtocols requiredProtocols)
Defines the protocols required for your distribution.
|
DistributionConfig |
withS3Origin(S3Origin s3Origin)
Origin information to associate with the distribution.
|
DistributionConfig |
withTrustedSigners(TrustedSigners trustedSigners)
A complex type that specifies any AWS accounts you want to permit to
create signed URLs for private content.
|
public DistributionConfig()
public DistributionConfig(String callerReference, Boolean enabled)
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.public S3Origin getS3Origin()
public void setS3Origin(S3Origin s3Origin)
s3Origin
- Origin information to associate with the distribution. If your
distribution will use an Amazon S3 origin, then you use the S3Origin
element.public DistributionConfig withS3Origin(S3Origin s3Origin)
Returns a reference to this object so that method calls can be chained together.
s3Origin
- Origin information to associate with the distribution. If your
distribution will use an Amazon S3 origin, then you use the S3Origin
element.public CustomOrigin getCustomOrigin()
public void setCustomOrigin(CustomOrigin customOrigin)
customOrigin
- Origin information to associate with the distribution. If your
distribution will use a custom origin (non Amazon S3), then you use
the CustomOrigin element.public DistributionConfig withCustomOrigin(CustomOrigin customOrigin)
Returns a reference to this object so that method calls can be chained together.
customOrigin
- Origin information to associate with the distribution. If your
distribution will use a custom origin (non Amazon S3), then you use
the CustomOrigin element.public String getCallerReference()
public void setCallerReference(String callerReference)
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.public DistributionConfig withCallerReference(String callerReference)
Returns a reference to this object so that method calls can be chained together.
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.public List<String> getCNAME()
public void setCNAME(Collection<String> cNAME)
cNAME
- A CNAME alias you want to associate with this distribution. You can
have up to 10 CNAME aliases per distribution. Only include a CNAME
element if you have a CNAME to associate with the distribution. Don't
include an empty CNAME element in the DistributionConfig object. If
you do, CloudFront returns a MalformedXML error.public DistributionConfig withCNAME(String... cNAME)
Returns a reference to this object so that method calls can be chained together.
cNAME
- A CNAME alias you want to associate with this distribution. You can
have up to 10 CNAME aliases per distribution. Only include a CNAME
element if you have a CNAME to associate with the distribution. Don't
include an empty CNAME element in the DistributionConfig object. If
you do, CloudFront returns a MalformedXML error.public DistributionConfig withCNAME(Collection<String> cNAME)
Returns a reference to this object so that method calls can be chained together.
cNAME
- A CNAME alias you want to associate with this distribution. You can
have up to 10 CNAME aliases per distribution. Only include a CNAME
element if you have a CNAME to associate with the distribution. Don't
include an empty CNAME element in the DistributionConfig object. If
you do, CloudFront returns a MalformedXML error.public String getComment()
public void setComment(String comment)
comment
- Any comments you want to include about the distribution.public DistributionConfig withComment(String comment)
Returns a reference to this object so that method calls can be chained together.
comment
- Any comments you want to include about the distribution.public Boolean isEnabled()
public void setEnabled(Boolean enabled)
enabled
- Whether the distribution is enabled to accept end user requests for
content.public DistributionConfig withEnabled(Boolean enabled)
Returns a reference to this object so that method calls can be chained together.
enabled
- Whether the distribution is enabled to accept end user requests for
content.public Boolean getEnabled()
public LoggingConfig getLogging()
public void setLogging(LoggingConfig logging)
logging
- A complex type that controls whether access logs are written for the
distribution. If you want to turn on access logs, include this
element; if you want to turn off access logs, remove this element.public DistributionConfig withLogging(LoggingConfig logging)
Returns a reference to this object so that method calls can be chained together.
logging
- A complex type that controls whether access logs are written for the
distribution. If you want to turn on access logs, include this
element; if you want to turn off access logs, remove this element.public TrustedSigners getTrustedSigners()
public void setTrustedSigners(TrustedSigners trustedSigners)
trustedSigners
- A complex type that specifies any AWS accounts you want to permit to
create signed URLs for private content. If you want the distribution
to use signed URLs, include this element; if you want the distribution
to use basic URLs, remove this element.public DistributionConfig withTrustedSigners(TrustedSigners trustedSigners)
Returns a reference to this object so that method calls can be chained together.
trustedSigners
- A complex type that specifies any AWS accounts you want to permit to
create signed URLs for private content. If you want the distribution
to use signed URLs, include this element; if you want the distribution
to use basic URLs, remove this element.public RequiredProtocols getRequiredProtocols()
public void setRequiredProtocols(RequiredProtocols requiredProtocols)
requiredProtocols
- Defines the protocols required for your distribution. Use this element
to restrict access to your distribution solely to HTTPS requests.
Without this element, CloudFront can use any available protocol to
serve the request.public DistributionConfig withRequiredProtocols(RequiredProtocols requiredProtocols)
Returns a reference to this object so that method calls can be chained together.
requiredProtocols
- Defines the protocols required for your distribution. Use this element
to restrict access to your distribution solely to HTTPS requests.
Without this element, CloudFront can use any available protocol to
serve the request.public String getDefaultRootObject()
public void setDefaultRootObject(String defaultRootObject)
defaultRootObject
- Designates a default root object. Only include a DefaultRootObject
element if you are going to assign a default root object for the
distribution. Don't include an empty DefaultRootObject element in the
DistributionConfig object. If you do, CloudFront returns a
MalformedXML error.public DistributionConfig withDefaultRootObject(String defaultRootObject)
Returns a reference to this object so that method calls can be chained together.
defaultRootObject
- Designates a default root object. Only include a DefaultRootObject
element if you are going to assign a default root object for the
distribution. Don't include an empty DefaultRootObject element in the
DistributionConfig object. If you do, CloudFront returns a
MalformedXML error.public CachingBehavior getCachingBehavior()
public void setCachingBehavior(CachingBehavior cachingBehavior)
cachingBehavior
- Determines the minimum TTL for objects in the CloudFront cache. This
value specifies a lower bound for values in the headers for an object,
for example, in the Cache-Control max-age directive.public DistributionConfig withCachingBehavior(CachingBehavior cachingBehavior)
Returns a reference to this object so that method calls can be chained together.
cachingBehavior
- Determines the minimum TTL for objects in the CloudFront cache. This
value specifies a lower bound for values in the headers for an object,
for example, in the Cache-Control max-age directive.public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.