/*
* 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 lightsail-2016-11-28.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.Lightsail.Model
{
///
/// Describes the cache settings of an Amazon Lightsail content delivery network (CDN)
/// distribution.
///
///
///
/// These settings apply only to your distribution's cacheBehaviors
(including
/// the defaultCacheBehavior
) that have a behavior
of cache
.
///
///
public partial class CacheSettings
{
private string _allowedhttpMethods;
private string _cachedhttpMethods;
private long? _defaultttl;
private CookieObject _forwardedCookies;
private HeaderObject _forwardedHeaders;
private QueryStringObject _forwardedQueryStrings;
private long? _maximumttl;
private long? _minimumttl;
///
/// Gets and sets the property AllowedHTTPMethods.
///
/// The HTTP methods that are processed and forwarded to the distribution's origin.
///
///
///
/// You can specify the following options:
///
/// -
///
///
GET,HEAD
- The distribution forwards the GET
and HEAD
/// methods.
///
/// -
///
///
GET,HEAD,OPTIONS
- The distribution forwards the GET
, HEAD
,
/// and OPTIONS
methods.
///
/// -
///
///
GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE
- The distribution forwards the
/// GET
, HEAD
, OPTIONS
, PUT
, PATCH
,
/// POST
, and DELETE
methods.
///
///
///
/// If you specify the third option, you might need to restrict access to your distribution's
/// origin so users can't perform operations that you don't want them to. For example,
/// you might not want users to have permission to delete objects from your origin.
///
///
public string AllowedHTTPMethods
{
get { return this._allowedhttpMethods; }
set { this._allowedhttpMethods = value; }
}
// Check to see if AllowedHTTPMethods property is set
internal bool IsSetAllowedHTTPMethods()
{
return this._allowedhttpMethods != null;
}
///
/// Gets and sets the property CachedHTTPMethods.
///
/// The HTTP method responses that are cached by your distribution.
///
///
///
/// You can specify the following options:
///
/// -
///
///
GET,HEAD
- The distribution caches responses to the GET
/// and HEAD
methods.
///
/// -
///
///
GET,HEAD,OPTIONS
- The distribution caches responses to the GET
,
/// HEAD
, and OPTIONS
methods.
///
///
///
public string CachedHTTPMethods
{
get { return this._cachedhttpMethods; }
set { this._cachedhttpMethods = value; }
}
// Check to see if CachedHTTPMethods property is set
internal bool IsSetCachedHTTPMethods()
{
return this._cachedhttpMethods != null;
}
///
/// Gets and sets the property DefaultTTL.
///
/// The default amount of time that objects stay in the distribution's cache before the
/// distribution forwards another request to the origin to determine whether the content
/// has been updated.
///
///
///
/// The value specified applies only when the origin does not add HTTP headers such as
/// Cache-Control max-age
, Cache-Control s-maxage
, and Expires
/// to objects.
///
///
///
public long DefaultTTL
{
get { return this._defaultttl.GetValueOrDefault(); }
set { this._defaultttl = value; }
}
// Check to see if DefaultTTL property is set
internal bool IsSetDefaultTTL()
{
return this._defaultttl.HasValue;
}
///
/// Gets and sets the property ForwardedCookies.
///
/// An object that describes the cookies that are forwarded to the origin. Your content
/// is cached based on the cookies that are forwarded.
///
///
public CookieObject ForwardedCookies
{
get { return this._forwardedCookies; }
set { this._forwardedCookies = value; }
}
// Check to see if ForwardedCookies property is set
internal bool IsSetForwardedCookies()
{
return this._forwardedCookies != null;
}
///
/// Gets and sets the property ForwardedHeaders.
///
/// An object that describes the headers that are forwarded to the origin. Your content
/// is cached based on the headers that are forwarded.
///
///
public HeaderObject ForwardedHeaders
{
get { return this._forwardedHeaders; }
set { this._forwardedHeaders = value; }
}
// Check to see if ForwardedHeaders property is set
internal bool IsSetForwardedHeaders()
{
return this._forwardedHeaders != null;
}
///
/// Gets and sets the property ForwardedQueryStrings.
///
/// An object that describes the query strings that are forwarded to the origin. Your
/// content is cached based on the query strings that are forwarded.
///
///
public QueryStringObject ForwardedQueryStrings
{
get { return this._forwardedQueryStrings; }
set { this._forwardedQueryStrings = value; }
}
// Check to see if ForwardedQueryStrings property is set
internal bool IsSetForwardedQueryStrings()
{
return this._forwardedQueryStrings != null;
}
///
/// Gets and sets the property MaximumTTL.
///
/// The maximum amount of time that objects stay in the distribution's cache before the
/// distribution forwards another request to the origin to determine whether the object
/// has been updated.
///
///
///
/// The value specified applies only when the origin adds HTTP headers such as Cache-Control
/// max-age
, Cache-Control s-maxage
, and Expires
to objects.
///
///
public long MaximumTTL
{
get { return this._maximumttl.GetValueOrDefault(); }
set { this._maximumttl = value; }
}
// Check to see if MaximumTTL property is set
internal bool IsSetMaximumTTL()
{
return this._maximumttl.HasValue;
}
///
/// Gets and sets the property MinimumTTL.
///
/// The minimum amount of time that objects stay in the distribution's cache before the
/// distribution forwards another request to the origin to determine whether the object
/// has been updated.
///
///
///
/// A value of 0
must be specified for minimumTTL
if the distribution
/// is configured to forward all headers to the origin.
///
///
public long MinimumTTL
{
get { return this._minimumttl.GetValueOrDefault(); }
set { this._minimumttl = value; }
}
// Check to see if MinimumTTL property is set
internal bool IsSetMinimumTTL()
{
return this._minimumttl.HasValue;
}
}
}