/*
* 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 ecs-2014-11-13.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.ECS.Model
{
///
/// The details of an Amazon ECS service deployment. This is used only when a service
/// uses the ECS
deployment controller type.
///
public partial class Deployment
{
private List _capacityProviderStrategy = new List();
private DateTime? _createdAt;
private int? _desiredCount;
private int? _failedTasks;
private string _id;
private LaunchType _launchType;
private NetworkConfiguration _networkConfiguration;
private int? _pendingCount;
private string _platformFamily;
private string _platformVersion;
private DeploymentRolloutState _rolloutState;
private string _rolloutStateReason;
private int? _runningCount;
private ServiceConnectConfiguration _serviceConnectConfiguration;
private List _serviceConnectResources = new List();
private string _status;
private string _taskDefinition;
private DateTime? _updatedAt;
///
/// Gets and sets the property CapacityProviderStrategy.
///
/// The capacity provider strategy that the deployment is using.
///
///
public List CapacityProviderStrategy
{
get { return this._capacityProviderStrategy; }
set { this._capacityProviderStrategy = value; }
}
// Check to see if CapacityProviderStrategy property is set
internal bool IsSetCapacityProviderStrategy()
{
return this._capacityProviderStrategy != null && this._capacityProviderStrategy.Count > 0;
}
///
/// Gets and sets the property CreatedAt.
///
/// The Unix timestamp for the time when the service deployment was created.
///
///
public DateTime CreatedAt
{
get { return this._createdAt.GetValueOrDefault(); }
set { this._createdAt = value; }
}
// Check to see if CreatedAt property is set
internal bool IsSetCreatedAt()
{
return this._createdAt.HasValue;
}
///
/// Gets and sets the property DesiredCount.
///
/// The most recent desired count of tasks that was specified for the service to deploy
/// or maintain.
///
///
public int DesiredCount
{
get { return this._desiredCount.GetValueOrDefault(); }
set { this._desiredCount = value; }
}
// Check to see if DesiredCount property is set
internal bool IsSetDesiredCount()
{
return this._desiredCount.HasValue;
}
///
/// Gets and sets the property FailedTasks.
///
/// The number of consecutively failed tasks in the deployment. A task is considered a
/// failure if the service scheduler can't launch the task, the task doesn't transition
/// to a RUNNING
state, or if it fails any of its defined health checks and
/// is stopped.
///
///
///
/// Once a service deployment has one or more successfully running tasks, the failed task
/// count resets to zero and stops being evaluated.
///
///
///
public int FailedTasks
{
get { return this._failedTasks.GetValueOrDefault(); }
set { this._failedTasks = value; }
}
// Check to see if FailedTasks property is set
internal bool IsSetFailedTasks()
{
return this._failedTasks.HasValue;
}
///
/// Gets and sets the property Id.
///
/// The ID of the deployment.
///
///
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 LaunchType.
///
/// The launch type the tasks in the service are using. For more information, see Amazon
/// ECS Launch Types in the Amazon Elastic Container Service Developer Guide.
///
///
public LaunchType LaunchType
{
get { return this._launchType; }
set { this._launchType = value; }
}
// Check to see if LaunchType property is set
internal bool IsSetLaunchType()
{
return this._launchType != null;
}
///
/// Gets and sets the property NetworkConfiguration.
///
/// The VPC subnet and security group configuration for tasks that receive their own elastic
/// network interface by using the awsvpc
networking mode.
///
///
public NetworkConfiguration NetworkConfiguration
{
get { return this._networkConfiguration; }
set { this._networkConfiguration = value; }
}
// Check to see if NetworkConfiguration property is set
internal bool IsSetNetworkConfiguration()
{
return this._networkConfiguration != null;
}
///
/// Gets and sets the property PendingCount.
///
/// The number of tasks in the deployment that are in the PENDING
status.
///
///
public int PendingCount
{
get { return this._pendingCount.GetValueOrDefault(); }
set { this._pendingCount = value; }
}
// Check to see if PendingCount property is set
internal bool IsSetPendingCount()
{
return this._pendingCount.HasValue;
}
///
/// Gets and sets the property PlatformFamily.
///
/// The operating system that your tasks in the service, or tasks are running on. A platform
/// family is specified only for tasks using the Fargate launch type.
///
///
///
/// All tasks that run as part of this service must use the same platformFamily
/// value as the service, for example, LINUX.
.
///
///
public string PlatformFamily
{
get { return this._platformFamily; }
set { this._platformFamily = value; }
}
// Check to see if PlatformFamily property is set
internal bool IsSetPlatformFamily()
{
return this._platformFamily != null;
}
///
/// Gets and sets the property PlatformVersion.
///
/// The platform version that your tasks in the service run on. A platform version is
/// only specified for tasks using the Fargate launch type. If one isn't specified, the
/// LATEST
platform version is used. For more information, see Fargate
/// Platform Versions in the Amazon Elastic Container Service Developer Guide.
///
///
public string PlatformVersion
{
get { return this._platformVersion; }
set { this._platformVersion = value; }
}
// Check to see if PlatformVersion property is set
internal bool IsSetPlatformVersion()
{
return this._platformVersion != null;
}
///
/// Gets and sets the property RolloutState.
///
/// The rolloutState
of a service is only returned for services that use
/// the rolling update (ECS
) deployment type that aren't behind a Classic
/// Load Balancer.
///
///
///
/// The rollout state of the deployment. When a service deployment is started, it begins
/// in an IN_PROGRESS
state. When the service reaches a steady state, the
/// deployment transitions to a COMPLETED
state. If the service fails to
/// reach a steady state and circuit breaker is turned on, the deployment transitions
/// to a FAILED
state. A deployment in FAILED
state doesn't
/// launch any new tasks. For more information, see DeploymentCircuitBreaker.
///
///
public DeploymentRolloutState RolloutState
{
get { return this._rolloutState; }
set { this._rolloutState = value; }
}
// Check to see if RolloutState property is set
internal bool IsSetRolloutState()
{
return this._rolloutState != null;
}
///
/// Gets and sets the property RolloutStateReason.
///
/// A description of the rollout state of a deployment.
///
///
public string RolloutStateReason
{
get { return this._rolloutStateReason; }
set { this._rolloutStateReason = value; }
}
// Check to see if RolloutStateReason property is set
internal bool IsSetRolloutStateReason()
{
return this._rolloutStateReason != null;
}
///
/// Gets and sets the property RunningCount.
///
/// The number of tasks in the deployment that are in the RUNNING
status.
///
///
public int RunningCount
{
get { return this._runningCount.GetValueOrDefault(); }
set { this._runningCount = value; }
}
// Check to see if RunningCount property is set
internal bool IsSetRunningCount()
{
return this._runningCount.HasValue;
}
///
/// Gets and sets the property ServiceConnectConfiguration.
///
/// The details of the Service Connect configuration that's used by this deployment. Compare
/// the configuration between multiple deployments when troubleshooting issues with new
/// deployments.
///
///
///
/// The configuration for this service to discover and connect to services, and be discovered
/// by, and connected from, other services within a namespace.
///
///
///
/// Tasks that run in a namespace can use short names to connect to services in the namespace.
/// Tasks can connect to services across all of the clusters in the namespace. Tasks connect
/// through a managed proxy container that collects logs and metrics for increased visibility.
/// Only the tasks that Amazon ECS services create are supported with Service Connect.
/// For more information, see Service
/// Connect in the Amazon Elastic Container Service Developer Guide.
///
///
public ServiceConnectConfiguration ServiceConnectConfiguration
{
get { return this._serviceConnectConfiguration; }
set { this._serviceConnectConfiguration = value; }
}
// Check to see if ServiceConnectConfiguration property is set
internal bool IsSetServiceConnectConfiguration()
{
return this._serviceConnectConfiguration != null;
}
///
/// Gets and sets the property ServiceConnectResources.
///
/// The list of Service Connect resources that are associated with this deployment. Each
/// list entry maps a discovery name to a Cloud Map service name.
///
///
public List ServiceConnectResources
{
get { return this._serviceConnectResources; }
set { this._serviceConnectResources = value; }
}
// Check to see if ServiceConnectResources property is set
internal bool IsSetServiceConnectResources()
{
return this._serviceConnectResources != null && this._serviceConnectResources.Count > 0;
}
///
/// Gets and sets the property Status.
///
/// The status of the deployment. The following describes each state.
///
/// - PRIMARY
-
///
/// The most recent deployment of a service.
///
///
- ACTIVE
-
///
/// A service deployment that still has running tasks, but are in the process of being
/// replaced with a new
PRIMARY
deployment.
///
/// - INACTIVE
-
///
/// A deployment that has been completely replaced.
///
///
///
public string Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
///
/// Gets and sets the property TaskDefinition.
///
/// The most recent task definition that was specified for the tasks in the service to
/// use.
///
///
public string TaskDefinition
{
get { return this._taskDefinition; }
set { this._taskDefinition = value; }
}
// Check to see if TaskDefinition property is set
internal bool IsSetTaskDefinition()
{
return this._taskDefinition != null;
}
///
/// Gets and sets the property UpdatedAt.
///
/// The Unix timestamp for the time when the service deployment was last updated.
///
///
public DateTime UpdatedAt
{
get { return this._updatedAt.GetValueOrDefault(); }
set { this._updatedAt = value; }
}
// Check to see if UpdatedAt property is set
internal bool IsSetUpdatedAt()
{
return this._updatedAt.HasValue;
}
}
}