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: BackupSelectionTypeDef,  # (1)
    CreatorRequestId: str = ...,
) -> CreateBackupSelectionOutputTypeDef:  # (2)
    ...
  1. See BackupSelectionTypeDef
  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[FrameworkControlTypeDef],  # (1)
    FrameworkDescription: str = ...,
    IdempotencyToken: str = ...,
    FrameworkTags: Mapping[str, str] = ...,
) -> CreateFrameworkOutputTypeDef:  # (2)
    ...
  1. See FrameworkControlTypeDef
  2. See CreateFrameworkOutputTypeDef
# create_framework method usage example with argument unpacking

kwargs: CreateFrameworkInputRequestTypeDef = {  # (1)
    "FrameworkName": ...,
    "FrameworkControls": ...,
}

parent.create_framework(**kwargs)
  1. See CreateFrameworkInputRequestTypeDef

This action creates a legal hold on a recovery point (backup).

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

# create_legal_hold method definition

def create_legal_hold(
    self,
    *,
    Title: str,
    Description: str,
    IdempotencyToken: str = ...,
    RecoveryPointSelection: RecoveryPointSelectionTypeDef = ...,  # (1)
    Tags: Mapping[str, str] = ...,
) -> CreateLegalHoldOutputTypeDef:  # (2)
    ...
  1. See RecoveryPointSelectionTypeDef
  2. See CreateLegalHoldOutputTypeDef
# create_legal_hold method usage example with argument unpacking

kwargs: CreateLegalHoldInputRequestTypeDef = {  # (1)
    "Title": ...,
    "Description": ...,
}

parent.create_legal_hold(**kwargs)
  1. See CreateLegalHoldInputRequestTypeDef

create_logically_air_gapped_backup_vault#

This request creates a logical container to where backups may be copied.

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

# create_logically_air_gapped_backup_vault method definition

def create_logically_air_gapped_backup_vault(
    self,
    *,
    BackupVaultName: str,
    MinRetentionDays: int,
    MaxRetentionDays: int,
    BackupVaultTags: Mapping[str, str] = ...,
    CreatorRequestId: str = ...,
) -> CreateLogicallyAirGappedBackupVaultOutputTypeDef:  # (1)
    ...
  1. See CreateLogicallyAirGappedBackupVaultOutputTypeDef
# create_logically_air_gapped_backup_vault method usage example with argument unpacking

kwargs: CreateLogicallyAirGappedBackupVaultInputRequestTypeDef = {  # (1)
    "BackupVaultName": ...,
    "MinRetentionDays": ...,
    "MaxRetentionDays": ...,
}

parent.create_logically_air_gapped_backup_vault(**kwargs)
  1. See CreateLogicallyAirGappedBackupVaultInputRequestTypeDef

create_report_plan#

Creates a report plan.

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

# create_report_plan method definition

def create_report_plan(
    self,
    *,
    ReportPlanName: str,
    ReportDeliveryChannel: ReportDeliveryChannelTypeDef,  # (1)
    ReportSetting: ReportSettingTypeDef,  # (2)
    ReportPlanDescription: str = ...,
    ReportPlanTags: Mapping[str, str] = ...,
    IdempotencyToken: str = ...,
) -> CreateReportPlanOutputTypeDef:  # (3)
    ...
  1. See ReportDeliveryChannelTypeDef
  2. See ReportSettingTypeDef
  3. See CreateReportPlanOutputTypeDef
# create_report_plan method usage example with argument unpacking

kwargs: CreateReportPlanInputRequestTypeDef = {  # (1)
    "ReportPlanName": ...,
    "ReportDeliveryChannel": ...,
    "ReportSetting": ...,
}

parent.create_report_plan(**kwargs)
  1. See CreateReportPlanInputRequestTypeDef

create_restore_testing_plan#

This is the first of two steps to create a restore testing plan; once this request is successful, finish the procedure with request CreateRestoreTestingSelection.

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

# create_restore_testing_plan method definition

def create_restore_testing_plan(
    self,
    *,
    RestoreTestingPlan: RestoreTestingPlanForCreateTypeDef,  # (1)
    CreatorRequestId: str = ...,
    Tags: Mapping[str, str] = ...,
) -> CreateRestoreTestingPlanOutputTypeDef:  # (2)
    ...
  1. See RestoreTestingPlanForCreateTypeDef
  2. See CreateRestoreTestingPlanOutputTypeDef
# create_restore_testing_plan method usage example with argument unpacking

kwargs: CreateRestoreTestingPlanInputRequestTypeDef = {  # (1)
    "RestoreTestingPlan": ...,
}

parent.create_restore_testing_plan(**kwargs)
  1. See CreateRestoreTestingPlanInputRequestTypeDef

create_restore_testing_selection#

This request can be sent after CreateRestoreTestingPlan request returns successfully.

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

# create_restore_testing_selection method definition

def create_restore_testing_selection(
    self,
    *,
    RestoreTestingPlanName: str,
    RestoreTestingSelection: RestoreTestingSelectionForCreateTypeDef,  # (1)
    CreatorRequestId: str = ...,
) -> CreateRestoreTestingSelectionOutputTypeDef:  # (2)
    ...
  1. See RestoreTestingSelectionForCreateTypeDef
  2. See CreateRestoreTestingSelectionOutputTypeDef
# create_restore_testing_selection method usage example with argument unpacking

kwargs: CreateRestoreTestingSelectionInputRequestTypeDef = {  # (1)
    "RestoreTestingPlanName": ...,
    "RestoreTestingSelection": ...,
}

parent.create_restore_testing_selection(**kwargs)
  1. See CreateRestoreTestingSelectionInputRequestTypeDef

delete_backup_plan#

Deletes a backup plan.

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