Skip to content

RecycleBinClient

Index > RecycleBin > RecycleBinClient

Auto-generated documentation for RecycleBin type annotations stubs module mypy-boto3-rbin.

RecycleBinClient

Type annotations and code completion for boto3.client("rbin"). boto3 documentation

Usage example
from boto3.session import Session
from mypy_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.

Usage example
client = boto3.client("rbin")

try:
    do_something(client)
except (
    client.ClientError,
    client.ConflictException,
    client.InternalServerException,
    client.ResourceNotFoundException,
    client.ServiceQuotaExceededException,
    client.ValidationException,
) as e:
    print(e)
Type checking example
from mypy_boto3_rbin.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("rbin").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("rbin").close method. boto3 documentation

Method definition
def close(
    self,
) -> None:
    ...

create_rule

Creates a Recycle Bin retention rule.

Type annotations and code completion for boto3.client("rbin").create_rule method. boto3 documentation

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)
) -> CreateRuleResponseTypeDef:  # (6)
    ...
  1. See RetentionPeriodTypeDef
  2. See ResourceTypeType
  3. See TagTypeDef
  4. See ResourceTagTypeDef
  5. See LockConfigurationTypeDef
  6. See CreateRuleResponseTypeDef
Usage example with kwargs
kwargs: CreateRuleRequestRequestTypeDef = {  # (1)
    "RetentionPeriod": ...,
    "ResourceType": ...,
}

parent.create_rule(**kwargs)
  1. See CreateRuleRequestRequestTypeDef

delete_rule

Deletes a Recycle Bin retention rule.

Type annotations and code completion for boto3.client("rbin").delete_rule method. boto3 documentation

Method definition
def delete_rule(
    self,
    *,
    Identifier: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteRuleRequestRequestTypeDef = {  # (1)
    "Identifier": ...,
}

parent.delete_rule(**kwargs)
  1. See DeleteRuleRequestRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("rbin").generate_presigned_url method. boto3 documentation

Method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_rule

Gets information about a Recycle Bin retention rule.

Type annotations and code completion for boto3.client("rbin").get_rule method. boto3 documentation

Method definition
def get_rule(
    self,
    *,
    Identifier: str,
) -> GetRuleResponseTypeDef:  # (1)
    ...
  1. See GetRuleResponseTypeDef
Usage example with kwargs
kwargs: GetRuleRequestRequestTypeDef = {  # (1)
    "Identifier": ...,
}

parent.get_rule(**kwargs)
  1. See GetRuleRequestRequestTypeDef

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

Method definition
def list_rules(
    self,
    *,
    ResourceType: ResourceTypeType,  # (1)
    MaxResults: int = ...,
    NextToken: str = ...,
    ResourceTags: Sequence[ResourceTagTypeDef] = ...,  # (2)
    LockState: LockStateType = ...,  # (3)
) -> ListRulesResponseTypeDef:  # (4)
    ...
  1. See ResourceTypeType
  2. See ResourceTagTypeDef
  3. See LockStateType
  4. See ListRulesResponseTypeDef
Usage example with kwargs
kwargs: ListRulesRequestRequestTypeDef = {  # (1)
    "ResourceType": ...,
}

parent.list_rules(**kwargs)
  1. See ListRulesRequestRequestTypeDef

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

Method definition
def list_tags_for_resource(
    self,
    *,
    ResourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
Usage example with kwargs
kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

lock_rule

Locks a retention rule.

Type annotations and code completion for boto3.client("rbin").lock_rule method. boto3 documentation

Method definition
def lock_rule(
    self,
    *,
    Identifier: str,
    LockConfiguration: LockConfigurationTypeDef,  # (1)
) -> LockRuleResponseTypeDef:  # (2)
    ...
  1. See LockConfigurationTypeDef
  2. See LockRuleResponseTypeDef
Usage example with kwargs
kwargs: LockRuleRequestRequestTypeDef = {  # (1)
    "Identifier": ...,
    "LockConfiguration": ...,
}

parent.lock_rule(**kwargs)
  1. See LockRuleRequestRequestTypeDef

tag_resource

Assigns tags to the specified retention rule.

Type annotations and code completion for boto3.client("rbin").tag_resource method. boto3 documentation

Method definition
def tag_resource(
    self,
    *,
    ResourceArn: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
Usage example with kwargs
kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "Tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

unlock_rule

Unlocks a retention rule.

Type annotations and code completion for boto3.client("rbin").unlock_rule method. boto3 documentation

Method definition
def unlock_rule(
    self,
    *,
    Identifier: str,
) -> UnlockRuleResponseTypeDef:  # (1)
    ...
  1. See UnlockRuleResponseTypeDef
Usage example with kwargs
kwargs: UnlockRuleRequestRequestTypeDef = {  # (1)
    "Identifier": ...,
}

parent.unlock_rule(**kwargs)
  1. See UnlockRuleRequestRequestTypeDef

untag_resource

Unassigns a tag from a retention rule.

Type annotations and code completion for boto3.client("rbin").untag_resource method. boto3 documentation

Method definition
def untag_resource(
    self,
    *,
    ResourceArn: str,
    TagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "ResourceArn": ...,
    "TagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_rule

Updates an existing Recycle Bin retention rule.

Type annotations and code completion for boto3.client("rbin").update_rule method. boto3 documentation

Method definition
def update_rule(
    self,
    *,
    Identifier: str,
    RetentionPeriod: RetentionPeriodTypeDef = ...,  # (1)
    Description: str = ...,
    ResourceType: ResourceTypeType = ...,  # (2)
    ResourceTags: Sequence[ResourceTagTypeDef] = ...,  # (3)
) -> UpdateRuleResponseTypeDef:  # (4)
    ...
  1. See RetentionPeriodTypeDef
  2. See ResourceTypeType
  3. See ResourceTagTypeDef
  4. See UpdateRuleResponseTypeDef
Usage example with kwargs
kwargs: UpdateRuleRequestRequestTypeDef = {  # (1)
    "Identifier": ...,
}

parent.update_rule(**kwargs)
  1. See UpdateRuleRequestRequestTypeDef

get_paginator

Type annotations and code completion for boto3.client("rbin").get_paginator method with overloads.