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 new user.

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.DirectoryServiceData
Assembly: AWSSDK.DirectoryServiceData.dll
Version: 3.x.y.z

Syntax

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

Parameters

request
Type: Amazon.DirectoryServiceData.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 DirectoryServiceData.

Exceptions

ExceptionCondition
AccessDeniedException You don't have permission to perform the request or access the directory. It can also occur when the DirectoryId doesn't exist or the user, member, or group might be outside of your organizational unit (OU). Make sure that you have the authentication and authorization to perform the action. Review the directory information in the request, and make sure that the object isn't outside of your OU.
ConflictException This error will occur when you try to create a resource that conflicts with an existing object. It can also occur when adding a member to a group that the member is already in. This error can be caused by a request sent within the 8-hour idempotency window with the same client token but different input parameters. Client tokens should not be re-used across different requests. After 8 hours, any request with the same client token is treated as a new request.
DirectoryUnavailableException The request could not be completed due to a problem in the configuration or current state of the specified directory.
InternalServerException The operation didn't succeed because an internal error occurred. Try again later.
ThrottlingException The limit on the number of requests per second has been exceeded.
ValidationException The request isn't valid. Review the details in the error message to update the invalid parameters or values in your request.

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