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.

Implementation for accessing DirectoryService AWS Directory Service

AWS Directory Service is a web service that makes it easy for you to setup and run directories in the AWS cloud, or connect your AWS resources with an existing on-premises Microsoft Active Directory. This guide provides detailed information about AWS Directory Service operations, data types, parameters, and errors. For information about AWS Directory Services features, see AWS Directory Service and the AWS Directory Service Administration Guide.

AWS provides SDKs that consist of libraries and sample code for various programming languages and platforms (Java, Ruby, .Net, iOS, Android, etc.). The SDKs provide a convenient way to create programmatic access to AWS Directory Service and other AWS services. For more information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonServiceClient
    Amazon.DirectoryService.AmazonDirectoryServiceClient

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

Syntax

C#
public class AmazonDirectoryServiceClient : AmazonServiceClient
         IAmazonDirectoryService, IAmazonService, IDisposable

The AmazonDirectoryServiceClient type exposes the following members

Constructors

NameDescription
Public Method AmazonDirectoryServiceClient()

Constructs AmazonDirectoryServiceClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.



    
        
    

             

Public Method AmazonDirectoryServiceClient(RegionEndpoint)

Constructs AmazonDirectoryServiceClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.



    
        
    

             

Public Method AmazonDirectoryServiceClient(AmazonDirectoryServiceConfig)

Constructs AmazonDirectoryServiceClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.



    
        
    

             

Public Method AmazonDirectoryServiceClient(AWSCredentials)

Constructs AmazonDirectoryServiceClient with AWS Credentials

Public Method AmazonDirectoryServiceClient(AWSCredentials, RegionEndpoint)

Constructs AmazonDirectoryServiceClient with AWS Credentials

Public Method AmazonDirectoryServiceClient(AWSCredentials, AmazonDirectoryServiceConfig)

Constructs AmazonDirectoryServiceClient with AWS Credentials and an AmazonDirectoryServiceClient Configuration object.

Public Method AmazonDirectoryServiceClient(string, string)

Constructs AmazonDirectoryServiceClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonDirectoryServiceClient(string, string, RegionEndpoint)

Constructs AmazonDirectoryServiceClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonDirectoryServiceClient(string, string, AmazonDirectoryServiceConfig)

Constructs AmazonDirectoryServiceClient with AWS Access Key ID, AWS Secret Key and an AmazonDirectoryServiceClient Configuration object.

Public Method AmazonDirectoryServiceClient(string, string, string)

Constructs AmazonDirectoryServiceClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonDirectoryServiceClient(string, string, string, RegionEndpoint)

Constructs AmazonDirectoryServiceClient with AWS Access Key ID and AWS Secret Key

Public Method AmazonDirectoryServiceClient(string, string, string, AmazonDirectoryServiceConfig)

Constructs AmazonDirectoryServiceClient with AWS Access Key ID, AWS Secret Key and an AmazonDirectoryServiceClient Configuration object.

Properties

NameTypeDescription
Public Property Config Amazon.Runtime.IClientConfig Inherited from Amazon.Runtime.AmazonServiceClient.

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method AddIpRoutes(AddIpRoutesRequest)

If the DNS server for your on-premises domain uses a publicly addressable IP address, you must add a CIDR address block to correctly route traffic to and from your Microsoft AD on Amazon Web Services. AddIpRoutes adds this address block. You can also use AddIpRoutes to facilitate routing traffic that uses public IP ranges from your Microsoft AD on AWS to a peer VPC.

Before you call AddIpRoutes, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the AddIpRoutes operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

Public Method AddIpRoutesAsync(AddIpRoutesRequest, CancellationToken)

Initiates the asynchronous execution of the AddIpRoutes operation.

Public Method AddTagsToResource(AddTagsToResourceRequest)

Adds or overwrites one or more tags for the specified directory. Each directory can have a maximum of 50 tags. Each tag consists of a key and optional value. Tag keys must be unique to each resource.

Public Method AddTagsToResourceAsync(AddTagsToResourceRequest, CancellationToken)

Initiates the asynchronous execution of the AddTagsToResource operation.

Public Method CancelSchemaExtension(CancelSchemaExtensionRequest)

Cancels an in-progress schema extension to a Microsoft AD directory. Once a schema extension has started replicating to all domain controllers, the task can no longer be canceled. A schema extension can be canceled during any of the following states; Initializing, CreatingSnapshot, and UpdatingSchema.

Public Method CancelSchemaExtensionAsync(CancelSchemaExtensionRequest, CancellationToken)

Initiates the asynchronous execution of the CancelSchemaExtension operation.

Public Method ConnectDirectory(ConnectDirectoryRequest)

Creates an AD Connector to connect to an on-premises directory.

Before you call ConnectDirectory, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the ConnectDirectory operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

Public Method ConnectDirectoryAsync(ConnectDirectoryRequest, CancellationToken)

Initiates the asynchronous execution of the ConnectDirectory operation.

Public Method CreateAlias(CreateAliasRequest)

Creates an alias for a directory and assigns the alias to the directory. The alias is used to construct the access URL for the directory, such as http://.awsapps.com.

After an alias has been created, it cannot be deleted or reused, so this operation should only be used when absolutely necessary.

Public Method CreateAliasAsync(CreateAliasRequest, CancellationToken)

Initiates the asynchronous execution of the CreateAlias operation.

Public Method CreateComputer(CreateComputerRequest)

Creates a computer account in the specified directory, and joins the computer to the directory.

Public Method CreateComputerAsync(CreateComputerRequest, CancellationToken)

Initiates the asynchronous execution of the CreateComputer operation.

Public Method CreateConditionalForwarder(CreateConditionalForwarderRequest)

Creates a conditional forwarder associated with your AWS directory. Conditional forwarders are required in order to set up a trust relationship with another domain. The conditional forwarder points to the trusted domain.

Public Method CreateConditionalForwarderAsync(CreateConditionalForwarderRequest, CancellationToken)

Initiates the asynchronous execution of the CreateConditionalForwarder operation.

Public Method CreateDirectory(CreateDirectoryRequest)

Creates a Simple AD directory.

Before you call CreateDirectory, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the CreateDirectory operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

Public Method CreateDirectoryAsync(CreateDirectoryRequest, CancellationToken)

Initiates the asynchronous execution of the CreateDirectory operation.

Public Method CreateMicrosoftAD(CreateMicrosoftADRequest)

Creates a Microsoft AD in the AWS cloud.

Before you call CreateMicrosoftAD, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the CreateMicrosoftAD operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

Public Method CreateMicrosoftADAsync(CreateMicrosoftADRequest, CancellationToken)

Initiates the asynchronous execution of the CreateMicrosoftAD operation.

Public Method CreateSnapshot(CreateSnapshotRequest)

Creates a snapshot of a Simple AD or Microsoft AD directory in the AWS cloud.

You cannot take snapshots of AD Connector directories.

Public Method CreateSnapshotAsync(CreateSnapshotRequest, CancellationToken)

Initiates the asynchronous execution of the CreateSnapshot operation.

Public Method CreateTrust(CreateTrustRequest)

AWS Directory Service for Microsoft Active Directory allows you to configure trust relationships. For example, you can establish a trust between your Microsoft AD in the AWS cloud, and your existing on-premises Microsoft Active Directory. This would allow you to provide users and groups access to resources in either domain, with a single set of credentials.

This action initiates the creation of the AWS side of a trust relationship between a Microsoft AD in the AWS cloud and an external domain.

Public Method CreateTrustAsync(CreateTrustRequest, CancellationToken)

Initiates the asynchronous execution of the CreateTrust operation.

Public Method DeleteConditionalForwarder(DeleteConditionalForwarderRequest)

Deletes a conditional forwarder that has been set up for your AWS directory.

Public Method DeleteConditionalForwarderAsync(DeleteConditionalForwarderRequest, CancellationToken)

Initiates the asynchronous execution of the DeleteConditionalForwarder operation.

Public Method DeleteDirectory(DeleteDirectoryRequest)

Deletes an AWS Directory Service directory.

Before you call DeleteDirectory, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the DeleteDirectory operation, see AWS Directory Service API Permissions: Actions, Resources, and Conditions Reference.

Public Method DeleteDirectoryAsync(DeleteDirectoryRequest, CancellationToken)

Initiates the asynchronous execution of the DeleteDirectory operation.

Public Method DeleteSnapshot(DeleteSnapshotRequest)

Deletes a directory snapshot.

Public Method DeleteSnapshotAsync(DeleteSnapshotRequest, CancellationToken)

Initiates the asynchronous execution of the DeleteSnapshot operation.

Public Method DeleteTrust(DeleteTrustRequest)

Deletes an existing trust relationship between your Microsoft AD in the AWS cloud and an external domain.

Public Method DeleteTrustAsync(DeleteTrustRequest, CancellationToken)

Initiates the asynchronous execution of the DeleteTrust operation.

Public Method DeregisterEventTopic(DeregisterEventTopicRequest)

Removes the specified directory as a publisher to the specified SNS topic.

Public Method DeregisterEventTopicAsync(DeregisterEventTopicRequest, CancellationToken)

Initiates the asynchronous execution of the DeregisterEventTopic operation.

Public Method DescribeConditionalForwarders(DescribeConditionalForwardersRequest)

Obtains information about the conditional forwarders for this account.

If no input parameters are provided for RemoteDomainNames, this request describes all conditional forwarders for the specified directory ID.

Public Method DescribeConditionalForwardersAsync(DescribeConditionalForwardersRequest, CancellationToken)

Initiates the asynchronous execution of the DescribeConditionalForwarders operation.

Public Method DescribeDirectories()

Obtains information about the directories that belong to this account.

You can retrieve information about specific directories by passing the directory identifiers in the DirectoryIds parameter. Otherwise, all directories that belong to the current account are returned.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the DescribeDirectoriesResult.NextToken member contains a token that you pass in the next call to DescribeDirectories to retrieve the next set of items.

You can also specify a maximum number of return results with the Limit parameter.

Public Method DescribeDirectories(DescribeDirectoriesRequest)

Obtains information about the directories that belong to this account.

You can retrieve information about specific directories by passing the directory identifiers in the DirectoryIds parameter. Otherwise, all directories that belong to the current account are returned.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the DescribeDirectoriesResult.NextToken member contains a token that you pass in the next call to DescribeDirectories to retrieve the next set of items.

You can also specify a maximum number of return results with the Limit parameter.

Public Method DescribeDirectoriesAsync(CancellationToken)

Obtains information about the directories that belong to this account.

You can retrieve information about specific directories by passing the directory identifiers in the DirectoryIds parameter. Otherwise, all directories that belong to the current account are returned.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the DescribeDirectoriesResult.NextToken member contains a token that you pass in the next call to DescribeDirectories to retrieve the next set of items.

You can also specify a maximum number of return results with the Limit parameter.

Public Method DescribeDirectoriesAsync(DescribeDirectoriesRequest, CancellationToken)

Initiates the asynchronous execution of the DescribeDirectories operation.

Public Method DescribeDomainControllers(DescribeDomainControllersRequest)

Provides information about any domain controllers in your directory.

Public Method DescribeDomainControllersAsync(DescribeDomainControllersRequest, CancellationToken)

Initiates the asynchronous execution of the DescribeDomainControllers operation.

Public Method DescribeEventTopics(DescribeEventTopicsRequest)

Obtains information about which SNS topics receive status messages from the specified directory.

If no input parameters are provided, such as DirectoryId or TopicName, this request describes all of the associations in the account.

Public Method DescribeEventTopicsAsync(DescribeEventTopicsRequest, CancellationToken)

Initiates the asynchronous execution of the DescribeEventTopics operation.

Public Method DescribeSnapshots(DescribeSnapshotsRequest)

Obtains information about the directory snapshots that belong to this account.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the DescribeSnapshots.NextToken member contains a token that you pass in the next call to DescribeSnapshots to retrieve the next set of items.

You can also specify a maximum number of return results with the Limit parameter.

Public Method DescribeSnapshotsAsync(DescribeSnapshotsRequest, CancellationToken)

Initiates the asynchronous execution of the DescribeSnapshots operation.

Public Method DescribeTrusts(DescribeTrustsRequest)

Obtains information about the trust relationships for this account.

If no input parameters are provided, such as DirectoryId or TrustIds, this request describes all the trust relationships belonging to the account.

Public Method DescribeTrustsAsync(DescribeTrustsRequest, CancellationToken)

Initiates the asynchronous execution of the DescribeTrusts operation.

Public Method DisableRadius(DisableRadiusRequest)

Disables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server for an AD Connector directory.

Public Method DisableRadiusAsync(DisableRadiusRequest, CancellationToken)

Initiates the asynchronous execution of the DisableRadius operation.

Public Method DisableSso(DisableSsoRequest)

Disables single-sign on for a directory.

Public Method DisableSsoAsync(DisableSsoRequest, CancellationToken)

Initiates the asynchronous execution of the DisableSso operation.

Public Method Dispose() Inherited from Amazon.Runtime.AmazonServiceClient.
Public Method EnableRadius(EnableRadiusRequest)

Enables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server for an AD Connector directory.

Public Method EnableRadiusAsync(EnableRadiusRequest, CancellationToken)

Initiates the asynchronous execution of the EnableRadius operation.

Public Method EnableSso(EnableSsoRequest)

Enables single sign-on for a directory.

Public Method EnableSsoAsync(EnableSsoRequest, CancellationToken)

Initiates the asynchronous execution of the EnableSso operation.

Public Method GetDirectoryLimits()

Obtains directory limit information for the current region.

Public Method GetDirectoryLimits(GetDirectoryLimitsRequest)

Obtains directory limit information for the current region.

Public Method GetDirectoryLimitsAsync(CancellationToken)

Obtains directory limit information for the current region.

Public Method GetDirectoryLimitsAsync(GetDirectoryLimitsRequest, CancellationToken)

Initiates the asynchronous execution of the GetDirectoryLimits operation.

Public Method GetSnapshotLimits(GetSnapshotLimitsRequest)

Obtains the manual snapshot limits for a directory.

Public Method GetSnapshotLimitsAsync(GetSnapshotLimitsRequest, CancellationToken)

Initiates the asynchronous execution of the GetSnapshotLimits operation.

Public Method ListIpRoutes(ListIpRoutesRequest)

Lists the address blocks that you have added to a directory.

Public Method ListIpRoutesAsync(ListIpRoutesRequest, CancellationToken)

Initiates the asynchronous execution of the ListIpRoutes operation.

Public Method ListSchemaExtensions(ListSchemaExtensionsRequest)

Lists all schema extensions applied to a Microsoft AD Directory.

Public Method ListSchemaExtensionsAsync(ListSchemaExtensionsRequest, CancellationToken)

Initiates the asynchronous execution of the ListSchemaExtensions operation.

Public Method ListTagsForResource(ListTagsForResourceRequest)

Lists all tags on a directory.

Public Method ListTagsForResourceAsync(ListTagsForResourceRequest, CancellationToken)

Initiates the asynchronous execution of the ListTagsForResource operation.

Public Method RegisterEventTopic(RegisterEventTopicRequest)

Associates a directory with an SNS topic. This establishes the directory as a publisher to the specified SNS topic. You can then receive email or text (SMS) messages when the status of your directory changes. You get notified if your directory goes from an Active status to an Impaired or Inoperable status. You also receive a notification when the directory returns to an Active status.

Public Method RegisterEventTopicAsync(RegisterEventTopicRequest, CancellationToken)

Initiates the asynchronous execution of the RegisterEventTopic operation.

Public Method RemoveIpRoutes(RemoveIpRoutesRequest)

Removes IP address blocks from a directory.

Public Method RemoveIpRoutesAsync(RemoveIpRoutesRequest, CancellationToken)

Initiates the asynchronous execution of the RemoveIpRoutes operation.

Public Method RemoveTagsFromResource(RemoveTagsFromResourceRequest)

Removes tags from a directory.

Public Method RemoveTagsFromResourceAsync(RemoveTagsFromResourceRequest, CancellationToken)

Initiates the asynchronous execution of the RemoveTagsFromResource operation.

Public Method RestoreFromSnapshot(RestoreFromSnapshotRequest)

Restores a directory using an existing directory snapshot.

When you restore a directory from a snapshot, any changes made to the directory after the snapshot date are overwritten.

This action returns as soon as the restore operation is initiated. You can monitor the progress of the restore operation by calling the DescribeDirectories operation with the directory identifier. When the DirectoryDescription.Stage value changes to Active, the restore operation is complete.

Public Method RestoreFromSnapshotAsync(RestoreFromSnapshotRequest, CancellationToken)

Initiates the asynchronous execution of the RestoreFromSnapshot operation.

Public Method StartSchemaExtension(StartSchemaExtensionRequest)

Applies a schema extension to a Microsoft AD directory.

Public Method StartSchemaExtensionAsync(StartSchemaExtensionRequest, CancellationToken)

Initiates the asynchronous execution of the StartSchemaExtension operation.

Public Method UpdateConditionalForwarder(UpdateConditionalForwarderRequest)

Updates a conditional forwarder that has been set up for your AWS directory.

Public Method UpdateConditionalForwarderAsync(UpdateConditionalForwarderRequest, CancellationToken)

Initiates the asynchronous execution of the UpdateConditionalForwarder operation.

Public Method UpdateNumberOfDomainControllers(UpdateNumberOfDomainControllersRequest)

Adds or removes domain controllers to or from the directory. Based on the difference between current value and new value (provided through this API call), domain controllers will be added or removed. It may take up to 45 minutes for any new domain controllers to become fully active once the requested number of domain controllers is updated. During this time, you cannot make another update request.

Public Method UpdateNumberOfDomainControllersAsync(UpdateNumberOfDomainControllersRequest, CancellationToken)

Initiates the asynchronous execution of the UpdateNumberOfDomainControllers operation.

Public Method UpdateRadius(UpdateRadiusRequest)

Updates the Remote Authentication Dial In User Service (RADIUS) server information for an AD Connector directory.

Public Method UpdateRadiusAsync(UpdateRadiusRequest, CancellationToken)

Initiates the asynchronous execution of the UpdateRadius operation.

Public Method VerifyTrust(VerifyTrustRequest)

AWS Directory Service for Microsoft Active Directory allows you to configure and verify trust relationships.

This action verifies a trust relationship between your Microsoft AD in the AWS cloud and an external domain.

Public Method VerifyTrustAsync(VerifyTrustRequest, CancellationToken)

Initiates the asynchronous execution of the VerifyTrust operation.

Events

NameDescription
Event AfterResponseEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event BeforeRequestEvent Inherited from Amazon.Runtime.AmazonServiceClient.
Event ExceptionEvent Inherited from Amazon.Runtime.AmazonServiceClient.

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms