RecycleBinClient#
Index > RecycleBin > RecycleBinClient
Auto-generated documentation for RecycleBin type annotations stubs module types-boto3-rbin.
RecycleBinClient#
Type annotations and code completion for boto3.client("rbin").
 boto3 documentation
# RecycleBinClient usage example
from boto3.session import Session
from types_boto3_rbin.client import RecycleBinClient
def get_rbin_client() -> RecycleBinClient:
    return Session().client("rbin")Exceptions#
boto3 client exceptions are generated in runtime.
This class provides code completion for boto3.client("rbin").exceptions structure.
# Exceptions.exceptions usage example
client = boto3.client("rbin")
try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ValidationException,
) as e:
    print(e)# Exceptions.exceptions type checking example
from types_boto3_rbin.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
    ...Methods#
can_paginate#
Type annotations and code completion for boto3.client("rbin").can_paginate method.
 boto3 documentation
# can_paginate method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...generate_presigned_url#
Type annotations and code completion for boto3.client("rbin").generate_presigned_url method.
 boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...create_rule#
Creates a Recycle Bin retention rule.
Type annotations and code completion for boto3.client("rbin").create_rule method.
 boto3 documentation
# create_rule method definition
def create_rule(
    self,
    *,
    RetentionPeriod: RetentionPeriodTypeDef,  # (1)
    ResourceType: ResourceTypeType,  # (2)
    Description: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (3)
    ResourceTags: Sequence[ResourceTagTypeDef] = ...,  # (4)
    LockConfiguration: LockConfigurationTypeDef = ...,  # (5)
    ExcludeResourceTags: Sequence[ResourceTagTypeDef] = ...,  # (4)
) -> CreateRuleResponseTypeDef:  # (7)
    ...- See RetentionPeriodTypeDef
- See ResourceTypeType
- See Sequence[TagTypeDef]
- See Sequence[ResourceTagTypeDef]
- See LockConfigurationTypeDef
- See Sequence[ResourceTagTypeDef]
- See CreateRuleResponseTypeDef
# create_rule method usage example with argument unpacking
kwargs: CreateRuleRequestTypeDef = {  # (1)
    "RetentionPeriod": ...,
    "ResourceType": ...,
}
parent.create_rule(**kwargs)delete_rule#
Deletes a Recycle Bin retention rule.
Type annotations and code completion for boto3.client("rbin").delete_rule method.
 boto3 documentation
# delete_rule method definition
def delete_rule(
    self,
    *,
    Identifier: str,
) -> Dict[str, Any]:
    ...# delete_rule method usage example with argument unpacking
kwargs: DeleteRuleRequestTypeDef = {  # (1)
    "Identifier": ...,
}
parent.delete_rule(**kwargs)get_rule#
Gets information about a Recycle Bin retention rule.
Type annotations and code completion for boto3.client("rbin").get_rule method.
 boto3 documentation
# get_rule method definition
def get_rule(
    self,
    *,
    Identifier: str,
) -> GetRuleResponseTypeDef:  # (1)
    ...# get_rule method usage example with argument unpacking
kwargs: GetRuleRequestTypeDef = {  # (1)
    "Identifier": ...,
}
parent.get_rule(**kwargs)list_rules#
Lists the Recycle Bin retention rules in the Region.
Type annotations and code completion for boto3.client("rbin").list_rules method.
 boto3 documentation
# list_rules method definition
def list_rules(
    self,
    *,
    ResourceType: ResourceTypeType,  # (1)
    MaxResults: int = ...,
    NextToken: str = ...,
    ResourceTags: Sequence[ResourceTagTypeDef] = ...,  # (2)
    LockState: LockStateType = ...,  # (3)
    ExcludeResourceTags: Sequence[ResourceTagTypeDef] = ...,  # (2)
) -> ListRulesResponseTypeDef:  # (5)
    ...- See ResourceTypeType
- See Sequence[ResourceTagTypeDef]
- See LockStateType
- See Sequence[ResourceTagTypeDef]
- See ListRulesResponseTypeDef
# list_rules method usage example with argument unpacking
kwargs: ListRulesRequestTypeDef = {  # (1)
    "ResourceType": ...,
}
parent.list_rules(**kwargs)list_tags_for_resource#
Lists the tags assigned to a retention rule.
Type annotations and code completion for boto3.client("rbin").list_tags_for_resource method.
 boto3 documentation
# list_tags_for_resource method definition
def list_tags_for_resource(
    self,
    *,
    ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)lock_rule#
Locks a Region-level retention rule.
Type annotations and code completion for boto3.client("rbin").lock_rule method.
 boto3 documentation
# lock_rule method definition
def lock_rule(
    self,
    *,
    Identifier: str,
    LockConfiguration: LockConfigurationTypeDef,  # (1)
) -> LockRuleResponseTypeDef:  # (2)
    ...# lock_rule method usage example with argument unpacking
kwargs: LockRuleRequestTypeDef = {  # (1)
    "Identifier": ...,
    "LockConfiguration": ...,
}
parent.lock_rule(**kwargs)tag_resource#
Assigns tags to the specified retention rule.
Type annotations and code completion for boto3.client("rbin").tag_resource method.
 boto3 documentation
# tag_resource method definition
def tag_resource(
    self,
    *,
    ResourceArn: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...- See Sequence[TagTypeDef]
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "Tags": ...,
}
parent.tag_resource(**kwargs)unlock_rule#
Unlocks a retention rule.
Type annotations and code completion for boto3.client("rbin").unlock_rule method.
 boto3 documentation
# unlock_rule method definition
def unlock_rule(
    self,
    *,
    Identifier: str,
) -> UnlockRuleResponseTypeDef:  # (1)
    ...# unlock_rule method usage example with argument unpacking
kwargs: UnlockRuleRequestTypeDef = {  # (1)
    "Identifier": ...,
}
parent.unlock_rule(**kwargs)untag_resource#
Unassigns a tag from a retention rule.
Type annotations and code completion for boto3.client("rbin").untag_resource method.
 boto3 documentation
# untag_resource method definition
def untag_resource(
    self,
    *,
    ResourceArn: str,
    TagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "TagKeys": ...,
}
parent.untag_resource(**kwargs)update_rule#
Updates an existing Recycle Bin retention rule.
Type annotations and code completion for boto3.client("rbin").update_rule method.
 boto3 documentation
# update_rule method definition
def update_rule(
    self,
    *,
    Identifier: str,
    RetentionPeriod: RetentionPeriodTypeDef = ...,  # (1)
    Description: str = ...,
    ResourceType: ResourceTypeType = ...,  # (2)
    ResourceTags: Sequence[ResourceTagTypeDef] = ...,  # (3)
    ExcludeResourceTags: Sequence[ResourceTagTypeDef] = ...,  # (3)
) -> UpdateRuleResponseTypeDef:  # (5)
    ...- See RetentionPeriodTypeDef
- See ResourceTypeType
- See Sequence[ResourceTagTypeDef]
- See Sequence[ResourceTagTypeDef]
- See UpdateRuleResponseTypeDef
# update_rule method usage example with argument unpacking
kwargs: UpdateRuleRequestTypeDef = {  # (1)
    "Identifier": ...,
}
parent.update_rule(**kwargs)get_paginator#
Type annotations and code completion for boto3.client("rbin").get_paginator method with overloads.
- client.get_paginator("list_rules")-> ListRulesPaginator