Create a new user.

Example

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

import { SftpClient, CreateUserCommand } from "@stedi/sdk-client-sftp"; // ES Modules import
// const { SftpClient, CreateUserCommand } = require("@stedi/sdk-client-sftp"); // CommonJS import
const client = new SftpClient(config);
const input = { // CreateUserInput
homeDirectory: "STRING_VALUE", // required
description: "STRING_VALUE", // required
passwordOptions: { // PasswordOptions
length: Number("int"),
},
bucketName: "STRING_VALUE",
};
const command = new CreateUserCommand(input);
const response = await client.send(command);
// { // CreateUserOutput
// username: "STRING_VALUE", // required
// password: "STRING_VALUE", // required
// homeDirectory: "STRING_VALUE", // required
// bucketName: "STRING_VALUE", // required
// description: "STRING_VALUE", // required
// endpoint: "STRING_VALUE", // required
// };

Param

CreateUserCommandInput

Returns

CreateUserCommandOutput

See

Throws

ValidationException (client fault) A standard error for input validation failures. This should be thrown by services when a member of the input structure falls outside of the modeled or documented constraints.

Throws

SftpProvisioningTimeout (server fault) Request timed out while provisioning the SFTP resource.

Throws

UnmappedException (client fault) The Stedi account has not been granted permission for this particular service.

Throws

BucketProvisioningTimeout (server fault) Request timed out while provisioning the Bucket resource.

Throws

SftpServiceException

Base exception class for all service exceptions from Sftp service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Returns EndpointParameterInstructions