com.amazonaws.services.cloudfront.model

## Class S3Origin

- java.lang.Object
- - com.amazonaws.services.cloudfront.model.S3Origin

All Implemented Interfaces:
  Serializable, Cloneable

    public class S3Origin
    extends Object
    implements Serializable, Cloneable

A complex type that contains information about the Amazon S3 bucket from which you want CloudFront to get your media files for distribution.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`S3Origin()` Default constructor for S3Origin object.
`S3Origin(String domainName)` Constructs a new S3Origin object.
`S3Origin(String domainName, String originAccessIdentity)` Constructs a new S3Origin object.

### Method Summary

All Methods Instance Methods Concrete Methods
`S3Origin` `clone()`
`boolean` `equals(Object obj)`
`String` `getDomainName()` The DNS name of the Amazon S3 origin.
`String` `getOriginAccessIdentity()` The CloudFront origin access identity to associate with the RTMP distribution.
`int` `hashCode()`
`void` `setDomainName(String domainName)` The DNS name of the Amazon S3 origin.
`void` `setOriginAccessIdentity(String originAccessIdentity)` The CloudFront origin access identity to associate with the RTMP distribution.
`String` `toString()` Returns a string representation of this object; useful for testing and debugging.
`S3Origin` `withDomainName(String domainName)` The DNS name of the Amazon S3 origin.
`S3Origin` `withOriginAccessIdentity(String originAccessIdentity)` The CloudFront origin access identity to associate with the RTMP distribution.

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### S3Origin

    public S3Origin()

Default constructor for S3Origin object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.

#### S3Origin

    public S3Origin(String domainName)

Constructs a new S3Origin object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
  `domainName` - The DNS name of the Amazon S3 origin.

#### S3Origin

    public S3Origin(String domainName,
                    String originAccessIdentity)

Constructs a new S3Origin object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
  `domainName` - The DNS name of the Amazon S3 origin.
  `originAccessIdentity` - The CloudFront origin access identity to associate with the RTMP distribution. Use an origin access identity to configure the distribution so that end users can only access objects in an Amazon S3 bucket through CloudFront.

  If you want end users to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty `OriginAccessIdentity` element.

  To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty `OriginAccessIdentity` element.

  To replace the origin access identity, update the distribution configuration and specify the new origin access identity.

  For more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon Amazon CloudFront Developer Guide.

### Method Detail

#### setDomainName

    public void setDomainName(String domainName)

The DNS name of the Amazon S3 origin.

Parameters:
  `domainName` - The DNS name of the Amazon S3 origin.

#### getDomainName

    public String getDomainName()

The DNS name of the Amazon S3 origin.

Returns:
  The DNS name of the Amazon S3 origin.

#### withDomainName

    public S3Origin withDomainName(String domainName)

The DNS name of the Amazon S3 origin.

Parameters:
  `domainName` - The DNS name of the Amazon S3 origin.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setOriginAccessIdentity

    public void setOriginAccessIdentity(String originAccessIdentity)

The CloudFront origin access identity to associate with the RTMP distribution. Use an origin access identity to configure the distribution so that end users can only access objects in an Amazon S3 bucket through CloudFront.

If you want end users to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty `OriginAccessIdentity` element.

To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty `OriginAccessIdentity` element.

To replace the origin access identity, update the distribution configuration and specify the new origin access identity.

For more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon Amazon CloudFront Developer Guide.

Parameters:
  `originAccessIdentity` - The CloudFront origin access identity to associate with the RTMP distribution. Use an origin access identity to configure the distribution so that end users can only access objects in an Amazon S3 bucket through CloudFront.

  If you want end users to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty `OriginAccessIdentity` element.

  To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty `OriginAccessIdentity` element.

  To replace the origin access identity, update the distribution configuration and specify the new origin access identity.

  For more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon Amazon CloudFront Developer Guide.

#### getOriginAccessIdentity

    public String getOriginAccessIdentity()

The CloudFront origin access identity to associate with the RTMP distribution. Use an origin access identity to configure the distribution so that end users can only access objects in an Amazon S3 bucket through CloudFront.

If you want end users to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty `OriginAccessIdentity` element.

To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty `OriginAccessIdentity` element.

To replace the origin access identity, update the distribution configuration and specify the new origin access identity.

For more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon Amazon CloudFront Developer Guide.

Returns:
  The CloudFront origin access identity to associate with the RTMP distribution. Use an origin access identity to configure the distribution so that end users can only access objects in an Amazon S3 bucket through CloudFront.

  If you want end users to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty `OriginAccessIdentity` element.

  To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty `OriginAccessIdentity` element.

  To replace the origin access identity, update the distribution configuration and specify the new origin access identity.

  For more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon Amazon CloudFront Developer Guide.

#### withOriginAccessIdentity

    public S3Origin withOriginAccessIdentity(String originAccessIdentity)

The CloudFront origin access identity to associate with the RTMP distribution. Use an origin access identity to configure the distribution so that end users can only access objects in an Amazon S3 bucket through CloudFront.

If you want end users to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty `OriginAccessIdentity` element.

To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty `OriginAccessIdentity` element.

To replace the origin access identity, update the distribution configuration and specify the new origin access identity.

For more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon Amazon CloudFront Developer Guide.

Parameters:
  `originAccessIdentity` - The CloudFront origin access identity to associate with the RTMP distribution. Use an origin access identity to configure the distribution so that end users can only access objects in an Amazon S3 bucket through CloudFront.

  If you want end users to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty `OriginAccessIdentity` element.

  To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty `OriginAccessIdentity` element.

  To replace the origin access identity, update the distribution configuration and specify the new origin access identity.

  For more information, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon Amazon CloudFront Developer Guide.

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:
  `toString` in class `Object`
Returns:
  A string representation of this object.
See Also:
  `Object.toString()`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### clone

    public S3Origin clone()

Overrides:
  `clone` in class `Object`