/*
* 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
{
///
/// Container for the parameters to the DeregisterContainerInstance operation.
/// Deregisters an Amazon ECS container instance from the specified cluster. This instance
/// is no longer available to run tasks.
///
///
///
/// If you intend to use the container instance for some other purpose after deregistration,
/// we recommend that you stop all of the tasks running on the container instance before
/// deregistration. That prevents any orphaned tasks from consuming resources.
///
///
///
/// Deregistering a container instance removes the instance from a cluster, but it doesn't
/// terminate the EC2 instance. If you are finished using the instance, be sure to terminate
/// it in the Amazon EC2 console to stop billing.
///
///
///
/// If you terminate a running container instance, Amazon ECS automatically deregisters
/// the instance from your cluster (stopped container instances or instances with disconnected
/// agents aren't automatically deregistered when terminated).
///
///
///
public partial class DeregisterContainerInstanceRequest : AmazonECSRequest
{
private string _cluster;
private string _containerInstance;
private bool? _force;
///
/// Gets and sets the property Cluster.
///
/// The short name or full Amazon Resource Name (ARN) of the cluster that hosts the container
/// instance to deregister. If you do not specify a cluster, the default cluster is assumed.
///
///
public string Cluster
{
get { return this._cluster; }
set { this._cluster = value; }
}
// Check to see if Cluster property is set
internal bool IsSetCluster()
{
return this._cluster != null;
}
///
/// Gets and sets the property ContainerInstance.
///
/// The container instance ID or full ARN of the container instance to deregister. For
/// more information about the ARN format, see Amazon
/// Resource Name (ARN) in the Amazon ECS Developer Guide.
///
///
[AWSProperty(Required=true)]
public string ContainerInstance
{
get { return this._containerInstance; }
set { this._containerInstance = value; }
}
// Check to see if ContainerInstance property is set
internal bool IsSetContainerInstance()
{
return this._containerInstance != null;
}
///
/// Gets and sets the property Force.
///
/// Forces the container instance to be deregistered. If you have tasks running on the
/// container instance when you deregister it with the force option, these
/// tasks remain running until you terminate the instance or the tasks stop through some
/// other means, but they're orphaned (no longer monitored or accounted for by Amazon
/// ECS). If an orphaned task on your container instance is part of an Amazon ECS service,
/// then the service scheduler starts another copy of that task, on a different container
/// instance if possible.
///
///
///
/// Any containers in orphaned service tasks that are registered with a Classic Load Balancer
/// or an Application Load Balancer target group are deregistered. They begin connection
/// draining according to the settings on the load balancer or target group.
///
///
public bool Force
{
get { return this._force.GetValueOrDefault(); }
set { this._force = value; }
}
// Check to see if Force property is set
internal bool IsSetForce()
{
return this._force.HasValue;
}
}
}