/*
* 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 globalaccelerator-2018-08-08.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.GlobalAccelerator.Model
{
///
/// A complex type for endpoints. A resource must be valid and active when you add it
/// as an endpoint.
///
public partial class EndpointConfiguration
{
private bool? _clientIPPreservationEnabled;
private string _endpointId;
private int? _weight;
///
/// Gets and sets the property ClientIPPreservationEnabled.
///
/// Indicates whether client IP address preservation is enabled for an endpoint. The value
/// is true or false. The default value is true for new accelerators.
///
///
///
/// If the value is set to true, the client's IP address is preserved in the X-Forwarded-For
/// request header as traffic travels to applications on the endpoint fronted by the accelerator.
///
///
///
/// Client IP address preservation is supported, in specific Amazon Web Services Regions,
/// for endpoints that are Application Load Balancers and Amazon EC2 instances.
///
///
///
/// For more information, see
/// Preserve client IP addresses in Global Accelerator in the Global Accelerator
/// Developer Guide.
///
///
public bool ClientIPPreservationEnabled
{
get { return this._clientIPPreservationEnabled.GetValueOrDefault(); }
set { this._clientIPPreservationEnabled = value; }
}
// Check to see if ClientIPPreservationEnabled property is set
internal bool IsSetClientIPPreservationEnabled()
{
return this._clientIPPreservationEnabled.HasValue;
}
///
/// Gets and sets the property EndpointId.
///
/// An ID for the endpoint. If the endpoint is a Network Load Balancer or Application
/// Load Balancer, this is the Amazon Resource Name (ARN) of the resource. If the endpoint
/// is an Elastic IP address, this is the Elastic IP address allocation ID. For Amazon
/// EC2 instances, this is the EC2 instance ID. A resource must be valid and active when
/// you add it as an endpoint.
///
///
///
/// An Application Load Balancer can be either internal or internet-facing.
///
///
[AWSProperty(Max=255)]
public string EndpointId
{
get { return this._endpointId; }
set { this._endpointId = value; }
}
// Check to see if EndpointId property is set
internal bool IsSetEndpointId()
{
return this._endpointId != null;
}
///
/// Gets and sets the property Weight.
///
/// The weight associated with the endpoint. When you add weights to endpoints, you configure
/// Global Accelerator to route traffic based on proportions that you specify. For example,
/// you might specify endpoint weights of 4, 5, 5, and 6 (sum=20). The result is that
/// 4/20 of your traffic, on average, is routed to the first endpoint, 5/20 is routed
/// both to the second and third endpoints, and 6/20 is routed to the last endpoint. For
/// more information, see Endpoint
/// weights in the Global Accelerator Developer Guide.
///
///
[AWSProperty(Min=0, Max=255)]
public int Weight
{
get { return this._weight.GetValueOrDefault(); }
set { this._weight = value; }
}
// Check to see if Weight property is set
internal bool IsSetWeight()
{
return this._weight.HasValue;
}
}
}