Skip to content

BackupClient#

Index > Backup > BackupClient

Auto-generated documentation for Backup type annotations stubs module mypy-boto3-backup.

BackupClient#

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

# BackupClient usage example

from boto3.session import Session
from mypy_boto3_backup.client import BackupClient

def get_backup_client() -> BackupClient:
    return Session().client("backup")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("backup").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("backup")

try:
    do_something(client)
except (
    client.exceptions.AlreadyExistsException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.DependencyFailureException,
    client.exceptions.InvalidParameterValueException,
    client.exceptions.InvalidRequestException,
    client.exceptions.InvalidResourceStateException,
    client.exceptions.LimitExceededException,
    client.exceptions.MissingParameterValueException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceUnavailableException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_backup.client import Exceptions

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

Methods#

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

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

This action removes the specified legal hold on a recovery point.

Type annotations and code completion for boto3.client("backup").cancel_legal_hold method. boto3 documentation

# cancel_legal_hold method definition

def cancel_legal_hold(
    self,
    *,
    LegalHoldId: str,
    CancelDescription: str,
    RetainRecordInDays: int = ...,
) -> Dict[str, Any]:
    ...
# cancel_legal_hold method usage example with argument unpacking

kwargs: CancelLegalHoldInputRequestTypeDef = {  # (1)
    "LegalHoldId": ...,
    "CancelDescription": ...,
}

parent.cancel_legal_hold(**kwargs)
  1. See CancelLegalHoldInputRequestTypeDef

close#

Closes underlying endpoint connections.

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

# close method definition

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

create_backup_plan#

Creates a backup plan using a backup plan name and backup rules.

Type annotations and code completion for boto3.client("backup").create_backup_plan method. boto3 documentation

# create_backup_plan method definition

def create_backup_plan(
    self,
    *,
    BackupPlan: BackupPlanInputTypeDef,  # (1)
    BackupPlanTags: Mapping[str, str] = ...,
    CreatorRequestId: str = ...,
) -> CreateBackupPlanOutputTypeDef:  # (2)
    ...
  1. See BackupPlanInputTypeDef
  2. See CreateBackupPlanOutputTypeDef
# create_backup_plan method usage example with argument unpacking

kwargs: CreateBackupPlanInputRequestTypeDef = {  # (1)
    "BackupPlan": ...,
}

parent.create_backup_plan(**kwargs)
  1. See CreateBackupPlanInputRequestTypeDef

create_backup_selection#

Creates a JSON document that specifies a set of resources to assign to a backup plan.

Type annotations and code completion for boto3.client("backup").create_backup_selection method. boto3 documentation

# create_backup_selection method definition

def create_backup_selection(
    self,
    *,
    BackupPlanId: str,
    BackupSelection: Union[BackupSelectionTypeDef, BackupSelectionOutputTypeDef],  # (1)
    CreatorRequestId: str = ...,
) -> CreateBackupSelectionOutputTypeDef:  # (2)
    ...
  1. See BackupSelectionTypeDef BackupSelectionOutputTypeDef
  2. See CreateBackupSelectionOutputTypeDef
# create_backup_selection method usage example with argument unpacking

kwargs: CreateBackupSelectionInputRequestTypeDef = {  # (1)
    "BackupPlanId": ...,
    "BackupSelection": ...,
}

parent.create_backup_selection(**kwargs)
  1. See CreateBackupSelectionInputRequestTypeDef

create_backup_vault#

Creates a logical container where backups are stored.

Type annotations and code completion for boto3.client("backup").create_backup_vault method. boto3 documentation

# create_backup_vault method definition

def create_backup_vault(
    self,
    *,
    BackupVaultName: str,
    BackupVaultTags: Mapping[str, str] = ...,
    EncryptionKeyArn: str = ...,
    CreatorRequestId: str = ...,
) -> CreateBackupVaultOutputTypeDef:  # (1)
    ...
  1. See CreateBackupVaultOutputTypeDef
# create_backup_vault method usage example with argument unpacking

kwargs: CreateBackupVaultInputRequestTypeDef = {  # (1)
    "BackupVaultName": ...,
}

parent.create_backup_vault(**kwargs)
  1. See CreateBackupVaultInputRequestTypeDef

create_framework#

Creates a framework with one or more controls.

Type annotations and code completion for boto3.client("backup").create_framework method. boto3 documentation

# create_framework method definition

def create_framework(
    self,
    *,
    FrameworkName: str,
    FrameworkControls: Sequence[Union[FrameworkControlTypeDef, FrameworkControlOutputTypeDef]],  # (1)
    FrameworkDescription: str = ...,
    IdempotencyToken: str = ...,
    FrameworkTags: Mapping[str, str] = ...,
) -> CreateFrameworkOutputTypeDef:  # (2)
    ...
  1. See FrameworkControlTypeDef FrameworkControlOutputTypeDef