Skip to content

create_location_fsx_open_zfs

create_location_fsx_open_zfs(
    fsx_filesystem_arn: FsxFilesystemArn,
    protocol: FsxProtocol,
    security_group_arns: Ec2SecurityGroupArnList,
    *,
    config_overrides: Optional[DataSyncClientConfig] = None,
    subdirectory: Optional[FsxOpenZfsSubdirectory] = None,
    tags: Optional[InputTagList] = None,
) -> CreateLocationFsxOpenZfsResponse

Creates a transfer location for an Amazon FSx for OpenZFS file system. DataSync can use this location as a source or destination for transferring data.

Before you begin, make sure that you understand how DataSync accesses FSx for OpenZFS file systems.

Request parameters related to SMB aren't supported with the CreateLocationFsxOpenZfs operation.

Parameters:

  • fsx_filesystem_arn (FsxFilesystemArn) –

    The Amazon Resource Name (ARN) of the FSx for OpenZFS file system.

  • protocol (FsxProtocol) –

    The type of protocol that DataSync uses to access your file system.

  • security_group_arns (Ec2SecurityGroupArnList) –

    The ARNs of the security groups that are used to configure the FSx for OpenZFS file system.

  • subdirectory (Optional[FsxOpenZfsSubdirectory], default: None ) –

    A subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

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

    The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.

Raises:

Source code in docs_src/capo_datasync/_services/data_sync.py
def create_location_fsx_open_zfs(
    self,
    fsx_filesystem_arn: "capo_datasync.types.fsx_filesystem_arn.FsxFilesystemArn",
    protocol: "capo_datasync.types.fsx_protocol.FsxProtocol",
    security_group_arns: "capo_datasync.types.ec2_security_group_arn_list.Ec2SecurityGroupArnList",
    *,
    config_overrides: Optional[DataSyncClientConfig] = None,
    subdirectory: Optional[
        "capo_datasync.types.fsx_open_zfs_subdirectory.FsxOpenZfsSubdirectory"
    ] = None,
    tags: Optional["capo_datasync.types.input_tag_list.InputTagList"] = None,
) -> "capo_datasync.types.create_location_fsx_open_zfs_response.CreateLocationFsxOpenZfsResponse":
    """<p>Creates a transfer <i>location</i> for an Amazon FSx for OpenZFS file system. DataSync can use this location as a source or destination for transferring data.</p> <p>Before you begin, make sure that you understand how DataSync <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-openzfs-location.html#create-openzfs-access">accesses FSx for OpenZFS file systems</a>.</p> <note> <p>Request parameters related to <code>SMB</code> aren't supported with the <code>CreateLocationFsxOpenZfs</code> operation.</p> </note>

    Args:
        fsx_filesystem_arn: <p>The Amazon Resource Name (ARN) of the FSx for OpenZFS file system.</p>
        protocol: <p>The type of protocol that DataSync uses to access your file system.</p>
        security_group_arns: <p>The ARNs of the security groups that are used to configure the FSx for OpenZFS file system.</p>
        subdirectory: <p>A subdirectory in the location's path that must begin with <code>/fsx</code>. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).</p>
        tags: <p>The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.</p>

    Raises:
        capo_datasync.errors.internal_exception.InternalException: <p>This exception is thrown when an error occurs in the DataSync service.</p>
        capo_datasync.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
        capo_datasync.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datasync.types.create_location_fsx_open_zfs_request.CreateLocationFsxOpenZfsRequest]",
    ) -> OperationResponse[
        "capo_datasync.types.create_location_fsx_open_zfs_response.CreateLocationFsxOpenZfsResponse"
    ]:
        import capo_datasync._operations.fmrs_service.create_location_fsx_open_zfs

        output, http_response = (
            capo_datasync._operations.fmrs_service.create_location_fsx_open_zfs.create_location_fsx_open_zfs(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_datasync.types.create_location_fsx_open_zfs_request.CreateLocationFsxOpenZfsRequest",
    ) -> dict[str, Any]:
        import capo_datasync.types.create_location_fsx_open_zfs_request

        return capo_datasync.types.create_location_fsx_open_zfs_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateLocationFsxOpenZfs", redact_input=_redact_input),
    )
    input_: capo_datasync.types.create_location_fsx_open_zfs_request.CreateLocationFsxOpenZfsRequest = {
        "fsx_filesystem_arn": fsx_filesystem_arn,
        "protocol": protocol,
        "security_group_arns": security_group_arns,
    }
    if subdirectory is not None:
        input_["subdirectory"] = subdirectory
    if tags is not None:
        input_["tags"] = tags

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