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 |
Creates a Recycle Bin retention rule. For more information, see Create Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.
Synopsis
- data CreateRule = CreateRule' {}
- newCreateRule :: RetentionPeriod -> ResourceType -> CreateRule
- createRule_description :: Lens' CreateRule (Maybe Text)
- createRule_lockConfiguration :: Lens' CreateRule (Maybe LockConfiguration)
- createRule_resourceTags :: Lens' CreateRule (Maybe [ResourceTag])
- createRule_tags :: Lens' CreateRule (Maybe [Tag])
- createRule_retentionPeriod :: Lens' CreateRule RetentionPeriod
- createRule_resourceType :: Lens' CreateRule ResourceType
- data CreateRuleResponse = CreateRuleResponse' {}
- newCreateRuleResponse :: Int -> CreateRuleResponse
- createRuleResponse_description :: Lens' CreateRuleResponse (Maybe Text)
- createRuleResponse_identifier :: Lens' CreateRuleResponse (Maybe Text)
- createRuleResponse_lockConfiguration :: Lens' CreateRuleResponse (Maybe LockConfiguration)
- createRuleResponse_lockState :: Lens' CreateRuleResponse (Maybe LockState)
- createRuleResponse_resourceTags :: Lens' CreateRuleResponse (Maybe [ResourceTag])
- createRuleResponse_resourceType :: Lens' CreateRuleResponse (Maybe ResourceType)
- createRuleResponse_retentionPeriod :: Lens' CreateRuleResponse (Maybe RetentionPeriod)
- createRuleResponse_status :: Lens' CreateRuleResponse (Maybe RuleStatus)
- createRuleResponse_tags :: Lens' CreateRuleResponse (Maybe [Tag])
- createRuleResponse_httpStatus :: Lens' CreateRuleResponse Int
Creating a Request
data CreateRule Source #
See: newCreateRule
smart constructor.
CreateRule' | |
|
Instances
Create a value of CreateRule
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:
CreateRule
, createRule_description
- The retention rule description.
CreateRule
, createRule_lockConfiguration
- Information about the retention rule lock configuration.
CreateRule
, createRule_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.
CreateRule
, createRule_tags
- Information about the tags to assign to the retention rule.
CreateRule
, createRule_retentionPeriod
- Information about the retention period for which the retention rule is
to retain resources.
CreateRule
, createRule_resourceType
- The resource type to be retained by the retention rule. Currently, only
Amazon EBS snapshots and EBS-backed AMIs are supported. To retain
snapshots, specify EBS_SNAPSHOT
. To retain EBS-backed AMIs, specify
EC2_IMAGE
.
Request Lenses
createRule_description :: Lens' CreateRule (Maybe Text) Source #
The retention rule description.
createRule_lockConfiguration :: Lens' CreateRule (Maybe LockConfiguration) Source #
Information about the retention rule lock configuration.
createRule_resourceTags :: Lens' CreateRule (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.
createRule_tags :: Lens' CreateRule (Maybe [Tag]) Source #
Information about the tags to assign to the retention rule.
createRule_retentionPeriod :: Lens' CreateRule RetentionPeriod Source #
Information about the retention period for which the retention rule is to retain resources.
createRule_resourceType :: Lens' CreateRule ResourceType Source #
The resource type to be retained by the retention rule. Currently, only
Amazon EBS snapshots and EBS-backed AMIs are supported. To retain
snapshots, specify EBS_SNAPSHOT
. To retain EBS-backed AMIs, specify
EC2_IMAGE
.
Destructuring the Response
data CreateRuleResponse Source #
See: newCreateRuleResponse
smart constructor.
CreateRuleResponse' | |
|
Instances
newCreateRuleResponse Source #
Create a value of CreateRuleResponse
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:
CreateRule
, createRuleResponse_description
- The retention rule description.
CreateRuleResponse
, createRuleResponse_identifier
- The unique ID of the retention rule.
CreateRule
, createRuleResponse_lockConfiguration
- Information about the retention rule lock configuration.
CreateRuleResponse
, createRuleResponse_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
.
CreateRule
, createRuleResponse_resourceTags
- Information about the resource tags used to identify resources that are
retained by the retention rule.
CreateRule
, createRuleResponse_resourceType
- The resource type retained by the retention rule.
CreateRule
, createRuleResponse_retentionPeriod
- Undocumented member.
$sel:status:CreateRuleResponse'
, createRuleResponse_status
- The state of the retention rule. Only retention rules that are in the
available
state retain resources.
CreateRule
, createRuleResponse_tags
- Information about the tags assigned to the retention rule.
$sel:httpStatus:CreateRuleResponse'
, createRuleResponse_httpStatus
- The response's http status code.
Response Lenses
createRuleResponse_description :: Lens' CreateRuleResponse (Maybe Text) Source #
The retention rule description.
createRuleResponse_identifier :: Lens' CreateRuleResponse (Maybe Text) Source #
The unique ID of the retention rule.
createRuleResponse_lockConfiguration :: Lens' CreateRuleResponse (Maybe LockConfiguration) Source #
Information about the retention rule lock configuration.
createRuleResponse_lockState :: Lens' CreateRuleResponse (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
.
createRuleResponse_resourceTags :: Lens' CreateRuleResponse (Maybe [ResourceTag]) Source #
Information about the resource tags used to identify resources that are retained by the retention rule.
createRuleResponse_resourceType :: Lens' CreateRuleResponse (Maybe ResourceType) Source #
The resource type retained by the retention rule.
createRuleResponse_retentionPeriod :: Lens' CreateRuleResponse (Maybe RetentionPeriod) Source #
Undocumented member.
createRuleResponse_status :: Lens' CreateRuleResponse (Maybe RuleStatus) Source #
The state of the retention rule. Only retention rules that are in the
available
state retain resources.
createRuleResponse_tags :: Lens' CreateRuleResponse (Maybe [Tag]) Source #
Information about the tags assigned to the retention rule.
createRuleResponse_httpStatus :: Lens' CreateRuleResponse Int Source #
The response's http status code.