Skip to content

create_backup_access_point async

create_backup_access_point(
    name: AccessPointName,
    recovery_point_arn: RecoveryPointArn,
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    access_point_metadata: Optional[AccessPointMetadataMap] = None,
    access_point_policy: Optional[AccessPointPolicy] = None,
    tags: Optional[TagMap] = None,
) -> CreateBackupAccessPointResponse

Creates a backup access point for an Amazon S3 recovery point. A backup access point provides on-demand, read-only access to the backup data in a recovery point through an Amazon S3 access point, without initiating a restore.

While a backup access point is active for a recovery point, Backup pauses lifecycle transitions and blocks deletion of that recovery point.

Parameters:

  • access_point_metadata (Optional[AccessPointMetadataMap], default: None ) –

    Metadata for the backup access point. For continuous (point-in-time) recovery points, you must include an AccessPointInTime timestamp (in format 2021-11-27T03:30:27Z). The access point provides access to the content present in the backup at that specific time. You can specify any time within the continuous backup's retention period, up to the latest restorable time. For snapshot recovery points, do not include AccessPointInTime.

  • access_point_policy (Optional[AccessPointPolicy], default: None ) –

    An optional resource-based policy, in JSON format, to apply to the underlying Amazon S3 access point. The policy controls how backup data can be accessed through the access point. If you do not specify a policy, access is governed by the caller's IAM permissions. For more information, see Configuring IAM policies for using access points in the Amazon S3 User Guide.

  • name (AccessPointName) –

    The name of the backup access point. This name is shared with the Amazon S3 access point namespace. It must be unique within your account and Region and cannot conflict with an existing Amazon S3 access point. For more information about access point naming, see Access points naming rules, restrictions, and limitations in the Amazon S3 User Guide.

  • recovery_point_arn (RecoveryPointArn) –

    The Amazon Resource Name (ARN) of the recovery point for which to create the backup access point. The recovery point must be an Amazon S3 recovery point in the AVAILABLE, STOPPED, or COMPLETED state.

  • tags (Optional[TagMap], default: None ) –

    The tags to assign to the backup access point.

Raises:

Source code in docs_src/capo_backup/_services/async_backup.py
async def create_backup_access_point(
    self,
    name: "capo_backup.types.access_point_name.AccessPointName",
    recovery_point_arn: "capo_backup.types.recovery_point_arn.RecoveryPointArn",
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    access_point_metadata: Optional[
        "capo_backup.types.access_point_metadata_map.AccessPointMetadataMap"
    ] = None,
    access_point_policy: Optional[
        "capo_backup.types.access_point_policy.AccessPointPolicy"
    ] = None,
    tags: Optional["capo_backup.types.tag_map.TagMap"] = None,
) -> "capo_backup.types.create_backup_access_point_response.CreateBackupAccessPointResponse":
    """<p>Creates a backup access point for an Amazon S3 recovery point. A backup access point provides on-demand, read-only access to the backup data in a recovery point through an Amazon S3 access point, without initiating a restore.</p> <p>While a backup access point is active for a recovery point, Backup pauses lifecycle transitions and blocks deletion of that recovery point.</p>

    Args:
        access_point_metadata: <p>Metadata for the backup access point. For continuous (point-in-time) recovery points, you must include an <code>AccessPointInTime</code> timestamp (in format <code>2021-11-27T03:30:27Z</code>). The access point provides access to the content present in the backup at that specific time. You can specify any time within the continuous backup's retention period, up to the latest restorable time. For snapshot recovery points, do not include <code>AccessPointInTime</code>.</p>
        access_point_policy: <p>An optional resource-based policy, in JSON format, to apply to the underlying Amazon S3 access point. The policy controls how backup data can be accessed through the access point. If you do not specify a policy, access is governed by the caller's IAM permissions. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-policies.html">Configuring IAM policies for using access points</a> in the <i>Amazon S3 User Guide</i>.</p>
        name: <p>The name of the backup access point. This name is shared with the Amazon S3 access point namespace. It must be unique within your account and Region and cannot conflict with an existing Amazon S3 access point. For more information about access point naming, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points-restrictions-limitations-naming-rules.html">Access points naming rules, restrictions, and limitations</a> in the <i>Amazon S3 User Guide</i>.</p>
        recovery_point_arn: <p>The Amazon Resource Name (ARN) of the recovery point for which to create the backup access point. The recovery point must be an Amazon S3 recovery point in the <code>AVAILABLE</code>, <code>STOPPED</code>, or <code>COMPLETED</code> state.</p>
        tags: <p>The tags to assign to the backup access point.</p>

    Raises:
        capo_backup.errors.already_exists_exception.AlreadyExistsException: <p>The required resource already exists.</p>
        capo_backup.errors.conflict_exception.ConflictException: <p>Backup can't perform the action that you requested until it finishes performing a previous action. Try again later.</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_backup_access_point_request.CreateBackupAccessPointRequest]",
    ) -> AsyncOperationResponse[
        "capo_backup.types.create_backup_access_point_response.CreateBackupAccessPointResponse"
    ]:
        import capo_backup._operations.cryo_controller_user_manager.create_backup_access_point

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

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

        return (
            capo_backup.types.create_backup_access_point_request.redact_sensitive(
                input_
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateBackupAccessPoint", redact_input=_redact_input),
    )
    input_: capo_backup.types.create_backup_access_point_request.CreateBackupAccessPointRequest = {
        "name": name,
        "recovery_point_arn": recovery_point_arn,
    }
    if access_point_metadata is not None:
        input_["access_point_metadata"] = access_point_metadata
    if access_point_policy is not None:
        input_["access_point_policy"] = access_point_policy
    if tags is not None:
        input_["tags"] = tags

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