Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data UpdateRule = UpdateRule' {}
- newUpdateRule :: Text -> UpdateRule
- updateRule_description :: Lens' UpdateRule (Maybe Text)
- updateRule_resourceTags :: Lens' UpdateRule (Maybe [ResourceTag])
- updateRule_resourceType :: Lens' UpdateRule (Maybe ResourceType)
- updateRule_retentionPeriod :: Lens' UpdateRule (Maybe RetentionPeriod)
- updateRule_identifier :: Lens' UpdateRule Text
- data UpdateRuleResponse = UpdateRuleResponse' {}
- newUpdateRuleResponse :: Int -> UpdateRuleResponse
- updateRuleResponse_description :: Lens' UpdateRuleResponse (Maybe Text)
- updateRuleResponse_identifier :: Lens' UpdateRuleResponse (Maybe Text)
- updateRuleResponse_lockEndTime :: Lens' UpdateRuleResponse (Maybe UTCTime)
- updateRuleResponse_lockState :: Lens' UpdateRuleResponse (Maybe LockState)
- updateRuleResponse_resourceTags :: Lens' UpdateRuleResponse (Maybe [ResourceTag])
- updateRuleResponse_resourceType :: Lens' UpdateRuleResponse (Maybe ResourceType)
- updateRuleResponse_retentionPeriod :: Lens' UpdateRuleResponse (Maybe RetentionPeriod)
- updateRuleResponse_status :: Lens' UpdateRuleResponse (Maybe RuleStatus)
- updateRuleResponse_httpStatus :: Lens' UpdateRuleResponse Int
Creating a Request
data UpdateRule Source #
See: newUpdateRule
smart constructor.
UpdateRule' | |
|
Instances
:: Text | |
-> 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.
UpdateRuleResponse' | |
|
Instances
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 thelocked
andunlocked
states only; it can never transition back tonull
.
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_description :: Lens' UpdateRuleResponse (Maybe Text) Source #
The retention rule description.
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 thelocked
andunlocked
states only; it can never transition back tonull
.
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_retentionPeriod :: Lens' UpdateRuleResponse (Maybe RetentionPeriod) Source #
Undocumented member.
updateRuleResponse_status :: Lens' UpdateRuleResponse (Maybe RuleStatus) Source #
The state of the retention rule. Only retention rules that are in the
available
state retain resources.
updateRuleResponse_httpStatus :: Lens' UpdateRuleResponse Int Source #
The response's http status code.