amazonka-ec2-2.0: Amazon Elastic Compute Cloud 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.EC2.EnableImageDeprecation

Description

Enables deprecation of the specified AMI at the specified date and time.

For more information, see Deprecate an AMI in the Amazon EC2 User Guide.

Synopsis

Creating a Request

data EnableImageDeprecation Source #

See: newEnableImageDeprecation smart constructor.

Constructors

EnableImageDeprecation' 

Fields

  • dryRun :: Maybe Bool

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

  • imageId :: Text

    The ID of the AMI.

  • deprecateAt :: ISO8601

    The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ. If you specify a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.

    You can’t specify a date in the past. The upper limit for DeprecateAt is 10 years from now, except for public AMIs, where the upper limit is 2 years from the creation date.

Instances

Instances details
ToHeaders EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

ToPath EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

ToQuery EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

AWSRequest EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

Associated Types

type AWSResponse EnableImageDeprecation #

Generic EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

Associated Types

type Rep EnableImageDeprecation :: Type -> Type #

Read EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

Show EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

NFData EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

Methods

rnf :: EnableImageDeprecation -> () #

Eq EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

Hashable EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

type AWSResponse EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

type Rep EnableImageDeprecation Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

type Rep EnableImageDeprecation = D1 ('MetaData "EnableImageDeprecation" "Amazonka.EC2.EnableImageDeprecation" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "EnableImageDeprecation'" 'PrefixI 'True) (S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "imageId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "deprecateAt") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ISO8601))))

newEnableImageDeprecation Source #

Create a value of EnableImageDeprecation 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:dryRun:EnableImageDeprecation', enableImageDeprecation_dryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

EnableImageDeprecation, enableImageDeprecation_imageId - The ID of the AMI.

$sel:deprecateAt:EnableImageDeprecation', enableImageDeprecation_deprecateAt - The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ. If you specify a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.

You can’t specify a date in the past. The upper limit for DeprecateAt is 10 years from now, except for public AMIs, where the upper limit is 2 years from the creation date.

Request Lenses

enableImageDeprecation_dryRun :: Lens' EnableImageDeprecation (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

enableImageDeprecation_deprecateAt :: Lens' EnableImageDeprecation UTCTime Source #

The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ. If you specify a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.

You can’t specify a date in the past. The upper limit for DeprecateAt is 10 years from now, except for public AMIs, where the upper limit is 2 years from the creation date.

Destructuring the Response

data EnableImageDeprecationResponse Source #

See: newEnableImageDeprecationResponse smart constructor.

Constructors

EnableImageDeprecationResponse' 

Fields

Instances

Instances details
Generic EnableImageDeprecationResponse Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

Associated Types

type Rep EnableImageDeprecationResponse :: Type -> Type #

Read EnableImageDeprecationResponse Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

Show EnableImageDeprecationResponse Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

NFData EnableImageDeprecationResponse Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

Eq EnableImageDeprecationResponse Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

type Rep EnableImageDeprecationResponse Source # 
Instance details

Defined in Amazonka.EC2.EnableImageDeprecation

type Rep EnableImageDeprecationResponse = D1 ('MetaData "EnableImageDeprecationResponse" "Amazonka.EC2.EnableImageDeprecation" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "EnableImageDeprecationResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "return'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newEnableImageDeprecationResponse Source #

Create a value of EnableImageDeprecationResponse 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:return':EnableImageDeprecationResponse', enableImageDeprecationResponse_return - Returns true if the request succeeds; otherwise, it returns an error.

$sel:httpStatus:EnableImageDeprecationResponse', enableImageDeprecationResponse_httpStatus - The response's http status code.

Response Lenses

enableImageDeprecationResponse_return :: Lens' EnableImageDeprecationResponse (Maybe Bool) Source #

Returns true if the request succeeds; otherwise, it returns an error.