pub struct Client { /* private fields */ }
Expand description
Client for AWS Directory Service Data
Client for invoking operations on AWS Directory Service Data. Each operation on AWS Directory Service Data 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_directoryservicedata::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
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_directoryservicedata::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 AddGroupMember
operation has
a Client::add_group_member
, 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.add_group_member()
.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
impl Client
Sourcepub fn add_group_member(&self) -> AddGroupMemberFluentBuilder
pub fn add_group_member(&self) -> AddGroupMemberFluentBuilder
Constructs a fluent builder for the AddGroupMember
operation.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the group.
group_name(impl Into<String>)
/set_group_name(Option<String>)
:
required: trueThe name of the group.
member_name(impl Into<String>)
/set_member_name(Option<String>)
:
required: trueThe
SAMAccountName
of the user, group, or computer to add as a group member.member_realm(impl Into<String>)
/set_member_realm(Option<String>)
:
required: falseThe domain name that’s associated with the group member. This parameter is required only when adding a member outside of your Managed Microsoft AD domain to a group inside of your Managed Microsoft AD domain. This parameter defaults to the Managed Microsoft AD domain.
This parameter is case insensitive.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.
A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.
If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an
ConflictException
.This parameter is optional when using the CLI or SDK.
- On success, responds with
AddGroupMemberOutput
- On failure, responds with
SdkError<AddGroupMemberError>
Source§impl Client
impl Client
Sourcepub fn create_group(&self) -> CreateGroupFluentBuilder
pub fn create_group(&self) -> CreateGroupFluentBuilder
Constructs a fluent builder for the CreateGroup
operation.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the group.
sam_account_name(impl Into<String>)
/set_sam_account_name(Option<String>)
:
required: trueThe name of the group.
group_type(GroupType)
/set_group_type(Option<GroupType>)
:
required: falseThe AD group type. For details, see Active Directory security group type.
group_scope(GroupScope)
/set_group_scope(Option<GroupScope>)
:
required: falseThe scope of the AD group. For details, see Active Directory security group scope.
other_attributes(impl Into<String>, AttributeValue)
/set_other_attributes(Option<HashMap::<String, AttributeValue>>)
:
required: falseAn expression that defines one or more attributes with the data type and value of each attribute.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.
A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.
If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an
ConflictException
.This parameter is optional when using the CLI or SDK.
- On success, responds with
CreateGroupOutput
with field(s):directory_id(Option<String>)
:The identifier (ID) of the directory that’s associated with the group.
sam_account_name(Option<String>)
:The name of the group.
sid(Option<String>)
:The unique security identifier (SID) of the group.
- On failure, responds with
SdkError<CreateGroupError>
Source§impl Client
impl Client
Sourcepub fn create_user(&self) -> CreateUserFluentBuilder
pub fn create_user(&self) -> CreateUserFluentBuilder
Constructs a fluent builder for the CreateUser
operation.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the user.
sam_account_name(impl Into<String>)
/set_sam_account_name(Option<String>)
:
required: trueThe name of the user.
email_address(impl Into<String>)
/set_email_address(Option<String>)
:
required: falseThe email address of the user.
given_name(impl Into<String>)
/set_given_name(Option<String>)
:
required: falseThe first name of the user.
surname(impl Into<String>)
/set_surname(Option<String>)
:
required: falseThe last name of the user.
other_attributes(impl Into<String>, AttributeValue)
/set_other_attributes(Option<HashMap::<String, AttributeValue>>)
:
required: falseAn expression that defines one or more attribute names with the data type and value of each attribute. A key is an attribute name, and the value is a list of maps. For a list of supported attributes, see Directory Service Data Attributes.
Attribute names are case insensitive.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.
A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.
If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an
ConflictException
.This parameter is optional when using the CLI or SDK.
- On success, responds with
CreateUserOutput
with field(s):directory_id(Option<String>)
:The identifier (ID) of the directory where the address block is added.
sid(Option<String>)
:The unique security identifier (SID) of the user.
sam_account_name(Option<String>)
:The name of the user.
- On failure, responds with
SdkError<CreateUserError>
Source§impl Client
impl Client
Sourcepub fn delete_group(&self) -> DeleteGroupFluentBuilder
pub fn delete_group(&self) -> DeleteGroupFluentBuilder
Constructs a fluent builder for the DeleteGroup
operation.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the group.
sam_account_name(impl Into<String>)
/set_sam_account_name(Option<String>)
:
required: trueThe name of the group.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.
A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.
If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an
ConflictException
.This parameter is optional when using the CLI or SDK.
- On success, responds with
DeleteGroupOutput
- On failure, responds with
SdkError<DeleteGroupError>
Source§impl Client
impl Client
Sourcepub fn delete_user(&self) -> DeleteUserFluentBuilder
pub fn delete_user(&self) -> DeleteUserFluentBuilder
Constructs a fluent builder for the DeleteUser
operation.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the user.
sam_account_name(impl Into<String>)
/set_sam_account_name(Option<String>)
:
required: trueThe name of the user.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.
A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.
If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an
ConflictException
.This parameter is optional when using the CLI or SDK.
- On success, responds with
DeleteUserOutput
- On failure, responds with
SdkError<DeleteUserError>
Source§impl Client
impl Client
Sourcepub fn describe_group(&self) -> DescribeGroupFluentBuilder
pub fn describe_group(&self) -> DescribeGroupFluentBuilder
Constructs a fluent builder for the DescribeGroup
operation.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe Identifier (ID) of the directory associated with the group.
realm(impl Into<String>)
/set_realm(Option<String>)
:
required: falseThe domain name that’s associated with the group.
This parameter is optional, so you can return groups outside of your Managed Microsoft AD domain. When no value is defined, only your Managed Microsoft AD groups are returned.
This value is case insensitive.
sam_account_name(impl Into<String>)
/set_sam_account_name(Option<String>)
:
required: trueThe name of the group.
other_attributes(impl Into<String>)
/set_other_attributes(Option<Vec::<String>>)
:
required: falseOne or more attributes to be returned for the group. For a list of supported attributes, see Directory Service Data Attributes.
- On success, responds with
DescribeGroupOutput
with field(s):directory_id(Option<String>)
:The identifier (ID) of the directory that’s associated with the group.
realm(Option<String>)
:The domain name that’s associated with the group.
sid(Option<String>)
:The unique security identifier (SID) of the group.
sam_account_name(Option<String>)
:The name of the group.
distinguished_name(Option<String>)
:The distinguished name of the object.
group_type(Option<GroupType>)
:The AD group type. For details, see Active Directory security group type.
group_scope(Option<GroupScope>)
:The scope of the AD group. For details, see Active Directory security groups.
other_attributes(Option<HashMap::<String, AttributeValue>>)
:The attribute values that are returned for the attribute names that are included in the request.
- On failure, responds with
SdkError<DescribeGroupError>
Source§impl Client
impl Client
Sourcepub fn describe_user(&self) -> DescribeUserFluentBuilder
pub fn describe_user(&self) -> DescribeUserFluentBuilder
Constructs a fluent builder for the DescribeUser
operation.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the user.
sam_account_name(impl Into<String>)
/set_sam_account_name(Option<String>)
:
required: trueThe name of the user.
other_attributes(impl Into<String>)
/set_other_attributes(Option<Vec::<String>>)
:
required: falseOne or more attribute names to be returned for the user. A key is an attribute name, and the value is a list of maps. For a list of supported attributes, see Directory Service Data Attributes.
realm(impl Into<String>)
/set_realm(Option<String>)
:
required: falseThe domain name that’s associated with the user.
This parameter is optional, so you can return users outside your Managed Microsoft AD domain. When no value is defined, only your Managed Microsoft AD users are returned.
This value is case insensitive.
- On success, responds with
DescribeUserOutput
with field(s):directory_id(Option<String>)
:The identifier (ID) of the directory that’s associated with the user.
realm(Option<String>)
:The domain name that’s associated with the user.
sid(Option<String>)
:The unique security identifier (SID) of the user.
sam_account_name(Option<String>)
:The name of the user.
distinguished_name(Option<String>)
:The distinguished name of the object.
user_principal_name(Option<String>)
:The UPN that is an Internet-style login name for a user and is based on the Internet standard RFC 822. The UPN is shorter than the distinguished name and easier to remember.
email_address(Option<String>)
:The email address of the user.
given_name(Option<String>)
:The first name of the user.
surname(Option<String>)
:The last name of the user.
enabled(Option<bool>)
:Indicates whether the user account is active.
other_attributes(Option<HashMap::<String, AttributeValue>>)
:The attribute values that are returned for the attribute names that are included in the request.
Attribute names are case insensitive.
- On failure, responds with
SdkError<DescribeUserError>
Source§impl Client
impl Client
Sourcepub fn disable_user(&self) -> DisableUserFluentBuilder
pub fn disable_user(&self) -> DisableUserFluentBuilder
Constructs a fluent builder for the DisableUser
operation.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the user.
sam_account_name(impl Into<String>)
/set_sam_account_name(Option<String>)
:
required: trueThe name of the user.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.
A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.
If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an
ConflictException
.This parameter is optional when using the CLI or SDK.
- On success, responds with
DisableUserOutput
- On failure, responds with
SdkError<DisableUserError>
Source§impl Client
impl Client
Sourcepub fn list_group_members(&self) -> ListGroupMembersFluentBuilder
pub fn list_group_members(&self) -> ListGroupMembersFluentBuilder
Constructs a fluent builder for the ListGroupMembers
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the group.
realm(impl Into<String>)
/set_realm(Option<String>)
:
required: falseThe domain name that’s associated with the group.
This parameter is optional, so you can return members from a group outside of your Managed Microsoft AD domain. When no value is defined, only members of your Managed Microsoft AD groups are returned.
This value is case insensitive.
member_realm(impl Into<String>)
/set_member_realm(Option<String>)
:
required: falseThe domain name that’s associated with the group member. This parameter defaults to the Managed Microsoft AD domain.
This parameter is optional and case insensitive.
sam_account_name(impl Into<String>)
/set_sam_account_name(Option<String>)
:
required: trueThe name of the group.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseAn encoded paging token for paginated calls that can be passed back to retrieve the next page.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be returned per request.
- On success, responds with
ListGroupMembersOutput
with field(s):directory_id(Option<String>)
:Identifier (ID) of the directory associated with the group.
realm(Option<String>)
:The domain name that’s associated with the group.
member_realm(Option<String>)
:The domain name that’s associated with the member.
members(Option<Vec::<Member>>)
:The member information that the request returns.
next_token(Option<String>)
:An encoded paging token for paginated calls that can be passed back to retrieve the next page.
- On failure, responds with
SdkError<ListGroupMembersError>
Source§impl Client
impl Client
Sourcepub fn list_groups(&self) -> ListGroupsFluentBuilder
pub fn list_groups(&self) -> ListGroupsFluentBuilder
Constructs a fluent builder for the ListGroups
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the group.
realm(impl Into<String>)
/set_realm(Option<String>)
:
required: falseThe domain name associated with the directory.
This parameter is optional, so you can return groups outside of your Managed Microsoft AD domain. When no value is defined, only your Managed Microsoft AD groups are returned.
This value is case insensitive.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseAn encoded paging token for paginated calls that can be passed back to retrieve the next page.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be returned per request.
- On success, responds with
ListGroupsOutput
with field(s):directory_id(Option<String>)
:The identifier (ID) of the directory that’s associated with the group.
realm(Option<String>)
:The domain name associated with the group.
groups(Option<Vec::<GroupSummary>>)
:The group information that the request returns.
next_token(Option<String>)
:An encoded paging token for paginated calls that can be passed back to retrieve the next page.
- On failure, responds with
SdkError<ListGroupsError>
Source§impl Client
impl Client
Sourcepub fn list_groups_for_member(&self) -> ListGroupsForMemberFluentBuilder
pub fn list_groups_for_member(&self) -> ListGroupsForMemberFluentBuilder
Constructs a fluent builder for the ListGroupsForMember
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the member.
realm(impl Into<String>)
/set_realm(Option<String>)
:
required: falseThe domain name that’s associated with the group.
This parameter is optional, so you can return groups outside of your Managed Microsoft AD domain. When no value is defined, only your Managed Microsoft AD groups are returned.
This value is case insensitive and defaults to your Managed Microsoft AD domain.
member_realm(impl Into<String>)
/set_member_realm(Option<String>)
:
required: falseThe domain name that’s associated with the group member.
This parameter is optional, so you can limit your results to the group members in a specific domain.
This parameter is case insensitive and defaults to
Realm
sam_account_name(impl Into<String>)
/set_sam_account_name(Option<String>)
:
required: trueThe
SAMAccountName
of the user, group, or computer that’s a member of the group.next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseAn encoded paging token for paginated calls that can be passed back to retrieve the next page.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be returned per request.
- On success, responds with
ListGroupsForMemberOutput
with field(s):directory_id(Option<String>)
:The identifier (ID) of the directory that’s associated with the member.
realm(Option<String>)
:The domain that’s associated with the group.
member_realm(Option<String>)
:The domain that’s associated with the member.
groups(Option<Vec::<GroupSummary>>)
:The group information that the request returns.
next_token(Option<String>)
:An encoded paging token for paginated calls that can be passed back to retrieve the next page.
- On failure, responds with
SdkError<ListGroupsForMemberError>
Source§impl Client
impl Client
Sourcepub fn list_users(&self) -> ListUsersFluentBuilder
pub fn list_users(&self) -> ListUsersFluentBuilder
Constructs a fluent builder for the ListUsers
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the user.
realm(impl Into<String>)
/set_realm(Option<String>)
:
required: falseThe domain name that’s associated with the user.
This parameter is optional, so you can return users outside of your Managed Microsoft AD domain. When no value is defined, only your Managed Microsoft AD users are returned.
This value is case insensitive.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseAn encoded paging token for paginated calls that can be passed back to retrieve the next page.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be returned per request.
- On success, responds with
ListUsersOutput
with field(s):directory_id(Option<String>)
:The identifier (ID) of the directory that’s associated with the user.
realm(Option<String>)
:The domain that’s associated with the user.
users(Option<Vec::<UserSummary>>)
:The user information that the request returns.
next_token(Option<String>)
:An encoded paging token for paginated calls that can be passed back to retrieve the next page.
- On failure, responds with
SdkError<ListUsersError>
Source§impl Client
impl Client
Sourcepub fn remove_group_member(&self) -> RemoveGroupMemberFluentBuilder
pub fn remove_group_member(&self) -> RemoveGroupMemberFluentBuilder
Constructs a fluent builder for the RemoveGroupMember
operation.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the member.
group_name(impl Into<String>)
/set_group_name(Option<String>)
:
required: trueThe name of the group.
member_name(impl Into<String>)
/set_member_name(Option<String>)
:
required: trueThe
SAMAccountName
of the user, group, or computer to remove from the group.member_realm(impl Into<String>)
/set_member_realm(Option<String>)
:
required: falseThe domain name that’s associated with the group member. This parameter defaults to the Managed Microsoft AD domain.
This parameter is optional and case insensitive.
client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.
A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.
If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an
ConflictException
.This parameter is optional when using the CLI or SDK.
- On success, responds with
RemoveGroupMemberOutput
- On failure, responds with
SdkError<RemoveGroupMemberError>
Source§impl Client
impl Client
Sourcepub fn search_groups(&self) -> SearchGroupsFluentBuilder
pub fn search_groups(&self) -> SearchGroupsFluentBuilder
Constructs a fluent builder for the SearchGroups
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the group.
search_string(impl Into<String>)
/set_search_string(Option<String>)
:
required: trueThe attribute value that you want to search for.
Wildcard
(*)
searches aren’t supported. For a list of supported attributes, see Directory Service Data Attributes.search_attributes(impl Into<String>)
/set_search_attributes(Option<Vec::<String>>)
:
required: trueOne or more data attributes that are used to search for a group. For a list of supported attributes, see Directory Service Data Attributes.
realm(impl Into<String>)
/set_realm(Option<String>)
:
required: falseThe domain name that’s associated with the group.
This parameter is optional, so you can return groups outside of your Managed Microsoft AD domain. When no value is defined, only your Managed Microsoft AD groups are returned.
This value is case insensitive.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseAn encoded paging token for paginated calls that can be passed back to retrieve the next page.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be returned per request.
- On success, responds with
SearchGroupsOutput
with field(s):directory_id(Option<String>)
:The identifier (ID) of the directory that’s associated with the group.
realm(Option<String>)
:The domain that’s associated with the group.
groups(Option<Vec::<Group>>)
:The group information that the request returns.
next_token(Option<String>)
:An encoded paging token for paginated calls that can be passed back to retrieve the next page.
- On failure, responds with
SdkError<SearchGroupsError>
Source§impl Client
impl Client
Sourcepub fn search_users(&self) -> SearchUsersFluentBuilder
pub fn search_users(&self) -> SearchUsersFluentBuilder
Constructs a fluent builder for the SearchUsers
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the user.
realm(impl Into<String>)
/set_realm(Option<String>)
:
required: falseThe domain name that’s associated with the user.
This parameter is optional, so you can return users outside of your Managed Microsoft AD domain. When no value is defined, only your Managed Microsoft AD users are returned.
This value is case insensitive.
search_string(impl Into<String>)
/set_search_string(Option<String>)
:
required: trueThe attribute value that you want to search for.
Wildcard
(*)
searches aren’t supported. For a list of supported attributes, see Directory Service Data Attributes.search_attributes(impl Into<String>)
/set_search_attributes(Option<Vec::<String>>)
:
required: trueOne or more data attributes that are used to search for a user. For a list of supported attributes, see Directory Service Data Attributes.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseAn encoded paging token for paginated calls that can be passed back to retrieve the next page.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to be returned per request.
- On success, responds with
SearchUsersOutput
with field(s):directory_id(Option<String>)
:The identifier (ID) of the directory where the address block is added.
realm(Option<String>)
:The domain that’s associated with the user.
users(Option<Vec::<User>>)
:The user information that the request returns.
next_token(Option<String>)
:An encoded paging token for paginated calls that can be passed back to retrieve the next page.
- On failure, responds with
SdkError<SearchUsersError>
Source§impl Client
impl Client
Sourcepub fn update_group(&self) -> UpdateGroupFluentBuilder
pub fn update_group(&self) -> UpdateGroupFluentBuilder
Constructs a fluent builder for the UpdateGroup
operation.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the group.
sam_account_name(impl Into<String>)
/set_sam_account_name(Option<String>)
:
required: trueThe name of the group.
group_type(GroupType)
/set_group_type(Option<GroupType>)
:
required: falseThe AD group type. For details, see Active Directory security group type.
group_scope(GroupScope)
/set_group_scope(Option<GroupScope>)
:
required: falseThe scope of the AD group. For details, see Active Directory security groups.
other_attributes(impl Into<String>, AttributeValue)
/set_other_attributes(Option<HashMap::<String, AttributeValue>>)
:
required: falseAn expression that defines one or more attributes with the data type and the value of each attribute.
update_type(UpdateType)
/set_update_type(Option<UpdateType>)
:
required: falseThe type of update to be performed. If no value exists for the attribute, use
ADD
. Otherwise, useREPLACE
to change an attribute value orREMOVE
to clear the attribute value.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.
A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.
If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an
ConflictException
.This parameter is optional when using the CLI or SDK.
- On success, responds with
UpdateGroupOutput
- On failure, responds with
SdkError<UpdateGroupError>
Source§impl Client
impl Client
Sourcepub fn update_user(&self) -> UpdateUserFluentBuilder
pub fn update_user(&self) -> UpdateUserFluentBuilder
Constructs a fluent builder for the UpdateUser
operation.
- The fluent builder is configurable:
directory_id(impl Into<String>)
/set_directory_id(Option<String>)
:
required: trueThe identifier (ID) of the directory that’s associated with the user.
sam_account_name(impl Into<String>)
/set_sam_account_name(Option<String>)
:
required: trueThe name of the user.
email_address(impl Into<String>)
/set_email_address(Option<String>)
:
required: falseThe email address of the user.
given_name(impl Into<String>)
/set_given_name(Option<String>)
:
required: falseThe first name of the user.
surname(impl Into<String>)
/set_surname(Option<String>)
:
required: falseThe last name of the user.
other_attributes(impl Into<String>, AttributeValue)
/set_other_attributes(Option<HashMap::<String, AttributeValue>>)
:
required: falseAn expression that defines one or more attribute names with the data type and value of each attribute. A key is an attribute name, and the value is a list of maps. For a list of supported attributes, see Directory Service Data Attributes.
Attribute names are case insensitive.
update_type(UpdateType)
/set_update_type(Option<UpdateType>)
:
required: falseThe type of update to be performed. If no value exists for the attribute, use
ADD
. Otherwise, useREPLACE
to change an attribute value orREMOVE
to clear the attribute value.client_token(impl Into<String>)
/set_client_token(Option<String>)
:
required: falseA unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.
A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.
If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an
ConflictException
.This parameter is optional when using the CLI or SDK.
- On success, responds with
UpdateUserOutput
- On failure, responds with
SdkError<UpdateUserError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
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 thesleep_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 thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);