/* * 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 { /// /// Information about a set of Amazon ECS tasks in either an CodeDeploy or an EXTERNAL /// deployment. An Amazon ECS task set includes details such as the desired number of /// tasks, how many tasks are running, and whether the task set serves production traffic. /// public partial class TaskSet { private List _capacityProviderStrategy = new List(); private string _clusterArn; private int? _computedDesiredCount; private DateTime? _createdAt; private string _externalId; private string _id; private LaunchType _launchType; private List _loadBalancers = new List(); private NetworkConfiguration _networkConfiguration; private int? _pendingCount; private string _platformFamily; private string _platformVersion; private int? _runningCount; private Scale _scale; private string _serviceArn; private List _serviceRegistries = new List(); private StabilityStatus _stabilityStatus; private DateTime? _stabilityStatusAt; private string _startedBy; private string _status; private List _tags = new List(); private string _taskDefinition; private string _taskSetArn; private DateTime? _updatedAt; /// /// Gets and sets the property CapacityProviderStrategy. /// /// The capacity provider strategy that are associated with the task set. /// /// 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 ClusterArn. /// /// The Amazon Resource Name (ARN) of the cluster that the service that hosts the task /// set exists in. /// /// public string ClusterArn { get { return this._clusterArn; } set { this._clusterArn = value; } } // Check to see if ClusterArn property is set internal bool IsSetClusterArn() { return this._clusterArn != null; } /// /// Gets and sets the property ComputedDesiredCount. /// /// The computed desired count for the task set. This is calculated by multiplying the /// service's desiredCount by the task set's scale percentage. /// The result is always rounded up. For example, if the computed desired count is 1.2, /// it rounds up to 2 tasks. /// /// public int ComputedDesiredCount { get { return this._computedDesiredCount.GetValueOrDefault(); } set { this._computedDesiredCount = value; } } // Check to see if ComputedDesiredCount property is set internal bool IsSetComputedDesiredCount() { return this._computedDesiredCount.HasValue; } /// /// Gets and sets the property CreatedAt. /// /// The Unix timestamp for the time when the task set 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 ExternalId. /// /// The external ID associated with the task set. /// /// /// /// If an CodeDeploy deployment created a task set, the externalId parameter /// contains the CodeDeploy deployment ID. /// /// /// /// If a task set is created for an external deployment and is associated with a service /// discovery registry, the externalId parameter contains the ECS_TASK_SET_EXTERNAL_ID /// Cloud Map attribute. /// /// public string ExternalId { get { return this._externalId; } set { this._externalId = value; } } // Check to see if ExternalId property is set internal bool IsSetExternalId() { return this._externalId != null; } /// /// Gets and sets the property Id. /// /// The ID of the task set. /// /// 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 task set 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 LoadBalancers. /// /// Details on a load balancer that are used with a task set. /// /// public List LoadBalancers { get { return this._loadBalancers; } set { this._loadBalancers = value; } } // Check to see if LoadBalancers property is set internal bool IsSetLoadBalancers() { return this._loadBalancers != null && this._loadBalancers.Count > 0; } /// /// Gets and sets the property NetworkConfiguration. /// /// The network configuration for the task set. /// /// 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 task set that are in the PENDING status during /// a deployment. A task in the PENDING state is preparing to enter the RUNNING /// state. A task set enters the PENDING status when it launches for the /// first time or when it's restarted after being in the STOPPED state. /// /// 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 set are running on. A platform family /// is specified only for tasks that use the Fargate launch type. /// /// /// /// All tasks in the set must have the same value. /// /// 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 Fargate platform version where the tasks in the task set are running. A platform /// version is only specified for tasks run on Fargate. 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 RunningCount. /// /// The number of tasks in the task set that are in the RUNNING status during /// a deployment. A task in the RUNNING state is running and ready for use. /// /// 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 Scale. /// /// A floating-point percentage of your desired number of tasks to place and keep running /// in the task set. /// /// public Scale Scale { get { return this._scale; } set { this._scale = value; } } // Check to see if Scale property is set internal bool IsSetScale() { return this._scale != null; } /// /// Gets and sets the property ServiceArn. /// /// The Amazon Resource Name (ARN) of the service the task set exists in. /// /// public string ServiceArn { get { return this._serviceArn; } set { this._serviceArn = value; } } // Check to see if ServiceArn property is set internal bool IsSetServiceArn() { return this._serviceArn != null; } /// /// Gets and sets the property ServiceRegistries. /// /// The details for the service discovery registries to assign to this task set. For more /// information, see Service /// discovery. /// /// public List ServiceRegistries { get { return this._serviceRegistries; } set { this._serviceRegistries = value; } } // Check to see if ServiceRegistries property is set internal bool IsSetServiceRegistries() { return this._serviceRegistries != null && this._serviceRegistries.Count > 0; } /// /// Gets and sets the property StabilityStatus. /// /// The stability status. This indicates whether the task set has reached a steady state. /// If the following conditions are met, the task set are in STEADY_STATE: /// ///
  • /// /// The task runningCount is equal to the computedDesiredCount. /// ///
  • /// /// The pendingCount is 0. /// ///
  • /// /// There are no tasks that are running on container instances in the DRAINING /// status. /// ///
  • /// /// All tasks are reporting a healthy status from the load balancers, service discovery, /// and container health checks. /// ///
/// /// If any of those conditions aren't met, the stability status returns STABILIZING. /// ///
public StabilityStatus StabilityStatus { get { return this._stabilityStatus; } set { this._stabilityStatus = value; } } // Check to see if StabilityStatus property is set internal bool IsSetStabilityStatus() { return this._stabilityStatus != null; } /// /// Gets and sets the property StabilityStatusAt. /// /// The Unix timestamp for the time when the task set stability status was retrieved. /// /// public DateTime StabilityStatusAt { get { return this._stabilityStatusAt.GetValueOrDefault(); } set { this._stabilityStatusAt = value; } } // Check to see if StabilityStatusAt property is set internal bool IsSetStabilityStatusAt() { return this._stabilityStatusAt.HasValue; } /// /// Gets and sets the property StartedBy. /// /// The tag specified when a task set is started. If an CodeDeploy deployment created /// the task set, the startedBy parameter is CODE_DEPLOY. If /// an external deployment created the task set, the startedBy field isn't /// used. /// /// public string StartedBy { get { return this._startedBy; } set { this._startedBy = value; } } // Check to see if StartedBy property is set internal bool IsSetStartedBy() { return this._startedBy != null; } /// /// Gets and sets the property Status. /// /// The status of the task set. The following describes each state. /// ///
PRIMARY
/// /// The task set is serving production traffic. /// ///
ACTIVE
/// /// The task set isn't serving production traffic. /// ///
DRAINING
/// /// The tasks in the task set are being stopped, and their corresponding targets are being /// deregistered from their target group. /// ///
///
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 Tags. /// /// The metadata that you apply to the task set to help you categorize and organize them. /// Each tag consists of a key and an optional value. You define both. /// /// /// /// The following basic restrictions apply to tags: /// ///
  • /// /// Maximum number of tags per resource - 50 /// ///
  • /// /// For each resource, each tag key must be unique, and each tag key can have only one /// value. /// ///
  • /// /// Maximum key length - 128 Unicode characters in UTF-8 /// ///
  • /// /// Maximum value length - 256 Unicode characters in UTF-8 /// ///
  • /// /// If your tagging schema is used across multiple services and resources, remember that /// other services may have restrictions on allowed characters. Generally allowed characters /// are: letters, numbers, and spaces representable in UTF-8, and the following characters: /// + - = . _ : / @. /// ///
  • /// /// Tag keys and values are case-sensitive. /// ///
  • /// /// Do not use aws:, AWS:, or any upper or lowercase combination /// of such as a prefix for either keys or values as it is reserved for Amazon Web Services /// use. You cannot edit or delete tag keys or values with this prefix. Tags with this /// prefix do not count against your tags per resource limit. /// ///
///
[AWSProperty(Min=0, Max=50)] public List Tags { get { return this._tags; } set { this._tags = value; } } // Check to see if Tags property is set internal bool IsSetTags() { return this._tags != null && this._tags.Count > 0; } /// /// Gets and sets the property TaskDefinition. /// /// The task definition that the task set is using. /// /// 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 TaskSetArn. /// /// The Amazon Resource Name (ARN) of the task set. /// /// public string TaskSetArn { get { return this._taskSetArn; } set { this._taskSetArn = value; } } // Check to see if TaskSetArn property is set internal bool IsSetTaskSetArn() { return this._taskSetArn != null; } /// /// Gets and sets the property UpdatedAt. /// /// The Unix timestamp for the time when the task set 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; } } }