amazonka-backup-2.0: Amazon Backup 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.Backup.CreateLegalHold

Description

This action creates a legal hold on a recovery point (backup). A legal hold is a restraint on altering or deleting a backup until an authorized user cancels the legal hold. Any actions to delete or disassociate a recovery point will fail with an error if one or more active legal holds are on the recovery point.

Synopsis

Creating a Request

data CreateLegalHold Source #

See: newCreateLegalHold smart constructor.

Constructors

CreateLegalHold' 

Fields

  • idempotencyToken :: Maybe Text

    This is a user-chosen string used to distinguish between otherwise identical calls. Retrying a successful request with the same idempotency token results in a success message with no action taken.

  • recoveryPointSelection :: Maybe RecoveryPointSelection

    This specifies criteria to assign a set of resources, such as resource types or backup vaults.

  • tags :: Maybe (Sensitive (HashMap Text Text))

    Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters, numbers, spaces, and the following characters: + - = . _ : /.

  • title :: Text

    This is the string title of the legal hold.

  • description :: Text

    This is the string description of the legal hold.

Instances

Instances details
ToJSON CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

ToHeaders CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

ToPath CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

ToQuery CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

AWSRequest CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

Associated Types

type AWSResponse CreateLegalHold #

Generic CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

Associated Types

type Rep CreateLegalHold :: Type -> Type #

Show CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

NFData CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

Methods

rnf :: CreateLegalHold -> () #

Eq CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

Hashable CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

type AWSResponse CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

type Rep CreateLegalHold Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

type Rep CreateLegalHold = D1 ('MetaData "CreateLegalHold" "Amazonka.Backup.CreateLegalHold" "amazonka-backup-2.0-LovIt41tphM6jvgQJhTyRf" 'False) (C1 ('MetaCons "CreateLegalHold'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "idempotencyToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "recoveryPointSelection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RecoveryPointSelection))) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive (HashMap Text Text)))) :*: (S1 ('MetaSel ('Just "title") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newCreateLegalHold Source #

Create a value of CreateLegalHold 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:idempotencyToken:CreateLegalHold', createLegalHold_idempotencyToken - This is a user-chosen string used to distinguish between otherwise identical calls. Retrying a successful request with the same idempotency token results in a success message with no action taken.

CreateLegalHold, createLegalHold_recoveryPointSelection - This specifies criteria to assign a set of resources, such as resource types or backup vaults.

CreateLegalHold, createLegalHold_tags - Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters, numbers, spaces, and the following characters: + - = . _ : /.

CreateLegalHold, createLegalHold_title - This is the string title of the legal hold.

CreateLegalHold, createLegalHold_description - This is the string description of the legal hold.

Request Lenses

createLegalHold_idempotencyToken :: Lens' CreateLegalHold (Maybe Text) Source #

This is a user-chosen string used to distinguish between otherwise identical calls. Retrying a successful request with the same idempotency token results in a success message with no action taken.

createLegalHold_recoveryPointSelection :: Lens' CreateLegalHold (Maybe RecoveryPointSelection) Source #

This specifies criteria to assign a set of resources, such as resource types or backup vaults.

createLegalHold_tags :: Lens' CreateLegalHold (Maybe (HashMap Text Text)) Source #

Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters, numbers, spaces, and the following characters: + - = . _ : /.

createLegalHold_title :: Lens' CreateLegalHold Text Source #

This is the string title of the legal hold.

createLegalHold_description :: Lens' CreateLegalHold Text Source #

This is the string description of the legal hold.

Destructuring the Response

data CreateLegalHoldResponse Source #

See: newCreateLegalHoldResponse smart constructor.

Constructors

CreateLegalHoldResponse' 

Fields

Instances

Instances details
Generic CreateLegalHoldResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

Associated Types

type Rep CreateLegalHoldResponse :: Type -> Type #

Read CreateLegalHoldResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

Show CreateLegalHoldResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

NFData CreateLegalHoldResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

Methods

rnf :: CreateLegalHoldResponse -> () #

Eq CreateLegalHoldResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

type Rep CreateLegalHoldResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateLegalHold

newCreateLegalHoldResponse Source #

Create a value of CreateLegalHoldResponse 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:

CreateLegalHoldResponse, createLegalHoldResponse_creationDate - Time in number format when legal hold was created.

CreateLegalHold, createLegalHoldResponse_description - This is the returned string description of the legal hold.

CreateLegalHoldResponse, createLegalHoldResponse_legalHoldArn - This is the ARN (Amazon Resource Number) of the created legal hold.

CreateLegalHoldResponse, createLegalHoldResponse_legalHoldId - Legal hold ID returned for the specified legal hold on a recovery point.

CreateLegalHold, createLegalHoldResponse_recoveryPointSelection - This specifies criteria to assign a set of resources, such as resource types or backup vaults.

CreateLegalHoldResponse, createLegalHoldResponse_status - This displays the status of the legal hold returned after creating the legal hold. Statuses can be ACTIVE, PENDING, CANCELED, CANCELING, or FAILED.

CreateLegalHold, createLegalHoldResponse_title - This is the string title of the legal hold returned after creating the legal hold.

$sel:httpStatus:CreateLegalHoldResponse', createLegalHoldResponse_httpStatus - The response's http status code.

Response Lenses

createLegalHoldResponse_creationDate :: Lens' CreateLegalHoldResponse (Maybe UTCTime) Source #

Time in number format when legal hold was created.

createLegalHoldResponse_description :: Lens' CreateLegalHoldResponse (Maybe Text) Source #

This is the returned string description of the legal hold.

createLegalHoldResponse_legalHoldArn :: Lens' CreateLegalHoldResponse (Maybe Text) Source #

This is the ARN (Amazon Resource Number) of the created legal hold.

createLegalHoldResponse_legalHoldId :: Lens' CreateLegalHoldResponse (Maybe Text) Source #

Legal hold ID returned for the specified legal hold on a recovery point.

createLegalHoldResponse_recoveryPointSelection :: Lens' CreateLegalHoldResponse (Maybe RecoveryPointSelection) Source #

This specifies criteria to assign a set of resources, such as resource types or backup vaults.

createLegalHoldResponse_status :: Lens' CreateLegalHoldResponse (Maybe LegalHoldStatus) Source #

This displays the status of the legal hold returned after creating the legal hold. Statuses can be ACTIVE, PENDING, CANCELED, CANCELING, or FAILED.

createLegalHoldResponse_title :: Lens' CreateLegalHoldResponse (Maybe Text) Source #

This is the string title of the legal hold returned after creating the legal hold.