Skip to content

create_logically_air_gapped_backup_vault

create_logically_air_gapped_backup_vault(
    backup_vault_name: BackupVaultName,
    min_retention_days: Long,
    max_retention_days: Long,
    *,
    config_overrides: Optional[BackupClientConfig] = None,
    backup_vault_tags: Optional[Tags] = None,
    creator_request_id: Optional[string] = None,
    encryption_key_arn: Optional[ARN] = None,
) -> CreateLogicallyAirGappedBackupVaultOutput

Creates a logical container to where backups may be copied.

This request includes a name, the Region, the maximum number of retention days, the minimum number of retention days, and optionally can include tags and a creator request ID.

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

Parameters:

  • backup_vault_name (BackupVaultName) –

    The name of a logical container where backups are stored. Logically air-gapped backup vaults are identified by names that are unique to the account used to create them and the Region where they are created.

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

    The tags to assign to the vault.

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

    The ID of the creation request.

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

  • min_retention_days (Long) –

    This setting specifies the minimum retention period that the vault retains its recovery points.

    The minimum value accepted is 7 days.

  • max_retention_days (Long) –

    The maximum retention period that the vault retains its recovery points.

  • encryption_key_arn (Optional[ARN], default: None ) –

    The ARN of the customer-managed KMS key to use for encrypting the logically air-gapped backup vault. If not specified, the vault will be encrypted with an Amazon Web Services-owned key managed by Amazon Web Services Backup.

Raises:

Source code in docs_src/capo_backup/_services/backup.py
def create_logically_air_gapped_backup_vault(
    self,
    backup_vault_name: "capo_backup.types.backup_vault_name.BackupVaultName",
    min_retention_days: "capo_backup.types.long.Long",
    max_retention_days: "capo_backup.types.long.Long",
    *,
    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,
    encryption_key_arn: Optional["capo_backup.types.arn.ARN"] = None,
) -> "capo_backup.types.create_logically_air_gapped_backup_vault_output.CreateLogicallyAirGappedBackupVaultOutput":
    """<p>Creates a logical container to where backups may be copied.</p> <p>This request includes a name, the Region, the maximum number of retention days, the minimum number of retention days, and optionally can include tags and a creator request ID.</p> <note> <p>Do not include sensitive data, such as passport numbers, in the name of a backup vault.</p> </note>

    Args:
        backup_vault_name: <p>The name of a logical container where backups are stored. Logically air-gapped backup vaults are identified by names that are unique to the account used to create them and the Region where they are created.</p>
        backup_vault_tags: <p>The tags to assign to the vault.</p>
        creator_request_id: <p>The ID of the creation request.</p> <p>This parameter is optional. If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters.</p>
        min_retention_days: <p>This setting specifies the minimum retention period that the vault retains its recovery points.</p> <p>The minimum value accepted is 7 days.</p>
        max_retention_days: <p>The maximum retention period that the vault retains its recovery points.</p>
        encryption_key_arn: <p>The ARN of the customer-managed KMS key to use for encrypting the logically air-gapped backup vault. If not specified, the vault will be encrypted with an Amazon Web Services-owned key managed by Amazon Web Services Backup.</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.invalid_request_exception.InvalidRequestException: <p>Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong type.</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.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_logically_air_gapped_backup_vault_input.CreateLogicallyAirGappedBackupVaultInput]",
    ) -> OperationResponse[
        "capo_backup.types.create_logically_air_gapped_backup_vault_output.CreateLogicallyAirGappedBackupVaultOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.create_logically_air_gapped_backup_vault

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

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

        return capo_backup.types.create_logically_air_gapped_backup_vault_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateLogicallyAirGappedBackupVault", redact_input=_redact_input
        ),
    )
    input_: capo_backup.types.create_logically_air_gapped_backup_vault_input.CreateLogicallyAirGappedBackupVaultInput = {
        "backup_vault_name": backup_vault_name,
        "min_retention_days": min_retention_days,
        "max_retention_days": max_retention_days,
    }
    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
    if encryption_key_arn is not None:
        input_["encryption_key_arn"] = encryption_key_arn

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