amazonka-ecs-2.0: Amazon EC2 Container Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.ECS.GetTaskProtection

Description

Retrieves the protection status of tasks in an Amazon ECS service.

Synopsis

Creating a Request

data GetTaskProtection Source #

See: newGetTaskProtection smart constructor.

Constructors

GetTaskProtection' 

Fields

  • tasks :: Maybe [Text]

    A list of up to 100 task IDs or full ARN entries.

  • cluster :: Text

    The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.

Instances

Instances details
ToJSON GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

ToHeaders GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

ToPath GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

ToQuery GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

AWSRequest GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

Associated Types

type AWSResponse GetTaskProtection #

Generic GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

Associated Types

type Rep GetTaskProtection :: Type -> Type #

Read GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

Show GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

NFData GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

Methods

rnf :: GetTaskProtection -> () #

Eq GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

Hashable GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

type AWSResponse GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

type Rep GetTaskProtection Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

type Rep GetTaskProtection = D1 ('MetaData "GetTaskProtection" "Amazonka.ECS.GetTaskProtection" "amazonka-ecs-2.0-3xFxVqi9x5nBZ44jBEC5G8" 'False) (C1 ('MetaCons "GetTaskProtection'" 'PrefixI 'True) (S1 ('MetaSel ('Just "tasks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "cluster") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newGetTaskProtection Source #

Create a value of GetTaskProtection with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:tasks:GetTaskProtection', getTaskProtection_tasks - A list of up to 100 task IDs or full ARN entries.

$sel:cluster:GetTaskProtection', getTaskProtection_cluster - The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.

Request Lenses

getTaskProtection_tasks :: Lens' GetTaskProtection (Maybe [Text]) Source #

A list of up to 100 task IDs or full ARN entries.

getTaskProtection_cluster :: Lens' GetTaskProtection Text Source #

The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.

Destructuring the Response

data GetTaskProtectionResponse Source #

See: newGetTaskProtectionResponse smart constructor.

Constructors

GetTaskProtectionResponse' 

Fields

  • failures :: Maybe [Failure]

    Any failures associated with the call.

  • protectedTasks :: Maybe [ProtectedTask]

    A list of tasks with the following information.

    • taskArn: The task ARN.
    • protectionEnabled: The protection status of the task. If scale-in protection is enabled for a task, the value is true. Otherwise, it is false.
    • expirationDate: The epoch time when protection for the task will expire.
  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic GetTaskProtectionResponse Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

Associated Types

type Rep GetTaskProtectionResponse :: Type -> Type #

Read GetTaskProtectionResponse Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

Show GetTaskProtectionResponse Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

NFData GetTaskProtectionResponse Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

Eq GetTaskProtectionResponse Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

type Rep GetTaskProtectionResponse Source # 
Instance details

Defined in Amazonka.ECS.GetTaskProtection

type Rep GetTaskProtectionResponse = D1 ('MetaData "GetTaskProtectionResponse" "Amazonka.ECS.GetTaskProtection" "amazonka-ecs-2.0-3xFxVqi9x5nBZ44jBEC5G8" 'False) (C1 ('MetaCons "GetTaskProtectionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "failures") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Failure])) :*: (S1 ('MetaSel ('Just "protectedTasks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ProtectedTask])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newGetTaskProtectionResponse Source #

Create a value of GetTaskProtectionResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:failures:GetTaskProtectionResponse', getTaskProtectionResponse_failures - Any failures associated with the call.

$sel:protectedTasks:GetTaskProtectionResponse', getTaskProtectionResponse_protectedTasks - A list of tasks with the following information.

  • taskArn: The task ARN.
  • protectionEnabled: The protection status of the task. If scale-in protection is enabled for a task, the value is true. Otherwise, it is false.
  • expirationDate: The epoch time when protection for the task will expire.

$sel:httpStatus:GetTaskProtectionResponse', getTaskProtectionResponse_httpStatus - The response's http status code.

Response Lenses

getTaskProtectionResponse_protectedTasks :: Lens' GetTaskProtectionResponse (Maybe [ProtectedTask]) Source #

A list of tasks with the following information.

  • taskArn: The task ARN.
  • protectionEnabled: The protection status of the task. If scale-in protection is enabled for a task, the value is true. Otherwise, it is false.
  • expirationDate: The epoch time when protection for the task will expire.