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
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.
client = boto3.client("backup")
try:
do_something(client)
except (
client.AlreadyExistsException,
client.ClientError,
client.ConflictException,
client.DependencyFailureException,
client.InvalidParameterValueException,
client.InvalidRequestException,
client.InvalidResourceStateException,
client.LimitExceededException,
client.MissingParameterValueException,
client.ResourceNotFoundException,
client.ServiceUnavailableException,
) as e:
print(e)
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
cancel_legal_hold
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
def cancel_legal_hold(
self,
*,
LegalHoldId: str,
CancelDescription: str,
RetainRecordInDays: int = ...,
) -> Dict[str, Any]:
...
kwargs: CancelLegalHoldInputRequestTypeDef = { # (1)
"LegalHoldId": ...,
"CancelDescription": ...,
}
parent.cancel_legal_hold(**kwargs)
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("backup").close
method.
boto3 documentation
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
def create_backup_plan(
self,
*,
BackupPlan: BackupPlanInputTypeDef, # (1)
BackupPlanTags: Mapping[str, str] = ...,
CreatorRequestId: str = ...,
) -> CreateBackupPlanOutputTypeDef: # (2)
...
kwargs: CreateBackupPlanInputRequestTypeDef = { # (1)
"BackupPlan": ...,
}
parent.create_backup_plan(**kwargs)
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
def create_backup_selection(
self,
*,
BackupPlanId: str,
BackupSelection: BackupSelectionTypeDef, # (1)
CreatorRequestId: str = ...,
) -> CreateBackupSelectionOutputTypeDef: # (2)
...
kwargs: CreateBackupSelectionInputRequestTypeDef = { # (1)
"BackupPlanId": ...,
"BackupSelection": ...,
}
parent.create_backup_selection(**kwargs)
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
def create_backup_vault(
self,
*,
BackupVaultName: str,
BackupVaultTags: Mapping[str, str] = ...,
EncryptionKeyArn: str = ...,
CreatorRequestId: str = ...,
) -> CreateBackupVaultOutputTypeDef: # (1)
...
kwargs: CreateBackupVaultInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
}
parent.create_backup_vault(**kwargs)
create_framework
Creates a framework with one or more controls.
Type annotations and code completion for boto3.client("backup").create_framework
method.
boto3 documentation
def create_framework(
self,
*,
FrameworkName: str,
FrameworkControls: Sequence[FrameworkControlTypeDef], # (1)
FrameworkDescription: str = ...,
IdempotencyToken: str = ...,
FrameworkTags: Mapping[str, str] = ...,
) -> CreateFrameworkOutputTypeDef: # (2)
...
kwargs: CreateFrameworkInputRequestTypeDef = { # (1)
"FrameworkName": ...,
"FrameworkControls": ...,
}
parent.create_framework(**kwargs)
create_legal_hold
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
def create_legal_hold(
self,
*,
Title: str,
Description: str,
IdempotencyToken: str = ...,
RecoveryPointSelection: RecoveryPointSelectionTypeDef = ..., # (1)
Tags: Mapping[str, str] = ...,
) -> CreateLegalHoldOutputTypeDef: # (2)
...
kwargs: CreateLegalHoldInputRequestTypeDef = { # (1)
"Title": ...,
"Description": ...,
}
parent.create_legal_hold(**kwargs)
create_report_plan
Creates a report plan.
Type annotations and code completion for boto3.client("backup").create_report_plan
method.
boto3 documentation
def create_report_plan(
self,
*,
ReportPlanName: str,
ReportDeliveryChannel: ReportDeliveryChannelTypeDef, # (1)
ReportSetting: ReportSettingTypeDef, # (2)
ReportPlanDescription: str = ...,
ReportPlanTags: Mapping[str, str] = ...,
IdempotencyToken: str = ...,
) -> CreateReportPlanOutputTypeDef: # (3)
...
kwargs: CreateReportPlanInputRequestTypeDef = { # (1)
"ReportPlanName": ...,
"ReportDeliveryChannel": ...,
"ReportSetting": ...,
}
parent.create_report_plan(**kwargs)
delete_backup_plan
Deletes a backup plan.
Type annotations and code completion for boto3.client("backup").delete_backup_plan
method.
boto3 documentation
def delete_backup_plan(
self,
*,
BackupPlanId: str,
) -> DeleteBackupPlanOutputTypeDef: # (1)
...
kwargs: DeleteBackupPlanInputRequestTypeDef = { # (1)
"BackupPlanId": ...,
}
parent.delete_backup_plan(**kwargs)
delete_backup_selection
Deletes the resource selection associated with a backup plan that is specified
by the SelectionId
.
Type annotations and code completion for boto3.client("backup").delete_backup_selection
method.
boto3 documentation
def delete_backup_selection(
self,
*,
BackupPlanId: str,
SelectionId: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteBackupSelectionInputRequestTypeDef = { # (1)
"BackupPlanId": ...,
"SelectionId": ...,
}
parent.delete_backup_selection(**kwargs)
delete_backup_vault
Deletes the backup vault identified by its name.
Type annotations and code completion for boto3.client("backup").delete_backup_vault
method.
boto3 documentation
def delete_backup_vault(
self,
*,
BackupVaultName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteBackupVaultInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
}
parent.delete_backup_vault(**kwargs)
delete_backup_vault_access_policy
Deletes the policy document that manages permissions on a backup vault.
Type annotations and code completion for boto3.client("backup").delete_backup_vault_access_policy
method.
boto3 documentation
def delete_backup_vault_access_policy(
self,
*,
BackupVaultName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteBackupVaultAccessPolicyInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
}
parent.delete_backup_vault_access_policy(**kwargs)
delete_backup_vault_lock_configuration
Deletes Backup Vault Lock from a backup vault specified by a backup vault name.
Type annotations and code completion for boto3.client("backup").delete_backup_vault_lock_configuration
method.
boto3 documentation
def delete_backup_vault_lock_configuration(
self,
*,
BackupVaultName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteBackupVaultLockConfigurationInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
}
parent.delete_backup_vault_lock_configuration(**kwargs)
delete_backup_vault_notifications
Deletes event notifications for the specified backup vault.
Type annotations and code completion for boto3.client("backup").delete_backup_vault_notifications
method.
boto3 documentation
def delete_backup_vault_notifications(
self,
*,
BackupVaultName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteBackupVaultNotificationsInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
}
parent.delete_backup_vault_notifications(**kwargs)
delete_framework
Deletes the framework specified by a framework name.
Type annotations and code completion for boto3.client("backup").delete_framework
method.
boto3 documentation
def delete_framework(
self,
*,
FrameworkName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteFrameworkInputRequestTypeDef = { # (1)
"FrameworkName": ...,
}
parent.delete_framework(**kwargs)
delete_recovery_point
Deletes the recovery point specified by a recovery point ID.
Type annotations and code completion for boto3.client("backup").delete_recovery_point
method.
boto3 documentation
def delete_recovery_point(
self,
*,
BackupVaultName: str,
RecoveryPointArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteRecoveryPointInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
"RecoveryPointArn": ...,
}
parent.delete_recovery_point(**kwargs)
delete_report_plan
Deletes the report plan specified by a report plan name.
Type annotations and code completion for boto3.client("backup").delete_report_plan
method.
boto3 documentation
def delete_report_plan(
self,
*,
ReportPlanName: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DeleteReportPlanInputRequestTypeDef = { # (1)
"ReportPlanName": ...,
}
parent.delete_report_plan(**kwargs)
describe_backup_job
Returns backup job details for the specified BackupJobId
.
Type annotations and code completion for boto3.client("backup").describe_backup_job
method.
boto3 documentation
def describe_backup_job(
self,
*,
BackupJobId: str,
) -> DescribeBackupJobOutputTypeDef: # (1)
...
kwargs: DescribeBackupJobInputRequestTypeDef = { # (1)
"BackupJobId": ...,
}
parent.describe_backup_job(**kwargs)
describe_backup_vault
Returns metadata about a backup vault specified by its name.
Type annotations and code completion for boto3.client("backup").describe_backup_vault
method.
boto3 documentation
def describe_backup_vault(
self,
*,
BackupVaultName: str,
) -> DescribeBackupVaultOutputTypeDef: # (1)
...
kwargs: DescribeBackupVaultInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
}
parent.describe_backup_vault(**kwargs)
describe_copy_job
Returns metadata associated with creating a copy of a resource.
Type annotations and code completion for boto3.client("backup").describe_copy_job
method.
boto3 documentation
def describe_copy_job(
self,
*,
CopyJobId: str,
) -> DescribeCopyJobOutputTypeDef: # (1)
...
kwargs: DescribeCopyJobInputRequestTypeDef = { # (1)
"CopyJobId": ...,
}
parent.describe_copy_job(**kwargs)
describe_framework
Returns the framework details for the specified FrameworkName
.
Type annotations and code completion for boto3.client("backup").describe_framework
method.
boto3 documentation
def describe_framework(
self,
*,
FrameworkName: str,
) -> DescribeFrameworkOutputTypeDef: # (1)
...
kwargs: DescribeFrameworkInputRequestTypeDef = { # (1)
"FrameworkName": ...,
}
parent.describe_framework(**kwargs)
describe_global_settings
Describes whether the Amazon Web Services account is opted in to cross-account backup.
Type annotations and code completion for boto3.client("backup").describe_global_settings
method.
boto3 documentation
def describe_global_settings(
self,
) -> DescribeGlobalSettingsOutputTypeDef: # (1)
...
describe_protected_resource
Returns information about a saved resource, including the last time it was backed up, its Amazon Resource Name (ARN), and the Amazon Web Services service type of the saved resource.
Type annotations and code completion for boto3.client("backup").describe_protected_resource
method.
boto3 documentation
def describe_protected_resource(
self,
*,
ResourceArn: str,
) -> DescribeProtectedResourceOutputTypeDef: # (1)
...
kwargs: DescribeProtectedResourceInputRequestTypeDef = { # (1)
"ResourceArn": ...,
}
parent.describe_protected_resource(**kwargs)
describe_recovery_point
Returns metadata associated with a recovery point, including ID, status, encryption, and lifecycle.
Type annotations and code completion for boto3.client("backup").describe_recovery_point
method.
boto3 documentation
def describe_recovery_point(
self,
*,
BackupVaultName: str,
RecoveryPointArn: str,
) -> DescribeRecoveryPointOutputTypeDef: # (1)
...
kwargs: DescribeRecoveryPointInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
"RecoveryPointArn": ...,
}
parent.describe_recovery_point(**kwargs)
describe_region_settings
Returns the current service opt-in settings for the Region.
Type annotations and code completion for boto3.client("backup").describe_region_settings
method.
boto3 documentation
def describe_region_settings(
self,
) -> DescribeRegionSettingsOutputTypeDef: # (1)
...
describe_report_job
Returns the details associated with creating a report as specified by its
ReportJobId
.
Type annotations and code completion for boto3.client("backup").describe_report_job
method.
boto3 documentation
def describe_report_job(
self,
*,
ReportJobId: str,
) -> DescribeReportJobOutputTypeDef: # (1)
...
kwargs: DescribeReportJobInputRequestTypeDef = { # (1)
"ReportJobId": ...,
}
parent.describe_report_job(**kwargs)
describe_report_plan
Returns a list of all report plans for an Amazon Web Services account and Amazon Web Services Region.
Type annotations and code completion for boto3.client("backup").describe_report_plan
method.
boto3 documentation
def describe_report_plan(
self,
*,
ReportPlanName: str,
) -> DescribeReportPlanOutputTypeDef: # (1)
...
kwargs: DescribeReportPlanInputRequestTypeDef = { # (1)
"ReportPlanName": ...,
}
parent.describe_report_plan(**kwargs)
describe_restore_job
Returns metadata associated with a restore job that is specified by a job ID.
Type annotations and code completion for boto3.client("backup").describe_restore_job
method.
boto3 documentation
def describe_restore_job(
self,
*,
RestoreJobId: str,
) -> DescribeRestoreJobOutputTypeDef: # (1)
...
kwargs: DescribeRestoreJobInputRequestTypeDef = { # (1)
"RestoreJobId": ...,
}
parent.describe_restore_job(**kwargs)
disassociate_recovery_point
Deletes the specified continuous backup recovery point from Backup and releases control of that continuous backup to the source service, such as Amazon RDS.
Type annotations and code completion for boto3.client("backup").disassociate_recovery_point
method.
boto3 documentation
def disassociate_recovery_point(
self,
*,
BackupVaultName: str,
RecoveryPointArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DisassociateRecoveryPointInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
"RecoveryPointArn": ...,
}
parent.disassociate_recovery_point(**kwargs)
disassociate_recovery_point_from_parent
This action to a specific child (nested) recovery point removes the relationship between the specified recovery point and its parent (composite) recovery point.
Type annotations and code completion for boto3.client("backup").disassociate_recovery_point_from_parent
method.
boto3 documentation
def disassociate_recovery_point_from_parent(
self,
*,
BackupVaultName: str,
RecoveryPointArn: str,
) -> EmptyResponseMetadataTypeDef: # (1)
...
kwargs: DisassociateRecoveryPointFromParentInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
"RecoveryPointArn": ...,
}
parent.disassociate_recovery_point_from_parent(**kwargs)
export_backup_plan_template
Returns the backup plan that is specified by the plan ID as a backup template.
Type annotations and code completion for boto3.client("backup").export_backup_plan_template
method.
boto3 documentation
def export_backup_plan_template(
self,
*,
BackupPlanId: str,
) -> ExportBackupPlanTemplateOutputTypeDef: # (1)
...
kwargs: ExportBackupPlanTemplateInputRequestTypeDef = { # (1)
"BackupPlanId": ...,
}
parent.export_backup_plan_template(**kwargs)
generate_presigned_url
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("backup").generate_presigned_url
method.
boto3 documentation
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
get_backup_plan
Returns BackupPlan
details for the specified BackupPlanId
.
Type annotations and code completion for boto3.client("backup").get_backup_plan
method.
boto3 documentation
def get_backup_plan(
self,
*,
BackupPlanId: str,
VersionId: str = ...,
) -> GetBackupPlanOutputTypeDef: # (1)
...
kwargs: GetBackupPlanInputRequestTypeDef = { # (1)
"BackupPlanId": ...,
}
parent.get_backup_plan(**kwargs)
get_backup_plan_from_json
Returns a valid JSON document specifying a backup plan or an error.
Type annotations and code completion for boto3.client("backup").get_backup_plan_from_json
method.
boto3 documentation
def get_backup_plan_from_json(
self,
*,
BackupPlanTemplateJson: str,
) -> GetBackupPlanFromJSONOutputTypeDef: # (1)
...
kwargs: GetBackupPlanFromJSONInputRequestTypeDef = { # (1)
"BackupPlanTemplateJson": ...,
}
parent.get_backup_plan_from_json(**kwargs)
get_backup_plan_from_template
Returns the template specified by its templateId
as a backup plan.
Type annotations and code completion for boto3.client("backup").get_backup_plan_from_template
method.
boto3 documentation
def get_backup_plan_from_template(
self,
*,
BackupPlanTemplateId: str,
) -> GetBackupPlanFromTemplateOutputTypeDef: # (1)
...
kwargs: GetBackupPlanFromTemplateInputRequestTypeDef = { # (1)
"BackupPlanTemplateId": ...,
}
parent.get_backup_plan_from_template(**kwargs)
get_backup_selection
Returns selection metadata and a document in JSON format that specifies a list of resources that are associated with a backup plan.
Type annotations and code completion for boto3.client("backup").get_backup_selection
method.
boto3 documentation
def get_backup_selection(
self,
*,
BackupPlanId: str,
SelectionId: str,
) -> GetBackupSelectionOutputTypeDef: # (1)
...
kwargs: GetBackupSelectionInputRequestTypeDef = { # (1)
"BackupPlanId": ...,
"SelectionId": ...,
}
parent.get_backup_selection(**kwargs)
get_backup_vault_access_policy
Returns the access policy document that is associated with the named backup vault.
Type annotations and code completion for boto3.client("backup").get_backup_vault_access_policy
method.
boto3 documentation
def get_backup_vault_access_policy(
self,
*,
BackupVaultName: str,
) -> GetBackupVaultAccessPolicyOutputTypeDef: # (1)
...
kwargs: GetBackupVaultAccessPolicyInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
}
parent.get_backup_vault_access_policy(**kwargs)
get_backup_vault_notifications
Returns event notifications for the specified backup vault.
Type annotations and code completion for boto3.client("backup").get_backup_vault_notifications
method.
boto3 documentation
def get_backup_vault_notifications(
self,
*,
BackupVaultName: str,
) -> GetBackupVaultNotificationsOutputTypeDef: # (1)
...
kwargs: GetBackupVaultNotificationsInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
}
parent.get_backup_vault_notifications(**kwargs)
get_legal_hold
This action returns details for a specified legal hold.
Type annotations and code completion for boto3.client("backup").get_legal_hold
method.
boto3 documentation
def get_legal_hold(
self,
*,
LegalHoldId: str,
) -> GetLegalHoldOutputTypeDef: # (1)
...
kwargs: GetLegalHoldInputRequestTypeDef = { # (1)
"LegalHoldId": ...,
}
parent.get_legal_hold(**kwargs)
get_recovery_point_restore_metadata
Returns a set of metadata key-value pairs that were used to create the backup.
Type annotations and code completion for boto3.client("backup").get_recovery_point_restore_metadata
method.
boto3 documentation
def get_recovery_point_restore_metadata(
self,
*,
BackupVaultName: str,
RecoveryPointArn: str,
) -> GetRecoveryPointRestoreMetadataOutputTypeDef: # (1)
...
kwargs: GetRecoveryPointRestoreMetadataInputRequestTypeDef = { # (1)
"BackupVaultName": ...,
"RecoveryPointArn": ...,
}
parent.get_recovery_point_restore_metadata(**kwargs)
get_supported_resource_types
Returns the Amazon Web Services resource types supported by Backup.
Type annotations and code completion for boto3.client("backup").get_supported_resource_types
method.
boto3 documentation
def get_supported_resource_types(
self,
) -> GetSupportedResourceTypesOutputTypeDef: # (1)
...
list_backup_jobs
Returns a list of existing backup jobs for an authenticated account for the last 30 days.
Type annotations and code completion for boto3.client("backup").list_backup_jobs
method.
boto3 documentation
def list_backup_jobs(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
ByResourceArn: str = ...,
ByState: BackupJobStateType = ..., # (1)
ByBackupVaultName: str = ...,
ByCreatedBefore: Union[datetime, str] = ...,
ByCreatedAfter: Union[datetime, str] = ...,
ByResourceType: str = ...,
ByAccountId: str = ...,
ByCompleteAfter: Union[datetime, str] = ...,
ByCompleteBefore: Union[datetime, str] = ...,
ByParentJobId: str = ...,
) -> ListBackupJobsOutputTypeDef: # (2)
...
kwargs: ListBackupJobsInputRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_backup_jobs(**kwargs)
list_backup_plan_templates
Returns metadata of your saved backup plan templates, including the template ID, name, and the creation and deletion dates.
Type annotations and code completion for boto3.client("backup").list_backup_plan_templates
method.
boto3 documentation
def list_backup_plan_templates(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListBackupPlanTemplatesOutputTypeDef: # (1)
...
kwargs: ListBackupPlanTemplatesInputRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_backup_plan_templates(**kwargs)
list_backup_plan_versions
Returns version metadata of your backup plans, including Amazon Resource Names (ARNs), backup plan IDs, creation and deletion dates, plan names, and version IDs.
Type annotations and code completion for boto3.client("backup").list_backup_plan_versions
method.
boto3 documentation
def list_backup_plan_versions(
self,
*,
BackupPlanId: str,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListBackupPlanVersionsOutputTypeDef: # (1)
...
kwargs: ListBackupPlanVersionsInputRequestTypeDef = { # (1)
"BackupPlanId": ...,
}
parent.list_backup_plan_versions(**kwargs)
list_backup_plans
Returns a list of all active backup plans for an authenticated account.
Type annotations and code completion for boto3.client("backup").list_backup_plans
method.
boto3 documentation
def list_backup_plans(
self,
*,
NextToken: str = ...,
MaxResults: int = ...,
IncludeDeleted: bool = ...,
) -> ListBackupPlansOutputTypeDef: # (1)
...
kwargs: ListBackupPlansInputRequestTypeDef = { # (1)
"NextToken": ...,
}
parent.list_backup_plans(**kwargs)
list_backup_selections
Returns an array containing metadata of the resources associated with the target backup plan.
Type annotations and code completion for boto3.client("backup").list_backup_selections
method.
boto3 documentation
def list_backup_selections(
self,
*,
BackupPlanId: str,
NextToken: str = ...,
MaxResults: int = ...,
) -> ListBackupSelectionsOutputTypeDef: # (1)
...
kwargs: ListBackupSelectionsInputRequestTypeDef = { # (1)
"BackupPlanId": ...,
}
parent.list_backup_selections(**kwargs)
list_backup_vaults
Returns a list of recovery point storage containers along with information about them.
Type annotations and code completion for boto3.client("backup").list_backup_vaults
method.
boto3 documentation