pub struct Client { /* private fields */ }
Expand description

Client for AWS Directory Service

Client for invoking operations on AWS Directory Service. Each operation on AWS Directory Service is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_directory::Client::new(&config);

Occasionally, SDKs may have additional service-specific that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Config struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_directory::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

Using the Client

A client has a function for every operation that can be performed by the service. For example, the AcceptSharedDirectory operation has a Client::accept_shared_directory, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.accept_shared_directory()
    .shared_directory_id("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

Implementations§

source§

impl Client

source

pub fn accept_shared_directory(&self) -> AcceptSharedDirectoryFluentBuilder

Constructs a fluent builder for the AcceptSharedDirectory operation.

source§

impl Client

source

pub fn add_ip_routes(&self) -> AddIpRoutesFluentBuilder

Constructs a fluent builder for the AddIpRoutes operation.

  • The fluent builder is configurable:
    • directory_id(impl ::std::convert::Into<String>) / set_directory_id(Option<String>):

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

    • ip_routes(Vec<IpRoute>) / set_ip_routes(Option<Vec<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(bool) / set_update_security_group_for_directory_controllers(Option<bool>):

      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: 0.0.0.0/0

      • Type: Custom UDP Rule, Protocol: UDP, Range: 123, Source: 0.0.0.0/0

      • Type: Custom UDP Rule, Protocol: UDP, Range: 138, Source: 0.0.0.0/0

      • Type: Custom UDP Rule, Protocol: UDP, Range: 389, Source: 0.0.0.0/0

      • Type: Custom UDP Rule, Protocol: UDP, Range: 464, Source: 0.0.0.0/0

      • Type: Custom UDP Rule, Protocol: UDP, Range: 445, Source: 0.0.0.0/0

      • Type: Custom TCP Rule, Protocol: TCP, Range: 88, Source: 0.0.0.0/0

      • Type: Custom TCP Rule, Protocol: TCP, Range: 135, Source: 0.0.0.0/0

      • Type: Custom TCP Rule, Protocol: TCP, Range: 445, Source: 0.0.0.0/0

      • Type: Custom TCP Rule, Protocol: TCP, Range: 464, Source: 0.0.0.0/0

      • Type: Custom TCP Rule, Protocol: TCP, Range: 636, Source: 0.0.0.0/0

      • Type: Custom TCP Rule, Protocol: TCP, Range: 1024-65535, Source: 0.0.0.0/0

      • Type: Custom TCP Rule, Protocol: TCP, Range: 3268-33269, Source: 0.0.0.0/0

      • Type: DNS (UDP), Protocol: UDP, Range: 53, Source: 0.0.0.0/0

      • Type: DNS (TCP), Protocol: TCP, Range: 53, Source: 0.0.0.0/0

      • Type: LDAP, Protocol: TCP, Range: 389, Source: 0.0.0.0/0

      • Type: All ICMP, Protocol: All, Range: N/A, Source: 0.0.0.0/0

      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.

  • On success, responds with AddIpRoutesOutput
  • On failure, responds with SdkError<AddIpRoutesError>
source§

impl Client

source

pub fn add_region(&self) -> AddRegionFluentBuilder

Constructs a fluent builder for the AddRegion operation.

source§

impl Client

source

pub fn add_tags_to_resource(&self) -> AddTagsToResourceFluentBuilder

Constructs a fluent builder for the AddTagsToResource operation.

source§

impl Client

source

pub fn cancel_schema_extension(&self) -> CancelSchemaExtensionFluentBuilder

Constructs a fluent builder for the CancelSchemaExtension operation.

source§

impl Client

source

pub fn connect_directory(&self) -> ConnectDirectoryFluentBuilder

Constructs a fluent builder for the ConnectDirectory operation.

source§

impl Client

source

pub fn create_alias(&self) -> CreateAliasFluentBuilder

Constructs a fluent builder for the CreateAlias operation.

source§

impl Client

source

pub fn create_computer(&self) -> CreateComputerFluentBuilder

Constructs a fluent builder for the CreateComputer operation.

source§

impl Client

source

pub fn create_conditional_forwarder( &self ) -> CreateConditionalForwarderFluentBuilder

Constructs a fluent builder for the CreateConditionalForwarder operation.

source§

impl Client

source

pub fn create_directory(&self) -> CreateDirectoryFluentBuilder

Constructs a fluent builder for the CreateDirectory operation.


  1.  
source§

impl Client

source

pub fn create_log_subscription(&self) -> CreateLogSubscriptionFluentBuilder

Constructs a fluent builder for the CreateLogSubscription operation.

source§

impl Client

source

pub fn create_microsoft_ad(&self) -> CreateMicrosoftADFluentBuilder

Constructs a fluent builder for the CreateMicrosoftAD operation.

source§

impl Client

source

pub fn create_snapshot(&self) -> CreateSnapshotFluentBuilder

Constructs a fluent builder for the CreateSnapshot operation.

source§

impl Client

source

pub fn create_trust(&self) -> CreateTrustFluentBuilder

Constructs a fluent builder for the CreateTrust operation.

source§

impl Client

source

pub fn delete_conditional_forwarder( &self ) -> DeleteConditionalForwarderFluentBuilder

Constructs a fluent builder for the DeleteConditionalForwarder operation.

source§

impl Client

source

pub fn delete_directory(&self) -> DeleteDirectoryFluentBuilder

Constructs a fluent builder for the DeleteDirectory operation.

source§

impl Client

source

pub fn delete_log_subscription(&self) -> DeleteLogSubscriptionFluentBuilder

Constructs a fluent builder for the DeleteLogSubscription operation.

source§

impl Client

source

pub fn delete_snapshot(&self) -> DeleteSnapshotFluentBuilder

Constructs a fluent builder for the DeleteSnapshot operation.

source§

impl Client

source

pub fn delete_trust(&self) -> DeleteTrustFluentBuilder

Constructs a fluent builder for the DeleteTrust operation.

source§

impl Client

source

pub fn deregister_certificate(&self) -> DeregisterCertificateFluentBuilder

Constructs a fluent builder for the DeregisterCertificate operation.

source§

impl Client

source

pub fn deregister_event_topic(&self) -> DeregisterEventTopicFluentBuilder

Constructs a fluent builder for the DeregisterEventTopic operation.

source§

impl Client

source

pub fn describe_certificate(&self) -> DescribeCertificateFluentBuilder

Constructs a fluent builder for the DescribeCertificate operation.

source§

impl Client

source

pub fn describe_client_authentication_settings( &self ) -> DescribeClientAuthenticationSettingsFluentBuilder

Constructs a fluent builder for the DescribeClientAuthenticationSettings operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_conditional_forwarders( &self ) -> DescribeConditionalForwardersFluentBuilder

Constructs a fluent builder for the DescribeConditionalForwarders operation.

source§

impl Client

source

pub fn describe_directories(&self) -> DescribeDirectoriesFluentBuilder

Constructs a fluent builder for the DescribeDirectories operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_domain_controllers( &self ) -> DescribeDomainControllersFluentBuilder

Constructs a fluent builder for the DescribeDomainControllers operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_event_topics(&self) -> DescribeEventTopicsFluentBuilder

Constructs a fluent builder for the DescribeEventTopics operation.

source§

impl Client

source

pub fn describe_ldaps_settings(&self) -> DescribeLDAPSSettingsFluentBuilder

Constructs a fluent builder for the DescribeLDAPSSettings operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_regions(&self) -> DescribeRegionsFluentBuilder

Constructs a fluent builder for the DescribeRegions operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_settings(&self) -> DescribeSettingsFluentBuilder

Constructs a fluent builder for the DescribeSettings operation.

source§

impl Client

source

pub fn describe_shared_directories( &self ) -> DescribeSharedDirectoriesFluentBuilder

Constructs a fluent builder for the DescribeSharedDirectories operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_snapshots(&self) -> DescribeSnapshotsFluentBuilder

Constructs a fluent builder for the DescribeSnapshots operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_trusts(&self) -> DescribeTrustsFluentBuilder

Constructs a fluent builder for the DescribeTrusts operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn describe_update_directory(&self) -> DescribeUpdateDirectoryFluentBuilder

Constructs a fluent builder for the DescribeUpdateDirectory operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn disable_client_authentication( &self ) -> DisableClientAuthenticationFluentBuilder

Constructs a fluent builder for the DisableClientAuthentication operation.

source§

impl Client

source

pub fn disable_ldaps(&self) -> DisableLDAPSFluentBuilder

Constructs a fluent builder for the DisableLDAPS operation.

source§

impl Client

source

pub fn disable_radius(&self) -> DisableRadiusFluentBuilder

Constructs a fluent builder for the DisableRadius operation.

source§

impl Client

source

pub fn disable_sso(&self) -> DisableSsoFluentBuilder

Constructs a fluent builder for the DisableSso operation.

source§

impl Client

source

pub fn enable_client_authentication( &self ) -> EnableClientAuthenticationFluentBuilder

Constructs a fluent builder for the EnableClientAuthentication operation.

source§

impl Client

source

pub fn enable_ldaps(&self) -> EnableLDAPSFluentBuilder

Constructs a fluent builder for the EnableLDAPS operation.

source§

impl Client

source

pub fn enable_radius(&self) -> EnableRadiusFluentBuilder

Constructs a fluent builder for the EnableRadius operation.

source§

impl Client

source

pub fn enable_sso(&self) -> EnableSsoFluentBuilder

Constructs a fluent builder for the EnableSso operation.

source§

impl Client

source

pub fn get_directory_limits(&self) -> GetDirectoryLimitsFluentBuilder

Constructs a fluent builder for the GetDirectoryLimits operation.

source§

impl Client

source

pub fn get_snapshot_limits(&self) -> GetSnapshotLimitsFluentBuilder

Constructs a fluent builder for the GetSnapshotLimits operation.

source§

impl Client

source

pub fn list_certificates(&self) -> ListCertificatesFluentBuilder

Constructs a fluent builder for the ListCertificates operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_ip_routes(&self) -> ListIpRoutesFluentBuilder

Constructs a fluent builder for the ListIpRoutes operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_log_subscriptions(&self) -> ListLogSubscriptionsFluentBuilder

Constructs a fluent builder for the ListLogSubscriptions operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_schema_extensions(&self) -> ListSchemaExtensionsFluentBuilder

Constructs a fluent builder for the ListSchemaExtensions operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_tags_for_resource(&self) -> ListTagsForResourceFluentBuilder

Constructs a fluent builder for the ListTagsForResource operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn register_certificate(&self) -> RegisterCertificateFluentBuilder

Constructs a fluent builder for the RegisterCertificate operation.

source§

impl Client

source

pub fn register_event_topic(&self) -> RegisterEventTopicFluentBuilder

Constructs a fluent builder for the RegisterEventTopic operation.

source§

impl Client

source

pub fn reject_shared_directory(&self) -> RejectSharedDirectoryFluentBuilder

Constructs a fluent builder for the RejectSharedDirectory operation.

source§

impl Client

source

pub fn remove_ip_routes(&self) -> RemoveIpRoutesFluentBuilder

Constructs a fluent builder for the RemoveIpRoutes operation.

source§

impl Client

source

pub fn remove_region(&self) -> RemoveRegionFluentBuilder

Constructs a fluent builder for the RemoveRegion operation.

source§

impl Client

source

pub fn remove_tags_from_resource(&self) -> RemoveTagsFromResourceFluentBuilder

Constructs a fluent builder for the RemoveTagsFromResource operation.

source§

impl Client

source

pub fn reset_user_password(&self) -> ResetUserPasswordFluentBuilder

Constructs a fluent builder for the ResetUserPassword operation.

source§

impl Client

source

pub fn restore_from_snapshot(&self) -> RestoreFromSnapshotFluentBuilder

Constructs a fluent builder for the RestoreFromSnapshot operation.

source§

impl Client

source

pub fn share_directory(&self) -> ShareDirectoryFluentBuilder

Constructs a fluent builder for the ShareDirectory operation.

source§

impl Client

source

pub fn start_schema_extension(&self) -> StartSchemaExtensionFluentBuilder

Constructs a fluent builder for the StartSchemaExtension operation.

source§

impl Client

source

pub fn unshare_directory(&self) -> UnshareDirectoryFluentBuilder

Constructs a fluent builder for the UnshareDirectory operation.

source§

impl Client

source

pub fn update_conditional_forwarder( &self ) -> UpdateConditionalForwarderFluentBuilder

Constructs a fluent builder for the UpdateConditionalForwarder operation.

source§

impl Client

source

pub fn update_directory_setup(&self) -> UpdateDirectorySetupFluentBuilder

Constructs a fluent builder for the UpdateDirectorySetup operation.

source§

impl Client

source

pub fn update_number_of_domain_controllers( &self ) -> UpdateNumberOfDomainControllersFluentBuilder

Constructs a fluent builder for the UpdateNumberOfDomainControllers operation.

source§

impl Client

source

pub fn update_radius(&self) -> UpdateRadiusFluentBuilder

Constructs a fluent builder for the UpdateRadius operation.

source§

impl Client

source

pub fn update_settings(&self) -> UpdateSettingsFluentBuilder

Constructs a fluent builder for the UpdateSettings operation.

source§

impl Client

source

pub fn update_trust(&self) -> UpdateTrustFluentBuilder

Constructs a fluent builder for the UpdateTrust operation.

source§

impl Client

source

pub fn verify_trust(&self) -> VerifyTrustFluentBuilder

Constructs a fluent builder for the VerifyTrust operation.

source§

impl Client

source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

Panics
  • This method will panic if the conf is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the conf is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
source

pub fn config(&self) -> &Config

Returns the client’s configuration.

source§

impl Client

source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.

Trait Implementations§

source§

impl Clone for Client

source§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more