/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace ECS { namespace Model { /** *

An Amazon EC2 or External instance that's running the Amazon ECS agent and * has been registered with a cluster.

See Also:

AWS * API Reference

*/ class ContainerInstance { public: AWS_ECS_API ContainerInstance(); AWS_ECS_API ContainerInstance(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API ContainerInstance& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The Amazon Resource Name (ARN) of the container instance. For more * information about the ARN format, see Amazon * Resource Name (ARN) in the Amazon ECS Developer Guide.

*/ inline const Aws::String& GetContainerInstanceArn() const{ return m_containerInstanceArn; } /** *

The Amazon Resource Name (ARN) of the container instance. For more * information about the ARN format, see Amazon * Resource Name (ARN) in the Amazon ECS Developer Guide.

*/ inline bool ContainerInstanceArnHasBeenSet() const { return m_containerInstanceArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the container instance. For more * information about the ARN format, see Amazon * Resource Name (ARN) in the Amazon ECS Developer Guide.

*/ inline void SetContainerInstanceArn(const Aws::String& value) { m_containerInstanceArnHasBeenSet = true; m_containerInstanceArn = value; } /** *

The Amazon Resource Name (ARN) of the container instance. For more * information about the ARN format, see Amazon * Resource Name (ARN) in the Amazon ECS Developer Guide.

*/ inline void SetContainerInstanceArn(Aws::String&& value) { m_containerInstanceArnHasBeenSet = true; m_containerInstanceArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the container instance. For more * information about the ARN format, see Amazon * Resource Name (ARN) in the Amazon ECS Developer Guide.

*/ inline void SetContainerInstanceArn(const char* value) { m_containerInstanceArnHasBeenSet = true; m_containerInstanceArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the container instance. For more * information about the ARN format, see Amazon * Resource Name (ARN) in the Amazon ECS Developer Guide.

*/ inline ContainerInstance& WithContainerInstanceArn(const Aws::String& value) { SetContainerInstanceArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the container instance. For more * information about the ARN format, see Amazon * Resource Name (ARN) in the Amazon ECS Developer Guide.

*/ inline ContainerInstance& WithContainerInstanceArn(Aws::String&& value) { SetContainerInstanceArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the container instance. For more * information about the ARN format, see Amazon * Resource Name (ARN) in the Amazon ECS Developer Guide.

*/ inline ContainerInstance& WithContainerInstanceArn(const char* value) { SetContainerInstanceArn(value); return *this;} /** *

The ID of the container instance. For Amazon EC2 instances, this value is the * Amazon EC2 instance ID. For external instances, this value is the Amazon Web * Services Systems Manager managed instance ID.

*/ inline const Aws::String& GetEc2InstanceId() const{ return m_ec2InstanceId; } /** *

The ID of the container instance. For Amazon EC2 instances, this value is the * Amazon EC2 instance ID. For external instances, this value is the Amazon Web * Services Systems Manager managed instance ID.

*/ inline bool Ec2InstanceIdHasBeenSet() const { return m_ec2InstanceIdHasBeenSet; } /** *

The ID of the container instance. For Amazon EC2 instances, this value is the * Amazon EC2 instance ID. For external instances, this value is the Amazon Web * Services Systems Manager managed instance ID.

*/ inline void SetEc2InstanceId(const Aws::String& value) { m_ec2InstanceIdHasBeenSet = true; m_ec2InstanceId = value; } /** *

The ID of the container instance. For Amazon EC2 instances, this value is the * Amazon EC2 instance ID. For external instances, this value is the Amazon Web * Services Systems Manager managed instance ID.

*/ inline void SetEc2InstanceId(Aws::String&& value) { m_ec2InstanceIdHasBeenSet = true; m_ec2InstanceId = std::move(value); } /** *

The ID of the container instance. For Amazon EC2 instances, this value is the * Amazon EC2 instance ID. For external instances, this value is the Amazon Web * Services Systems Manager managed instance ID.

*/ inline void SetEc2InstanceId(const char* value) { m_ec2InstanceIdHasBeenSet = true; m_ec2InstanceId.assign(value); } /** *

The ID of the container instance. For Amazon EC2 instances, this value is the * Amazon EC2 instance ID. For external instances, this value is the Amazon Web * Services Systems Manager managed instance ID.

*/ inline ContainerInstance& WithEc2InstanceId(const Aws::String& value) { SetEc2InstanceId(value); return *this;} /** *

The ID of the container instance. For Amazon EC2 instances, this value is the * Amazon EC2 instance ID. For external instances, this value is the Amazon Web * Services Systems Manager managed instance ID.

*/ inline ContainerInstance& WithEc2InstanceId(Aws::String&& value) { SetEc2InstanceId(std::move(value)); return *this;} /** *

The ID of the container instance. For Amazon EC2 instances, this value is the * Amazon EC2 instance ID. For external instances, this value is the Amazon Web * Services Systems Manager managed instance ID.

*/ inline ContainerInstance& WithEc2InstanceId(const char* value) { SetEc2InstanceId(value); return *this;} /** *

The capacity provider that's associated with the container instance.

*/ inline const Aws::String& GetCapacityProviderName() const{ return m_capacityProviderName; } /** *

The capacity provider that's associated with the container instance.

*/ inline bool CapacityProviderNameHasBeenSet() const { return m_capacityProviderNameHasBeenSet; } /** *

The capacity provider that's associated with the container instance.

*/ inline void SetCapacityProviderName(const Aws::String& value) { m_capacityProviderNameHasBeenSet = true; m_capacityProviderName = value; } /** *

The capacity provider that's associated with the container instance.

*/ inline void SetCapacityProviderName(Aws::String&& value) { m_capacityProviderNameHasBeenSet = true; m_capacityProviderName = std::move(value); } /** *

The capacity provider that's associated with the container instance.

*/ inline void SetCapacityProviderName(const char* value) { m_capacityProviderNameHasBeenSet = true; m_capacityProviderName.assign(value); } /** *

The capacity provider that's associated with the container instance.

*/ inline ContainerInstance& WithCapacityProviderName(const Aws::String& value) { SetCapacityProviderName(value); return *this;} /** *

The capacity provider that's associated with the container instance.

*/ inline ContainerInstance& WithCapacityProviderName(Aws::String&& value) { SetCapacityProviderName(std::move(value)); return *this;} /** *

The capacity provider that's associated with the container instance.

*/ inline ContainerInstance& WithCapacityProviderName(const char* value) { SetCapacityProviderName(value); return *this;} /** *

The version counter for the container instance. Every time a container * instance experiences a change that triggers a CloudWatch event, the version * counter is incremented. If you're replicating your Amazon ECS container instance * state with CloudWatch Events, you can compare the version of a container * instance reported by the Amazon ECS APIs with the version reported in CloudWatch * Events for the container instance (inside the detail object) to * verify that the version in your event stream is current.

*/ inline long long GetVersion() const{ return m_version; } /** *

The version counter for the container instance. Every time a container * instance experiences a change that triggers a CloudWatch event, the version * counter is incremented. If you're replicating your Amazon ECS container instance * state with CloudWatch Events, you can compare the version of a container * instance reported by the Amazon ECS APIs with the version reported in CloudWatch * Events for the container instance (inside the detail object) to * verify that the version in your event stream is current.

*/ inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } /** *

The version counter for the container instance. Every time a container * instance experiences a change that triggers a CloudWatch event, the version * counter is incremented. If you're replicating your Amazon ECS container instance * state with CloudWatch Events, you can compare the version of a container * instance reported by the Amazon ECS APIs with the version reported in CloudWatch * Events for the container instance (inside the detail object) to * verify that the version in your event stream is current.

*/ inline void SetVersion(long long value) { m_versionHasBeenSet = true; m_version = value; } /** *

The version counter for the container instance. Every time a container * instance experiences a change that triggers a CloudWatch event, the version * counter is incremented. If you're replicating your Amazon ECS container instance * state with CloudWatch Events, you can compare the version of a container * instance reported by the Amazon ECS APIs with the version reported in CloudWatch * Events for the container instance (inside the detail object) to * verify that the version in your event stream is current.

*/ inline ContainerInstance& WithVersion(long long value) { SetVersion(value); return *this;} /** *

The version information for the Amazon ECS container agent and Docker daemon * running on the container instance.

*/ inline const VersionInfo& GetVersionInfo() const{ return m_versionInfo; } /** *

The version information for the Amazon ECS container agent and Docker daemon * running on the container instance.

*/ inline bool VersionInfoHasBeenSet() const { return m_versionInfoHasBeenSet; } /** *

The version information for the Amazon ECS container agent and Docker daemon * running on the container instance.

*/ inline void SetVersionInfo(const VersionInfo& value) { m_versionInfoHasBeenSet = true; m_versionInfo = value; } /** *

The version information for the Amazon ECS container agent and Docker daemon * running on the container instance.

*/ inline void SetVersionInfo(VersionInfo&& value) { m_versionInfoHasBeenSet = true; m_versionInfo = std::move(value); } /** *

The version information for the Amazon ECS container agent and Docker daemon * running on the container instance.

*/ inline ContainerInstance& WithVersionInfo(const VersionInfo& value) { SetVersionInfo(value); return *this;} /** *

The version information for the Amazon ECS container agent and Docker daemon * running on the container instance.

*/ inline ContainerInstance& WithVersionInfo(VersionInfo&& value) { SetVersionInfo(std::move(value)); return *this;} /** *

For CPU and memory resource types, this parameter describes the remaining CPU * and memory that wasn't already allocated to tasks and is therefore available for * new tasks. For port resource types, this parameter describes the ports that were * reserved by the Amazon ECS container agent (at instance registration time) and * any task containers that have reserved port mappings on the host (with the * host or bridge network mode). Any port that's not * specified here is available for new tasks.

*/ inline const Aws::Vector& GetRemainingResources() const{ return m_remainingResources; } /** *

For CPU and memory resource types, this parameter describes the remaining CPU * and memory that wasn't already allocated to tasks and is therefore available for * new tasks. For port resource types, this parameter describes the ports that were * reserved by the Amazon ECS container agent (at instance registration time) and * any task containers that have reserved port mappings on the host (with the * host or bridge network mode). Any port that's not * specified here is available for new tasks.

*/ inline bool RemainingResourcesHasBeenSet() const { return m_remainingResourcesHasBeenSet; } /** *

For CPU and memory resource types, this parameter describes the remaining CPU * and memory that wasn't already allocated to tasks and is therefore available for * new tasks. For port resource types, this parameter describes the ports that were * reserved by the Amazon ECS container agent (at instance registration time) and * any task containers that have reserved port mappings on the host (with the * host or bridge network mode). Any port that's not * specified here is available for new tasks.

*/ inline void SetRemainingResources(const Aws::Vector& value) { m_remainingResourcesHasBeenSet = true; m_remainingResources = value; } /** *

For CPU and memory resource types, this parameter describes the remaining CPU * and memory that wasn't already allocated to tasks and is therefore available for * new tasks. For port resource types, this parameter describes the ports that were * reserved by the Amazon ECS container agent (at instance registration time) and * any task containers that have reserved port mappings on the host (with the * host or bridge network mode). Any port that's not * specified here is available for new tasks.

*/ inline void SetRemainingResources(Aws::Vector&& value) { m_remainingResourcesHasBeenSet = true; m_remainingResources = std::move(value); } /** *

For CPU and memory resource types, this parameter describes the remaining CPU * and memory that wasn't already allocated to tasks and is therefore available for * new tasks. For port resource types, this parameter describes the ports that were * reserved by the Amazon ECS container agent (at instance registration time) and * any task containers that have reserved port mappings on the host (with the * host or bridge network mode). Any port that's not * specified here is available for new tasks.

*/ inline ContainerInstance& WithRemainingResources(const Aws::Vector& value) { SetRemainingResources(value); return *this;} /** *

For CPU and memory resource types, this parameter describes the remaining CPU * and memory that wasn't already allocated to tasks and is therefore available for * new tasks. For port resource types, this parameter describes the ports that were * reserved by the Amazon ECS container agent (at instance registration time) and * any task containers that have reserved port mappings on the host (with the * host or bridge network mode). Any port that's not * specified here is available for new tasks.

*/ inline ContainerInstance& WithRemainingResources(Aws::Vector&& value) { SetRemainingResources(std::move(value)); return *this;} /** *

For CPU and memory resource types, this parameter describes the remaining CPU * and memory that wasn't already allocated to tasks and is therefore available for * new tasks. For port resource types, this parameter describes the ports that were * reserved by the Amazon ECS container agent (at instance registration time) and * any task containers that have reserved port mappings on the host (with the * host or bridge network mode). Any port that's not * specified here is available for new tasks.

*/ inline ContainerInstance& AddRemainingResources(const Resource& value) { m_remainingResourcesHasBeenSet = true; m_remainingResources.push_back(value); return *this; } /** *

For CPU and memory resource types, this parameter describes the remaining CPU * and memory that wasn't already allocated to tasks and is therefore available for * new tasks. For port resource types, this parameter describes the ports that were * reserved by the Amazon ECS container agent (at instance registration time) and * any task containers that have reserved port mappings on the host (with the * host or bridge network mode). Any port that's not * specified here is available for new tasks.

*/ inline ContainerInstance& AddRemainingResources(Resource&& value) { m_remainingResourcesHasBeenSet = true; m_remainingResources.push_back(std::move(value)); return *this; } /** *

For CPU and memory resource types, this parameter describes the amount of * each resource that was available on the container instance when the container * agent registered it with Amazon ECS. This value represents the total amount of * CPU and memory that can be allocated on this container instance to tasks. For * port resource types, this parameter describes the ports that were reserved by * the Amazon ECS container agent when it registered the container instance with * Amazon ECS.

*/ inline const Aws::Vector& GetRegisteredResources() const{ return m_registeredResources; } /** *

For CPU and memory resource types, this parameter describes the amount of * each resource that was available on the container instance when the container * agent registered it with Amazon ECS. This value represents the total amount of * CPU and memory that can be allocated on this container instance to tasks. For * port resource types, this parameter describes the ports that were reserved by * the Amazon ECS container agent when it registered the container instance with * Amazon ECS.

*/ inline bool RegisteredResourcesHasBeenSet() const { return m_registeredResourcesHasBeenSet; } /** *

For CPU and memory resource types, this parameter describes the amount of * each resource that was available on the container instance when the container * agent registered it with Amazon ECS. This value represents the total amount of * CPU and memory that can be allocated on this container instance to tasks. For * port resource types, this parameter describes the ports that were reserved by * the Amazon ECS container agent when it registered the container instance with * Amazon ECS.

*/ inline void SetRegisteredResources(const Aws::Vector& value) { m_registeredResourcesHasBeenSet = true; m_registeredResources = value; } /** *

For CPU and memory resource types, this parameter describes the amount of * each resource that was available on the container instance when the container * agent registered it with Amazon ECS. This value represents the total amount of * CPU and memory that can be allocated on this container instance to tasks. For * port resource types, this parameter describes the ports that were reserved by * the Amazon ECS container agent when it registered the container instance with * Amazon ECS.

*/ inline void SetRegisteredResources(Aws::Vector&& value) { m_registeredResourcesHasBeenSet = true; m_registeredResources = std::move(value); } /** *

For CPU and memory resource types, this parameter describes the amount of * each resource that was available on the container instance when the container * agent registered it with Amazon ECS. This value represents the total amount of * CPU and memory that can be allocated on this container instance to tasks. For * port resource types, this parameter describes the ports that were reserved by * the Amazon ECS container agent when it registered the container instance with * Amazon ECS.

*/ inline ContainerInstance& WithRegisteredResources(const Aws::Vector& value) { SetRegisteredResources(value); return *this;} /** *

For CPU and memory resource types, this parameter describes the amount of * each resource that was available on the container instance when the container * agent registered it with Amazon ECS. This value represents the total amount of * CPU and memory that can be allocated on this container instance to tasks. For * port resource types, this parameter describes the ports that were reserved by * the Amazon ECS container agent when it registered the container instance with * Amazon ECS.

*/ inline ContainerInstance& WithRegisteredResources(Aws::Vector&& value) { SetRegisteredResources(std::move(value)); return *this;} /** *

For CPU and memory resource types, this parameter describes the amount of * each resource that was available on the container instance when the container * agent registered it with Amazon ECS. This value represents the total amount of * CPU and memory that can be allocated on this container instance to tasks. For * port resource types, this parameter describes the ports that were reserved by * the Amazon ECS container agent when it registered the container instance with * Amazon ECS.

*/ inline ContainerInstance& AddRegisteredResources(const Resource& value) { m_registeredResourcesHasBeenSet = true; m_registeredResources.push_back(value); return *this; } /** *

For CPU and memory resource types, this parameter describes the amount of * each resource that was available on the container instance when the container * agent registered it with Amazon ECS. This value represents the total amount of * CPU and memory that can be allocated on this container instance to tasks. For * port resource types, this parameter describes the ports that were reserved by * the Amazon ECS container agent when it registered the container instance with * Amazon ECS.

*/ inline ContainerInstance& AddRegisteredResources(Resource&& value) { m_registeredResourcesHasBeenSet = true; m_registeredResources.push_back(std::move(value)); return *this; } /** *

The status of the container instance. The valid values are * REGISTERING, REGISTRATION_FAILED, ACTIVE, * INACTIVE, DEREGISTERING, or DRAINING.

*

If your account has opted in to the awsvpcTrunking account * setting, then any newly registered container instance will transition to a * REGISTERING status while the trunk elastic network interface is * provisioned for the instance. If the registration fails, the instance will * transition to a REGISTRATION_FAILED status. You can describe the * container instance and see the reason for failure in the * statusReason parameter. Once the container instance is terminated, * the instance transitions to a DEREGISTERING status while the trunk * elastic network interface is deprovisioned. The instance then transitions to an * INACTIVE status.

The ACTIVE status indicates * that the container instance can accept tasks. The DRAINING * indicates that new tasks aren't placed on the container instance and any service * tasks running on the container instance are removed if possible. For more * information, see Container * instance draining in the Amazon Elastic Container Service Developer * Guide.

*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The status of the container instance. The valid values are * REGISTERING, REGISTRATION_FAILED, ACTIVE, * INACTIVE, DEREGISTERING, or DRAINING.

*

If your account has opted in to the awsvpcTrunking account * setting, then any newly registered container instance will transition to a * REGISTERING status while the trunk elastic network interface is * provisioned for the instance. If the registration fails, the instance will * transition to a REGISTRATION_FAILED status. You can describe the * container instance and see the reason for failure in the * statusReason parameter. Once the container instance is terminated, * the instance transitions to a DEREGISTERING status while the trunk * elastic network interface is deprovisioned. The instance then transitions to an * INACTIVE status.

The ACTIVE status indicates * that the container instance can accept tasks. The DRAINING * indicates that new tasks aren't placed on the container instance and any service * tasks running on the container instance are removed if possible. For more * information, see Container * instance draining in the Amazon Elastic Container Service Developer * Guide.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of the container instance. The valid values are * REGISTERING, REGISTRATION_FAILED, ACTIVE, * INACTIVE, DEREGISTERING, or DRAINING.

*

If your account has opted in to the awsvpcTrunking account * setting, then any newly registered container instance will transition to a * REGISTERING status while the trunk elastic network interface is * provisioned for the instance. If the registration fails, the instance will * transition to a REGISTRATION_FAILED status. You can describe the * container instance and see the reason for failure in the * statusReason parameter. Once the container instance is terminated, * the instance transitions to a DEREGISTERING status while the trunk * elastic network interface is deprovisioned. The instance then transitions to an * INACTIVE status.

The ACTIVE status indicates * that the container instance can accept tasks. The DRAINING * indicates that new tasks aren't placed on the container instance and any service * tasks running on the container instance are removed if possible. For more * information, see Container * instance draining in the Amazon Elastic Container Service Developer * Guide.

*/ inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of the container instance. The valid values are * REGISTERING, REGISTRATION_FAILED, ACTIVE, * INACTIVE, DEREGISTERING, or DRAINING.

*

If your account has opted in to the awsvpcTrunking account * setting, then any newly registered container instance will transition to a * REGISTERING status while the trunk elastic network interface is * provisioned for the instance. If the registration fails, the instance will * transition to a REGISTRATION_FAILED status. You can describe the * container instance and see the reason for failure in the * statusReason parameter. Once the container instance is terminated, * the instance transitions to a DEREGISTERING status while the trunk * elastic network interface is deprovisioned. The instance then transitions to an * INACTIVE status.

The ACTIVE status indicates * that the container instance can accept tasks. The DRAINING * indicates that new tasks aren't placed on the container instance and any service * tasks running on the container instance are removed if possible. For more * information, see Container * instance draining in the Amazon Elastic Container Service Developer * Guide.

*/ inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of the container instance. The valid values are * REGISTERING, REGISTRATION_FAILED, ACTIVE, * INACTIVE, DEREGISTERING, or DRAINING.

*

If your account has opted in to the awsvpcTrunking account * setting, then any newly registered container instance will transition to a * REGISTERING status while the trunk elastic network interface is * provisioned for the instance. If the registration fails, the instance will * transition to a REGISTRATION_FAILED status. You can describe the * container instance and see the reason for failure in the * statusReason parameter. Once the container instance is terminated, * the instance transitions to a DEREGISTERING status while the trunk * elastic network interface is deprovisioned. The instance then transitions to an * INACTIVE status.

The ACTIVE status indicates * that the container instance can accept tasks. The DRAINING * indicates that new tasks aren't placed on the container instance and any service * tasks running on the container instance are removed if possible. For more * information, see Container * instance draining in the Amazon Elastic Container Service Developer * Guide.

*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The status of the container instance. The valid values are * REGISTERING, REGISTRATION_FAILED, ACTIVE, * INACTIVE, DEREGISTERING, or DRAINING.

*

If your account has opted in to the awsvpcTrunking account * setting, then any newly registered container instance will transition to a * REGISTERING status while the trunk elastic network interface is * provisioned for the instance. If the registration fails, the instance will * transition to a REGISTRATION_FAILED status. You can describe the * container instance and see the reason for failure in the * statusReason parameter. Once the container instance is terminated, * the instance transitions to a DEREGISTERING status while the trunk * elastic network interface is deprovisioned. The instance then transitions to an * INACTIVE status.

The ACTIVE status indicates * that the container instance can accept tasks. The DRAINING * indicates that new tasks aren't placed on the container instance and any service * tasks running on the container instance are removed if possible. For more * information, see Container * instance draining in the Amazon Elastic Container Service Developer * Guide.

*/ inline ContainerInstance& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The status of the container instance. The valid values are * REGISTERING, REGISTRATION_FAILED, ACTIVE, * INACTIVE, DEREGISTERING, or DRAINING.

*

If your account has opted in to the awsvpcTrunking account * setting, then any newly registered container instance will transition to a * REGISTERING status while the trunk elastic network interface is * provisioned for the instance. If the registration fails, the instance will * transition to a REGISTRATION_FAILED status. You can describe the * container instance and see the reason for failure in the * statusReason parameter. Once the container instance is terminated, * the instance transitions to a DEREGISTERING status while the trunk * elastic network interface is deprovisioned. The instance then transitions to an * INACTIVE status.

The ACTIVE status indicates * that the container instance can accept tasks. The DRAINING * indicates that new tasks aren't placed on the container instance and any service * tasks running on the container instance are removed if possible. For more * information, see Container * instance draining in the Amazon Elastic Container Service Developer * Guide.

*/ inline ContainerInstance& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The status of the container instance. The valid values are * REGISTERING, REGISTRATION_FAILED, ACTIVE, * INACTIVE, DEREGISTERING, or DRAINING.

*

If your account has opted in to the awsvpcTrunking account * setting, then any newly registered container instance will transition to a * REGISTERING status while the trunk elastic network interface is * provisioned for the instance. If the registration fails, the instance will * transition to a REGISTRATION_FAILED status. You can describe the * container instance and see the reason for failure in the * statusReason parameter. Once the container instance is terminated, * the instance transitions to a DEREGISTERING status while the trunk * elastic network interface is deprovisioned. The instance then transitions to an * INACTIVE status.

The ACTIVE status indicates * that the container instance can accept tasks. The DRAINING * indicates that new tasks aren't placed on the container instance and any service * tasks running on the container instance are removed if possible. For more * information, see Container * instance draining in the Amazon Elastic Container Service Developer * Guide.

*/ inline ContainerInstance& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

The reason that the container instance reached its current status.

*/ inline const Aws::String& GetStatusReason() const{ return m_statusReason; } /** *

The reason that the container instance reached its current status.

*/ inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; } /** *

The reason that the container instance reached its current status.

*/ inline void SetStatusReason(const Aws::String& value) { m_statusReasonHasBeenSet = true; m_statusReason = value; } /** *

The reason that the container instance reached its current status.

*/ inline void SetStatusReason(Aws::String&& value) { m_statusReasonHasBeenSet = true; m_statusReason = std::move(value); } /** *

The reason that the container instance reached its current status.

*/ inline void SetStatusReason(const char* value) { m_statusReasonHasBeenSet = true; m_statusReason.assign(value); } /** *

The reason that the container instance reached its current status.

*/ inline ContainerInstance& WithStatusReason(const Aws::String& value) { SetStatusReason(value); return *this;} /** *

The reason that the container instance reached its current status.

*/ inline ContainerInstance& WithStatusReason(Aws::String&& value) { SetStatusReason(std::move(value)); return *this;} /** *

The reason that the container instance reached its current status.

*/ inline ContainerInstance& WithStatusReason(const char* value) { SetStatusReason(value); return *this;} /** *

This parameter returns true if the agent is connected to Amazon * ECS. An instance with an agent that may be unhealthy or stopped return * false. Only instances connected to an agent can accept task * placement requests.

*/ inline bool GetAgentConnected() const{ return m_agentConnected; } /** *

This parameter returns true if the agent is connected to Amazon * ECS. An instance with an agent that may be unhealthy or stopped return * false. Only instances connected to an agent can accept task * placement requests.

*/ inline bool AgentConnectedHasBeenSet() const { return m_agentConnectedHasBeenSet; } /** *

This parameter returns true if the agent is connected to Amazon * ECS. An instance with an agent that may be unhealthy or stopped return * false. Only instances connected to an agent can accept task * placement requests.

*/ inline void SetAgentConnected(bool value) { m_agentConnectedHasBeenSet = true; m_agentConnected = value; } /** *

This parameter returns true if the agent is connected to Amazon * ECS. An instance with an agent that may be unhealthy or stopped return * false. Only instances connected to an agent can accept task * placement requests.

*/ inline ContainerInstance& WithAgentConnected(bool value) { SetAgentConnected(value); return *this;} /** *

The number of tasks on the container instance that are in the * RUNNING status.

*/ inline int GetRunningTasksCount() const{ return m_runningTasksCount; } /** *

The number of tasks on the container instance that are in the * RUNNING status.

*/ inline bool RunningTasksCountHasBeenSet() const { return m_runningTasksCountHasBeenSet; } /** *

The number of tasks on the container instance that are in the * RUNNING status.

*/ inline void SetRunningTasksCount(int value) { m_runningTasksCountHasBeenSet = true; m_runningTasksCount = value; } /** *

The number of tasks on the container instance that are in the * RUNNING status.

*/ inline ContainerInstance& WithRunningTasksCount(int value) { SetRunningTasksCount(value); return *this;} /** *

The number of tasks on the container instance that are in the * PENDING status.

*/ inline int GetPendingTasksCount() const{ return m_pendingTasksCount; } /** *

The number of tasks on the container instance that are in the * PENDING status.

*/ inline bool PendingTasksCountHasBeenSet() const { return m_pendingTasksCountHasBeenSet; } /** *

The number of tasks on the container instance that are in the * PENDING status.

*/ inline void SetPendingTasksCount(int value) { m_pendingTasksCountHasBeenSet = true; m_pendingTasksCount = value; } /** *

The number of tasks on the container instance that are in the * PENDING status.

*/ inline ContainerInstance& WithPendingTasksCount(int value) { SetPendingTasksCount(value); return *this;} /** *

The status of the most recent agent update. If an update wasn't ever * requested, this value is NULL.

*/ inline const AgentUpdateStatus& GetAgentUpdateStatus() const{ return m_agentUpdateStatus; } /** *

The status of the most recent agent update. If an update wasn't ever * requested, this value is NULL.

*/ inline bool AgentUpdateStatusHasBeenSet() const { return m_agentUpdateStatusHasBeenSet; } /** *

The status of the most recent agent update. If an update wasn't ever * requested, this value is NULL.

*/ inline void SetAgentUpdateStatus(const AgentUpdateStatus& value) { m_agentUpdateStatusHasBeenSet = true; m_agentUpdateStatus = value; } /** *

The status of the most recent agent update. If an update wasn't ever * requested, this value is NULL.

*/ inline void SetAgentUpdateStatus(AgentUpdateStatus&& value) { m_agentUpdateStatusHasBeenSet = true; m_agentUpdateStatus = std::move(value); } /** *

The status of the most recent agent update. If an update wasn't ever * requested, this value is NULL.

*/ inline ContainerInstance& WithAgentUpdateStatus(const AgentUpdateStatus& value) { SetAgentUpdateStatus(value); return *this;} /** *

The status of the most recent agent update. If an update wasn't ever * requested, this value is NULL.

*/ inline ContainerInstance& WithAgentUpdateStatus(AgentUpdateStatus&& value) { SetAgentUpdateStatus(std::move(value)); return *this;} /** *

The attributes set for the container instance, either by the Amazon ECS * container agent at instance registration or manually with the * PutAttributes operation.

*/ inline const Aws::Vector& GetAttributes() const{ return m_attributes; } /** *

The attributes set for the container instance, either by the Amazon ECS * container agent at instance registration or manually with the * PutAttributes operation.

*/ inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } /** *

The attributes set for the container instance, either by the Amazon ECS * container agent at instance registration or manually with the * PutAttributes operation.

*/ inline void SetAttributes(const Aws::Vector& value) { m_attributesHasBeenSet = true; m_attributes = value; } /** *

The attributes set for the container instance, either by the Amazon ECS * container agent at instance registration or manually with the * PutAttributes operation.

*/ inline void SetAttributes(Aws::Vector&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } /** *

The attributes set for the container instance, either by the Amazon ECS * container agent at instance registration or manually with the * PutAttributes operation.

*/ inline ContainerInstance& WithAttributes(const Aws::Vector& value) { SetAttributes(value); return *this;} /** *

The attributes set for the container instance, either by the Amazon ECS * container agent at instance registration or manually with the * PutAttributes operation.

*/ inline ContainerInstance& WithAttributes(Aws::Vector&& value) { SetAttributes(std::move(value)); return *this;} /** *

The attributes set for the container instance, either by the Amazon ECS * container agent at instance registration or manually with the * PutAttributes operation.

*/ inline ContainerInstance& AddAttributes(const Attribute& value) { m_attributesHasBeenSet = true; m_attributes.push_back(value); return *this; } /** *

The attributes set for the container instance, either by the Amazon ECS * container agent at instance registration or manually with the * PutAttributes operation.

*/ inline ContainerInstance& AddAttributes(Attribute&& value) { m_attributesHasBeenSet = true; m_attributes.push_back(std::move(value)); return *this; } /** *

The Unix timestamp for the time when the container instance was * registered.

*/ inline const Aws::Utils::DateTime& GetRegisteredAt() const{ return m_registeredAt; } /** *

The Unix timestamp for the time when the container instance was * registered.

*/ inline bool RegisteredAtHasBeenSet() const { return m_registeredAtHasBeenSet; } /** *

The Unix timestamp for the time when the container instance was * registered.

*/ inline void SetRegisteredAt(const Aws::Utils::DateTime& value) { m_registeredAtHasBeenSet = true; m_registeredAt = value; } /** *

The Unix timestamp for the time when the container instance was * registered.

*/ inline void SetRegisteredAt(Aws::Utils::DateTime&& value) { m_registeredAtHasBeenSet = true; m_registeredAt = std::move(value); } /** *

The Unix timestamp for the time when the container instance was * registered.

*/ inline ContainerInstance& WithRegisteredAt(const Aws::Utils::DateTime& value) { SetRegisteredAt(value); return *this;} /** *

The Unix timestamp for the time when the container instance was * registered.

*/ inline ContainerInstance& WithRegisteredAt(Aws::Utils::DateTime&& value) { SetRegisteredAt(std::move(value)); return *this;} /** *

The resources attached to a container instance, such as an elastic network * interface.

*/ inline const Aws::Vector& GetAttachments() const{ return m_attachments; } /** *

The resources attached to a container instance, such as an elastic network * interface.

*/ inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; } /** *

The resources attached to a container instance, such as an elastic network * interface.

*/ inline void SetAttachments(const Aws::Vector& value) { m_attachmentsHasBeenSet = true; m_attachments = value; } /** *

The resources attached to a container instance, such as an elastic network * interface.

*/ inline void SetAttachments(Aws::Vector&& value) { m_attachmentsHasBeenSet = true; m_attachments = std::move(value); } /** *

The resources attached to a container instance, such as an elastic network * interface.

*/ inline ContainerInstance& WithAttachments(const Aws::Vector& value) { SetAttachments(value); return *this;} /** *

The resources attached to a container instance, such as an elastic network * interface.

*/ inline ContainerInstance& WithAttachments(Aws::Vector&& value) { SetAttachments(std::move(value)); return *this;} /** *

The resources attached to a container instance, such as an elastic network * interface.

*/ inline ContainerInstance& AddAttachments(const Attachment& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(value); return *this; } /** *

The resources attached to a container instance, such as an elastic network * interface.

*/ inline ContainerInstance& AddAttachments(Attachment&& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(std::move(value)); return *this; } /** *

The metadata that you apply to the container instance 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.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The metadata that you apply to the container instance 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.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The metadata that you apply to the container instance 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.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The metadata that you apply to the container instance 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.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The metadata that you apply to the container instance 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.

*/ inline ContainerInstance& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The metadata that you apply to the container instance 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.

*/ inline ContainerInstance& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The metadata that you apply to the container instance 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.

*/ inline ContainerInstance& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The metadata that you apply to the container instance 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.

*/ inline ContainerInstance& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

An object representing the health status of the container instance.

*/ inline const ContainerInstanceHealthStatus& GetHealthStatus() const{ return m_healthStatus; } /** *

An object representing the health status of the container instance.

*/ inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; } /** *

An object representing the health status of the container instance.

*/ inline void SetHealthStatus(const ContainerInstanceHealthStatus& value) { m_healthStatusHasBeenSet = true; m_healthStatus = value; } /** *

An object representing the health status of the container instance.

*/ inline void SetHealthStatus(ContainerInstanceHealthStatus&& value) { m_healthStatusHasBeenSet = true; m_healthStatus = std::move(value); } /** *

An object representing the health status of the container instance.

*/ inline ContainerInstance& WithHealthStatus(const ContainerInstanceHealthStatus& value) { SetHealthStatus(value); return *this;} /** *

An object representing the health status of the container instance.

*/ inline ContainerInstance& WithHealthStatus(ContainerInstanceHealthStatus&& value) { SetHealthStatus(std::move(value)); return *this;} private: Aws::String m_containerInstanceArn; bool m_containerInstanceArnHasBeenSet = false; Aws::String m_ec2InstanceId; bool m_ec2InstanceIdHasBeenSet = false; Aws::String m_capacityProviderName; bool m_capacityProviderNameHasBeenSet = false; long long m_version; bool m_versionHasBeenSet = false; VersionInfo m_versionInfo; bool m_versionInfoHasBeenSet = false; Aws::Vector m_remainingResources; bool m_remainingResourcesHasBeenSet = false; Aws::Vector m_registeredResources; bool m_registeredResourcesHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; Aws::String m_statusReason; bool m_statusReasonHasBeenSet = false; bool m_agentConnected; bool m_agentConnectedHasBeenSet = false; int m_runningTasksCount; bool m_runningTasksCountHasBeenSet = false; int m_pendingTasksCount; bool m_pendingTasksCountHasBeenSet = false; AgentUpdateStatus m_agentUpdateStatus; bool m_agentUpdateStatusHasBeenSet = false; Aws::Vector m_attributes; bool m_attributesHasBeenSet = false; Aws::Utils::DateTime m_registeredAt; bool m_registeredAtHasBeenSet = false; Aws::Vector m_attachments; bool m_attachmentsHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; ContainerInstanceHealthStatus m_healthStatus; bool m_healthStatusHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws