Class: Aws::CloudFront::Types::Origin
- Inherits:
-
Struct
- Object
- Struct
- Aws::CloudFront::Types::Origin
- Includes:
- Structure
- Defined in:
- lib/aws-sdk-cloudfront/types.rb
Overview
When making an API call, you may pass Origin data as a hash:
{
id: "string", # required
domain_name: "string", # required
origin_path: "string",
custom_headers: {
quantity: 1, # required
items: [
{
header_name: "string", # required
header_value: "string", # required
},
],
},
s3_origin_config: {
origin_access_identity: "string", # required
},
custom_origin_config: {
http_port: 1, # required
https_port: 1, # required
origin_protocol_policy: "http-only", # required, accepts http-only, match-viewer, https-only
origin_ssl_protocols: {
quantity: 1, # required
items: ["SSLv3"], # required, accepts SSLv3, TLSv1, TLSv1.1, TLSv1.2
},
origin_read_timeout: 1,
origin_keepalive_timeout: 1,
},
}
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.
For the current limit on the number of origins that you can create for a distribution, see [Amazon CloudFront Limits] in the *AWS General Reference*.
[1]: docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront
Instance Attribute Summary collapse
-
#custom_headers ⇒ Types::CustomHeaders
A complex type that contains names and values for the custom headers that you want.
-
#custom_origin_config ⇒ Types::CustomOriginConfig
A complex type that contains information about a custom origin.
-
#domain_name ⇒ String
**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`.
-
#id ⇒ String
A unique identifier for the origin.
-
#origin_path ⇒ String
An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin.
-
#s3_origin_config ⇒ Types::S3OriginConfig
A complex type that contains information about the Amazon S3 origin.
Instance Attribute Details
#custom_headers ⇒ Types::CustomHeaders
A complex type that contains names and values for the custom headers that you want.
4285 4286 4287 4288 4289 4290 4291 4292 4293 |
# File 'lib/aws-sdk-cloudfront/types.rb', line 4285 class Origin < Struct.new( :id, :domain_name, :origin_path, :custom_headers, :s3_origin_config, :custom_origin_config) include Aws::Structure end |
#custom_origin_config ⇒ Types::CustomOriginConfig
A complex type that contains information about a custom origin. If the origin is an Amazon S3 bucket, use the ‘S3OriginConfig` element instead.
4285 4286 4287 4288 4289 4290 4291 4292 4293 |
# File 'lib/aws-sdk-cloudfront/types.rb', line 4285 class Origin < Struct.new( :id, :domain_name, :origin_path, :custom_headers, :s3_origin_config, :custom_origin_config) include Aws::Structure end |
#domain_name ⇒ String
**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`.
Constraints for Amazon S3 origins:
-
If you configured Amazon S3 Transfer Acceleration for your bucket, do not specify the ‘s3-accelerate` endpoint for `DomainName`.
-
The bucket name must be between 3 and 63 characters long (inclusive).
-
The bucket name must contain only lowercase characters, numbers, periods, underscores, and dashes.
-
The bucket name must not contain adjacent periods.
**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`.
Constraints for custom origins:
-
‘DomainName` must be a valid DNS name that contains only a-z, A-Z, 0-9, dot (.), hyphen (-), or underscore (_) characters.
-
The name cannot exceed 128 characters.
4285 4286 4287 4288 4289 4290 4291 4292 4293 |
# File 'lib/aws-sdk-cloudfront/types.rb', line 4285 class Origin < Struct.new( :id, :domain_name, :origin_path, :custom_headers, :s3_origin_config, :custom_origin_config) include Aws::Structure end |
#id ⇒ String
A unique identifier for the origin. The value of ‘Id` must be unique within the distribution.
When you specify the value of ‘TargetOriginId` for the default cache behavior or for another cache behavior, you indicate the origin to which you want the cache behavior to route requests by specifying the value of the `Id` element for that origin. When a request matches the path pattern for that cache behavior, CloudFront routes the request to the specified origin. For more information, see
- Cache Behavior Settings][1
-
in the *Amazon CloudFront Developer
Guide*.
4285 4286 4287 4288 4289 4290 4291 4292 4293 |
# File 'lib/aws-sdk-cloudfront/types.rb', line 4285 class Origin < Struct.new( :id, :domain_name, :origin_path, :custom_headers, :s3_origin_config, :custom_origin_config) include Aws::Structure end |
#origin_path ⇒ String
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`, for example, `example.com/production`. Do not include a `/` at the end of the directory name.
For example, suppose you’ve specified the following values for your distribution:
-
‘DomainName`: An Amazon S3 bucket named `myawsbucket`.
-
‘OriginPath`: `/production`
-
‘CNAME`: `example.com`
When a user enters ‘example.com/index.html` in a browser, CloudFront sends a request to Amazon S3 for `myawsbucket/production/index.html`.
When a user enters ‘example.com/acme/index.html` in a browser, CloudFront sends a request to Amazon S3 for `myawsbucket/production/acme/index.html`.
4285 4286 4287 4288 4289 4290 4291 4292 4293 |
# File 'lib/aws-sdk-cloudfront/types.rb', line 4285 class Origin < Struct.new( :id, :domain_name, :origin_path, :custom_headers, :s3_origin_config, :custom_origin_config) include Aws::Structure end |
#s3_origin_config ⇒ Types::S3OriginConfig
A complex type that contains information about the Amazon S3 origin. If the origin is a custom origin, use the ‘CustomOriginConfig` element instead.
4285 4286 4287 4288 4289 4290 4291 4292 4293 |
# File 'lib/aws-sdk-cloudfront/types.rb', line 4285 class Origin < Struct.new( :id, :domain_name, :origin_path, :custom_headers, :s3_origin_config, :custom_origin_config) include Aws::Structure end |