libZSservicesZSamazonka-backupZSamazonka-backup
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Backup.CreateBackupSelection

Description

Creates a JSON document that specifies a set of resources to assign to a backup plan. Resources can be included by specifying patterns for a ListOfTags and selected Resources.

For example, consider the following patterns:

  • Resources: "arn:aws:ec2:region:account-id:volume/volume-id"
  • ConditionKey:"department"
    ConditionValue:"finance"
    ConditionType:"StringEquals"
  • ConditionKey:"importance"
    ConditionValue:"critical"
    ConditionType:"StringEquals"

Using these patterns would back up all Amazon Elastic Block Store (Amazon EBS) volumes that are tagged as "department=finance", "importance=critical", in addition to an EBS volume with the specified volume ID.

Resources and conditions are additive in that all resources that match the pattern are selected. This shouldn't be confused with a logical AND, where all conditions must match. The matching patterns are logically put together using the OR operator. In other words, all patterns that match are selected for backup.

Synopsis

Creating a Request

data CreateBackupSelection Source #

See: newCreateBackupSelection smart constructor.

Constructors

CreateBackupSelection' 

Fields

  • creatorRequestId :: Maybe Text

    A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.

  • backupPlanId :: Text

    Uniquely identifies the backup plan to be associated with the selection of resources.

  • backupSelection :: BackupSelection

    Specifies the body of a request to assign a set of resources to a backup plan.

Instances

Instances details
Eq CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

Read CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

Show CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

Generic CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

Associated Types

type Rep CreateBackupSelection :: Type -> Type #

NFData CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

Methods

rnf :: CreateBackupSelection -> () #

Hashable CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

ToJSON CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

AWSRequest CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

Associated Types

type AWSResponse CreateBackupSelection #

ToHeaders CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

ToPath CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

ToQuery CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

type Rep CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

type Rep CreateBackupSelection = D1 ('MetaData "CreateBackupSelection" "Amazonka.Backup.CreateBackupSelection" "libZSservicesZSamazonka-backupZSamazonka-backup" 'False) (C1 ('MetaCons "CreateBackupSelection'" 'PrefixI 'True) (S1 ('MetaSel ('Just "creatorRequestId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "backupPlanId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "backupSelection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BackupSelection))))
type AWSResponse CreateBackupSelection Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

newCreateBackupSelection Source #

Create a value of CreateBackupSelection 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:creatorRequestId:CreateBackupSelection', createBackupSelection_creatorRequestId - A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.

$sel:backupPlanId:CreateBackupSelection', createBackupSelection_backupPlanId - Uniquely identifies the backup plan to be associated with the selection of resources.

$sel:backupSelection:CreateBackupSelection', createBackupSelection_backupSelection - Specifies the body of a request to assign a set of resources to a backup plan.

Request Lenses

createBackupSelection_creatorRequestId :: Lens' CreateBackupSelection (Maybe Text) Source #

A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice.

createBackupSelection_backupPlanId :: Lens' CreateBackupSelection Text Source #

Uniquely identifies the backup plan to be associated with the selection of resources.

createBackupSelection_backupSelection :: Lens' CreateBackupSelection BackupSelection Source #

Specifies the body of a request to assign a set of resources to a backup plan.

Destructuring the Response

data CreateBackupSelectionResponse Source #

See: newCreateBackupSelectionResponse smart constructor.

Constructors

CreateBackupSelectionResponse' 

Fields

  • selectionId :: Maybe Text

    Uniquely identifies the body of a request to assign a set of resources to a backup plan.

  • backupPlanId :: Maybe Text

    Uniquely identifies a backup plan.

  • creationDate :: Maybe POSIX

    The date and time a backup selection is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq CreateBackupSelectionResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

Read CreateBackupSelectionResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

Show CreateBackupSelectionResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

Generic CreateBackupSelectionResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

Associated Types

type Rep CreateBackupSelectionResponse :: Type -> Type #

NFData CreateBackupSelectionResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

type Rep CreateBackupSelectionResponse Source # 
Instance details

Defined in Amazonka.Backup.CreateBackupSelection

type Rep CreateBackupSelectionResponse = D1 ('MetaData "CreateBackupSelectionResponse" "Amazonka.Backup.CreateBackupSelection" "libZSservicesZSamazonka-backupZSamazonka-backup" 'False) (C1 ('MetaCons "CreateBackupSelectionResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "selectionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "backupPlanId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "creationDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newCreateBackupSelectionResponse Source #

Create a value of CreateBackupSelectionResponse 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:selectionId:CreateBackupSelectionResponse', createBackupSelectionResponse_selectionId - Uniquely identifies the body of a request to assign a set of resources to a backup plan.

$sel:backupPlanId:CreateBackupSelection', createBackupSelectionResponse_backupPlanId - Uniquely identifies a backup plan.

$sel:creationDate:CreateBackupSelectionResponse', createBackupSelectionResponse_creationDate - The date and time a backup selection is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.

$sel:httpStatus:CreateBackupSelectionResponse', createBackupSelectionResponse_httpStatus - The response's http status code.

Response Lenses

createBackupSelectionResponse_selectionId :: Lens' CreateBackupSelectionResponse (Maybe Text) Source #

Uniquely identifies the body of a request to assign a set of resources to a backup plan.

createBackupSelectionResponse_creationDate :: Lens' CreateBackupSelectionResponse (Maybe UTCTime) Source #

The date and time a backup selection is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.