amazonka-rbin-2.0: Amazon Recycle Bin 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.RBin.UpdateRule

Description

Updates an existing Recycle Bin retention rule. You can update a retention rule's description, resource tags, and retention period at any time after creation. You can't update a retention rule's resource type after creation. For more information, see Update Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.

Synopsis

Creating a Request

data UpdateRule Source #

See: newUpdateRule smart constructor.

Constructors

UpdateRule' 

Fields

  • description :: Maybe Text

    The retention rule description.

  • resourceTags :: Maybe [ResourceTag]

    Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

    You can add the same tag key and value pair to a maximum or five retention rules.

    To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.

  • resourceType :: Maybe ResourceType

    This parameter is currently not supported. You can't update a retention rule's resource type after creation.

  • retentionPeriod :: Maybe RetentionPeriod

    Information about the retention period for which the retention rule is to retain resources.

  • identifier :: Text

    The unique ID of the retention rule.

Instances

Instances details
ToJSON UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

ToHeaders UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

Methods

toHeaders :: UpdateRule -> [Header] #

ToPath UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

ToQuery UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

AWSRequest UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

Associated Types

type AWSResponse UpdateRule #

Generic UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

Associated Types

type Rep UpdateRule :: Type -> Type #

Read UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

Show UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

NFData UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

Methods

rnf :: UpdateRule -> () #

Eq UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

Hashable UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

type AWSResponse UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

type Rep UpdateRule Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

type Rep UpdateRule = D1 ('MetaData "UpdateRule" "Amazonka.RBin.UpdateRule" "amazonka-rbin-2.0-683M7qr6PFTBsVsY3OL2az" 'False) (C1 ('MetaCons "UpdateRule'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "resourceTags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ResourceTag]))) :*: (S1 ('MetaSel ('Just "resourceType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ResourceType)) :*: (S1 ('MetaSel ('Just "retentionPeriod") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RetentionPeriod)) :*: S1 ('MetaSel ('Just "identifier") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newUpdateRule Source #

Arguments

:: Text

UpdateRule

-> UpdateRule 

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

UpdateRule, updateRule_description - The retention rule description.

UpdateRule, updateRule_resourceTags - Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

You can add the same tag key and value pair to a maximum or five retention rules.

To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.

UpdateRule, updateRule_resourceType - This parameter is currently not supported. You can't update a retention rule's resource type after creation.

UpdateRule, updateRule_retentionPeriod - Information about the retention period for which the retention rule is to retain resources.

UpdateRule, updateRule_identifier - The unique ID of the retention rule.

Request Lenses

updateRule_description :: Lens' UpdateRule (Maybe Text) Source #

The retention rule description.

updateRule_resourceTags :: Lens' UpdateRule (Maybe [ResourceTag]) Source #

Specifies the resource tags to use to identify resources that are to be retained by a tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

You can add the same tag key and value pair to a maximum or five retention rules.

To create a Region-level retention rule, omit this parameter. A Region-level retention rule does not have any resource tags specified. It retains all deleted resources of the specified resource type in the Region in which the rule is created, even if the resources are not tagged.

updateRule_resourceType :: Lens' UpdateRule (Maybe ResourceType) Source #

This parameter is currently not supported. You can't update a retention rule's resource type after creation.

updateRule_retentionPeriod :: Lens' UpdateRule (Maybe RetentionPeriod) Source #

Information about the retention period for which the retention rule is to retain resources.

updateRule_identifier :: Lens' UpdateRule Text Source #

The unique ID of the retention rule.

Destructuring the Response

data UpdateRuleResponse Source #

See: newUpdateRuleResponse smart constructor.

Constructors

UpdateRuleResponse' 

Fields

  • description :: Maybe Text

    The retention rule description.

  • identifier :: Maybe Text

    The unique ID of the retention rule.

  • lockEndTime :: Maybe POSIX

    The date and time at which the unlock delay is set to expire. Only returned for retention rules that have been unlocked and that are still within the unlock delay period.

  • lockState :: Maybe LockState

    The lock state for the retention rule.

    • locked - The retention rule is locked and can't be modified or deleted.
    • pending_unlock - The retention rule has been unlocked but it is still within the unlock delay period. The retention rule can be modified or deleted only after the unlock delay period has expired.
    • unlocked - The retention rule is unlocked and it can be modified or deleted by any user with the required permissions.
    • null - The retention rule has never been locked. Once a retention rule has been locked, it can transition between the locked and unlocked states only; it can never transition back to null.
  • resourceTags :: Maybe [ResourceTag]

    Information about the resource tags used to identify resources that are retained by the retention rule.

  • resourceType :: Maybe ResourceType

    The resource type retained by the retention rule.

  • retentionPeriod :: Maybe RetentionPeriod
     
  • status :: Maybe RuleStatus

    The state of the retention rule. Only retention rules that are in the available state retain resources.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic UpdateRuleResponse Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

Associated Types

type Rep UpdateRuleResponse :: Type -> Type #

Read UpdateRuleResponse Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

Show UpdateRuleResponse Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

NFData UpdateRuleResponse Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

Methods

rnf :: UpdateRuleResponse -> () #

Eq UpdateRuleResponse Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

type Rep UpdateRuleResponse Source # 
Instance details

Defined in Amazonka.RBin.UpdateRule

newUpdateRuleResponse Source #

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

UpdateRule, updateRuleResponse_description - The retention rule description.

UpdateRule, updateRuleResponse_identifier - The unique ID of the retention rule.

$sel:lockEndTime:UpdateRuleResponse', updateRuleResponse_lockEndTime - The date and time at which the unlock delay is set to expire. Only returned for retention rules that have been unlocked and that are still within the unlock delay period.

UpdateRuleResponse, updateRuleResponse_lockState - The lock state for the retention rule.

  • locked - The retention rule is locked and can't be modified or deleted.
  • pending_unlock - The retention rule has been unlocked but it is still within the unlock delay period. The retention rule can be modified or deleted only after the unlock delay period has expired.
  • unlocked - The retention rule is unlocked and it can be modified or deleted by any user with the required permissions.
  • null - The retention rule has never been locked. Once a retention rule has been locked, it can transition between the locked and unlocked states only; it can never transition back to null.

UpdateRule, updateRuleResponse_resourceTags - Information about the resource tags used to identify resources that are retained by the retention rule.

UpdateRule, updateRuleResponse_resourceType - The resource type retained by the retention rule.

UpdateRule, updateRuleResponse_retentionPeriod - Undocumented member.

$sel:status:UpdateRuleResponse', updateRuleResponse_status - The state of the retention rule. Only retention rules that are in the available state retain resources.

$sel:httpStatus:UpdateRuleResponse', updateRuleResponse_httpStatus - The response's http status code.

Response Lenses

updateRuleResponse_identifier :: Lens' UpdateRuleResponse (Maybe Text) Source #

The unique ID of the retention rule.

updateRuleResponse_lockEndTime :: Lens' UpdateRuleResponse (Maybe UTCTime) Source #

The date and time at which the unlock delay is set to expire. Only returned for retention rules that have been unlocked and that are still within the unlock delay period.

updateRuleResponse_lockState :: Lens' UpdateRuleResponse (Maybe LockState) Source #

The lock state for the retention rule.

  • locked - The retention rule is locked and can't be modified or deleted.
  • pending_unlock - The retention rule has been unlocked but it is still within the unlock delay period. The retention rule can be modified or deleted only after the unlock delay period has expired.
  • unlocked - The retention rule is unlocked and it can be modified or deleted by any user with the required permissions.
  • null - The retention rule has never been locked. Once a retention rule has been locked, it can transition between the locked and unlocked states only; it can never transition back to null.

updateRuleResponse_resourceTags :: Lens' UpdateRuleResponse (Maybe [ResourceTag]) Source #

Information about the resource tags used to identify resources that are retained by the retention rule.

updateRuleResponse_resourceType :: Lens' UpdateRuleResponse (Maybe ResourceType) Source #

The resource type retained by the retention rule.

updateRuleResponse_status :: Lens' UpdateRuleResponse (Maybe RuleStatus) Source #

The state of the retention rule. Only retention rules that are in the available state retain resources.