Struct aws_sdk_workmail::Client

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

Client for Amazon WorkMail

Client for invoking operations on Amazon WorkMail. Each operation on Amazon WorkMail 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_workmail::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 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_workmail::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 AssociateDelegateToResource operation has a Client::associate_delegate_to_resource, 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.associate_delegate_to_resource()
    .organization_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 associate_delegate_to_resource( &self ) -> AssociateDelegateToResourceFluentBuilder

Constructs a fluent builder for the AssociateDelegateToResource operation.

source§

impl Client

source

pub fn associate_member_to_group(&self) -> AssociateMemberToGroupFluentBuilder

Constructs a fluent builder for the AssociateMemberToGroup operation.

source§

impl Client

source

pub fn assume_impersonation_role(&self) -> AssumeImpersonationRoleFluentBuilder

Constructs a fluent builder for the AssumeImpersonationRole operation.

source§

impl Client

source

pub fn cancel_mailbox_export_job(&self) -> CancelMailboxExportJobFluentBuilder

Constructs a fluent builder for the CancelMailboxExportJob 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_availability_configuration( &self ) -> CreateAvailabilityConfigurationFluentBuilder

Constructs a fluent builder for the CreateAvailabilityConfiguration operation.

source§

impl Client

source

pub fn create_group(&self) -> CreateGroupFluentBuilder

Constructs a fluent builder for the CreateGroup operation.

source§

impl Client

source

pub fn create_impersonation_role(&self) -> CreateImpersonationRoleFluentBuilder

Constructs a fluent builder for the CreateImpersonationRole operation.

source§

impl Client

source

pub fn create_mobile_device_access_rule( &self ) -> CreateMobileDeviceAccessRuleFluentBuilder

Constructs a fluent builder for the CreateMobileDeviceAccessRule operation.

source§

impl Client

source

pub fn create_organization(&self) -> CreateOrganizationFluentBuilder

Constructs a fluent builder for the CreateOrganization operation.

source§

impl Client

source

pub fn create_resource(&self) -> CreateResourceFluentBuilder

Constructs a fluent builder for the CreateResource operation.

source§

impl Client

source

pub fn create_user(&self) -> CreateUserFluentBuilder

Constructs a fluent builder for the CreateUser operation.

source§

impl Client

source

pub fn delete_access_control_rule(&self) -> DeleteAccessControlRuleFluentBuilder

Constructs a fluent builder for the DeleteAccessControlRule operation.

source§

impl Client

source

pub fn delete_alias(&self) -> DeleteAliasFluentBuilder

Constructs a fluent builder for the DeleteAlias operation.

source§

impl Client

source

pub fn delete_availability_configuration( &self ) -> DeleteAvailabilityConfigurationFluentBuilder

Constructs a fluent builder for the DeleteAvailabilityConfiguration operation.

source§

impl Client

source

pub fn delete_email_monitoring_configuration( &self ) -> DeleteEmailMonitoringConfigurationFluentBuilder

Constructs a fluent builder for the DeleteEmailMonitoringConfiguration operation.

source§

impl Client

source

pub fn delete_group(&self) -> DeleteGroupFluentBuilder

Constructs a fluent builder for the DeleteGroup operation.

source§

impl Client

source

pub fn delete_impersonation_role(&self) -> DeleteImpersonationRoleFluentBuilder

Constructs a fluent builder for the DeleteImpersonationRole operation.

source§

impl Client

source

pub fn delete_mailbox_permissions( &self ) -> DeleteMailboxPermissionsFluentBuilder

Constructs a fluent builder for the DeleteMailboxPermissions operation.

source§

impl Client

source

pub fn delete_mobile_device_access_override( &self ) -> DeleteMobileDeviceAccessOverrideFluentBuilder

Constructs a fluent builder for the DeleteMobileDeviceAccessOverride operation.

source§

impl Client

source

pub fn delete_mobile_device_access_rule( &self ) -> DeleteMobileDeviceAccessRuleFluentBuilder

Constructs a fluent builder for the DeleteMobileDeviceAccessRule operation.

source§

impl Client

source

pub fn delete_organization(&self) -> DeleteOrganizationFluentBuilder

Constructs a fluent builder for the DeleteOrganization operation.

source§

impl Client

source

pub fn delete_resource(&self) -> DeleteResourceFluentBuilder

Constructs a fluent builder for the DeleteResource operation.

source§

impl Client

source

pub fn delete_retention_policy(&self) -> DeleteRetentionPolicyFluentBuilder

Constructs a fluent builder for the DeleteRetentionPolicy operation.

source§

impl Client

source

pub fn delete_user(&self) -> DeleteUserFluentBuilder

Constructs a fluent builder for the DeleteUser operation.

source§

impl Client

source

pub fn deregister_from_work_mail(&self) -> DeregisterFromWorkMailFluentBuilder

Constructs a fluent builder for the DeregisterFromWorkMail operation.

source§

impl Client

source

pub fn deregister_mail_domain(&self) -> DeregisterMailDomainFluentBuilder

Constructs a fluent builder for the DeregisterMailDomain operation.

source§

impl Client

source

pub fn describe_email_monitoring_configuration( &self ) -> DescribeEmailMonitoringConfigurationFluentBuilder

Constructs a fluent builder for the DescribeEmailMonitoringConfiguration operation.

source§

impl Client

source

pub fn describe_entity(&self) -> DescribeEntityFluentBuilder

Constructs a fluent builder for the DescribeEntity operation.

source§

impl Client

source

pub fn describe_group(&self) -> DescribeGroupFluentBuilder

Constructs a fluent builder for the DescribeGroup operation.

source§

impl Client

source

pub fn describe_inbound_dmarc_settings( &self ) -> DescribeInboundDmarcSettingsFluentBuilder

Constructs a fluent builder for the DescribeInboundDmarcSettings operation.

source§

impl Client

source

pub fn describe_mailbox_export_job( &self ) -> DescribeMailboxExportJobFluentBuilder

Constructs a fluent builder for the DescribeMailboxExportJob operation.

source§

impl Client

source

pub fn describe_organization(&self) -> DescribeOrganizationFluentBuilder

Constructs a fluent builder for the DescribeOrganization operation.

source§

impl Client

source

pub fn describe_resource(&self) -> DescribeResourceFluentBuilder

Constructs a fluent builder for the DescribeResource operation.

source§

impl Client

source

pub fn describe_user(&self) -> DescribeUserFluentBuilder

Constructs a fluent builder for the DescribeUser operation.

source§

impl Client

source

pub fn disassociate_delegate_from_resource( &self ) -> DisassociateDelegateFromResourceFluentBuilder

Constructs a fluent builder for the DisassociateDelegateFromResource operation.

source§

impl Client

source

pub fn disassociate_member_from_group( &self ) -> DisassociateMemberFromGroupFluentBuilder

Constructs a fluent builder for the DisassociateMemberFromGroup operation.

source§

impl Client

source

pub fn get_access_control_effect(&self) -> GetAccessControlEffectFluentBuilder

Constructs a fluent builder for the GetAccessControlEffect operation.

source§

impl Client

source

pub fn get_default_retention_policy( &self ) -> GetDefaultRetentionPolicyFluentBuilder

Constructs a fluent builder for the GetDefaultRetentionPolicy operation.

source§

impl Client

source

pub fn get_impersonation_role(&self) -> GetImpersonationRoleFluentBuilder

Constructs a fluent builder for the GetImpersonationRole operation.

source§

impl Client

source

pub fn get_impersonation_role_effect( &self ) -> GetImpersonationRoleEffectFluentBuilder

Constructs a fluent builder for the GetImpersonationRoleEffect operation.

source§

impl Client

source

pub fn get_mail_domain(&self) -> GetMailDomainFluentBuilder

Constructs a fluent builder for the GetMailDomain operation.

source§

impl Client

source

pub fn get_mailbox_details(&self) -> GetMailboxDetailsFluentBuilder

Constructs a fluent builder for the GetMailboxDetails operation.

source§

impl Client

source

pub fn get_mobile_device_access_effect( &self ) -> GetMobileDeviceAccessEffectFluentBuilder

Constructs a fluent builder for the GetMobileDeviceAccessEffect operation.

source§

impl Client

source

pub fn get_mobile_device_access_override( &self ) -> GetMobileDeviceAccessOverrideFluentBuilder

Constructs a fluent builder for the GetMobileDeviceAccessOverride operation.

source§

impl Client

source

pub fn list_access_control_rules(&self) -> ListAccessControlRulesFluentBuilder

Constructs a fluent builder for the ListAccessControlRules operation.

source§

impl Client

source

pub fn list_aliases(&self) -> ListAliasesFluentBuilder

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

source§

impl Client

source

pub fn list_availability_configurations( &self ) -> ListAvailabilityConfigurationsFluentBuilder

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

source§

impl Client

source

pub fn list_group_members(&self) -> ListGroupMembersFluentBuilder

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

source§

impl Client

source

pub fn list_groups(&self) -> ListGroupsFluentBuilder

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

source§

impl Client

source

pub fn list_groups_for_entity(&self) -> ListGroupsForEntityFluentBuilder

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

source§

impl Client

source

pub fn list_impersonation_roles(&self) -> ListImpersonationRolesFluentBuilder

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

source§

impl Client

source

pub fn list_mail_domains(&self) -> ListMailDomainsFluentBuilder

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

source§

impl Client

source

pub fn list_mailbox_export_jobs(&self) -> ListMailboxExportJobsFluentBuilder

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

source§

impl Client

source

pub fn list_mailbox_permissions(&self) -> ListMailboxPermissionsFluentBuilder

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

source§

impl Client

source

pub fn list_mobile_device_access_overrides( &self ) -> ListMobileDeviceAccessOverridesFluentBuilder

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

source§

impl Client

source

pub fn list_mobile_device_access_rules( &self ) -> ListMobileDeviceAccessRulesFluentBuilder

Constructs a fluent builder for the ListMobileDeviceAccessRules operation.

source§

impl Client

source

pub fn list_organizations(&self) -> ListOrganizationsFluentBuilder

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

source§

impl Client

source

pub fn list_resource_delegates(&self) -> ListResourceDelegatesFluentBuilder

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

source§

impl Client

source

pub fn list_resources(&self) -> ListResourcesFluentBuilder

Constructs a fluent builder for the ListResources 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.

source§

impl Client

source

pub fn list_users(&self) -> ListUsersFluentBuilder

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

source§

impl Client

source

pub fn put_access_control_rule(&self) -> PutAccessControlRuleFluentBuilder

Constructs a fluent builder for the PutAccessControlRule operation.

source§

impl Client

source

pub fn put_email_monitoring_configuration( &self ) -> PutEmailMonitoringConfigurationFluentBuilder

Constructs a fluent builder for the PutEmailMonitoringConfiguration operation.

source§

impl Client

source

pub fn put_inbound_dmarc_settings(&self) -> PutInboundDmarcSettingsFluentBuilder

Constructs a fluent builder for the PutInboundDmarcSettings operation.

source§

impl Client

source

pub fn put_mailbox_permissions(&self) -> PutMailboxPermissionsFluentBuilder

Constructs a fluent builder for the PutMailboxPermissions operation.

  • The fluent builder is configurable:
    • organization_id(impl Into<String>) / set_organization_id(Option<String>):
      required: true

      The identifier of the organization under which the user, group, or resource exists.


    • entity_id(impl Into<String>) / set_entity_id(Option<String>):
      required: true

      The identifier of the user or resource for which to update mailbox permissions.

      The identifier can be UserId, ResourceID, or Group Id, Username, Resourcename, or Groupname, or email.

      • Entity ID: 12345678-1234-1234-1234-123456789012, r-0123456789a0123456789b0123456789, or S-1-1-12-1234567890-123456789-123456789-1234

      • Email address: entity@domain.tld

      • Entity name: entity


    • grantee_id(impl Into<String>) / set_grantee_id(Option<String>):
      required: true

      The identifier of the user, group, or resource to which to grant the permissions.

      The identifier can be UserId, ResourceID, or Group Id, Username, Resourcename, or Groupname, or email.

      • Grantee ID: 12345678-1234-1234-1234-123456789012, r-0123456789a0123456789b0123456789, or S-1-1-12-1234567890-123456789-123456789-1234

      • Email address: grantee@domain.tld

      • Grantee name: grantee


    • permission_values(PermissionType) / set_permission_values(Option<Vec::<PermissionType>>):
      required: true

      The permissions granted to the grantee. SEND_AS allows the grantee to send email as the owner of the mailbox (the grantee is not mentioned on these emails). SEND_ON_BEHALF allows the grantee to send email on behalf of the owner of the mailbox (the grantee is not mentioned as the physical sender of these emails). FULL_ACCESS allows the grantee full access to the mailbox, irrespective of other folder-level permissions set on the mailbox.


  • On success, responds with PutMailboxPermissionsOutput
  • On failure, responds with SdkError<PutMailboxPermissionsError>
source§

impl Client

source

pub fn put_mobile_device_access_override( &self ) -> PutMobileDeviceAccessOverrideFluentBuilder

Constructs a fluent builder for the PutMobileDeviceAccessOverride operation.

source§

impl Client

source

pub fn put_retention_policy(&self) -> PutRetentionPolicyFluentBuilder

Constructs a fluent builder for the PutRetentionPolicy operation.

source§

impl Client

source

pub fn register_mail_domain(&self) -> RegisterMailDomainFluentBuilder

Constructs a fluent builder for the RegisterMailDomain operation.

source§

impl Client

source

pub fn register_to_work_mail(&self) -> RegisterToWorkMailFluentBuilder

Constructs a fluent builder for the RegisterToWorkMail operation.

source§

impl Client

source

pub fn reset_password(&self) -> ResetPasswordFluentBuilder

Constructs a fluent builder for the ResetPassword operation.

source§

impl Client

source

pub fn start_mailbox_export_job(&self) -> StartMailboxExportJobFluentBuilder

Constructs a fluent builder for the StartMailboxExportJob operation.

source§

impl Client

source

pub fn tag_resource(&self) -> TagResourceFluentBuilder

Constructs a fluent builder for the TagResource operation.

source§

impl Client

source

pub fn test_availability_configuration( &self ) -> TestAvailabilityConfigurationFluentBuilder

Constructs a fluent builder for the TestAvailabilityConfiguration operation.

source§

impl Client

source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

source§

impl Client

source

pub fn update_availability_configuration( &self ) -> UpdateAvailabilityConfigurationFluentBuilder

Constructs a fluent builder for the UpdateAvailabilityConfiguration operation.

source§

impl Client

source

pub fn update_default_mail_domain(&self) -> UpdateDefaultMailDomainFluentBuilder

Constructs a fluent builder for the UpdateDefaultMailDomain operation.

source§

impl Client

source

pub fn update_group(&self) -> UpdateGroupFluentBuilder

Constructs a fluent builder for the UpdateGroup operation.

source§

impl Client

source

pub fn update_impersonation_role(&self) -> UpdateImpersonationRoleFluentBuilder

Constructs a fluent builder for the UpdateImpersonationRole operation.

source§

impl Client

source

pub fn update_mailbox_quota(&self) -> UpdateMailboxQuotaFluentBuilder

Constructs a fluent builder for the UpdateMailboxQuota operation.

source§

impl Client

source

pub fn update_mobile_device_access_rule( &self ) -> UpdateMobileDeviceAccessRuleFluentBuilder

Constructs a fluent builder for the UpdateMobileDeviceAccessRule operation.

source§

impl Client

source

pub fn update_primary_email_address( &self ) -> UpdatePrimaryEmailAddressFluentBuilder

Constructs a fluent builder for the UpdatePrimaryEmailAddress operation.

source§

impl Client

source

pub fn update_resource(&self) -> UpdateResourceFluentBuilder

Constructs a fluent builder for the UpdateResource operation.

source§

impl Client

source

pub fn update_user(&self) -> UpdateUserFluentBuilder

Constructs a fluent builder for the UpdateUser 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 in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

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.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

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 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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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 T
where 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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where 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 T
where 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 T
where 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