/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudfront-2020-05-31.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudFront.Model
{
///
/// An origin.
///
///
///
/// An origin is the location where content is stored, and from which CloudFront gets
/// content to serve to viewers. To specify an origin:
///
/// -
///
/// Use
S3OriginConfig
to specify an Amazon S3 bucket that is not configured
/// with static website hosting.
///
/// -
///
/// Use
CustomOriginConfig
to specify all other kinds of origins, including:
///
/// -
///
/// An Amazon S3 bucket that is configured with static website hosting
///
///
-
///
/// An Elastic Load Balancing load balancer
///
///
-
///
/// An AWS Elemental MediaPackage endpoint
///
///
-
///
/// An AWS Elemental MediaStore container
///
///
-
///
/// Any other HTTP server, running on an Amazon EC2 instance or any other kind of host
///
///
///
/// For the current maximum number of origins that you can specify per distribution, see
/// General
/// Quotas on Web Distributions in the Amazon CloudFront Developer Guide (quotas
/// were formerly referred to as limits).
///
///
public partial class Origin
{
private int? _connectionAttempts;
private int? _connectionTimeout;
private CustomHeaders _customHeaders;
private CustomOriginConfig _customOriginConfig;
private string _domainName;
private string _id;
private string _originAccessControlId;
private string _originPath;
private OriginShield _originShield;
private S3OriginConfig _s3OriginConfig;
///
/// Gets and sets the property ConnectionAttempts.
///
/// The number of times that CloudFront attempts to connect to the origin. The minimum
/// number is 1, the maximum is 3, and the default (if you don't specify otherwise) is
/// 3.
///
///
///
/// For a custom origin (including an Amazon S3 bucket that's configured with static website
/// hosting), this value also specifies the number of times that CloudFront attempts to
/// get a response from the origin, in the case of an Origin
/// Response Timeout.
///
///
///
/// For more information, see Origin
/// Connection Attempts in the Amazon CloudFront Developer Guide.
///
///
public int ConnectionAttempts
{
get { return this._connectionAttempts.GetValueOrDefault(); }
set { this._connectionAttempts = value; }
}
// Check to see if ConnectionAttempts property is set
internal bool IsSetConnectionAttempts()
{
return this._connectionAttempts.HasValue;
}
///
/// Gets and sets the property ConnectionTimeout.
///
/// The number of seconds that CloudFront waits when trying to establish a connection
/// to the origin. The minimum timeout is 1 second, the maximum is 10 seconds, and the
/// default (if you don't specify otherwise) is 10 seconds.
///
///
///
/// For more information, see Origin
/// Connection Timeout in the Amazon CloudFront Developer Guide.
///
///
public int ConnectionTimeout
{
get { return this._connectionTimeout.GetValueOrDefault(); }
set { this._connectionTimeout = value; }
}
// Check to see if ConnectionTimeout property is set
internal bool IsSetConnectionTimeout()
{
return this._connectionTimeout.HasValue;
}
///
/// Gets and sets the property CustomHeaders.
///
/// A list of HTTP header names and values that CloudFront adds to the requests that it
/// sends to the origin.
///
///
///
/// For more information, see Adding
/// Custom Headers to Origin Requests in the Amazon CloudFront Developer Guide.
///
///
public CustomHeaders CustomHeaders
{
get { return this._customHeaders; }
set { this._customHeaders = value; }
}
// Check to see if CustomHeaders property is set
internal bool IsSetCustomHeaders()
{
return this._customHeaders != null;
}
///
/// Gets and sets the property CustomOriginConfig.
///
/// Use this type to specify an origin that is not an Amazon S3 bucket, with one exception.
/// If the Amazon S3 bucket is configured with static website hosting, use this type.
/// If the Amazon S3 bucket is not configured with static website hosting, use the S3OriginConfig
/// type instead.
///
///
public CustomOriginConfig CustomOriginConfig
{
get { return this._customOriginConfig; }
set { this._customOriginConfig = value; }
}
// Check to see if CustomOriginConfig property is set
internal bool IsSetCustomOriginConfig()
{
return this._customOriginConfig != null;
}
///
/// Gets and sets the property DomainName.
///
/// The domain name for the origin.
///
///
///
/// For more information, see Origin
/// Domain Name in the Amazon CloudFront Developer Guide.
///
///
[AWSProperty(Required=true)]
public string DomainName
{
get { return this._domainName; }
set { this._domainName = value; }
}
// Check to see if DomainName property is set
internal bool IsSetDomainName()
{
return this._domainName != null;
}
///
/// Gets and sets the property Id.
///
/// A unique identifier for the origin. This value must be unique within the distribution.
///
///
///
/// Use this value to specify the TargetOriginId
in a CacheBehavior
/// or DefaultCacheBehavior
.
///
///
[AWSProperty(Required=true)]
public string Id
{
get { return this._id; }
set { this._id = value; }
}
// Check to see if Id property is set
internal bool IsSetId()
{
return this._id != null;
}
///
/// Gets and sets the property OriginAccessControlId.
///
/// The unique identifier of an origin access control for this origin.
///
///
///
/// For more information, see Restricting
/// access to an Amazon S3 origin in the Amazon CloudFront Developer Guide.
///
///
public string OriginAccessControlId
{
get { return this._originAccessControlId; }
set { this._originAccessControlId = value; }
}
// Check to see if OriginAccessControlId property is set
internal bool IsSetOriginAccessControlId()
{
return this._originAccessControlId != null;
}
///
/// Gets and sets the property OriginPath.
///
/// An optional path that CloudFront appends to the origin domain name when CloudFront
/// requests content from the origin.
///
///
///
/// For more information, see Origin
/// Path in the Amazon CloudFront Developer Guide.
///
///
public string OriginPath
{
get { return this._originPath; }
set { this._originPath = value; }
}
// Check to see if OriginPath property is set
internal bool IsSetOriginPath()
{
return this._originPath != null;
}
///
/// Gets and sets the property OriginShield.
///
/// CloudFront Origin Shield. Using Origin Shield can help reduce the load on your origin.
///
///
///
/// For more information, see Using
/// Origin Shield in the Amazon CloudFront Developer Guide.
///
///
public OriginShield OriginShield
{
get { return this._originShield; }
set { this._originShield = value; }
}
// Check to see if OriginShield property is set
internal bool IsSetOriginShield()
{
return this._originShield != null;
}
///
/// Gets and sets the property S3OriginConfig.
///
/// Use this type to specify an origin that is an Amazon S3 bucket that is not configured
/// with static website hosting. To specify any other type of origin, including an Amazon
/// S3 bucket that is configured with static website hosting, use the CustomOriginConfig
/// type instead.
///
///
public S3OriginConfig S3OriginConfig
{
get { return this._s3OriginConfig; }
set { this._s3OriginConfig = value; }
}
// Check to see if S3OriginConfig property is set
internal bool IsSetS3OriginConfig()
{
return this._s3OriginConfig != null;
}
}
}