You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::DirectoryService::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::DirectoryService::Client
- Defined in:
- (unknown)
Overview
An API client for AWS Directory Service. To construct a client, you need to configure a :region
and :credentials
.
directoryservice = Aws::DirectoryService::Client.new(
region: region_name,
credentials: credentials,
# ...
)
See #initialize for a full list of supported configuration options.
Region
You can configure a default region in the following locations:
ENV['AWS_REGION']
Aws.config[:region]
Go here for a list of supported regions.
Credentials
Default credentials are loaded automatically from the following locations:
ENV['AWS_ACCESS_KEY_ID']
andENV['AWS_SECRET_ACCESS_KEY']
Aws.config[:credentials]
- The shared credentials ini file at
~/.aws/credentials
(more information) - From an instance profile when running on EC2
You can also construct a credentials object from one of the following classes:
Alternatively, you configure credentials with :access_key_id
and
:secret_access_key
:
# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))
Aws::DirectoryService::Client.new(
access_key_id: creds['access_key_id'],
secret_access_key: creds['secret_access_key']
)
Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
Constructor collapse
-
#initialize(options = {}) ⇒ Aws::DirectoryService::Client
constructor
Constructs an API client.
API Operations collapse
-
#accept_shared_directory(options = {}) ⇒ Types::AcceptSharedDirectoryResult
Accepts a directory sharing request that was sent from the directory owner account.
.
-
#add_ip_routes(options = {}) ⇒ Struct
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.
-
#add_region(options = {}) ⇒ Struct
Adds two domain controllers in the specified Region for the specified directory.
.
-
#add_tags_to_resource(options = {}) ⇒ Struct
Adds or overwrites one or more tags for the specified directory.
-
#cancel_schema_extension(options = {}) ⇒ Struct
Cancels an in-progress schema extension to a Microsoft AD directory.
-
#connect_directory(options = {}) ⇒ Types::ConnectDirectoryResult
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. -
#create_alias(options = {}) ⇒ Types::CreateAliasResult
Creates an alias for a directory and assigns the alias to the directory.
-
#create_computer(options = {}) ⇒ Types::CreateComputerResult
Creates an Active Directory computer object in the specified directory.
.
-
#create_conditional_forwarder(options = {}) ⇒ Struct
Creates a conditional forwarder associated with your AWS directory.
-
#create_directory(options = {}) ⇒ Types::CreateDirectoryResult
Creates a Simple AD directory.
-
#create_log_subscription(options = {}) ⇒ Struct
Creates a subscription to forward real-time Directory Service domain controller security logs to the specified Amazon CloudWatch log group in your AWS account.
.
-
#create_microsoft_ad(options = {}) ⇒ Types::CreateMicrosoftADResult
Creates a Microsoft AD directory in the AWS Cloud.
-
#create_snapshot(options = {}) ⇒ Types::CreateSnapshotResult
Creates a snapshot of a Simple AD or Microsoft AD directory in the AWS cloud.
You cannot take snapshots of AD Connector directories.
-
#create_trust(options = {}) ⇒ Types::CreateTrustResult
AWS Directory Service for Microsoft Active Directory allows you to configure trust relationships.
-
#delete_conditional_forwarder(options = {}) ⇒ Struct
Deletes a conditional forwarder that has been set up for your AWS directory.
.
-
#delete_directory(options = {}) ⇒ Types::DeleteDirectoryResult
Deletes an AWS Directory Service directory.
Before you call
DeleteDirectory
, ensure that all of the required permissions have been explicitly granted through a policy. -
#delete_log_subscription(options = {}) ⇒ Struct
Deletes the specified log subscription.
.
-
#delete_snapshot(options = {}) ⇒ Types::DeleteSnapshotResult
Deletes a directory snapshot.
.
-
#delete_trust(options = {}) ⇒ Types::DeleteTrustResult
Deletes an existing trust relationship between your AWS Managed Microsoft AD directory and an external domain.
.
-
#deregister_certificate(options = {}) ⇒ Struct
Deletes from the system the certificate that was registered for a secured LDAP connection.
.
-
#deregister_event_topic(options = {}) ⇒ Struct
Removes the specified directory as a publisher to the specified SNS topic.
.
-
#describe_certificate(options = {}) ⇒ Types::DescribeCertificateResult
Displays information about the certificate registered for a secured LDAP connection.
.
-
#describe_conditional_forwarders(options = {}) ⇒ Types::DescribeConditionalForwardersResult
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.
. -
#describe_directories(options = {}) ⇒ Types::DescribeDirectoriesResult
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. -
#describe_domain_controllers(options = {}) ⇒ Types::DescribeDomainControllersResult
Provides information about any domain controllers in your directory.
.
-
#describe_event_topics(options = {}) ⇒ Types::DescribeEventTopicsResult
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.
. -
#describe_ldaps_settings(options = {}) ⇒ Types::DescribeLDAPSSettingsResult
Describes the status of LDAP security for the specified directory.
.
-
#describe_regions(options = {}) ⇒ Types::DescribeRegionsResult
Provides information about the Regions that are configured for multi-Region replication.
.
-
#describe_shared_directories(options = {}) ⇒ Types::DescribeSharedDirectoriesResult
Returns the shared directories in your account.
-
#describe_snapshots(options = {}) ⇒ Types::DescribeSnapshotsResult
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.
-
#describe_trusts(options = {}) ⇒ Types::DescribeTrustsResult
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.
. -
#disable_ldaps(options = {}) ⇒ Struct
Deactivates LDAP secure calls for the specified directory.
.
-
#disable_radius(options = {}) ⇒ Struct
Disables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD directory.
.
-
#disable_sso(options = {}) ⇒ Struct
Disables single-sign on for a directory.
.
-
#enable_ldaps(options = {}) ⇒ Struct
Activates the switch for the specific directory to always use LDAP secure calls.
.
-
#enable_radius(options = {}) ⇒ Struct
Enables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD directory.
.
-
#enable_sso(options = {}) ⇒ Struct
Enables single sign-on for a directory.
-
#get_directory_limits(options = {}) ⇒ Types::GetDirectoryLimitsResult
Obtains directory limit information for the current Region.
.
-
#get_snapshot_limits(options = {}) ⇒ Types::GetSnapshotLimitsResult
Obtains the manual snapshot limits for a directory.
.
-
#list_certificates(options = {}) ⇒ Types::ListCertificatesResult
For the specified directory, lists all the certificates registered for a secured LDAP connection.
.
-
#list_ip_routes(options = {}) ⇒ Types::ListIpRoutesResult
Lists the address blocks that you have added to a directory.
.
-
#list_log_subscriptions(options = {}) ⇒ Types::ListLogSubscriptionsResult
Lists the active log subscriptions for the AWS account.
.
-
#list_schema_extensions(options = {}) ⇒ Types::ListSchemaExtensionsResult
Lists all schema extensions applied to a Microsoft AD Directory.
.
-
#list_tags_for_resource(options = {}) ⇒ Types::ListTagsForResourceResult
Lists all tags on a directory.
.
-
#register_certificate(options = {}) ⇒ Types::RegisterCertificateResult
Registers a certificate for secured LDAP connection.
.
-
#register_event_topic(options = {}) ⇒ Struct
Associates a directory with an SNS topic.
-
#reject_shared_directory(options = {}) ⇒ Types::RejectSharedDirectoryResult
Rejects a directory sharing request that was sent from the directory owner account.
.
-
#remove_ip_routes(options = {}) ⇒ Struct
Removes IP address blocks from a directory.
.
-
#remove_region(options = {}) ⇒ Struct
Stops all replication and removes the domain controllers from the specified Region.
-
#remove_tags_from_resource(options = {}) ⇒ Struct
Removes tags from a directory.
.
-
#reset_user_password(options = {}) ⇒ Struct
Resets the password for any user in your AWS Managed Microsoft AD or Simple AD directory.
You can reset the password for any user in your directory with the following exceptions:
-
For Simple AD, you cannot reset the password for any user that is a member of either the Domain Admins or Enterprise Admins group except for the administrator user.
-
For AWS Managed Microsoft AD, you can only reset the password for a user that is in an OU based off of the NetBIOS name that you typed when you created your directory.
-
-
#restore_from_snapshot(options = {}) ⇒ Struct
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.
-
#share_directory(options = {}) ⇒ Types::ShareDirectoryResult
Shares a specified directory (
DirectoryId
) in your AWS account (directory owner) with another AWS account (directory consumer). -
#start_schema_extension(options = {}) ⇒ Types::StartSchemaExtensionResult
Applies a schema extension to a Microsoft AD directory.
.
-
#unshare_directory(options = {}) ⇒ Types::UnshareDirectoryResult
Stops the directory sharing between the directory owner and consumer accounts.
-
#update_conditional_forwarder(options = {}) ⇒ Struct
Updates a conditional forwarder that has been set up for your AWS directory.
.
-
#update_number_of_domain_controllers(options = {}) ⇒ Struct
Adds or removes domain controllers to or from the directory.
-
#update_radius(options = {}) ⇒ Struct
Updates the Remote Authentication Dial In User Service (RADIUS) server information for an AD Connector or Microsoft AD directory.
.
-
#update_trust(options = {}) ⇒ Types::UpdateTrustResult
Updates the trust that has been set up between your AWS Managed Microsoft AD directory and an on-premises Active Directory.
.
-
#verify_trust(options = {}) ⇒ Types::VerifyTrustResult
AWS Directory Service for Microsoft Active Directory allows you to configure and verify trust relationships.
This action verifies a trust relationship between your AWS Managed Microsoft AD directory and an external domain.
.
Instance Method Summary collapse
-
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
-
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters.
Methods inherited from Seahorse::Client::Base
add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options = {}) ⇒ Aws::DirectoryService::Client
Constructs an API client.
Instance Method Details
#accept_shared_directory(options = {}) ⇒ Types::AcceptSharedDirectoryResult
Accepts a directory sharing request that was sent from the directory owner account.
#add_ip_routes(options = {}) ⇒ Struct
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.
#add_region(options = {}) ⇒ Struct
Adds two domain controllers in the specified Region for the specified directory.
#add_tags_to_resource(options = {}) ⇒ Struct
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.
#cancel_schema_extension(options = {}) ⇒ Struct
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
.
#connect_directory(options = {}) ⇒ Types::ConnectDirectoryResult
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.
#create_alias(options = {}) ⇒ Types::CreateAliasResult
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://<alias>.awsapps.com
.
After an alias has been created, it cannot be deleted or reused, so this operation should only be used when absolutely necessary.
#create_computer(options = {}) ⇒ Types::CreateComputerResult
Creates an Active Directory computer object in the specified directory.
#create_conditional_forwarder(options = {}) ⇒ Struct
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.
#create_directory(options = {}) ⇒ Types::CreateDirectoryResult
Creates a Simple AD directory. For more information, see Simple Active Directory in the AWS Directory Service Admin Guide.
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.
#create_log_subscription(options = {}) ⇒ Struct
Creates a subscription to forward real-time Directory Service domain controller security logs to the specified Amazon CloudWatch log group in your AWS account.
#create_microsoft_ad(options = {}) ⇒ Types::CreateMicrosoftADResult
Creates a Microsoft AD directory in the AWS Cloud. For more information, see AWS Managed Microsoft AD in the AWS Directory Service Admin Guide.
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.
#create_snapshot(options = {}) ⇒ Types::CreateSnapshotResult
Creates a snapshot of a Simple AD or Microsoft AD directory in the AWS cloud.
You cannot take snapshots of AD Connector directories.
#create_trust(options = {}) ⇒ Types::CreateTrustResult
AWS Directory Service for Microsoft Active Directory allows you to configure trust relationships. For example, you can establish a trust between your AWS Managed Microsoft AD directory, 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 an AWS Managed Microsoft AD directory and an external domain. You can create either a forest trust or an external trust.
#delete_conditional_forwarder(options = {}) ⇒ Struct
Deletes a conditional forwarder that has been set up for your AWS directory.
#delete_directory(options = {}) ⇒ Types::DeleteDirectoryResult
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.
#delete_log_subscription(options = {}) ⇒ Struct
Deletes the specified log subscription.
#delete_snapshot(options = {}) ⇒ Types::DeleteSnapshotResult
Deletes a directory snapshot.
#delete_trust(options = {}) ⇒ Types::DeleteTrustResult
Deletes an existing trust relationship between your AWS Managed Microsoft AD directory and an external domain.
#deregister_certificate(options = {}) ⇒ Struct
Deletes from the system the certificate that was registered for a secured LDAP connection.
#deregister_event_topic(options = {}) ⇒ Struct
Removes the specified directory as a publisher to the specified SNS topic.
#describe_certificate(options = {}) ⇒ Types::DescribeCertificateResult
Displays information about the certificate registered for a secured LDAP connection.
#describe_conditional_forwarders(options = {}) ⇒ Types::DescribeConditionalForwardersResult
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.
#describe_directories(options = {}) ⇒ Types::DescribeDirectoriesResult
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.
#describe_domain_controllers(options = {}) ⇒ Types::DescribeDomainControllersResult
Provides information about any domain controllers in your directory.
#describe_event_topics(options = {}) ⇒ Types::DescribeEventTopicsResult
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.
#describe_ldaps_settings(options = {}) ⇒ Types::DescribeLDAPSSettingsResult
Describes the status of LDAP security for the specified directory.
#describe_regions(options = {}) ⇒ Types::DescribeRegionsResult
Provides information about the Regions that are configured for multi-Region replication.
#describe_shared_directories(options = {}) ⇒ Types::DescribeSharedDirectoriesResult
Returns the shared directories in your account.
#describe_snapshots(options = {}) ⇒ Types::DescribeSnapshotsResult
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.
#describe_trusts(options = {}) ⇒ Types::DescribeTrustsResult
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.
#disable_ldaps(options = {}) ⇒ Struct
Deactivates LDAP secure calls for the specified directory.
#disable_radius(options = {}) ⇒ Struct
Disables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD directory.
#disable_sso(options = {}) ⇒ Struct
Disables single-sign on for a directory.
#enable_ldaps(options = {}) ⇒ Struct
Activates the switch for the specific directory to always use LDAP secure calls.
#enable_radius(options = {}) ⇒ Struct
Enables multi-factor authentication (MFA) with the Remote Authentication Dial In User Service (RADIUS) server for an AD Connector or Microsoft AD directory.
#enable_sso(options = {}) ⇒ Struct
Enables single sign-on for a directory. Single sign-on allows users in your directory to access certain AWS services from a computer joined to the directory without having to enter their credentials separately.
#get_directory_limits(options = {}) ⇒ Types::GetDirectoryLimitsResult
Obtains directory limit information for the current Region.
#get_snapshot_limits(options = {}) ⇒ Types::GetSnapshotLimitsResult
Obtains the manual snapshot limits for a directory.
#list_certificates(options = {}) ⇒ Types::ListCertificatesResult
For the specified directory, lists all the certificates registered for a secured LDAP connection.
#list_ip_routes(options = {}) ⇒ Types::ListIpRoutesResult
Lists the address blocks that you have added to a directory.
#list_log_subscriptions(options = {}) ⇒ Types::ListLogSubscriptionsResult
Lists the active log subscriptions for the AWS account.
#list_schema_extensions(options = {}) ⇒ Types::ListSchemaExtensionsResult
Lists all schema extensions applied to a Microsoft AD Directory.
#list_tags_for_resource(options = {}) ⇒ Types::ListTagsForResourceResult
Lists all tags on a directory.
#register_certificate(options = {}) ⇒ Types::RegisterCertificateResult
Registers a certificate for secured LDAP connection.
#register_event_topic(options = {}) ⇒ Struct
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.
#reject_shared_directory(options = {}) ⇒ Types::RejectSharedDirectoryResult
Rejects a directory sharing request that was sent from the directory owner account.
#remove_ip_routes(options = {}) ⇒ Struct
Removes IP address blocks from a directory.
#remove_region(options = {}) ⇒ Struct
Stops all replication and removes the domain controllers from the specified Region. You cannot remove the primary Region with this operation. Instead, use the DeleteDirectory
API.
#remove_tags_from_resource(options = {}) ⇒ Struct
Removes tags from a directory.
#reset_user_password(options = {}) ⇒ Struct
Resets the password for any user in your AWS Managed Microsoft AD or Simple AD directory.
You can reset the password for any user in your directory with the following exceptions:
-
For Simple AD, you cannot reset the password for any user that is a member of either the Domain Admins or Enterprise Admins group except for the administrator user.
-
For AWS Managed Microsoft AD, you can only reset the password for a user that is in an OU based off of the NetBIOS name that you typed when you created your directory. For example, you cannot reset the password for a user in the AWS Reserved OU. For more information about the OU structure for an AWS Managed Microsoft AD directory, see What Gets Created in the AWS Directory Service Administration Guide.
#restore_from_snapshot(options = {}) ⇒ Struct
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.
#share_directory(options = {}) ⇒ Types::ShareDirectoryResult
Shares a specified directory (DirectoryId
) in your AWS account (directory owner) with another AWS account (directory consumer). With this operation you can use your directory from any AWS account and from any Amazon VPC within an AWS Region.
When you share your AWS Managed Microsoft AD directory, AWS Directory Service creates a shared directory in the directory consumer account. This shared directory contains the metadata to provide access to the directory within the directory owner account. The shared directory is visible in all VPCs in the directory consumer account.
The ShareMethod
parameter determines whether the specified directory can be shared between AWS accounts inside the same AWS organization (ORGANIZATIONS
). It also determines whether you can share the directory with any other AWS account either inside or outside of the organization (HANDSHAKE
).
The ShareNotes
parameter is only used when HANDSHAKE
is called, which sends a directory sharing request to the directory consumer.
#start_schema_extension(options = {}) ⇒ Types::StartSchemaExtensionResult
Applies a schema extension to a Microsoft AD directory.
#unshare_directory(options = {}) ⇒ Types::UnshareDirectoryResult
Stops the directory sharing between the directory owner and consumer accounts.
#update_conditional_forwarder(options = {}) ⇒ Struct
Updates a conditional forwarder that has been set up for your AWS directory.
#update_number_of_domain_controllers(options = {}) ⇒ Struct
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.
#update_radius(options = {}) ⇒ Struct
Updates the Remote Authentication Dial In User Service (RADIUS) server information for an AD Connector or Microsoft AD directory.
#update_trust(options = {}) ⇒ Types::UpdateTrustResult
Updates the trust that has been set up between your AWS Managed Microsoft AD directory and an on-premises Active Directory.
#verify_trust(options = {}) ⇒ Types::VerifyTrustResult
AWS Directory Service for Microsoft Active Directory allows you to configure and verify trust relationships.
This action verifies a trust relationship between your AWS Managed Microsoft AD directory and an external domain.
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
Basic Usage
Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.
# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:
# poll for ~25 seconds
client.wait_until(...) do |w|
w.max_attempts = 5
w.delay = 5
end
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success
or :failure
from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(...) do |w|
# disable max attempts
w.max_attempts = nil
# poll for 1 hour, instead of a number of attempts
w.before_wait do |attempts, response|
throw :failure if Time.now - started_at > 3600
end
end
Handling Errors
When a waiter is successful, it returns true
. When a waiter
fails, it raises an error. All errors raised extend from
Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:
Waiter Name | Client Method | Default Delay: | Default Max Attempts: |
---|