{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ECS.Types.ContainerInstance
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ECS.Types.ContainerInstance where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ECS.Types.AgentUpdateStatus
import Amazonka.ECS.Types.Attachment
import Amazonka.ECS.Types.Attribute
import Amazonka.ECS.Types.ContainerInstanceHealthStatus
import Amazonka.ECS.Types.Resource
import Amazonka.ECS.Types.Tag
import Amazonka.ECS.Types.VersionInfo
import qualified Amazonka.Prelude as Prelude

-- | An Amazon EC2 or External instance that\'s running the Amazon ECS agent
-- and has been registered with a cluster.
--
-- /See:/ 'newContainerInstance' smart constructor.
data ContainerInstance = ContainerInstance'
  { -- | 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.
    ContainerInstance -> Maybe Bool
agentConnected :: Prelude.Maybe Prelude.Bool,
    -- | The status of the most recent agent update. If an update wasn\'t ever
    -- requested, this value is @NULL@.
    ContainerInstance -> Maybe AgentUpdateStatus
agentUpdateStatus :: Prelude.Maybe AgentUpdateStatus,
    -- | The resources attached to a container instance, such as an elastic
    -- network interface.
    ContainerInstance -> Maybe [Attachment]
attachments :: Prelude.Maybe [Attachment],
    -- | The attributes set for the container instance, either by the Amazon ECS
    -- container agent at instance registration or manually with the
    -- PutAttributes operation.
    ContainerInstance -> Maybe [Attribute]
attributes :: Prelude.Maybe [Attribute],
    -- | The capacity provider that\'s associated with the container instance.
    ContainerInstance -> Maybe Text
capacityProviderName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the container instance. For more
    -- information about the ARN format, see
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids Amazon Resource Name (ARN)>
    -- in the /Amazon ECS Developer Guide/.
    ContainerInstance -> Maybe Text
containerInstanceArn :: Prelude.Maybe Prelude.Text,
    -- | 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.
    ContainerInstance -> Maybe Text
ec2InstanceId :: Prelude.Maybe Prelude.Text,
    -- | An object representing the health status of the container instance.
    ContainerInstance -> Maybe ContainerInstanceHealthStatus
healthStatus :: Prelude.Maybe ContainerInstanceHealthStatus,
    -- | The number of tasks on the container instance that are in the @PENDING@
    -- status.
    ContainerInstance -> Maybe Int
pendingTasksCount :: Prelude.Maybe Prelude.Int,
    -- | The Unix timestamp for the time when the container instance was
    -- registered.
    ContainerInstance -> Maybe POSIX
registeredAt :: Prelude.Maybe Data.POSIX,
    -- | 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.
    ContainerInstance -> Maybe [Resource]
registeredResources :: Prelude.Maybe [Resource],
    -- | 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.
    ContainerInstance -> Maybe [Resource]
remainingResources :: Prelude.Maybe [Resource],
    -- | The number of tasks on the container instance that are in the @RUNNING@
    -- status.
    ContainerInstance -> Maybe Int
runningTasksCount :: Prelude.Maybe Prelude.Int,
    -- | 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
    -- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-draining.html Container instance draining>
    -- in the /Amazon Elastic Container Service Developer Guide/.
    ContainerInstance -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | The reason that the container instance reached its current status.
    ContainerInstance -> Maybe Text
statusReason :: Prelude.Maybe Prelude.Text,
    -- | 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.
    ContainerInstance -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | 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.
    ContainerInstance -> Maybe Integer
version :: Prelude.Maybe Prelude.Integer,
    -- | The version information for the Amazon ECS container agent and Docker
    -- daemon running on the container instance.
    ContainerInstance -> Maybe VersionInfo
versionInfo :: Prelude.Maybe VersionInfo
  }
  deriving (ContainerInstance -> ContainerInstance -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContainerInstance -> ContainerInstance -> Bool
$c/= :: ContainerInstance -> ContainerInstance -> Bool
== :: ContainerInstance -> ContainerInstance -> Bool
$c== :: ContainerInstance -> ContainerInstance -> Bool
Prelude.Eq, ReadPrec [ContainerInstance]
ReadPrec ContainerInstance
Int -> ReadS ContainerInstance
ReadS [ContainerInstance]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContainerInstance]
$creadListPrec :: ReadPrec [ContainerInstance]
readPrec :: ReadPrec ContainerInstance
$creadPrec :: ReadPrec ContainerInstance
readList :: ReadS [ContainerInstance]
$creadList :: ReadS [ContainerInstance]
readsPrec :: Int -> ReadS ContainerInstance
$creadsPrec :: Int -> ReadS ContainerInstance
Prelude.Read, Int -> ContainerInstance -> ShowS
[ContainerInstance] -> ShowS
ContainerInstance -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContainerInstance] -> ShowS
$cshowList :: [ContainerInstance] -> ShowS
show :: ContainerInstance -> String
$cshow :: ContainerInstance -> String
showsPrec :: Int -> ContainerInstance -> ShowS
$cshowsPrec :: Int -> ContainerInstance -> ShowS
Prelude.Show, forall x. Rep ContainerInstance x -> ContainerInstance
forall x. ContainerInstance -> Rep ContainerInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ContainerInstance x -> ContainerInstance
$cfrom :: forall x. ContainerInstance -> Rep ContainerInstance x
Prelude.Generic)

-- |
-- Create a value of 'ContainerInstance' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'agentConnected', 'containerInstance_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.
--
-- 'agentUpdateStatus', 'containerInstance_agentUpdateStatus' - The status of the most recent agent update. If an update wasn\'t ever
-- requested, this value is @NULL@.
--
-- 'attachments', 'containerInstance_attachments' - The resources attached to a container instance, such as an elastic
-- network interface.
--
-- 'attributes', 'containerInstance_attributes' - The attributes set for the container instance, either by the Amazon ECS
-- container agent at instance registration or manually with the
-- PutAttributes operation.
--
-- 'capacityProviderName', 'containerInstance_capacityProviderName' - The capacity provider that\'s associated with the container instance.
--
-- 'containerInstanceArn', 'containerInstance_containerInstanceArn' - The Amazon Resource Name (ARN) of the container instance. For more
-- information about the ARN format, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids Amazon Resource Name (ARN)>
-- in the /Amazon ECS Developer Guide/.
--
-- 'ec2InstanceId', 'containerInstance_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.
--
-- 'healthStatus', 'containerInstance_healthStatus' - An object representing the health status of the container instance.
--
-- 'pendingTasksCount', 'containerInstance_pendingTasksCount' - The number of tasks on the container instance that are in the @PENDING@
-- status.
--
-- 'registeredAt', 'containerInstance_registeredAt' - The Unix timestamp for the time when the container instance was
-- registered.
--
-- 'registeredResources', 'containerInstance_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.
--
-- 'remainingResources', 'containerInstance_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.
--
-- 'runningTasksCount', 'containerInstance_runningTasksCount' - The number of tasks on the container instance that are in the @RUNNING@
-- status.
--
-- 'status', 'containerInstance_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
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-draining.html Container instance draining>
-- in the /Amazon Elastic Container Service Developer Guide/.
--
-- 'statusReason', 'containerInstance_statusReason' - The reason that the container instance reached its current status.
--
-- 'tags', 'containerInstance_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.
--
-- 'version', 'containerInstance_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.
--
-- 'versionInfo', 'containerInstance_versionInfo' - The version information for the Amazon ECS container agent and Docker
-- daemon running on the container instance.
newContainerInstance ::
  ContainerInstance
newContainerInstance :: ContainerInstance
newContainerInstance =
  ContainerInstance'
    { $sel:agentConnected:ContainerInstance' :: Maybe Bool
agentConnected =
        forall a. Maybe a
Prelude.Nothing,
      $sel:agentUpdateStatus:ContainerInstance' :: Maybe AgentUpdateStatus
agentUpdateStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:attachments:ContainerInstance' :: Maybe [Attachment]
attachments = forall a. Maybe a
Prelude.Nothing,
      $sel:attributes:ContainerInstance' :: Maybe [Attribute]
attributes = forall a. Maybe a
Prelude.Nothing,
      $sel:capacityProviderName:ContainerInstance' :: Maybe Text
capacityProviderName = forall a. Maybe a
Prelude.Nothing,
      $sel:containerInstanceArn:ContainerInstance' :: Maybe Text
containerInstanceArn = forall a. Maybe a
Prelude.Nothing,
      $sel:ec2InstanceId:ContainerInstance' :: Maybe Text
ec2InstanceId = forall a. Maybe a
Prelude.Nothing,
      $sel:healthStatus:ContainerInstance' :: Maybe ContainerInstanceHealthStatus
healthStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:pendingTasksCount:ContainerInstance' :: Maybe Int
pendingTasksCount = forall a. Maybe a
Prelude.Nothing,
      $sel:registeredAt:ContainerInstance' :: Maybe POSIX
registeredAt = forall a. Maybe a
Prelude.Nothing,
      $sel:registeredResources:ContainerInstance' :: Maybe [Resource]
registeredResources = forall a. Maybe a
Prelude.Nothing,
      $sel:remainingResources:ContainerInstance' :: Maybe [Resource]
remainingResources = forall a. Maybe a
Prelude.Nothing,
      $sel:runningTasksCount:ContainerInstance' :: Maybe Int
runningTasksCount = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ContainerInstance' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
      $sel:statusReason:ContainerInstance' :: Maybe Text
statusReason = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ContainerInstance' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:version:ContainerInstance' :: Maybe Integer
version = forall a. Maybe a
Prelude.Nothing,
      $sel:versionInfo:ContainerInstance' :: Maybe VersionInfo
versionInfo = forall a. Maybe a
Prelude.Nothing
    }

-- | 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.
containerInstance_agentConnected :: Lens.Lens' ContainerInstance (Prelude.Maybe Prelude.Bool)
containerInstance_agentConnected :: Lens' ContainerInstance (Maybe Bool)
containerInstance_agentConnected = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe Bool
agentConnected :: Maybe Bool
$sel:agentConnected:ContainerInstance' :: ContainerInstance -> Maybe Bool
agentConnected} -> Maybe Bool
agentConnected) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe Bool
a -> ContainerInstance
s {$sel:agentConnected:ContainerInstance' :: Maybe Bool
agentConnected = Maybe Bool
a} :: ContainerInstance)

-- | The status of the most recent agent update. If an update wasn\'t ever
-- requested, this value is @NULL@.
containerInstance_agentUpdateStatus :: Lens.Lens' ContainerInstance (Prelude.Maybe AgentUpdateStatus)
containerInstance_agentUpdateStatus :: Lens' ContainerInstance (Maybe AgentUpdateStatus)
containerInstance_agentUpdateStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe AgentUpdateStatus
agentUpdateStatus :: Maybe AgentUpdateStatus
$sel:agentUpdateStatus:ContainerInstance' :: ContainerInstance -> Maybe AgentUpdateStatus
agentUpdateStatus} -> Maybe AgentUpdateStatus
agentUpdateStatus) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe AgentUpdateStatus
a -> ContainerInstance
s {$sel:agentUpdateStatus:ContainerInstance' :: Maybe AgentUpdateStatus
agentUpdateStatus = Maybe AgentUpdateStatus
a} :: ContainerInstance)

-- | The resources attached to a container instance, such as an elastic
-- network interface.
containerInstance_attachments :: Lens.Lens' ContainerInstance (Prelude.Maybe [Attachment])
containerInstance_attachments :: Lens' ContainerInstance (Maybe [Attachment])
containerInstance_attachments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe [Attachment]
attachments :: Maybe [Attachment]
$sel:attachments:ContainerInstance' :: ContainerInstance -> Maybe [Attachment]
attachments} -> Maybe [Attachment]
attachments) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe [Attachment]
a -> ContainerInstance
s {$sel:attachments:ContainerInstance' :: Maybe [Attachment]
attachments = Maybe [Attachment]
a} :: ContainerInstance) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The attributes set for the container instance, either by the Amazon ECS
-- container agent at instance registration or manually with the
-- PutAttributes operation.
containerInstance_attributes :: Lens.Lens' ContainerInstance (Prelude.Maybe [Attribute])
containerInstance_attributes :: Lens' ContainerInstance (Maybe [Attribute])
containerInstance_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe [Attribute]
attributes :: Maybe [Attribute]
$sel:attributes:ContainerInstance' :: ContainerInstance -> Maybe [Attribute]
attributes} -> Maybe [Attribute]
attributes) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe [Attribute]
a -> ContainerInstance
s {$sel:attributes:ContainerInstance' :: Maybe [Attribute]
attributes = Maybe [Attribute]
a} :: ContainerInstance) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The capacity provider that\'s associated with the container instance.
containerInstance_capacityProviderName :: Lens.Lens' ContainerInstance (Prelude.Maybe Prelude.Text)
containerInstance_capacityProviderName :: Lens' ContainerInstance (Maybe Text)
containerInstance_capacityProviderName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe Text
capacityProviderName :: Maybe Text
$sel:capacityProviderName:ContainerInstance' :: ContainerInstance -> Maybe Text
capacityProviderName} -> Maybe Text
capacityProviderName) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe Text
a -> ContainerInstance
s {$sel:capacityProviderName:ContainerInstance' :: Maybe Text
capacityProviderName = Maybe Text
a} :: ContainerInstance)

-- | The Amazon Resource Name (ARN) of the container instance. For more
-- information about the ARN format, see
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids Amazon Resource Name (ARN)>
-- in the /Amazon ECS Developer Guide/.
containerInstance_containerInstanceArn :: Lens.Lens' ContainerInstance (Prelude.Maybe Prelude.Text)
containerInstance_containerInstanceArn :: Lens' ContainerInstance (Maybe Text)
containerInstance_containerInstanceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe Text
containerInstanceArn :: Maybe Text
$sel:containerInstanceArn:ContainerInstance' :: ContainerInstance -> Maybe Text
containerInstanceArn} -> Maybe Text
containerInstanceArn) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe Text
a -> ContainerInstance
s {$sel:containerInstanceArn:ContainerInstance' :: Maybe Text
containerInstanceArn = Maybe Text
a} :: ContainerInstance)

-- | 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.
containerInstance_ec2InstanceId :: Lens.Lens' ContainerInstance (Prelude.Maybe Prelude.Text)
containerInstance_ec2InstanceId :: Lens' ContainerInstance (Maybe Text)
containerInstance_ec2InstanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe Text
ec2InstanceId :: Maybe Text
$sel:ec2InstanceId:ContainerInstance' :: ContainerInstance -> Maybe Text
ec2InstanceId} -> Maybe Text
ec2InstanceId) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe Text
a -> ContainerInstance
s {$sel:ec2InstanceId:ContainerInstance' :: Maybe Text
ec2InstanceId = Maybe Text
a} :: ContainerInstance)

-- | An object representing the health status of the container instance.
containerInstance_healthStatus :: Lens.Lens' ContainerInstance (Prelude.Maybe ContainerInstanceHealthStatus)
containerInstance_healthStatus :: Lens' ContainerInstance (Maybe ContainerInstanceHealthStatus)
containerInstance_healthStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe ContainerInstanceHealthStatus
healthStatus :: Maybe ContainerInstanceHealthStatus
$sel:healthStatus:ContainerInstance' :: ContainerInstance -> Maybe ContainerInstanceHealthStatus
healthStatus} -> Maybe ContainerInstanceHealthStatus
healthStatus) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe ContainerInstanceHealthStatus
a -> ContainerInstance
s {$sel:healthStatus:ContainerInstance' :: Maybe ContainerInstanceHealthStatus
healthStatus = Maybe ContainerInstanceHealthStatus
a} :: ContainerInstance)

-- | The number of tasks on the container instance that are in the @PENDING@
-- status.
containerInstance_pendingTasksCount :: Lens.Lens' ContainerInstance (Prelude.Maybe Prelude.Int)
containerInstance_pendingTasksCount :: Lens' ContainerInstance (Maybe Int)
containerInstance_pendingTasksCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe Int
pendingTasksCount :: Maybe Int
$sel:pendingTasksCount:ContainerInstance' :: ContainerInstance -> Maybe Int
pendingTasksCount} -> Maybe Int
pendingTasksCount) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe Int
a -> ContainerInstance
s {$sel:pendingTasksCount:ContainerInstance' :: Maybe Int
pendingTasksCount = Maybe Int
a} :: ContainerInstance)

-- | The Unix timestamp for the time when the container instance was
-- registered.
containerInstance_registeredAt :: Lens.Lens' ContainerInstance (Prelude.Maybe Prelude.UTCTime)
containerInstance_registeredAt :: Lens' ContainerInstance (Maybe UTCTime)
containerInstance_registeredAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe POSIX
registeredAt :: Maybe POSIX
$sel:registeredAt:ContainerInstance' :: ContainerInstance -> Maybe POSIX
registeredAt} -> Maybe POSIX
registeredAt) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe POSIX
a -> ContainerInstance
s {$sel:registeredAt:ContainerInstance' :: Maybe POSIX
registeredAt = Maybe POSIX
a} :: ContainerInstance) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | 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.
containerInstance_registeredResources :: Lens.Lens' ContainerInstance (Prelude.Maybe [Resource])
containerInstance_registeredResources :: Lens' ContainerInstance (Maybe [Resource])
containerInstance_registeredResources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe [Resource]
registeredResources :: Maybe [Resource]
$sel:registeredResources:ContainerInstance' :: ContainerInstance -> Maybe [Resource]
registeredResources} -> Maybe [Resource]
registeredResources) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe [Resource]
a -> ContainerInstance
s {$sel:registeredResources:ContainerInstance' :: Maybe [Resource]
registeredResources = Maybe [Resource]
a} :: ContainerInstance) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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.
containerInstance_remainingResources :: Lens.Lens' ContainerInstance (Prelude.Maybe [Resource])
containerInstance_remainingResources :: Lens' ContainerInstance (Maybe [Resource])
containerInstance_remainingResources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe [Resource]
remainingResources :: Maybe [Resource]
$sel:remainingResources:ContainerInstance' :: ContainerInstance -> Maybe [Resource]
remainingResources} -> Maybe [Resource]
remainingResources) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe [Resource]
a -> ContainerInstance
s {$sel:remainingResources:ContainerInstance' :: Maybe [Resource]
remainingResources = Maybe [Resource]
a} :: ContainerInstance) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of tasks on the container instance that are in the @RUNNING@
-- status.
containerInstance_runningTasksCount :: Lens.Lens' ContainerInstance (Prelude.Maybe Prelude.Int)
containerInstance_runningTasksCount :: Lens' ContainerInstance (Maybe Int)
containerInstance_runningTasksCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe Int
runningTasksCount :: Maybe Int
$sel:runningTasksCount:ContainerInstance' :: ContainerInstance -> Maybe Int
runningTasksCount} -> Maybe Int
runningTasksCount) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe Int
a -> ContainerInstance
s {$sel:runningTasksCount:ContainerInstance' :: Maybe Int
runningTasksCount = Maybe Int
a} :: ContainerInstance)

-- | 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
-- <https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-instance-draining.html Container instance draining>
-- in the /Amazon Elastic Container Service Developer Guide/.
containerInstance_status :: Lens.Lens' ContainerInstance (Prelude.Maybe Prelude.Text)
containerInstance_status :: Lens' ContainerInstance (Maybe Text)
containerInstance_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe Text
status :: Maybe Text
$sel:status:ContainerInstance' :: ContainerInstance -> Maybe Text
status} -> Maybe Text
status) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe Text
a -> ContainerInstance
s {$sel:status:ContainerInstance' :: Maybe Text
status = Maybe Text
a} :: ContainerInstance)

-- | The reason that the container instance reached its current status.
containerInstance_statusReason :: Lens.Lens' ContainerInstance (Prelude.Maybe Prelude.Text)
containerInstance_statusReason :: Lens' ContainerInstance (Maybe Text)
containerInstance_statusReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe Text
statusReason :: Maybe Text
$sel:statusReason:ContainerInstance' :: ContainerInstance -> Maybe Text
statusReason} -> Maybe Text
statusReason) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe Text
a -> ContainerInstance
s {$sel:statusReason:ContainerInstance' :: Maybe Text
statusReason = Maybe Text
a} :: ContainerInstance)

-- | 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.
containerInstance_tags :: Lens.Lens' ContainerInstance (Prelude.Maybe [Tag])
containerInstance_tags :: Lens' ContainerInstance (Maybe [Tag])
containerInstance_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:ContainerInstance' :: ContainerInstance -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe [Tag]
a -> ContainerInstance
s {$sel:tags:ContainerInstance' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: ContainerInstance) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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.
containerInstance_version :: Lens.Lens' ContainerInstance (Prelude.Maybe Prelude.Integer)
containerInstance_version :: Lens' ContainerInstance (Maybe Integer)
containerInstance_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe Integer
version :: Maybe Integer
$sel:version:ContainerInstance' :: ContainerInstance -> Maybe Integer
version} -> Maybe Integer
version) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe Integer
a -> ContainerInstance
s {$sel:version:ContainerInstance' :: Maybe Integer
version = Maybe Integer
a} :: ContainerInstance)

-- | The version information for the Amazon ECS container agent and Docker
-- daemon running on the container instance.
containerInstance_versionInfo :: Lens.Lens' ContainerInstance (Prelude.Maybe VersionInfo)
containerInstance_versionInfo :: Lens' ContainerInstance (Maybe VersionInfo)
containerInstance_versionInfo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerInstance' {Maybe VersionInfo
versionInfo :: Maybe VersionInfo
$sel:versionInfo:ContainerInstance' :: ContainerInstance -> Maybe VersionInfo
versionInfo} -> Maybe VersionInfo
versionInfo) (\s :: ContainerInstance
s@ContainerInstance' {} Maybe VersionInfo
a -> ContainerInstance
s {$sel:versionInfo:ContainerInstance' :: Maybe VersionInfo
versionInfo = Maybe VersionInfo
a} :: ContainerInstance)

instance Data.FromJSON ContainerInstance where
  parseJSON :: Value -> Parser ContainerInstance
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"ContainerInstance"
      ( \Object
x ->
          Maybe Bool
-> Maybe AgentUpdateStatus
-> Maybe [Attachment]
-> Maybe [Attribute]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ContainerInstanceHealthStatus
-> Maybe Int
-> Maybe POSIX
-> Maybe [Resource]
-> Maybe [Resource]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Maybe Integer
-> Maybe VersionInfo
-> ContainerInstance
ContainerInstance'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"agentConnected")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"agentUpdateStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"attachments" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"attributes" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"capacityProviderName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"containerInstanceArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ec2InstanceId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"healthStatus")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"pendingTasksCount")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"registeredAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"registeredResources"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"remainingResources"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"runningTasksCount")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"status")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"statusReason")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"version")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"versionInfo")
      )

instance Prelude.Hashable ContainerInstance where
  hashWithSalt :: Int -> ContainerInstance -> Int
hashWithSalt Int
_salt ContainerInstance' {Maybe Bool
Maybe Int
Maybe Integer
Maybe [Attachment]
Maybe [Resource]
Maybe [Tag]
Maybe [Attribute]
Maybe Text
Maybe POSIX
Maybe AgentUpdateStatus
Maybe ContainerInstanceHealthStatus
Maybe VersionInfo
versionInfo :: Maybe VersionInfo
version :: Maybe Integer
tags :: Maybe [Tag]
statusReason :: Maybe Text
status :: Maybe Text
runningTasksCount :: Maybe Int
remainingResources :: Maybe [Resource]
registeredResources :: Maybe [Resource]
registeredAt :: Maybe POSIX
pendingTasksCount :: Maybe Int
healthStatus :: Maybe ContainerInstanceHealthStatus
ec2InstanceId :: Maybe Text
containerInstanceArn :: Maybe Text
capacityProviderName :: Maybe Text
attributes :: Maybe [Attribute]
attachments :: Maybe [Attachment]
agentUpdateStatus :: Maybe AgentUpdateStatus
agentConnected :: Maybe Bool
$sel:versionInfo:ContainerInstance' :: ContainerInstance -> Maybe VersionInfo
$sel:version:ContainerInstance' :: ContainerInstance -> Maybe Integer
$sel:tags:ContainerInstance' :: ContainerInstance -> Maybe [Tag]
$sel:statusReason:ContainerInstance' :: ContainerInstance -> Maybe Text
$sel:status:ContainerInstance' :: ContainerInstance -> Maybe Text
$sel:runningTasksCount:ContainerInstance' :: ContainerInstance -> Maybe Int
$sel:remainingResources:ContainerInstance' :: ContainerInstance -> Maybe [Resource]
$sel:registeredResources:ContainerInstance' :: ContainerInstance -> Maybe [Resource]
$sel:registeredAt:ContainerInstance' :: ContainerInstance -> Maybe POSIX
$sel:pendingTasksCount:ContainerInstance' :: ContainerInstance -> Maybe Int
$sel:healthStatus:ContainerInstance' :: ContainerInstance -> Maybe ContainerInstanceHealthStatus
$sel:ec2InstanceId:ContainerInstance' :: ContainerInstance -> Maybe Text
$sel:containerInstanceArn:ContainerInstance' :: ContainerInstance -> Maybe Text
$sel:capacityProviderName:ContainerInstance' :: ContainerInstance -> Maybe Text
$sel:attributes:ContainerInstance' :: ContainerInstance -> Maybe [Attribute]
$sel:attachments:ContainerInstance' :: ContainerInstance -> Maybe [Attachment]
$sel:agentUpdateStatus:ContainerInstance' :: ContainerInstance -> Maybe AgentUpdateStatus
$sel:agentConnected:ContainerInstance' :: ContainerInstance -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
agentConnected
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AgentUpdateStatus
agentUpdateStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Attachment]
attachments
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Attribute]
attributes
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
capacityProviderName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
containerInstanceArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ec2InstanceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ContainerInstanceHealthStatus
healthStatus
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
pendingTasksCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
registeredAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Resource]
registeredResources
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Resource]
remainingResources
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
runningTasksCount
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusReason
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
version
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VersionInfo
versionInfo

instance Prelude.NFData ContainerInstance where
  rnf :: ContainerInstance -> ()
rnf ContainerInstance' {Maybe Bool
Maybe Int
Maybe Integer
Maybe [Attachment]
Maybe [Resource]
Maybe [Tag]
Maybe [Attribute]
Maybe Text
Maybe POSIX
Maybe AgentUpdateStatus
Maybe ContainerInstanceHealthStatus
Maybe VersionInfo
versionInfo :: Maybe VersionInfo
version :: Maybe Integer
tags :: Maybe [Tag]
statusReason :: Maybe Text
status :: Maybe Text
runningTasksCount :: Maybe Int
remainingResources :: Maybe [Resource]
registeredResources :: Maybe [Resource]
registeredAt :: Maybe POSIX
pendingTasksCount :: Maybe Int
healthStatus :: Maybe ContainerInstanceHealthStatus
ec2InstanceId :: Maybe Text
containerInstanceArn :: Maybe Text
capacityProviderName :: Maybe Text
attributes :: Maybe [Attribute]
attachments :: Maybe [Attachment]
agentUpdateStatus :: Maybe AgentUpdateStatus
agentConnected :: Maybe Bool
$sel:versionInfo:ContainerInstance' :: ContainerInstance -> Maybe VersionInfo
$sel:version:ContainerInstance' :: ContainerInstance -> Maybe Integer
$sel:tags:ContainerInstance' :: ContainerInstance -> Maybe [Tag]
$sel:statusReason:ContainerInstance' :: ContainerInstance -> Maybe Text
$sel:status:ContainerInstance' :: ContainerInstance -> Maybe Text
$sel:runningTasksCount:ContainerInstance' :: ContainerInstance -> Maybe Int
$sel:remainingResources:ContainerInstance' :: ContainerInstance -> Maybe [Resource]
$sel:registeredResources:ContainerInstance' :: ContainerInstance -> Maybe [Resource]
$sel:registeredAt:ContainerInstance' :: ContainerInstance -> Maybe POSIX
$sel:pendingTasksCount:ContainerInstance' :: ContainerInstance -> Maybe Int
$sel:healthStatus:ContainerInstance' :: ContainerInstance -> Maybe ContainerInstanceHealthStatus
$sel:ec2InstanceId:ContainerInstance' :: ContainerInstance -> Maybe Text
$sel:containerInstanceArn:ContainerInstance' :: ContainerInstance -> Maybe Text
$sel:capacityProviderName:ContainerInstance' :: ContainerInstance -> Maybe Text
$sel:attributes:ContainerInstance' :: ContainerInstance -> Maybe [Attribute]
$sel:attachments:ContainerInstance' :: ContainerInstance -> Maybe [Attachment]
$sel:agentUpdateStatus:ContainerInstance' :: ContainerInstance -> Maybe AgentUpdateStatus
$sel:agentConnected:ContainerInstance' :: ContainerInstance -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
agentConnected
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AgentUpdateStatus
agentUpdateStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Attachment]
attachments
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Attribute]
attributes
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
capacityProviderName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
containerInstanceArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ec2InstanceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ContainerInstanceHealthStatus
healthStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
pendingTasksCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
registeredAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Resource]
registeredResources
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Resource]
remainingResources
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
runningTasksCount
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VersionInfo
versionInfo