Skip to content

create_local_backup_vault

create_local_backup_vault(
    appliance_arn: string,
    backup_vault_name: BackupVaultName,
    encryption_key_arn: ARN,
    *,
    config_overrides: Optional[BackupClientConfig] = None,
    backup_vault_tags: Optional[Tags] = None,
    creator_request_id: Optional[string] = None,
) -> CreateLocalBackupVaultOutput

Creates a local backup vault for a backup appliance. A local backup vault represents, in the Amazon Web Services Cloud, the backup storage on a backup appliance that runs in your own environment. Recovery points in a local backup vault are stored on the appliance.

Resources that you register with a backup appliance always back up to the appliance's local backup vault. To store those recovery points in the Amazon Web Services Cloud, copy them to a backup vault or a logically air-gapped backup vault.

Each backup appliance can have one local backup vault. A local backup vault must be encrypted with a customer managed KMS key, and you can't change the key after you create the vault.

Do not include sensitive data, such as passport numbers, in the name of a backup vault.

Parameters:

  • appliance_arn (string) –

    The Amazon Resource Name (ARN) of the backup appliance to associate with the local backup vault. The appliance must be activated and exist in the same account and Region. You cannot create a local backup vault for an appliance that is pending activation or being deleted.

  • backup_vault_name (BackupVaultName) –

    The name of the local backup vault. The local backup vault represents, in the Amazon Web Services Cloud, the backup storage on the backup appliance. Recovery points in a local backup vault are stored on the appliance, not in the Amazon Web Services Cloud. Backup vault names are unique to the account used to create them and the Amazon Web Services Region where they are created. They consist of letters, numbers, and hyphens.

  • backup_vault_tags (Optional[Tags], default: None ) –

    The tags to assign to the local backup vault.

  • encryption_key_arn (ARN) –

    The ARN of the customer managed KMS key that is used to encrypt backups in the local backup vault; for example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.

    A local backup vault can't use an Amazon Web Services owned key. You can't change the key after the vault is created.

  • creator_request_id (Optional[string], default: None ) –

    A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. This parameter is optional.

    If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.

Raises:

Source code in docs_src/capo_backup/_services/backup.py
def create_local_backup_vault(
    self,
    appliance_arn: "capo_backup.types.string.string",
    backup_vault_name: "capo_backup.types.backup_vault_name.BackupVaultName",
    encryption_key_arn: "capo_backup.types.arn.ARN",
    *,
    config_overrides: Optional[BackupClientConfig] = None,
    backup_vault_tags: Optional["capo_backup.types.tags.Tags"] = None,
    creator_request_id: Optional["capo_backup.types.string.string"] = None,
) -> "capo_backup.types.create_local_backup_vault_output.CreateLocalBackupVaultOutput":
    """<p>Creates a local backup vault for a backup appliance. A local backup vault represents, in the Amazon Web Services Cloud, the backup storage on a backup appliance that runs in your own environment. Recovery points in a local backup vault are stored on the appliance.</p> <p>Resources that you register with a backup appliance always back up to the appliance's local backup vault. To store those recovery points in the Amazon Web Services Cloud, copy them to a backup vault or a logically air-gapped backup vault.</p> <p>Each backup appliance can have one local backup vault. A local backup vault must be encrypted with a customer managed KMS key, and you can't change the key after you create the vault.</p> <note> <p>Do not include sensitive data, such as passport numbers, in the name of a backup vault.</p> </note>

    Args:
        appliance_arn: <p>The Amazon Resource Name (ARN) of the backup appliance to associate with the local backup vault. The appliance must be activated and exist in the same account and Region. You cannot create a local backup vault for an appliance that is pending activation or being deleted.</p>
        backup_vault_name: <p>The name of the local backup vault. The local backup vault represents, in the Amazon Web Services Cloud, the backup storage on the backup appliance. Recovery points in a local backup vault are stored on the appliance, not in the Amazon Web Services Cloud. Backup vault names are unique to the account used to create them and the Amazon Web Services Region where they are created. They consist of letters, numbers, and hyphens.</p>
        backup_vault_tags: <p>The tags to assign to the local backup vault.</p>
        encryption_key_arn: <p>The ARN of the customer managed KMS key that is used to encrypt backups in the local backup vault; for example, <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p> <p>A local backup vault can't use an Amazon Web Services owned key. You can't change the key after the vault is created.</p>
        creator_request_id: <p>A unique string that identifies the request and allows failed requests to be retried without the risk of running the operation twice. This parameter is optional.</p> <p>If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.</p>

    Raises:
        capo_backup.errors.already_exists_exception.AlreadyExistsException: <p>The required resource already exists.</p>
        capo_backup.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
        capo_backup.errors.limit_exceeded_exception.LimitExceededException: <p>A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.</p>
        capo_backup.errors.missing_parameter_value_exception.MissingParameterValueException: <p>Indicates that a required parameter is missing.</p>
        capo_backup.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource that is required for the action doesn't exist.</p>
        capo_backup.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request failed due to a temporary failure of the server.</p>
        capo_backup.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_backup.types.create_local_backup_vault_input.CreateLocalBackupVaultInput]",
    ) -> OperationResponse[
        "capo_backup.types.create_local_backup_vault_output.CreateLocalBackupVaultOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.create_local_backup_vault

        output, http_response = (
            capo_backup._operations.cryo_controller_user_manager.create_local_backup_vault.create_local_backup_vault(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_backup.types.create_local_backup_vault_input.CreateLocalBackupVaultInput",
    ) -> dict[str, Any]:
        import capo_backup.types.create_local_backup_vault_input

        return capo_backup.types.create_local_backup_vault_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateLocalBackupVault", redact_input=_redact_input),
    )
    input_: capo_backup.types.create_local_backup_vault_input.CreateLocalBackupVaultInput = {
        "appliance_arn": appliance_arn,
        "backup_vault_name": backup_vault_name,
        "encryption_key_arn": encryption_key_arn,
    }
    if backup_vault_tags is not None:
        input_["backup_vault_tags"] = backup_vault_tags
    if creator_request_id is None:
        creator_request_id = str(uuid.uuid4())
    input_["creator_request_id"] = creator_request_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output