list_rules
async
¶
list_rules(
resource_type: ResourceType,
*,
config_overrides: Optional[AsyncrbinClientConfig] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[NextToken] = None,
resource_tags: Optional[ResourceTags] = None,
lock_state: Optional[LockState] = None,
exclude_resource_tags: Optional[ExcludeResourceTags] = None,
) -> ListRulesResponse
Lists the Recycle Bin retention rules in the Region.
Parameters:
-
max_results(Optional[MaxResults], default:None) –The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned
NextTokenvalue. -
next_token(Optional[NextToken], default:None) –The token for the next page of results.
-
resource_type(ResourceType) –The resource type retained by the retention rule. Only retention rules that retain the specified resource type are listed. Currently, only EBS volumes, EBS snapshots, and EBS-backed AMIs are supported.
-
To list retention rules that retain EBS volumes, specify
EBS_VOLUME. -
To list retention rules that retain EBS snapshots, specify
EBS_SNAPSHOT. -
To list retention rules that retain EBS-backed AMIs, specify
EC2_IMAGE.
-
-
resource_tags(Optional[ResourceTags], default:None) –[Tag-level retention rules only] Information about the resource tags used to identify resources that are retained by the retention rule.
-
lock_state(Optional[LockState], default:None) –The lock state of the retention rules to list. Only retention rules with the specified lock state are returned.
-
exclude_resource_tags(Optional[ExcludeResourceTags], default:None) –[Region-level retention rules only] Information about the exclusion tags used to identify resources that are to be excluded, or ignored, by the retention rule.
Raises:
-
InternalServerException–The service could not respond to the request due to an internal problem.
-
ValidationException–One or more of the parameters in the request is not valid.
-
UnknownServiceError–The service returned an error code this client does not model.