Class: Aws::DirectoryService::Client

Inherits:
Seahorse::Client::Base
  • Object
show all
Includes:
ClientStubs
Defined in:
lib/aws-sdk-directoryservice/client.rb

Overview

An API client for DirectoryService. To construct a client, you need to configure a ‘:region` and `:credentials`.

client = Aws::DirectoryService::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).

See #initialize for a full list of supported configuration options.

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • ‘Aws::Credentials` - Used for configuring static, non-refreshing credentials.

    • ‘Aws::SharedCredentials` - Used for loading static credentials from a shared file, such as `~/.aws/config`.

    • ‘Aws::AssumeRoleCredentials` - Used when you need to assume a role.

    • ‘Aws::AssumeRoleWebIdentityCredentials` - Used when you need to assume a role after providing credentials via the web.

    • ‘Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an access token generated from `aws login`.

    • ‘Aws::ProcessCredentials` - Used for loading credentials from a process that outputs to stdout.

    • ‘Aws::InstanceProfileCredentials` - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • ‘Aws::ECSCredentials` - Used for loading credentials from instances running in ECS.

    • ‘Aws::CognitoIdentityCredentials` - Used for loading credentials from the Cognito Identity service.

    When ‘:credentials` are not configured directly, the following locations will be searched for credentials:

    • Aws.config`

    • The ‘:access_key_id`, `:secret_access_key`, `:session_token`, and `:account_id` options.

    • ENV, ENV, ENV, and ENV

    • ‘~/.aws/credentials`

    • ‘~/.aws/config`

    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of ‘Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV to true.

  • :region (required, String)

    The AWS region to connect to. The configured ‘:region` is used to determine the service `:endpoint`. When not passed, a default `:region` is searched for in the following locations:

  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to ‘true`, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to `false`.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in ‘adaptive` retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a `RetryCapacityNotAvailableError` and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When ‘true`, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When ‘true`, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in ‘standard` and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See Aws::DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to ‘true’ the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the ‘:endpoint` option directly. This is normally constructed from the `:region` option. Configuring `:endpoint` is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to ‘true`, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the ‘:logger` at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in ‘standard` and `adaptive` retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, ‘default’ is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the ‘legacy` retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the ‘legacy` retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the ‘legacy` retry mode.

    @see www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the ‘legacy` retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the ‘legacy` retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • ‘legacy` - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • ‘standard` - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • ‘adaptive` - An experimental retry mode that includes all the functionality of `standard` mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default ‘:sigv4a_signing_region_set` is searched for in the following locations:

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disables response data type conversions. The request parameters hash must be formatted exactly as the API expects.This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    ** Please note ** When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses ‘NoOpTelemetryProvider` which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the

    ‘opentelemetry-sdk` gem and then, pass in an instance of a `Aws::Telemetry::OTelProvider` for telemetry provider.

  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • ‘Aws::StaticTokenProvider` - Used for configuring static, non-refreshing tokens.

    • ‘Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an access token generated from `aws login`.

    When ‘:token_provider` is not configured directly, the `Aws::TokenProviderChain` will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to ‘true`, dualstack enabled endpoints (with `.aws` TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to ‘true`, fips compatible endpoints will be used if available. When a `fips` region is used, the region is normalized and this config is set to `true`.

  • :validate_params (Boolean) — default: true

    When ‘true`, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::DirectoryService::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to ‘#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::DirectoryService::EndpointParameters`.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has “Expect” header set to “100-continue”. Defaults to ‘nil` which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like ‘proxy.com:123’.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When ‘true`, HTTP debug output will be sent to the `:logger`.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a ‘content-length`).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When ‘true`, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass ‘:ssl_ca_bundle` or `:ssl_ca_directory` the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass ‘:ssl_ca_bundle` or `:ssl_ca_directory` the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

    When ‘true`, SSL peer certificates are verified when establishing a connection.



451
452
453
# File 'lib/aws-sdk-directoryservice/client.rb', line 451

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



3555
3556
3557
# File 'lib/aws-sdk-directoryservice/client.rb', line 3555

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



3558
3559
3560
# File 'lib/aws-sdk-directoryservice/client.rb', line 3558

def errors_module
  Errors
end

Instance Method Details

#accept_shared_directory(params = {}) ⇒ Types::AcceptSharedDirectoryResult

Accepts a directory sharing request that was sent from the directory owner account.

Examples:

Request syntax with placeholder values


resp = client.accept_shared_directory({
  shared_directory_id: "DirectoryId", # required
})

Response structure


resp.shared_directory. #=> String
resp.shared_directory.owner_directory_id #=> String
resp.shared_directory.share_method #=> String, one of "ORGANIZATIONS", "HANDSHAKE"
resp.shared_directory. #=> String
resp.shared_directory.shared_directory_id #=> String
resp.shared_directory.share_status #=> String, one of "Shared", "PendingAcceptance", "Rejected", "Rejecting", "RejectFailed", "Sharing", "ShareFailed", "Deleted", "Deleting"
resp.shared_directory.share_notes #=> String
resp.shared_directory.created_date_time #=> Time
resp.shared_directory.last_updated_date_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :shared_directory_id (required, String)

    Identifier of the shared directory in the directory consumer account. This identifier is different for each directory owner account.

Returns:

See Also:



490
491
492
493
# File 'lib/aws-sdk-directoryservice/client.rb', line 490

def accept_shared_directory(params = {}, options = {})
  req = build_request(:accept_shared_directory, params)
  req.send_request(options)
end

#add_ip_routes(params = {}) ⇒ Struct

If the DNS server for your self-managed 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 Amazon Web Services 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 [Directory Service API Permissions: Actions, Resources, and Conditions Reference].

[1]: docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html

Examples:

Request syntax with placeholder values


resp = client.add_ip_routes({
  directory_id: "DirectoryId", # required
  ip_routes: [ # required
    {
      cidr_ip: "CidrIp",
      description: "Description",
    },
  ],
  update_security_group_for_directory_controllers: false,
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    Identifier (ID) of the directory to which to add the address block.

  • :ip_routes (required, Array<Types::IpRoute>)

    IP address blocks, using CIDR format, of the traffic to route. This is often the IP address block of the DNS server used for your self-managed domain.

  • :update_security_group_for_directory_controllers (Boolean)

    If set to true, updates the inbound and outbound rules of the security group that has the description: “Amazon Web Services created security group for *directory ID* directory controllers.” Following are the new rules:

    Inbound:

    • Type: Custom UDP Rule, Protocol: UDP, Range: 88, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom UDP Rule, Protocol: UDP, Range: 123, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom UDP Rule, Protocol: UDP, Range: 138, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom UDP Rule, Protocol: UDP, Range: 389, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom UDP Rule, Protocol: UDP, Range: 464, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom UDP Rule, Protocol: UDP, Range: 445, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom TCP Rule, Protocol: TCP, Range: 88, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom TCP Rule, Protocol: TCP, Range: 135, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom TCP Rule, Protocol: TCP, Range: 445, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom TCP Rule, Protocol: TCP, Range: 464, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom TCP Rule, Protocol: TCP, Range: 636, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom TCP Rule, Protocol: TCP, Range: 1024-65535, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: Custom TCP Rule, Protocol: TCP, Range: 3268-33269, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: DNS (UDP), Protocol: UDP, Range: 53, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: DNS (TCP), Protocol: TCP, Range: 53, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: LDAP, Protocol: TCP, Range: 389, Source: Managed Microsoft AD VPC IPv4 CIDR

    • Type: All ICMP, Protocol: All, Range: N/A, Source: Managed Microsoft AD VPC IPv4 CIDR

    Outbound:

    • Type: All traffic, Protocol: All, Range: All, Destination: 0.0.0.0/0

    ^

    These security rules impact an internal network interface that is not exposed publicly.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



609
610
611
612
# File 'lib/aws-sdk-directoryservice/client.rb', line 609

def add_ip_routes(params = {}, options = {})
  req = build_request(:add_ip_routes, params)
  req.send_request(options)
end

#add_region(params = {}) ⇒ Struct

Adds two domain controllers in the specified Region for the specified directory.

Examples:

Request syntax with placeholder values


resp = client.add_region({
  directory_id: "DirectoryId", # required
  region_name: "RegionName", # required
  vpc_settings: { # required
    vpc_id: "VpcId", # required
    subnet_ids: ["SubnetId"], # required
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory to which you want to add Region replication.

  • :region_name (required, String)

    The name of the Region where you want to add domain controllers for replication. For example, ‘us-east-1`.

  • :vpc_settings (required, Types::DirectoryVpcSettings)

    Contains VPC information for the CreateDirectory or CreateMicrosoftAD operation.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



646
647
648
649
# File 'lib/aws-sdk-directoryservice/client.rb', line 646

def add_region(params = {}, options = {})
  req = build_request(:add_region, params)
  req.send_request(options)
end

#add_tags_to_resource(params = {}) ⇒ 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.

Examples:

Request syntax with placeholder values


resp = client.add_tags_to_resource({
  resource_id: "ResourceId", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_id (required, String)

    Identifier (ID) for the directory to which to add the tag.

  • :tags (required, Array<Types::Tag>)

    The tags to be assigned to the directory.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



679
680
681
682
# File 'lib/aws-sdk-directoryservice/client.rb', line 679

def add_tags_to_resource(params = {}, options = {})
  req = build_request(:add_tags_to_resource, params)
  req.send_request(options)
end

#build_request(operation_name, params = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • params ({}) (defaults to: {})


3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
# File 'lib/aws-sdk-directoryservice/client.rb', line 3528

def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  tracer = config.telemetry_provider.tracer_provider.tracer(
    Aws::Telemetry.module_to_tracer_name('Aws::DirectoryService')
  )
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config,
    tracer: tracer
  )
  context[:gem_name] = 'aws-sdk-directoryservice'
  context[:gem_version] = '1.79.0'
  Seahorse::Client::Request.new(handlers, context)
end

#cancel_schema_extension(params = {}) ⇒ 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`.

Examples:

Request syntax with placeholder values


resp = client.cancel_schema_extension({
  directory_id: "DirectoryId", # required
  schema_extension_id: "SchemaExtensionId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory whose schema extension will be canceled.

  • :schema_extension_id (required, String)

    The identifier of the schema extension that will be canceled.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



710
711
712
713
# File 'lib/aws-sdk-directoryservice/client.rb', line 710

def cancel_schema_extension(params = {}, options = {})
  req = build_request(:cancel_schema_extension, params)
  req.send_request(options)
end

#connect_directory(params = {}) ⇒ Types::ConnectDirectoryResult

Creates an AD Connector to connect to a self-managed 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 [Directory Service API Permissions: Actions, Resources, and Conditions Reference].

[1]: docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html

Examples:

Request syntax with placeholder values


resp = client.connect_directory({
  name: "DirectoryName", # required
  short_name: "DirectoryShortName",
  password: "ConnectPassword", # required
  description: "Description",
  size: "Small", # required, accepts Small, Large
  connect_settings: { # required
    vpc_id: "VpcId", # required
    subnet_ids: ["SubnetId"], # required
    customer_dns_ips: ["IpAddr"], # required
    customer_user_name: "UserName", # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.directory_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The fully qualified name of your self-managed directory, such as ‘corp.example.com`.

  • :short_name (String)

    The NetBIOS name of your self-managed directory, such as ‘CORP`.

  • :password (required, String)

    The password for your self-managed user account.

  • :description (String)

    A description for the directory.

  • :size (required, String)

    The size of the directory.

  • :connect_settings (required, Types::DirectoryConnectSettings)

    A DirectoryConnectSettings object that contains additional information for the operation.

  • :tags (Array<Types::Tag>)

    The tags to be assigned to AD Connector.

Returns:

See Also:



784
785
786
787
# File 'lib/aws-sdk-directoryservice/client.rb', line 784

def connect_directory(params = {}, options = {})
  req = build_request(:connect_directory, params)
  req.send_request(options)
end

#create_alias(params = {}) ⇒ 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.

Examples:

Request syntax with placeholder values


resp = client.create_alias({
  directory_id: "DirectoryId", # required
  alias: "AliasName", # required
})

Response structure


resp.directory_id #=> String
resp.alias #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory for which to create the alias.

  • :alias (required, String)

    The requested alias.

    The alias must be unique amongst all aliases in Amazon Web Services. This operation throws an ‘EntityAlreadyExistsException` error if the alias already exists.

Returns:

See Also:



827
828
829
830
# File 'lib/aws-sdk-directoryservice/client.rb', line 827

def create_alias(params = {}, options = {})
  req = build_request(:create_alias, params)
  req.send_request(options)
end

#create_computer(params = {}) ⇒ Types::CreateComputerResult

Creates an Active Directory computer object in the specified directory.

Examples:

Request syntax with placeholder values


resp = client.create_computer({
  directory_id: "DirectoryId", # required
  computer_name: "ComputerName", # required
  password: "ComputerPassword", # required
  organizational_unit_distinguished_name: "OrganizationalUnitDN",
  computer_attributes: [
    {
      name: "AttributeName",
      value: "AttributeValue",
    },
  ],
})

Response structure


resp.computer.computer_id #=> String
resp.computer.computer_name #=> String
resp.computer.computer_attributes #=> Array
resp.computer.computer_attributes[0].name #=> String
resp.computer.computer_attributes[0].value #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory in which to create the computer account.

  • :computer_name (required, String)

    The name of the computer account.

  • :password (required, String)

    A one-time password that is used to join the computer to the directory. You should generate a random, strong password to use for this parameter.

  • :organizational_unit_distinguished_name (String)

    The fully-qualified distinguished name of the organizational unit to place the computer account in.

  • :computer_attributes (Array<Types::Attribute>)

    An array of Attribute objects that contain any LDAP attributes to apply to the computer account.

Returns:

See Also:



886
887
888
889
# File 'lib/aws-sdk-directoryservice/client.rb', line 886

def create_computer(params = {}, options = {})
  req = build_request(:create_computer, params)
  req.send_request(options)
end

#create_conditional_forwarder(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.create_conditional_forwarder({
  directory_id: "DirectoryId", # required
  remote_domain_name: "RemoteDomainName", # required
  dns_ip_addrs: ["IpAddr"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The directory ID of the Amazon Web Services directory for which you are creating the conditional forwarder.

  • :remote_domain_name (required, String)

    The fully qualified domain name (FQDN) of the remote domain with which you will set up a trust relationship.

  • :dns_ip_addrs (required, Array<String>)

    The IP addresses of the remote DNS server associated with RemoteDomainName.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



922
923
924
925
# File 'lib/aws-sdk-directoryservice/client.rb', line 922

def create_conditional_forwarder(params = {}, options = {})
  req = build_request(:create_conditional_forwarder, params)
  req.send_request(options)
end

#create_directory(params = {}) ⇒ Types::CreateDirectoryResult

Creates a Simple AD directory. For more information, see [Simple Active Directory] in the *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 [Directory Service API Permissions: Actions, Resources, and Conditions Reference].

[1]: docs.aws.amazon.com/directoryservice/latest/admin-guide/directory_simple_ad.html [2]: docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html

Examples:

Request syntax with placeholder values


resp = client.create_directory({
  name: "DirectoryName", # required
  short_name: "DirectoryShortName",
  password: "Password", # required
  description: "Description",
  size: "Small", # required, accepts Small, Large
  vpc_settings: {
    vpc_id: "VpcId", # required
    subnet_ids: ["SubnetId"], # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.directory_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The fully qualified name for the directory, such as ‘corp.example.com`.

  • :short_name (String)

    The NetBIOS name of the directory, such as ‘CORP`.

  • :password (required, String)

    The password for the directory administrator. The directory creation process creates a directory administrator account with the user name ‘Administrator` and this password.

    If you need to change the password for the administrator account, you can use the ResetUserPassword API call.

    The regex pattern for this string is made up of the following conditions:

    • Length (?=^.8,64$) – Must be between 8 and 64 characters

    ^

    AND any 3 of the following password complexity rules required by Active Directory:

    • Numbers and upper case and lowercase (?=.*\d)(?=.*)(?=.*[a-z])

    • Numbers and special characters and lower case (?=.*\d)(?=.*)(?=.*[a-z])

    • Special characters and upper case and lower case (?=.*[^A-Za-z0-9\s])(?=.*)(?=.*[a-z])

    • Numbers and upper case and special characters (?=.*\d)(?=.*)(?=.*[^A-Za-z0-9\s])

    For additional information about how Active Directory passwords are enforced, see [Password must meet complexity requirements] on the Microsoft website.

    [1]: docs.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/password-must-meet-complexity-requirements

  • :description (String)

    A description for the directory.

  • :size (required, String)

    The size of the directory.

  • :vpc_settings (Types::DirectoryVpcSettings)

    A DirectoryVpcSettings object that contains additional information for the operation.

  • :tags (Array<Types::Tag>)

    The tags to be assigned to the Simple AD directory.

Returns:

See Also:



1031
1032
1033
1034
# File 'lib/aws-sdk-directoryservice/client.rb', line 1031

def create_directory(params = {}, options = {})
  req = build_request(:create_directory, params)
  req.send_request(options)
end

#create_log_subscription(params = {}) ⇒ Struct

Creates a subscription to forward real-time Directory Service domain controller security logs to the specified Amazon CloudWatch log group in your Amazon Web Services account.

Examples:

Request syntax with placeholder values


resp = client.create_log_subscription({
  directory_id: "DirectoryId", # required
  log_group_name: "LogGroupName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    Identifier of the directory to which you want to subscribe and receive real-time logs to your specified CloudWatch log group.

  • :log_group_name (required, String)

    The name of the CloudWatch log group where the real-time domain controller logs are forwarded.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1061
1062
1063
1064
# File 'lib/aws-sdk-directoryservice/client.rb', line 1061

def create_log_subscription(params = {}, options = {})
  req = build_request(:create_log_subscription, params)
  req.send_request(options)
end

#create_microsoft_ad(params = {}) ⇒ Types::CreateMicrosoftADResult

Creates a Microsoft AD directory in the Amazon Web Services Cloud. For more information, see [Managed Microsoft AD] in the *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 [Directory Service API Permissions: Actions, Resources, and Conditions Reference].

[1]: docs.aws.amazon.com/directoryservice/latest/admin-guide/directory_microsoft_ad.html [2]: docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html

Examples:

Request syntax with placeholder values


resp = client.create_microsoft_ad({
  name: "DirectoryName", # required
  short_name: "DirectoryShortName",
  password: "Password", # required
  description: "Description",
  vpc_settings: { # required
    vpc_id: "VpcId", # required
    subnet_ids: ["SubnetId"], # required
  },
  edition: "Enterprise", # accepts Enterprise, Standard
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.directory_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The fully qualified domain name for the Managed Microsoft AD directory, such as ‘corp.example.com`. This name will resolve inside your VPC only. It does not need to be publicly resolvable.

  • :short_name (String)

    The NetBIOS name for your domain, such as ‘CORP`. If you don’t specify a NetBIOS name, it will default to the first part of your directory DNS. For example, ‘CORP` for the directory DNS `corp.example.com`.

  • :password (required, String)

    The password for the default administrative user named ‘Admin`.

    If you need to change the password for the administrator account, you can use the ResetUserPassword API call.

  • :description (String)

    A description for the directory. This label will appear on the Amazon Web Services console ‘Directory Details` page after the directory is created.

  • :vpc_settings (required, Types::DirectoryVpcSettings)

    Contains VPC information for the CreateDirectory or CreateMicrosoftAD operation.

  • :edition (String)

    Managed Microsoft AD is available in two editions: ‘Standard` and `Enterprise`. `Enterprise` is the default.

  • :tags (Array<Types::Tag>)

    The tags to be assigned to the Managed Microsoft AD directory.

Returns:

See Also:



1146
1147
1148
1149
# File 'lib/aws-sdk-directoryservice/client.rb', line 1146

def create_microsoft_ad(params = {}, options = {})
  req = build_request(:create_microsoft_ad, params)
  req.send_request(options)
end

#create_snapshot(params = {}) ⇒ Types::CreateSnapshotResult

Creates a snapshot of a Simple AD or Microsoft AD directory in the Amazon Web Services cloud.

<note markdown=“1”> You cannot take snapshots of AD Connector directories.

</note>

Examples:

Request syntax with placeholder values


resp = client.create_snapshot({
  directory_id: "DirectoryId", # required
  name: "SnapshotName",
})

Response structure


resp.snapshot_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory of which to take a snapshot.

  • :name (String)

    The descriptive name to apply to the snapshot.

Returns:

See Also:



1183
1184
1185
1186
# File 'lib/aws-sdk-directoryservice/client.rb', line 1183

def create_snapshot(params = {}, options = {})
  req = build_request(:create_snapshot, params)
  req.send_request(options)
end

#create_trust(params = {}) ⇒ Types::CreateTrustResult

Directory Service for Microsoft Active Directory allows you to configure trust relationships. For example, you can establish a trust between your Managed Microsoft AD directory, and your existing self-managed 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 Amazon Web Services side of a trust relationship between an Managed Microsoft AD directory and an external domain. You can create either a forest trust or an external trust.

Examples:

Request syntax with placeholder values


resp = client.create_trust({
  directory_id: "DirectoryId", # required
  remote_domain_name: "RemoteDomainName", # required
  trust_password: "TrustPassword", # required
  trust_direction: "One-Way: Outgoing", # required, accepts One-Way: Outgoing, One-Way: Incoming, Two-Way
  trust_type: "Forest", # accepts Forest, External
  conditional_forwarder_ip_addrs: ["IpAddr"],
  selective_auth: "Enabled", # accepts Enabled, Disabled
})

Response structure


resp.trust_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The Directory ID of the Managed Microsoft AD directory for which to establish the trust relationship.

  • :remote_domain_name (required, String)

    The Fully Qualified Domain Name (FQDN) of the external domain for which to create the trust relationship.

  • :trust_password (required, String)

    The trust password. The trust password must be the same password that was used when creating the trust relationship on the external domain.

  • :trust_direction (required, String)

    The direction of the trust relationship.

  • :trust_type (String)

    The trust relationship type. ‘Forest` is the default.

  • :conditional_forwarder_ip_addrs (Array<String>)

    The IP addresses of the remote DNS server associated with RemoteDomainName.

  • :selective_auth (String)

    Optional parameter to enable selective authentication for the trust.

Returns:

See Also:



1249
1250
1251
1252
# File 'lib/aws-sdk-directoryservice/client.rb', line 1249

def create_trust(params = {}, options = {})
  req = build_request(:create_trust, params)
  req.send_request(options)
end

#delete_conditional_forwarder(params = {}) ⇒ Struct

Deletes a conditional forwarder that has been set up for your Amazon Web Services directory.

Examples:

Request syntax with placeholder values


resp = client.delete_conditional_forwarder({
  directory_id: "DirectoryId", # required
  remote_domain_name: "RemoteDomainName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The directory ID for which you are deleting the conditional forwarder.

  • :remote_domain_name (required, String)

    The fully qualified domain name (FQDN) of the remote domain with which you are deleting the conditional forwarder.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1277
1278
1279
1280
# File 'lib/aws-sdk-directoryservice/client.rb', line 1277

def delete_conditional_forwarder(params = {}, options = {})
  req = build_request(:delete_conditional_forwarder, params)
  req.send_request(options)
end

#delete_directory(params = {}) ⇒ Types::DeleteDirectoryResult

Deletes an 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 [Directory Service API Permissions: Actions, Resources, and Conditions Reference].

[1]: docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html

Examples:

Request syntax with placeholder values


resp = client.delete_directory({
  directory_id: "DirectoryId", # required
})

Response structure


resp.directory_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory to delete.

Returns:

See Also:



1315
1316
1317
1318
# File 'lib/aws-sdk-directoryservice/client.rb', line 1315

def delete_directory(params = {}, options = {})
  req = build_request(:delete_directory, params)
  req.send_request(options)
end

#delete_log_subscription(params = {}) ⇒ Struct

Deletes the specified log subscription.

Examples:

Request syntax with placeholder values


resp = client.delete_log_subscription({
  directory_id: "DirectoryId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    Identifier of the directory whose log subscription you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1337
1338
1339
1340
# File 'lib/aws-sdk-directoryservice/client.rb', line 1337

def delete_log_subscription(params = {}, options = {})
  req = build_request(:delete_log_subscription, params)
  req.send_request(options)
end

#delete_snapshot(params = {}) ⇒ Types::DeleteSnapshotResult

Deletes a directory snapshot.

Examples:

Request syntax with placeholder values


resp = client.delete_snapshot({
  snapshot_id: "SnapshotId", # required
})

Response structure


resp.snapshot_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :snapshot_id (required, String)

    The identifier of the directory snapshot to be deleted.

Returns:

See Also:



1365
1366
1367
1368
# File 'lib/aws-sdk-directoryservice/client.rb', line 1365

def delete_snapshot(params = {}, options = {})
  req = build_request(:delete_snapshot, params)
  req.send_request(options)
end

#delete_trust(params = {}) ⇒ Types::DeleteTrustResult

Deletes an existing trust relationship between your Managed Microsoft AD directory and an external domain.

Examples:

Request syntax with placeholder values


resp = client.delete_trust({
  trust_id: "TrustId", # required
  delete_associated_conditional_forwarder: false,
})

Response structure


resp.trust_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :trust_id (required, String)

    The Trust ID of the trust relationship to be deleted.

  • :delete_associated_conditional_forwarder (Boolean)

    Delete a conditional forwarder as part of a DeleteTrustRequest.

Returns:

See Also:



1398
1399
1400
1401
# File 'lib/aws-sdk-directoryservice/client.rb', line 1398

def delete_trust(params = {}, options = {})
  req = build_request(:delete_trust, params)
  req.send_request(options)
end

#deregister_certificate(params = {}) ⇒ Struct

Deletes from the system the certificate that was registered for secure LDAP or client certificate authentication.

Examples:

Request syntax with placeholder values


resp = client.deregister_certificate({
  directory_id: "DirectoryId", # required
  certificate_id: "CertificateId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory.

  • :certificate_id (required, String)

    The identifier of the certificate.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1425
1426
1427
1428
# File 'lib/aws-sdk-directoryservice/client.rb', line 1425

def deregister_certificate(params = {}, options = {})
  req = build_request(:deregister_certificate, params)
  req.send_request(options)
end

#deregister_event_topic(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.deregister_event_topic({
  directory_id: "DirectoryId", # required
  topic_name: "TopicName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The Directory ID to remove as a publisher. This directory will no longer send messages to the specified Amazon SNS topic.

  • :topic_name (required, String)

    The name of the Amazon SNS topic from which to remove the directory as a publisher.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1454
1455
1456
1457
# File 'lib/aws-sdk-directoryservice/client.rb', line 1454

def deregister_event_topic(params = {}, options = {})
  req = build_request(:deregister_event_topic, params)
  req.send_request(options)
end

#describe_certificate(params = {}) ⇒ Types::DescribeCertificateResult

Displays information about the certificate registered for secure LDAP or client certificate authentication.

Examples:

Request syntax with placeholder values


resp = client.describe_certificate({
  directory_id: "DirectoryId", # required
  certificate_id: "CertificateId", # required
})

Response structure


resp.certificate.certificate_id #=> String
resp.certificate.state #=> String, one of "Registering", "Registered", "RegisterFailed", "Deregistering", "Deregistered", "DeregisterFailed"
resp.certificate.state_reason #=> String
resp.certificate.common_name #=> String
resp.certificate.registered_date_time #=> Time
resp.certificate.expiry_date_time #=> Time
resp.certificate.type #=> String, one of "ClientCertAuth", "ClientLDAPS"
resp.certificate.client_cert_auth_settings.ocsp_url #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory.

  • :certificate_id (required, String)

    The identifier of the certificate.

Returns:

See Also:



1494
1495
1496
1497
# File 'lib/aws-sdk-directoryservice/client.rb', line 1494

def describe_certificate(params = {}, options = {})
  req = build_request(:describe_certificate, params)
  req.send_request(options)
end

#describe_client_authentication_settings(params = {}) ⇒ Types::DescribeClientAuthenticationSettingsResult

Retrieves information about the type of client authentication for the specified directory, if the type is specified. If no type is specified, information about all client authentication types that are supported for the specified directory is retrieved. Currently, only ‘SmartCard` is supported.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_client_authentication_settings({
  directory_id: "DirectoryId", # required
  type: "SmartCard", # accepts SmartCard, SmartCardOrPassword
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.client_authentication_settings_info #=> Array
resp.client_authentication_settings_info[0].type #=> String, one of "SmartCard", "SmartCardOrPassword"
resp.client_authentication_settings_info[0].status #=> String, one of "Enabled", "Disabled"
resp.client_authentication_settings_info[0].last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory for which to retrieve information.

  • :type (String)

    The type of client authentication for which to retrieve information. If no type is specified, a list of all client authentication types that are supported for the specified directory is retrieved.

  • :next_token (String)

    The DescribeClientAuthenticationSettingsResult.NextToken value from a previous call to DescribeClientAuthenticationSettings. Pass null if this is the first call.

  • :limit (Integer)

    The maximum number of items to return. If this value is zero, the maximum number of items is specified by the limitations of the operation.

Returns:

See Also:



1551
1552
1553
1554
# File 'lib/aws-sdk-directoryservice/client.rb', line 1551

def describe_client_authentication_settings(params = {}, options = {})
  req = build_request(:describe_client_authentication_settings, params)
  req.send_request(options)
end

#describe_conditional_forwarders(params = {}) ⇒ 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.

Examples:

Request syntax with placeholder values


resp = client.describe_conditional_forwarders({
  directory_id: "DirectoryId", # required
  remote_domain_names: ["RemoteDomainName"],
})

Response structure


resp.conditional_forwarders #=> Array
resp.conditional_forwarders[0].remote_domain_name #=> String
resp.conditional_forwarders[0].dns_ip_addrs #=> Array
resp.conditional_forwarders[0].dns_ip_addrs[0] #=> String
resp.conditional_forwarders[0].replication_scope #=> String, one of "Domain"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The directory ID for which to get the list of associated conditional forwarders.

  • :remote_domain_names (Array<String>)

    The fully qualified domain names (FQDN) of the remote domains for which to get the list of associated conditional forwarders. If this member is null, all conditional forwarders are returned.

Returns:

See Also:



1594
1595
1596
1597
# File 'lib/aws-sdk-directoryservice/client.rb', line 1594

def describe_conditional_forwarders(params = {}, options = {})
  req = build_request(:describe_conditional_forwarders, params)
  req.send_request(options)
end

#describe_directories(params = {}) ⇒ 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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_directories({
  directory_ids: ["DirectoryId"],
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.directory_descriptions #=> Array
resp.directory_descriptions[0].directory_id #=> String
resp.directory_descriptions[0].name #=> String
resp.directory_descriptions[0].short_name #=> String
resp.directory_descriptions[0].size #=> String, one of "Small", "Large"
resp.directory_descriptions[0].edition #=> String, one of "Enterprise", "Standard"
resp.directory_descriptions[0].alias #=> String
resp.directory_descriptions[0].access_url #=> String
resp.directory_descriptions[0].description #=> String
resp.directory_descriptions[0].dns_ip_addrs #=> Array
resp.directory_descriptions[0].dns_ip_addrs[0] #=> String
resp.directory_descriptions[0].stage #=> String, one of "Requested", "Creating", "Created", "Active", "Inoperable", "Impaired", "Restoring", "RestoreFailed", "Deleting", "Deleted", "Failed", "Updating"
resp.directory_descriptions[0].share_status #=> String, one of "Shared", "PendingAcceptance", "Rejected", "Rejecting", "RejectFailed", "Sharing", "ShareFailed", "Deleted", "Deleting"
resp.directory_descriptions[0].share_method #=> String, one of "ORGANIZATIONS", "HANDSHAKE"
resp.directory_descriptions[0].share_notes #=> String
resp.directory_descriptions[0].launch_time #=> Time
resp.directory_descriptions[0].stage_last_updated_date_time #=> Time
resp.directory_descriptions[0].type #=> String, one of "SimpleAD", "ADConnector", "MicrosoftAD", "SharedMicrosoftAD"
resp.directory_descriptions[0].vpc_settings.vpc_id #=> String
resp.directory_descriptions[0].vpc_settings.subnet_ids #=> Array
resp.directory_descriptions[0].vpc_settings.subnet_ids[0] #=> String
resp.directory_descriptions[0].vpc_settings.security_group_id #=> String
resp.directory_descriptions[0].vpc_settings.availability_zones #=> Array
resp.directory_descriptions[0].vpc_settings.availability_zones[0] #=> String
resp.directory_descriptions[0].connect_settings.vpc_id #=> String
resp.directory_descriptions[0].connect_settings.subnet_ids #=> Array
resp.directory_descriptions[0].connect_settings.subnet_ids[0] #=> String
resp.directory_descriptions[0].connect_settings.customer_user_name #=> String
resp.directory_descriptions[0].connect_settings.security_group_id #=> String
resp.directory_descriptions[0].connect_settings.availability_zones #=> Array
resp.directory_descriptions[0].connect_settings.availability_zones[0] #=> String
resp.directory_descriptions[0].connect_settings.connect_ips #=> Array
resp.directory_descriptions[0].connect_settings.connect_ips[0] #=> String
resp.directory_descriptions[0].radius_settings.radius_servers #=> Array
resp.directory_descriptions[0].radius_settings.radius_servers[0] #=> String
resp.directory_descriptions[0].radius_settings.radius_port #=> Integer
resp.directory_descriptions[0].radius_settings.radius_timeout #=> Integer
resp.directory_descriptions[0].radius_settings.radius_retries #=> Integer
resp.directory_descriptions[0].radius_settings.shared_secret #=> String
resp.directory_descriptions[0].radius_settings.authentication_protocol #=> String, one of "PAP", "CHAP", "MS-CHAPv1", "MS-CHAPv2"
resp.directory_descriptions[0].radius_settings.display_label #=> String
resp.directory_descriptions[0].radius_settings.use_same_username #=> Boolean
resp.directory_descriptions[0].radius_status #=> String, one of "Creating", "Completed", "Failed"
resp.directory_descriptions[0].stage_reason #=> String
resp.directory_descriptions[0].sso_enabled #=> Boolean
resp.directory_descriptions[0].desired_number_of_domain_controllers #=> Integer
resp.directory_descriptions[0].owner_directory_description.directory_id #=> String
resp.directory_descriptions[0].owner_directory_description. #=> String
resp.directory_descriptions[0].owner_directory_description.dns_ip_addrs #=> Array
resp.directory_descriptions[0].owner_directory_description.dns_ip_addrs[0] #=> String
resp.directory_descriptions[0].owner_directory_description.vpc_settings.vpc_id #=> String
resp.directory_descriptions[0].owner_directory_description.vpc_settings.subnet_ids #=> Array
resp.directory_descriptions[0].owner_directory_description.vpc_settings.subnet_ids[0] #=> String
resp.directory_descriptions[0].owner_directory_description.vpc_settings.security_group_id #=> String
resp.directory_descriptions[0].owner_directory_description.vpc_settings.availability_zones #=> Array
resp.directory_descriptions[0].owner_directory_description.vpc_settings.availability_zones[0] #=> String
resp.directory_descriptions[0].owner_directory_description.radius_settings.radius_servers #=> Array
resp.directory_descriptions[0].owner_directory_description.radius_settings.radius_servers[0] #=> String
resp.directory_descriptions[0].owner_directory_description.radius_settings.radius_port #=> Integer
resp.directory_descriptions[0].owner_directory_description.radius_settings.radius_timeout #=> Integer
resp.directory_descriptions[0].owner_directory_description.radius_settings.radius_retries #=> Integer
resp.directory_descriptions[0].owner_directory_description.radius_settings.shared_secret #=> String
resp.directory_descriptions[0].owner_directory_description.radius_settings.authentication_protocol #=> String, one of "PAP", "CHAP", "MS-CHAPv1", "MS-CHAPv2"
resp.directory_descriptions[0].owner_directory_description.radius_settings.display_label #=> String
resp.directory_descriptions[0].owner_directory_description.radius_settings.use_same_username #=> Boolean
resp.directory_descriptions[0].owner_directory_description.radius_status #=> String, one of "Creating", "Completed", "Failed"
resp.directory_descriptions[0].regions_info.primary_region #=> String
resp.directory_descriptions[0].regions_info.additional_regions #=> Array
resp.directory_descriptions[0].regions_info.additional_regions[0] #=> String
resp.directory_descriptions[0].os_version #=> String, one of "SERVER_2012", "SERVER_2019"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_ids (Array<String>)

    A list of identifiers of the directories for which to obtain the information. If this member is null, all directories that belong to the current account are returned.

    An empty list results in an ‘InvalidParameterException` being thrown.

  • :next_token (String)

    The ‘DescribeDirectoriesResult.NextToken` value from a previous call to DescribeDirectories. Pass null if this is the first call.

  • :limit (Integer)

    The maximum number of items to return. If this value is zero, the maximum number of items is specified by the limitations of the operation.

Returns:

See Also:



1723
1724
1725
1726
# File 'lib/aws-sdk-directoryservice/client.rb', line 1723

def describe_directories(params = {}, options = {})
  req = build_request(:describe_directories, params)
  req.send_request(options)
end

#describe_directory_data_access(params = {}) ⇒ Types::DescribeDirectoryDataAccessResult

Obtains status of directory data access enablement through the Directory Service Data API for the specified directory.

Examples:

Request syntax with placeholder values


resp = client.describe_directory_data_access({
  directory_id: "DirectoryId", # required
})

Response structure


resp.data_access_status #=> String, one of "Disabled", "Disabling", "Enabled", "Enabling", "Failed"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The directory identifier.

Returns:

See Also:



1752
1753
1754
1755
# File 'lib/aws-sdk-directoryservice/client.rb', line 1752

def describe_directory_data_access(params = {}, options = {})
  req = build_request(:describe_directory_data_access, params)
  req.send_request(options)
end

#describe_domain_controllers(params = {}) ⇒ Types::DescribeDomainControllersResult

Provides information about any domain controllers in your directory.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_domain_controllers({
  directory_id: "DirectoryId", # required
  domain_controller_ids: ["DomainControllerId"],
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.domain_controllers #=> Array
resp.domain_controllers[0].directory_id #=> String
resp.domain_controllers[0].domain_controller_id #=> String
resp.domain_controllers[0].dns_ip_addr #=> String
resp.domain_controllers[0].vpc_id #=> String
resp.domain_controllers[0].subnet_id #=> String
resp.domain_controllers[0].availability_zone #=> String
resp.domain_controllers[0].status #=> String, one of "Creating", "Active", "Impaired", "Restoring", "Deleting", "Deleted", "Failed", "Updating"
resp.domain_controllers[0].status_reason #=> String
resp.domain_controllers[0].launch_time #=> Time
resp.domain_controllers[0].status_last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    Identifier of the directory for which to retrieve the domain controller information.

  • :domain_controller_ids (Array<String>)

    A list of identifiers for the domain controllers whose information will be provided.

  • :next_token (String)

    The DescribeDomainControllers.NextToken value from a previous call to DescribeDomainControllers. Pass null if this is the first call.

  • :limit (Integer)

    The maximum number of items to return.

Returns:

See Also:



1809
1810
1811
1812
# File 'lib/aws-sdk-directoryservice/client.rb', line 1809

def describe_domain_controllers(params = {}, options = {})
  req = build_request(:describe_domain_controllers, params)
  req.send_request(options)
end

#describe_event_topics(params = {}) ⇒ Types::DescribeEventTopicsResult

Obtains information about which Amazon 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.

Examples:

Request syntax with placeholder values


resp = client.describe_event_topics({
  directory_id: "DirectoryId",
  topic_names: ["TopicName"],
})

Response structure


resp.event_topics #=> Array
resp.event_topics[0].directory_id #=> String
resp.event_topics[0].topic_name #=> String
resp.event_topics[0].topic_arn #=> String
resp.event_topics[0].created_date_time #=> Time
resp.event_topics[0].status #=> String, one of "Registered", "Topic not found", "Failed", "Deleted"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (String)

    The Directory ID for which to get the list of associated Amazon SNS topics. If this member is null, associations for all Directory IDs are returned.

  • :topic_names (Array<String>)

    A list of Amazon SNS topic names for which to obtain the information. If this member is null, all associations for the specified Directory ID are returned.

    An empty list results in an ‘InvalidParameterException` being thrown.

Returns:

See Also:



1856
1857
1858
1859
# File 'lib/aws-sdk-directoryservice/client.rb', line 1856

def describe_event_topics(params = {}, options = {})
  req = build_request(:describe_event_topics, params)
  req.send_request(options)
end

#describe_ldaps_settings(params = {}) ⇒ Types::DescribeLDAPSSettingsResult

Describes the status of LDAP security for the specified directory.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_ldaps_settings({
  directory_id: "DirectoryId", # required
  type: "Client", # accepts Client
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.ldaps_settings_info #=> Array
resp.ldaps_settings_info[0].ldaps_status #=> String, one of "Enabling", "Enabled", "EnableFailed", "Disabled"
resp.ldaps_settings_info[0].ldaps_status_reason #=> String
resp.ldaps_settings_info[0].last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory.

  • :type (String)

    The type of LDAP security to enable. Currently only the value ‘Client` is supported.

  • :next_token (String)

    The type of next token used for pagination.

  • :limit (Integer)

    Specifies the number of items that should be displayed on one page.

Returns:

See Also:



1904
1905
1906
1907
# File 'lib/aws-sdk-directoryservice/client.rb', line 1904

def describe_ldaps_settings(params = {}, options = {})
  req = build_request(:describe_ldaps_settings, params)
  req.send_request(options)
end

#describe_regions(params = {}) ⇒ Types::DescribeRegionsResult

Provides information about the Regions that are configured for multi-Region replication.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_regions({
  directory_id: "DirectoryId", # required
  region_name: "RegionName",
  next_token: "NextToken",
})

Response structure


resp.regions_description #=> Array
resp.regions_description[0].directory_id #=> String
resp.regions_description[0].region_name #=> String
resp.regions_description[0].region_type #=> String, one of "Primary", "Additional"
resp.regions_description[0].status #=> String, one of "Requested", "Creating", "Created", "Active", "Inoperable", "Impaired", "Restoring", "RestoreFailed", "Deleting", "Deleted", "Failed", "Updating"
resp.regions_description[0].vpc_settings.vpc_id #=> String
resp.regions_description[0].vpc_settings.subnet_ids #=> Array
resp.regions_description[0].vpc_settings.subnet_ids[0] #=> String
resp.regions_description[0].desired_number_of_domain_controllers #=> Integer
resp.regions_description[0].launch_time #=> Time
resp.regions_description[0].status_last_updated_date_time #=> Time
resp.regions_description[0].last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory.

  • :region_name (String)

    The name of the Region. For example, ‘us-east-1`.

  • :next_token (String)

    The ‘DescribeRegionsResult.NextToken` value from a previous call to DescribeRegions. Pass null if this is the first call.

Returns:

See Also:



1957
1958
1959
1960
# File 'lib/aws-sdk-directoryservice/client.rb', line 1957

def describe_regions(params = {}, options = {})
  req = build_request(:describe_regions, params)
  req.send_request(options)
end

#describe_settings(params = {}) ⇒ Types::DescribeSettingsResult

Retrieves information about the configurable settings for the specified directory.

Examples:

Request syntax with placeholder values


resp = client.describe_settings({
  directory_id: "DirectoryId", # required
  status: "Requested", # accepts Requested, Updating, Updated, Failed, Default
  next_token: "NextToken",
})

Response structure


resp.directory_id #=> String
resp.setting_entries #=> Array
resp.setting_entries[0].type #=> String
resp.setting_entries[0].name #=> String
resp.setting_entries[0].allowed_values #=> String
resp.setting_entries[0].applied_value #=> String
resp.setting_entries[0].requested_value #=> String
resp.setting_entries[0].request_status #=> String, one of "Requested", "Updating", "Updated", "Failed", "Default"
resp.setting_entries[0].request_detailed_status #=> Hash
resp.setting_entries[0].request_detailed_status["RegionName"] #=> String, one of "Requested", "Updating", "Updated", "Failed", "Default"
resp.setting_entries[0].request_status_message #=> String
resp.setting_entries[0].last_updated_date_time #=> Time
resp.setting_entries[0].last_requested_date_time #=> Time
resp.setting_entries[0].data_type #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory for which to retrieve information.

  • :status (String)

    The status of the directory settings for which to retrieve information.

  • :next_token (String)

    The ‘DescribeSettingsResult.NextToken` value from a previous call to DescribeSettings. Pass null if this is the first call.

Returns:

See Also:



2012
2013
2014
2015
# File 'lib/aws-sdk-directoryservice/client.rb', line 2012

def describe_settings(params = {}, options = {})
  req = build_request(:describe_settings, params)
  req.send_request(options)
end

#describe_shared_directories(params = {}) ⇒ Types::DescribeSharedDirectoriesResult

Returns the shared directories in your account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_shared_directories({
  owner_directory_id: "DirectoryId", # required
  shared_directory_ids: ["DirectoryId"],
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.shared_directories #=> Array
resp.shared_directories[0]. #=> String
resp.shared_directories[0].owner_directory_id #=> String
resp.shared_directories[0].share_method #=> String, one of "ORGANIZATIONS", "HANDSHAKE"
resp.shared_directories[0]. #=> String
resp.shared_directories[0].shared_directory_id #=> String
resp.shared_directories[0].share_status #=> String, one of "Shared", "PendingAcceptance", "Rejected", "Rejecting", "RejectFailed", "Sharing", "ShareFailed", "Deleted", "Deleting"
resp.shared_directories[0].share_notes #=> String
resp.shared_directories[0].created_date_time #=> Time
resp.shared_directories[0].last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :owner_directory_id (required, String)

    Returns the identifier of the directory in the directory owner account.

  • :shared_directory_ids (Array<String>)

    A list of identifiers of all shared directories in your account.

  • :next_token (String)

    The ‘DescribeSharedDirectoriesResult.NextToken` value from a previous call to DescribeSharedDirectories. Pass null if this is the first call.

  • :limit (Integer)

    The number of shared directories to return in the response object.

Returns:

See Also:



2068
2069
2070
2071
# File 'lib/aws-sdk-directoryservice/client.rb', line 2068

def describe_shared_directories(params = {}, options = {})
  req = build_request(:describe_shared_directories, params)
  req.send_request(options)
end

#describe_snapshots(params = {}) ⇒ 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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_snapshots({
  directory_id: "DirectoryId",
  snapshot_ids: ["SnapshotId"],
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.snapshots #=> Array
resp.snapshots[0].directory_id #=> String
resp.snapshots[0].snapshot_id #=> String
resp.snapshots[0].type #=> String, one of "Auto", "Manual"
resp.snapshots[0].name #=> String
resp.snapshots[0].status #=> String, one of "Creating", "Completed", "Failed"
resp.snapshots[0].start_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (String)

    The identifier of the directory for which to retrieve snapshot information.

  • :snapshot_ids (Array<String>)

    A list of identifiers of the snapshots to obtain the information for. If this member is null or empty, all snapshots are returned using the Limit and NextToken members.

  • :next_token (String)

    The DescribeSnapshotsResult.NextToken value from a previous call to DescribeSnapshots. Pass null if this is the first call.

  • :limit (Integer)

    The maximum number of objects to return.

Returns:

See Also:



2131
2132
2133
2134
# File 'lib/aws-sdk-directoryservice/client.rb', line 2131

def describe_snapshots(params = {}, options = {})
  req = build_request(:describe_snapshots, params)
  req.send_request(options)
end

#describe_trusts(params = {}) ⇒ 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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_trusts({
  directory_id: "DirectoryId",
  trust_ids: ["TrustId"],
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.trusts #=> Array
resp.trusts[0].directory_id #=> String
resp.trusts[0].trust_id #=> String
resp.trusts[0].remote_domain_name #=> String
resp.trusts[0].trust_type #=> String, one of "Forest", "External"
resp.trusts[0].trust_direction #=> String, one of "One-Way: Outgoing", "One-Way: Incoming", "Two-Way"
resp.trusts[0].trust_state #=> String, one of "Creating", "Created", "Verifying", "VerifyFailed", "Verified", "Updating", "UpdateFailed", "Updated", "Deleting", "Deleted", "Failed"
resp.trusts[0].created_date_time #=> Time
resp.trusts[0].last_updated_date_time #=> Time
resp.trusts[0].state_last_updated_date_time #=> Time
resp.trusts[0].trust_state_reason #=> String
resp.trusts[0].selective_auth #=> String, one of "Enabled", "Disabled"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (String)

    The Directory ID of the Amazon Web Services directory that is a part of the requested trust relationship.

  • :trust_ids (Array<String>)

    A list of identifiers of the trust relationships for which to obtain the information. If this member is null, all trust relationships that belong to the current account are returned.

    An empty list results in an ‘InvalidParameterException` being thrown.

  • :next_token (String)

    The DescribeTrustsResult.NextToken value from a previous call to DescribeTrusts. Pass null if this is the first call.

  • :limit (Integer)

    The maximum number of objects to return.

Returns:

See Also:



2196
2197
2198
2199
# File 'lib/aws-sdk-directoryservice/client.rb', line 2196

def describe_trusts(params = {}, options = {})
  req = build_request(:describe_trusts, params)
  req.send_request(options)
end

#describe_update_directory(params = {}) ⇒ Types::DescribeUpdateDirectoryResult

Describes the updates of a directory for a particular update type.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_update_directory({
  directory_id: "DirectoryId", # required
  update_type: "OS", # required, accepts OS
  region_name: "RegionName",
  next_token: "NextToken",
})

Response structure


resp.update_activities #=> Array
resp.update_activities[0].region #=> String
resp.update_activities[0].status #=> String, one of "Updated", "Updating", "UpdateFailed"
resp.update_activities[0].status_reason #=> String
resp.update_activities[0].initiated_by #=> String
resp.update_activities[0].new_value.os_update_settings.os_version #=> String, one of "SERVER_2012", "SERVER_2019"
resp.update_activities[0].previous_value.os_update_settings.os_version #=> String, one of "SERVER_2012", "SERVER_2019"
resp.update_activities[0].start_time #=> Time
resp.update_activities[0].last_updated_date_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The unique identifier of the directory.

  • :update_type (required, String)

    The type of updates you want to describe for the directory.

  • :region_name (String)

    The name of the Region.

  • :next_token (String)

    The ‘DescribeUpdateDirectoryResult`. NextToken value from a previous call to DescribeUpdateDirectory. Pass null if this is the first call.

Returns:

See Also:



2249
2250
2251
2252
# File 'lib/aws-sdk-directoryservice/client.rb', line 2249

def describe_update_directory(params = {}, options = {})
  req = build_request(:describe_update_directory, params)
  req.send_request(options)
end

#disable_client_authentication(params = {}) ⇒ Struct

Disables alternative client authentication methods for the specified directory.

Examples:

Request syntax with placeholder values


resp = client.disable_client_authentication({
  directory_id: "DirectoryId", # required
  type: "SmartCard", # required, accepts SmartCard, SmartCardOrPassword
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory

  • :type (required, String)

    The type of client authentication to disable. Currently the only parameter ‘“SmartCard”` is supported.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2277
2278
2279
2280
# File 'lib/aws-sdk-directoryservice/client.rb', line 2277

def disable_client_authentication(params = {}, options = {})
  req = build_request(:disable_client_authentication, params)
  req.send_request(options)
end

#disable_directory_data_access(params = {}) ⇒ Struct

Deactivates access to directory data via the Directory Service Data API for the specified directory.

Examples:

Request syntax with placeholder values


resp = client.disable_directory_data_access({
  directory_id: "DirectoryId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The directory identifier.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2300
2301
2302
2303
# File 'lib/aws-sdk-directoryservice/client.rb', line 2300

def disable_directory_data_access(params = {}, options = {})
  req = build_request(:disable_directory_data_access, params)
  req.send_request(options)
end

#disable_ldaps(params = {}) ⇒ Struct

Deactivates LDAP secure calls for the specified directory.

Examples:

Request syntax with placeholder values


resp = client.disable_ldaps({
  directory_id: "DirectoryId", # required
  type: "Client", # required, accepts Client
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory.

  • :type (required, String)

    The type of LDAP security to enable. Currently only the value ‘Client` is supported.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2327
2328
2329
2330
# File 'lib/aws-sdk-directoryservice/client.rb', line 2327

def disable_ldaps(params = {}, options = {})
  req = build_request(:disable_ldaps, params)
  req.send_request(options)
end

#disable_radius(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.disable_radius({
  directory_id: "DirectoryId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory for which to disable MFA.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2351
2352
2353
2354
# File 'lib/aws-sdk-directoryservice/client.rb', line 2351

def disable_radius(params = {}, options = {})
  req = build_request(:disable_radius, params)
  req.send_request(options)
end

#disable_sso(params = {}) ⇒ Struct

Disables single-sign on for a directory.

Examples:

Request syntax with placeholder values


resp = client.disable_sso({
  directory_id: "DirectoryId", # required
  user_name: "UserName",
  password: "ConnectPassword",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory for which to disable single-sign on.

  • :user_name (String)

    The username of an alternate account to use to disable single-sign on. This is only used for AD Connector directories. This account must have privileges to remove a service principal name.

    If the AD Connector service account does not have privileges to remove a service principal name, you can specify an alternate account with the UserName and Password parameters. These credentials are only used to disable single sign-on and are not stored by the service. The AD Connector service account is not changed.

  • :password (String)

    The password of an alternate account to use to disable single-sign on. This is only used for AD Connector directories. For more information, see the UserName parameter.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2391
2392
2393
2394
# File 'lib/aws-sdk-directoryservice/client.rb', line 2391

def disable_sso(params = {}, options = {})
  req = build_request(:disable_sso, params)
  req.send_request(options)
end

#enable_client_authentication(params = {}) ⇒ Struct

Enables alternative client authentication methods for the specified directory.

Examples:

Request syntax with placeholder values


resp = client.enable_client_authentication({
  directory_id: "DirectoryId", # required
  type: "SmartCard", # required, accepts SmartCard, SmartCardOrPassword
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the specified directory.

  • :type (required, String)

    The type of client authentication to enable. Currently only the value ‘SmartCard` is supported. Smart card authentication in AD Connector requires that you enable Kerberos Constrained Delegation for the Service User to the LDAP service in your self-managed AD.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2421
2422
2423
2424
# File 'lib/aws-sdk-directoryservice/client.rb', line 2421

def enable_client_authentication(params = {}, options = {})
  req = build_request(:enable_client_authentication, params)
  req.send_request(options)
end

#enable_directory_data_access(params = {}) ⇒ Struct

Enables access to directory data via the Directory Service Data API for the specified directory.

Examples:

Request syntax with placeholder values


resp = client.enable_directory_data_access({
  directory_id: "DirectoryId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The directory identifier.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2444
2445
2446
2447
# File 'lib/aws-sdk-directoryservice/client.rb', line 2444

def enable_directory_data_access(params = {}, options = {})
  req = build_request(:enable_directory_data_access, params)
  req.send_request(options)
end

#enable_ldaps(params = {}) ⇒ Struct

Activates the switch for the specific directory to always use LDAP secure calls.

Examples:

Request syntax with placeholder values


resp = client.enable_ldaps({
  directory_id: "DirectoryId", # required
  type: "Client", # required, accepts Client
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory.

  • :type (required, String)

    The type of LDAP security to enable. Currently only the value ‘Client` is supported.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2472
2473
2474
2475
# File 'lib/aws-sdk-directoryservice/client.rb', line 2472

def enable_ldaps(params = {}, options = {})
  req = build_request(:enable_ldaps, params)
  req.send_request(options)
end

#enable_radius(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.enable_radius({
  directory_id: "DirectoryId", # required
  radius_settings: { # required
    radius_servers: ["Server"],
    radius_port: 1,
    radius_timeout: 1,
    radius_retries: 1,
    shared_secret: "RadiusSharedSecret",
    authentication_protocol: "PAP", # accepts PAP, CHAP, MS-CHAPv1, MS-CHAPv2
    display_label: "RadiusDisplayLabel",
    use_same_username: false,
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory for which to enable MFA.

  • :radius_settings (required, Types::RadiusSettings)

    A RadiusSettings object that contains information about the RADIUS server.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2510
2511
2512
2513
# File 'lib/aws-sdk-directoryservice/client.rb', line 2510

def enable_radius(params = {}, options = {})
  req = build_request(:enable_radius, params)
  req.send_request(options)
end

#enable_sso(params = {}) ⇒ Struct

Enables single sign-on for a directory. Single sign-on allows users in your directory to access certain Amazon Web Services services from a computer joined to the directory without having to enter their credentials separately.

Examples:

Request syntax with placeholder values


resp = client.enable_sso({
  directory_id: "DirectoryId", # required
  user_name: "UserName",
  password: "ConnectPassword",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory for which to enable single-sign on.

  • :user_name (String)

    The username of an alternate account to use to enable single-sign on. This is only used for AD Connector directories. This account must have privileges to add a service principal name.

    If the AD Connector service account does not have privileges to add a service principal name, you can specify an alternate account with the UserName and Password parameters. These credentials are only used to enable single sign-on and are not stored by the service. The AD Connector service account is not changed.

  • :password (String)

    The password of an alternate account to use to enable single-sign on. This is only used for AD Connector directories. For more information, see the UserName parameter.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2553
2554
2555
2556
# File 'lib/aws-sdk-directoryservice/client.rb', line 2553

def enable_sso(params = {}, options = {})
  req = build_request(:enable_sso, params)
  req.send_request(options)
end

#get_directory_limits(params = {}) ⇒ Types::GetDirectoryLimitsResult

Obtains directory limit information for the current Region.

Examples:

Response structure


resp.directory_limits.cloud_only_directories_limit #=> Integer
resp.directory_limits.cloud_only_directories_current_count #=> Integer
resp.directory_limits.cloud_only_directories_limit_reached #=> Boolean
resp.directory_limits.cloud_only_microsoft_ad_limit #=> Integer
resp.directory_limits.cloud_only_microsoft_ad_current_count #=> Integer
resp.directory_limits.cloud_only_microsoft_ad_limit_reached #=> Boolean
resp.directory_limits.connected_directories_limit #=> Integer
resp.directory_limits.connected_directories_current_count #=> Integer
resp.directory_limits.connected_directories_limit_reached #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:

See Also:



2580
2581
2582
2583
# File 'lib/aws-sdk-directoryservice/client.rb', line 2580

def get_directory_limits(params = {}, options = {})
  req = build_request(:get_directory_limits, params)
  req.send_request(options)
end

#get_snapshot_limits(params = {}) ⇒ Types::GetSnapshotLimitsResult

Obtains the manual snapshot limits for a directory.

Examples:

Request syntax with placeholder values


resp = client.get_snapshot_limits({
  directory_id: "DirectoryId", # required
})

Response structure


resp.snapshot_limits.manual_snapshots_limit #=> Integer
resp.snapshot_limits.manual_snapshots_current_count #=> Integer
resp.snapshot_limits.manual_snapshots_limit_reached #=> Boolean

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    Contains the identifier of the directory to obtain the limits for.

Returns:

See Also:



2610
2611
2612
2613
# File 'lib/aws-sdk-directoryservice/client.rb', line 2610

def get_snapshot_limits(params = {}, options = {})
  req = build_request(:get_snapshot_limits, params)
  req.send_request(options)
end

#list_certificates(params = {}) ⇒ Types::ListCertificatesResult

For the specified directory, lists all the certificates registered for a secure LDAP or client certificate authentication.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_certificates({
  directory_id: "DirectoryId", # required
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.next_token #=> String
resp.certificates_info #=> Array
resp.certificates_info[0].certificate_id #=> String
resp.certificates_info[0].common_name #=> String
resp.certificates_info[0].state #=> String, one of "Registering", "Registered", "RegisterFailed", "Deregistering", "Deregistered", "DeregisterFailed"
resp.certificates_info[0].expiry_date_time #=> Time
resp.certificates_info[0].type #=> String, one of "ClientCertAuth", "ClientLDAPS"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory.

  • :next_token (String)

    A token for requesting another page of certificates if the ‘NextToken` response element indicates that more certificates are available. Use the value of the returned `NextToken` element in your request until the token comes back as `null`. Pass `null` if this is the first call.

  • :limit (Integer)

    The number of items that should show up on one page

Returns:

See Also:



2659
2660
2661
2662
# File 'lib/aws-sdk-directoryservice/client.rb', line 2659

def list_certificates(params = {}, options = {})
  req = build_request(:list_certificates, params)
  req.send_request(options)
end

#list_ip_routes(params = {}) ⇒ Types::ListIpRoutesResult

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_ip_routes({
  directory_id: "DirectoryId", # required
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.ip_routes_info #=> Array
resp.ip_routes_info[0].directory_id #=> String
resp.ip_routes_info[0].cidr_ip #=> String
resp.ip_routes_info[0].ip_route_status_msg #=> String, one of "Adding", "Added", "Removing", "Removed", "AddFailed", "RemoveFailed"
resp.ip_routes_info[0].added_date_time #=> Time
resp.ip_routes_info[0].ip_route_status_reason #=> String
resp.ip_routes_info[0].description #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    Identifier (ID) of the directory for which you want to retrieve the IP addresses.

  • :next_token (String)

    The ListIpRoutes.NextToken value from a previous call to ListIpRoutes. Pass null if this is the first call.

  • :limit (Integer)

    Maximum number of items to return. If this value is zero, the maximum number of items is specified by the limitations of the operation.

Returns:

See Also:



2708
2709
2710
2711
# File 'lib/aws-sdk-directoryservice/client.rb', line 2708

def list_ip_routes(params = {}, options = {})
  req = build_request(:list_ip_routes, params)
  req.send_request(options)
end

#list_log_subscriptions(params = {}) ⇒ Types::ListLogSubscriptionsResult

Lists the active log subscriptions for the Amazon Web Services account.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_log_subscriptions({
  directory_id: "DirectoryId",
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.log_subscriptions #=> Array
resp.log_subscriptions[0].directory_id #=> String
resp.log_subscriptions[0].log_group_name #=> String
resp.log_subscriptions[0].subscription_created_date_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (String)

    If a DirectoryID is provided, lists only the log subscription associated with that directory. If no DirectoryId is provided, lists all log subscriptions associated with your Amazon Web Services account. If there are no log subscriptions for the Amazon Web Services account or the directory, an empty list will be returned.

  • :next_token (String)

    The token for the next set of items to return.

  • :limit (Integer)

    The maximum number of items returned.

Returns:

See Also:



2756
2757
2758
2759
# File 'lib/aws-sdk-directoryservice/client.rb', line 2756

def list_log_subscriptions(params = {}, options = {})
  req = build_request(:list_log_subscriptions, params)
  req.send_request(options)
end

#list_schema_extensions(params = {}) ⇒ Types::ListSchemaExtensionsResult

Lists all schema extensions applied to a Microsoft AD Directory.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_schema_extensions({
  directory_id: "DirectoryId", # required
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.schema_extensions_info #=> Array
resp.schema_extensions_info[0].directory_id #=> String
resp.schema_extensions_info[0].schema_extension_id #=> String
resp.schema_extensions_info[0].description #=> String
resp.schema_extensions_info[0].schema_extension_status #=> String, one of "Initializing", "CreatingSnapshot", "UpdatingSchema", "Replicating", "CancelInProgress", "RollbackInProgress", "Cancelled", "Failed", "Completed"
resp.schema_extensions_info[0].schema_extension_status_reason #=> String
resp.schema_extensions_info[0].start_date_time #=> Time
resp.schema_extensions_info[0].end_date_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory from which to retrieve the schema extension information.

  • :next_token (String)

    The ‘ListSchemaExtensions.NextToken` value from a previous call to `ListSchemaExtensions`. Pass null if this is the first call.

  • :limit (Integer)

    The maximum number of items to return.

Returns:

See Also:



2805
2806
2807
2808
# File 'lib/aws-sdk-directoryservice/client.rb', line 2805

def list_schema_extensions(params = {}, options = {})
  req = build_request(:list_schema_extensions, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResult

Lists all tags on a directory.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_id: "ResourceId", # required
  next_token: "NextToken",
  limit: 1,
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_id (required, String)

    Identifier (ID) of the directory for which you want to retrieve tags.

  • :next_token (String)

    Reserved for future use.

  • :limit (Integer)

    Reserved for future use.

Returns:

See Also:



2847
2848
2849
2850
# File 'lib/aws-sdk-directoryservice/client.rb', line 2847

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#register_certificate(params = {}) ⇒ Types::RegisterCertificateResult

Registers a certificate for a secure LDAP or client certificate authentication.

Examples:

Request syntax with placeholder values


resp = client.register_certificate({
  directory_id: "DirectoryId", # required
  certificate_data: "CertificateData", # required
  type: "ClientCertAuth", # accepts ClientCertAuth, ClientLDAPS
  client_cert_auth_settings: {
    ocsp_url: "OCSPUrl",
  },
})

Response structure


resp.certificate_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory.

  • :certificate_data (required, String)

    The certificate PEM string that needs to be registered.

  • :type (String)

    The function that the registered certificate performs. Valid values include ‘ClientLDAPS` or `ClientCertAuth`. The default value is `ClientLDAPS`.

  • :client_cert_auth_settings (Types::ClientCertAuthSettings)

    A ‘ClientCertAuthSettings` object that contains client certificate authentication settings.

Returns:

See Also:



2893
2894
2895
2896
# File 'lib/aws-sdk-directoryservice/client.rb', line 2893

def register_certificate(params = {}, options = {})
  req = build_request(:register_certificate, params)
  req.send_request(options)
end

#register_event_topic(params = {}) ⇒ Struct

Associates a directory with an Amazon SNS topic. This establishes the directory as a publisher to the specified Amazon 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.

Examples:

Request syntax with placeholder values


resp = client.register_event_topic({
  directory_id: "DirectoryId", # required
  topic_name: "TopicName", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The Directory ID that will publish status messages to the Amazon SNS topic.

  • :topic_name (required, String)

    The Amazon SNS topic name to which the directory will publish status messages. This Amazon SNS topic must be in the same region as the specified Directory ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2927
2928
2929
2930
# File 'lib/aws-sdk-directoryservice/client.rb', line 2927

def register_event_topic(params = {}, options = {})
  req = build_request(:register_event_topic, params)
  req.send_request(options)
end

#reject_shared_directory(params = {}) ⇒ Types::RejectSharedDirectoryResult

Rejects a directory sharing request that was sent from the directory owner account.

Examples:

Request syntax with placeholder values


resp = client.reject_shared_directory({
  shared_directory_id: "DirectoryId", # required
})

Response structure


resp.shared_directory_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :shared_directory_id (required, String)

    Identifier of the shared directory in the directory consumer account. This identifier is different for each directory owner account.

Returns:

See Also:



2957
2958
2959
2960
# File 'lib/aws-sdk-directoryservice/client.rb', line 2957

def reject_shared_directory(params = {}, options = {})
  req = build_request(:reject_shared_directory, params)
  req.send_request(options)
end

#remove_ip_routes(params = {}) ⇒ Struct

Removes IP address blocks from a directory.

Examples:

Request syntax with placeholder values


resp = client.remove_ip_routes({
  directory_id: "DirectoryId", # required
  cidr_ips: ["CidrIp"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    Identifier (ID) of the directory from which you want to remove the IP addresses.

  • :cidr_ips (required, Array<String>)

    IP address blocks that you want to remove.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2984
2985
2986
2987
# File 'lib/aws-sdk-directoryservice/client.rb', line 2984

def remove_ip_routes(params = {}, options = {})
  req = build_request(:remove_ip_routes, params)
  req.send_request(options)
end

#remove_region(params = {}) ⇒ 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.

Examples:

Request syntax with placeholder values


resp = client.remove_region({
  directory_id: "DirectoryId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory for which you want to remove Region replication.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3009
3010
3011
3012
# File 'lib/aws-sdk-directoryservice/client.rb', line 3009

def remove_region(params = {}, options = {})
  req = build_request(:remove_region, params)
  req.send_request(options)
end

#remove_tags_from_resource(params = {}) ⇒ Struct

Removes tags from a directory.

Examples:

Request syntax with placeholder values


resp = client.remove_tags_from_resource({
  resource_id: "ResourceId", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_id (required, String)

    Identifier (ID) of the directory from which to remove the tag.

  • :tag_keys (required, Array<String>)

    The tag key (name) of the tag to be removed.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3035
3036
3037
3038
# File 'lib/aws-sdk-directoryservice/client.rb', line 3035

def remove_tags_from_resource(params = {}, options = {})
  req = build_request(:remove_tags_from_resource, params)
  req.send_request(options)
end

#reset_user_password(params = {}) ⇒ Struct

Resets the password for any user in your Managed Microsoft AD or Simple AD directory. Disabled users will become enabled and can be authenticated following the API call.

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 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 **Amazon Web Services Reserved** OU. For more information about the OU structure for an Managed Microsoft AD directory, see [What Gets Created] in the *Directory Service Administration Guide*.

[1]: docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_getting_started_what_gets_created.html

Examples:

Request syntax with placeholder values


resp = client.reset_user_password({
  directory_id: "DirectoryId", # required
  user_name: "CustomerUserName", # required
  new_password: "UserPassword", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    Identifier of the Managed Microsoft AD or Simple AD directory in which the user resides.

  • :user_name (required, String)

    The user name of the user whose password will be reset.

  • :new_password (required, String)

    The new password that will be reset.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3087
3088
3089
3090
# File 'lib/aws-sdk-directoryservice/client.rb', line 3087

def reset_user_password(params = {}, options = {})
  req = build_request(:reset_user_password, params)
  req.send_request(options)
end

#restore_from_snapshot(params = {}) ⇒ 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.

Examples:

Request syntax with placeholder values


resp = client.restore_from_snapshot({
  snapshot_id: "SnapshotId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :snapshot_id (required, String)

    The identifier of the snapshot to restore from.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3118
3119
3120
3121
# File 'lib/aws-sdk-directoryservice/client.rb', line 3118

def restore_from_snapshot(params = {}, options = {})
  req = build_request(:restore_from_snapshot, params)
  req.send_request(options)
end

#share_directory(params = {}) ⇒ Types::ShareDirectoryResult

Shares a specified directory (‘DirectoryId`) in your Amazon Web Services account (directory owner) with another Amazon Web Services account (directory consumer). With this operation you can use your directory from any Amazon Web Services account and from any Amazon VPC within an Amazon Web Services Region.

When you share your Managed Microsoft AD directory, 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 Amazon Web Services accounts inside the same Amazon Web Services organization (`ORGANIZATIONS`). It also determines whether you can share the directory with any other Amazon Web Services 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.

Examples:

Request syntax with placeholder values


resp = client.share_directory({
  directory_id: "DirectoryId", # required
  share_notes: "Notes",
  share_target: { # required
    id: "TargetId", # required
    type: "ACCOUNT", # required, accepts ACCOUNT
  },
  share_method: "ORGANIZATIONS", # required, accepts ORGANIZATIONS, HANDSHAKE
})

Response structure


resp.shared_directory_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    Identifier of the Managed Microsoft AD directory that you want to share with other Amazon Web Services accounts.

  • :share_notes (String)

    A directory share request that is sent by the directory owner to the directory consumer. The request includes a typed message to help the directory consumer administrator determine whether to approve or reject the share invitation.

  • :share_target (required, Types::ShareTarget)

    Identifier for the directory consumer account with whom the directory is to be shared.

  • :share_method (required, String)

    The method used when sharing a directory to determine whether the directory should be shared within your Amazon Web Services organization (‘ORGANIZATIONS`) or with any Amazon Web Services account by sending a directory sharing request (`HANDSHAKE`).

Returns:

See Also:



3188
3189
3190
3191
# File 'lib/aws-sdk-directoryservice/client.rb', line 3188

def share_directory(params = {}, options = {})
  req = build_request(:share_directory, params)
  req.send_request(options)
end

#start_schema_extension(params = {}) ⇒ Types::StartSchemaExtensionResult

Applies a schema extension to a Microsoft AD directory.

Examples:

Request syntax with placeholder values


resp = client.start_schema_extension({
  directory_id: "DirectoryId", # required
  create_snapshot_before_schema_extension: false, # required
  ldif_content: "LdifContent", # required
  description: "Description", # required
})

Response structure


resp.schema_extension_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory for which the schema extension will be applied to.

  • :create_snapshot_before_schema_extension (required, Boolean)

    If true, creates a snapshot of the directory before applying the schema extension.

  • :ldif_content (required, String)

    The LDIF file represented as a string. To construct the LdifContent string, precede each line as it would be formatted in an ldif file with \n. See the example request below for more details. The file size can be no larger than 1MB.

  • :description (required, String)

    A description of the schema extension.

Returns:

See Also:



3233
3234
3235
3236
# File 'lib/aws-sdk-directoryservice/client.rb', line 3233

def start_schema_extension(params = {}, options = {})
  req = build_request(:start_schema_extension, params)
  req.send_request(options)
end

#unshare_directory(params = {}) ⇒ Types::UnshareDirectoryResult

Stops the directory sharing between the directory owner and consumer accounts.

Examples:

Request syntax with placeholder values


resp = client.unshare_directory({
  directory_id: "DirectoryId", # required
  unshare_target: { # required
    id: "TargetId", # required
    type: "ACCOUNT", # required, accepts ACCOUNT
  },
})

Response structure


resp.shared_directory_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the Managed Microsoft AD directory that you want to stop sharing.

  • :unshare_target (required, Types::UnshareTarget)

    Identifier for the directory consumer account with whom the directory has to be unshared.

Returns:

See Also:



3271
3272
3273
3274
# File 'lib/aws-sdk-directoryservice/client.rb', line 3271

def unshare_directory(params = {}, options = {})
  req = build_request(:unshare_directory, params)
  req.send_request(options)
end

#update_conditional_forwarder(params = {}) ⇒ Struct

Updates a conditional forwarder that has been set up for your Amazon Web Services directory.

Examples:

Request syntax with placeholder values


resp = client.update_conditional_forwarder({
  directory_id: "DirectoryId", # required
  remote_domain_name: "RemoteDomainName", # required
  dns_ip_addrs: ["IpAddr"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The directory ID of the Amazon Web Services directory for which to update the conditional forwarder.

  • :remote_domain_name (required, String)

    The fully qualified domain name (FQDN) of the remote domain with which you will set up a trust relationship.

  • :dns_ip_addrs (required, Array<String>)

    The updated IP addresses of the remote DNS server associated with the conditional forwarder.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3305
3306
3307
3308
# File 'lib/aws-sdk-directoryservice/client.rb', line 3305

def update_conditional_forwarder(params = {}, options = {})
  req = build_request(:update_conditional_forwarder, params)
  req.send_request(options)
end

#update_directory_setup(params = {}) ⇒ Struct

Updates the directory for a particular update type.

Examples:

Request syntax with placeholder values


resp = client.update_directory_setup({
  directory_id: "DirectoryId", # required
  update_type: "OS", # required, accepts OS
  os_update_settings: {
    os_version: "SERVER_2012", # accepts SERVER_2012, SERVER_2019
  },
  create_snapshot_before_update: false,
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory on which you want to perform the update.

  • :update_type (required, String)

    The type of update that needs to be performed on the directory. For example, OS.

  • :os_update_settings (Types::OSUpdateSettings)

    The settings for the OS update that needs to be performed on the directory.

  • :create_snapshot_before_update (Boolean)

    The boolean that specifies if a snapshot for the directory needs to be taken before updating the directory.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3345
3346
3347
3348
# File 'lib/aws-sdk-directoryservice/client.rb', line 3345

def update_directory_setup(params = {}, options = {})
  req = build_request(:update_directory_setup, params)
  req.send_request(options)
end

#update_number_of_domain_controllers(params = {}) ⇒ 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.

Examples:

Request syntax with placeholder values


resp = client.update_number_of_domain_controllers({
  directory_id: "DirectoryId", # required
  desired_number: 1, # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    Identifier of the directory to which the domain controllers will be added or removed.

  • :desired_number (required, Integer)

    The number of domain controllers desired in the directory.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3377
3378
3379
3380
# File 'lib/aws-sdk-directoryservice/client.rb', line 3377

def update_number_of_domain_controllers(params = {}, options = {})
  req = build_request(:update_number_of_domain_controllers, params)
  req.send_request(options)
end

#update_radius(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


resp = client.update_radius({
  directory_id: "DirectoryId", # required
  radius_settings: { # required
    radius_servers: ["Server"],
    radius_port: 1,
    radius_timeout: 1,
    radius_retries: 1,
    shared_secret: "RadiusSharedSecret",
    authentication_protocol: "PAP", # accepts PAP, CHAP, MS-CHAPv1, MS-CHAPv2
    display_label: "RadiusDisplayLabel",
    use_same_username: false,
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory for which to update the RADIUS server information.

  • :radius_settings (required, Types::RadiusSettings)

    A RadiusSettings object that contains information about the RADIUS server.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3415
3416
3417
3418
# File 'lib/aws-sdk-directoryservice/client.rb', line 3415

def update_radius(params = {}, options = {})
  req = build_request(:update_radius, params)
  req.send_request(options)
end

#update_settings(params = {}) ⇒ Types::UpdateSettingsResult

Updates the configurable settings for the specified directory.

Examples:

Request syntax with placeholder values


resp = client.update_settings({
  directory_id: "DirectoryId", # required
  settings: [ # required
    {
      name: "DirectoryConfigurationSettingName", # required
      value: "DirectoryConfigurationSettingValue", # required
    },
  ],
})

Response structure


resp.directory_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :directory_id (required, String)

    The identifier of the directory for which to update settings.

  • :settings (required, Array<Types::Setting>)

    The list of Setting objects.

Returns:

See Also:



3452
3453
3454
3455
# File 'lib/aws-sdk-directoryservice/client.rb', line 3452

def update_settings(params = {}, options = {})
  req = build_request(:update_settings, params)
  req.send_request(options)
end

#update_trust(params = {}) ⇒ Types::UpdateTrustResult

Updates the trust that has been set up between your Managed Microsoft AD directory and an self-managed Active Directory.

Examples:

Request syntax with placeholder values


resp = client.update_trust({
  trust_id: "TrustId", # required
  selective_auth: "Enabled", # accepts Enabled, Disabled
})

Response structure


resp.request_id #=> String
resp.trust_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :trust_id (required, String)

    Identifier of the trust relationship.

  • :selective_auth (String)

    Updates selective authentication for the trust.

Returns:

See Also:



3487
3488
3489
3490
# File 'lib/aws-sdk-directoryservice/client.rb', line 3487

def update_trust(params = {}, options = {})
  req = build_request(:update_trust, params)
  req.send_request(options)
end

#verify_trust(params = {}) ⇒ Types::VerifyTrustResult

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

This action verifies a trust relationship between your Managed Microsoft AD directory and an external domain.

Examples:

Request syntax with placeholder values


resp = client.verify_trust({
  trust_id: "TrustId", # required
})

Response structure


resp.trust_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :trust_id (required, String)

    The unique Trust ID of the trust relationship to verify.

Returns:

See Also:



3519
3520
3521
3522
# File 'lib/aws-sdk-directoryservice/client.rb', line 3519

def verify_trust(params = {}, options = {})
  req = build_request(:verify_trust, params)
  req.send_request(options)
end

#waiter_namesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated.


3548
3549
3550
# File 'lib/aws-sdk-directoryservice/client.rb', line 3548

def waiter_names
  []
end