Class Origin
- java.lang.Object
-
- com.amazonaws.services.cloudfront.model.Origin
-
- All Implemented Interfaces:
Serializable,Cloneable
public class Origin extends Object implements Serializable, Cloneable
A complex type that describes the Amazon S3 bucket or the HTTP server (for example, a web server) from which CloudFront gets your files.You must create at least one origin.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Origin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Originclone()booleanequals(Object obj)CustomHeadersgetCustomHeaders()A complex type that contains information about the custom headers associated with this Origin.CustomOriginConfiggetCustomOriginConfig()A complex type that contains information about a custom origin.StringgetDomainName()Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com.StringgetId()A unique identifier for the origin.StringgetOriginPath()An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin.S3OriginConfiggetS3OriginConfig()A complex type that contains information about the Amazon S3 origin.inthashCode()voidsetCustomHeaders(CustomHeaders customHeaders)A complex type that contains information about the custom headers associated with this Origin.voidsetCustomOriginConfig(CustomOriginConfig customOriginConfig)A complex type that contains information about a custom origin.voidsetDomainName(String domainName)Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com.voidsetId(String id)A unique identifier for the origin.voidsetOriginPath(String originPath)An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin.voidsetS3OriginConfig(S3OriginConfig s3OriginConfig)A complex type that contains information about the Amazon S3 origin.StringtoString()Returns a string representation of this object; useful for testing and debugging.OriginwithCustomHeaders(CustomHeaders customHeaders)A complex type that contains information about the custom headers associated with this Origin.OriginwithCustomOriginConfig(CustomOriginConfig customOriginConfig)A complex type that contains information about a custom origin.OriginwithDomainName(String domainName)Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com.OriginwithId(String id)A unique identifier for the origin.OriginwithOriginPath(String originPath)An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin.OriginwithS3OriginConfig(S3OriginConfig s3OriginConfig)A complex type that contains information about the Amazon S3 origin.
-
-
-
Method Detail
-
setId
public void setId(String id)
A unique identifier for the origin. The value of Id must be unique within the distribution. You use the value of Id when you create a cache behavior. The Id identifies the origin that CloudFront routes a request to when the request matches the path pattern for that cache behavior.- Parameters:
id- A unique identifier for the origin. The value of Id must be unique within the distribution. You use the value of Id when you create a cache behavior. The Id identifies the origin that CloudFront routes a request to when the request matches the path pattern for that cache behavior.
-
getId
public String getId()
A unique identifier for the origin. The value of Id must be unique within the distribution. You use the value of Id when you create a cache behavior. The Id identifies the origin that CloudFront routes a request to when the request matches the path pattern for that cache behavior.- Returns:
- A unique identifier for the origin. The value of Id must be unique within the distribution. You use the value of Id when you create a cache behavior. The Id identifies the origin that CloudFront routes a request to when the request matches the path pattern for that cache behavior.
-
withId
public Origin withId(String id)
A unique identifier for the origin. The value of Id must be unique within the distribution. You use the value of Id when you create a cache behavior. The Id identifies the origin that CloudFront routes a request to when the request matches the path pattern for that cache behavior.- Parameters:
id- A unique identifier for the origin. The value of Id must be unique within the distribution. You use the value of Id when you create a cache behavior. The Id identifies the origin that CloudFront routes a request to when the request matches the path pattern for that cache behavior.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDomainName
public void setDomainName(String domainName)
Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com. Custom origins: The DNS domain name for the HTTP server from which you want CloudFront to get objects for this origin, for example, www.example.com.- Parameters:
domainName- Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com. Custom origins: The DNS domain name for the HTTP server from which you want CloudFront to get objects for this origin, for example, www.example.com.
-
getDomainName
public String getDomainName()
Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com. Custom origins: The DNS domain name for the HTTP server from which you want CloudFront to get objects for this origin, for example, www.example.com.- Returns:
- Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com. Custom origins: The DNS domain name for the HTTP server from which you want CloudFront to get objects for this origin, for example, www.example.com.
-
withDomainName
public Origin withDomainName(String domainName)
Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com. Custom origins: The DNS domain name for the HTTP server from which you want CloudFront to get objects for this origin, for example, www.example.com.- Parameters:
domainName- Amazon S3 origins: The DNS name of the Amazon S3 bucket from which you want CloudFront to get objects for this origin, for example, myawsbucket.s3.amazonaws.com. Custom origins: The DNS domain name for the HTTP server from which you want CloudFront to get objects for this origin, for example, www.example.com.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setOriginPath
public void setOriginPath(String originPath)
An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. When you include the OriginPath element, specify the directory name, beginning with a /. CloudFront appends the directory name to the value of DomainName.- Parameters:
originPath- An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. When you include the OriginPath element, specify the directory name, beginning with a /. CloudFront appends the directory name to the value of DomainName.
-
getOriginPath
public String getOriginPath()
An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. When you include the OriginPath element, specify the directory name, beginning with a /. CloudFront appends the directory name to the value of DomainName.- Returns:
- An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. When you include the OriginPath element, specify the directory name, beginning with a /. CloudFront appends the directory name to the value of DomainName.
-
withOriginPath
public Origin withOriginPath(String originPath)
An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. When you include the OriginPath element, specify the directory name, beginning with a /. CloudFront appends the directory name to the value of DomainName.- Parameters:
originPath- An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. When you include the OriginPath element, specify the directory name, beginning with a /. CloudFront appends the directory name to the value of DomainName.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCustomHeaders
public void setCustomHeaders(CustomHeaders customHeaders)
A complex type that contains information about the custom headers associated with this Origin.- Parameters:
customHeaders- A complex type that contains information about the custom headers associated with this Origin.
-
getCustomHeaders
public CustomHeaders getCustomHeaders()
A complex type that contains information about the custom headers associated with this Origin.- Returns:
- A complex type that contains information about the custom headers associated with this Origin.
-
withCustomHeaders
public Origin withCustomHeaders(CustomHeaders customHeaders)
A complex type that contains information about the custom headers associated with this Origin.- Parameters:
customHeaders- A complex type that contains information about the custom headers associated with this Origin.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setS3OriginConfig
public void setS3OriginConfig(S3OriginConfig s3OriginConfig)
A complex type that contains information about the Amazon S3 origin. If the origin is a custom origin, use the CustomOriginConfig element instead.- Parameters:
s3OriginConfig- A complex type that contains information about the Amazon S3 origin. If the origin is a custom origin, use the CustomOriginConfig element instead.
-
getS3OriginConfig
public S3OriginConfig getS3OriginConfig()
A complex type that contains information about the Amazon S3 origin. If the origin is a custom origin, use the CustomOriginConfig element instead.- Returns:
- A complex type that contains information about the Amazon S3 origin. If the origin is a custom origin, use the CustomOriginConfig element instead.
-
withS3OriginConfig
public Origin withS3OriginConfig(S3OriginConfig s3OriginConfig)
A complex type that contains information about the Amazon S3 origin. If the origin is a custom origin, use the CustomOriginConfig element instead.- Parameters:
s3OriginConfig- A complex type that contains information about the Amazon S3 origin. If the origin is a custom origin, use the CustomOriginConfig element instead.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCustomOriginConfig
public void setCustomOriginConfig(CustomOriginConfig customOriginConfig)
A complex type that contains information about a custom origin. If the origin is an Amazon S3 bucket, use the S3OriginConfig element instead.- Parameters:
customOriginConfig- A complex type that contains information about a custom origin. If the origin is an Amazon S3 bucket, use the S3OriginConfig element instead.
-
getCustomOriginConfig
public CustomOriginConfig getCustomOriginConfig()
A complex type that contains information about a custom origin. If the origin is an Amazon S3 bucket, use the S3OriginConfig element instead.- Returns:
- A complex type that contains information about a custom origin. If the origin is an Amazon S3 bucket, use the S3OriginConfig element instead.
-
withCustomOriginConfig
public Origin withCustomOriginConfig(CustomOriginConfig customOriginConfig)
A complex type that contains information about a custom origin. If the origin is an Amazon S3 bucket, use the S3OriginConfig element instead.- Parameters:
customOriginConfig- A complex type that contains information about a custom origin. If the origin is an Amazon S3 bucket, use the S3OriginConfig element instead.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-