CreateLocationFsxOpenZfsCommand

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.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { DataSyncClient, CreateLocationFsxOpenZfsCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, CreateLocationFsxOpenZfsCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // CreateLocationFsxOpenZfsRequest
  FsxFilesystemArn: "STRING_VALUE", // required
  Protocol: { // FsxProtocol
    NFS: { // FsxProtocolNfs
      MountOptions: { // NfsMountOptions
        Version: "AUTOMATIC" || "NFS3" || "NFS4_0" || "NFS4_1",
      },
    },
    SMB: { // FsxProtocolSmb
      Domain: "STRING_VALUE",
      MountOptions: { // SmbMountOptions
        Version: "AUTOMATIC" || "SMB2" || "SMB3" || "SMB1" || "SMB2_0",
      },
      Password: "STRING_VALUE", // required
      User: "STRING_VALUE", // required
    },
  },
  SecurityGroupArns: [ // Ec2SecurityGroupArnList // required
    "STRING_VALUE",
  ],
  Subdirectory: "STRING_VALUE",
  Tags: [ // InputTagList
    { // TagListEntry
      Key: "STRING_VALUE", // required
      Value: "STRING_VALUE",
    },
  ],
};
const command = new CreateLocationFsxOpenZfsCommand(input);
const response = await client.send(command);
// { // CreateLocationFsxOpenZfsResponse
//   LocationArn: "STRING_VALUE",
// };

CreateLocationFsxOpenZfsCommand Input

Parameter
Type
Description
FsxFilesystemArn
Required
string | undefined

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

Protocol
Required
FsxProtocol | undefined

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

SecurityGroupArns
Required
string[] | undefined

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

Subdirectory
string | undefined

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
TagListEntry[] | undefined

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.

CreateLocationFsxOpenZfsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
LocationArn
string | undefined

The ARN of the FSx for OpenZFS file system location that you created.

Throws

Name
Fault
Details
InternalException
server

This exception is thrown when an error occurs in the DataSync service.

InvalidRequestException
client

This exception is thrown when the client submits a malformed request.

DataSyncServiceException
Base exception class for all service exceptions from DataSync service.