/*
* 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
{
///
/// A CloudFront origin access control configuration.
///
public partial class OriginAccessControlConfig
{
private string _description;
private string _name;
private OriginAccessControlOriginTypes _originAccessControlOriginType;
private OriginAccessControlSigningBehaviors _signingBehavior;
private OriginAccessControlSigningProtocols _signingProtocol;
///
/// Gets and sets the property Description.
///
/// A description of the origin access control.
///
///
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
///
/// Gets and sets the property Name.
///
/// A name to identify the origin access control.
///
///
[AWSProperty(Required=true)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
///
/// Gets and sets the property OriginAccessControlOriginType.
///
/// The type of origin that this origin access control is for.
///
///
[AWSProperty(Required=true)]
public OriginAccessControlOriginTypes OriginAccessControlOriginType
{
get { return this._originAccessControlOriginType; }
set { this._originAccessControlOriginType = value; }
}
// Check to see if OriginAccessControlOriginType property is set
internal bool IsSetOriginAccessControlOriginType()
{
return this._originAccessControlOriginType != null;
}
///
/// Gets and sets the property SigningBehavior.
///
/// Specifies which requests CloudFront signs (adds authentication information to). Specify
/// always
for the most common use case. For more information, see origin
/// access control advanced settings in the Amazon CloudFront Developer Guide.
///
///
///
/// This field can have one of the following values:
///
/// -
///
///
always
– CloudFront signs all origin requests, overwriting the Authorization
/// header from the viewer request if one exists.
///
/// -
///
///
never
– CloudFront doesn't sign any origin requests. This value turns
/// off origin access control for all origins in all distributions that use this origin
/// access control.
///
/// -
///
///
no-override
– If the viewer request doesn't contain the Authorization
/// header, then CloudFront signs the origin request. If the viewer request contains the
/// Authorization
header, then CloudFront doesn't sign the origin request
/// and instead passes along the Authorization
header from the viewer request.
/// WARNING: To pass along the Authorization
header from the viewer request,
/// you must add the Authorization
header to a cache
/// policy for all cache behaviors that use origins associated with this origin access
/// control.
///
///
///
[AWSProperty(Required=true)]
public OriginAccessControlSigningBehaviors SigningBehavior
{
get { return this._signingBehavior; }
set { this._signingBehavior = value; }
}
// Check to see if SigningBehavior property is set
internal bool IsSetSigningBehavior()
{
return this._signingBehavior != null;
}
///
/// Gets and sets the property SigningProtocol.
///
/// The signing protocol of the origin access control, which determines how CloudFront
/// signs (authenticates) requests. The only valid value is sigv4
.
///
///
[AWSProperty(Required=true)]
public OriginAccessControlSigningProtocols SigningProtocol
{
get { return this._signingProtocol; }
set { this._signingProtocol = value; }
}
// Check to see if SigningProtocol property is set
internal bool IsSetSigningProtocol()
{
return this._signingProtocol != null;
}
}
}