Skip to content

create_restore_access_backup_vault async

create_restore_access_backup_vault(
    source_backup_vault_arn: ARN,
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    backup_vault_name: Optional[BackupVaultName] = None,
    backup_vault_tags: Optional[Tags] = None,
    creator_request_id: Optional[string] = None,
    requester_comment: Optional[RequesterComment] = None,
) -> CreateRestoreAccessBackupVaultOutput

Creates a restore access backup vault that provides temporary access to recovery points in a logically air-gapped backup vault, subject to MPA approval.

Parameters:

  • source_backup_vault_arn (ARN) –

    The ARN of the source backup vault containing the recovery points to which temporary access is requested.

  • backup_vault_name (Optional[BackupVaultName], default: None ) –

    The name of the backup vault to associate with an MPA approval team.

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

    Optional tags to assign to the restore access backup vault.

  • 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 executing the operation twice.

  • requester_comment (Optional[RequesterComment], default: None ) –

    A comment explaining the reason for requesting restore access to the backup vault.

Raises:

Source code in docs_src/capo_backup/_services/async_backup.py
async def create_restore_access_backup_vault(
    self,
    source_backup_vault_arn: "capo_backup.types.arn.ARN",
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    backup_vault_name: Optional[
        "capo_backup.types.backup_vault_name.BackupVaultName"
    ] = None,
    backup_vault_tags: Optional["capo_backup.types.tags.Tags"] = None,
    creator_request_id: Optional["capo_backup.types.string.string"] = None,
    requester_comment: Optional[
        "capo_backup.types.requester_comment.RequesterComment"
    ] = None,
) -> "capo_backup.types.create_restore_access_backup_vault_output.CreateRestoreAccessBackupVaultOutput":
    """<p>Creates a restore access backup vault that provides temporary access to recovery points in a logically air-gapped backup vault, subject to MPA approval.</p>

    Args:
        source_backup_vault_arn: <p>The ARN of the source backup vault containing the recovery points to which temporary access is requested.</p>
        backup_vault_name: <p>The name of the backup vault to associate with an MPA approval team.</p>
        backup_vault_tags: <p>Optional tags to assign to the restore access backup vault.</p>
        creator_request_id: <p>A unique string that identifies the request and allows failed requests to be retried without the risk of executing the operation twice.</p>
        requester_comment: <p>A comment explaining the reason for requesting restore access to the backup vault.</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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backup.types.create_restore_access_backup_vault_input.CreateRestoreAccessBackupVaultInput]",
    ) -> AsyncOperationResponse[
        "capo_backup.types.create_restore_access_backup_vault_output.CreateRestoreAccessBackupVaultOutput"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.create_restore_access_backup_vault

        (
            output,
            http_response,
        ) = await capo_backup._operations.cryo_controller_user_manager.create_restore_access_backup_vault.async_create_restore_access_backup_vault(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

        return capo_backup.types.create_restore_access_backup_vault_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateRestoreAccessBackupVault", redact_input=_redact_input
        ),
    )
    input_: capo_backup.types.create_restore_access_backup_vault_input.CreateRestoreAccessBackupVaultInput = {
        "source_backup_vault_arn": source_backup_vault_arn
    }
    if backup_vault_name is not None:
        input_["backup_vault_name"] = backup_vault_name
    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 requester_comment is not None:
        input_["requester_comment"] = requester_comment

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output