AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Creates a user and associates them with an existing file transfer protocol-enabled server. You can only create and associate users with servers that have the IdentityProviderType set to SERVICE_MANAGED. Using parameters for CreateUser, you can specify the user name, set the home directory, store the user's public key, and assign the user's Identity and Access Management (IAM) role. You can also optionally add a session policy, and assign metadata with tags that can be used to group and search for users.

Note:

This is an asynchronous operation using the standard naming convention for .NET 4.5 or higher. For .NET 3.5 the operation is implemented as a pair of methods using the standard naming convention of BeginCreateUser and EndCreateUser.

Namespace: Amazon.Transfer
Assembly: AWSSDK.Transfer.dll
Version: 3.x.y.z

Syntax

C#
public virtual Task<CreateUserResponse> CreateUserAsync(
         CreateUserRequest request,
         CancellationToken cancellationToken
)

Parameters

request
Type: Amazon.Transfer.Model.CreateUserRequest

Container for the necessary parameters to execute the CreateUser service method.

cancellationToken
Type: System.Threading.CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value


The response from the CreateUser service method, as returned by Transfer.

Exceptions

ExceptionCondition
InternalServiceErrorException This exception is thrown when an error occurs in the Transfer Family service.
InvalidRequestException This exception is thrown when the client submits a malformed request.
ResourceExistsException The requested resource does not exist, or exists in a region other than the one specified for the command.
ResourceNotFoundException This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.
ServiceUnavailableException The request has failed because the Amazon Web ServicesTransfer Family service is not available.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer

See Also