Class: Aws::WorkMail::Client

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

Overview

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

client = Aws::WorkMail::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 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::WorkMail::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to ‘#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::WorkMail::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-workmail/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.



4885
4886
4887
# File 'lib/aws-sdk-workmail/client.rb', line 4885

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.



4888
4889
4890
# File 'lib/aws-sdk-workmail/client.rb', line 4888

def errors_module
  Errors
end

Instance Method Details

#associate_delegate_to_resource(params = {}) ⇒ Struct

Adds a member (user or group) to the resource’s set of delegates.

Examples:

Request syntax with placeholder values


resp = client.associate_delegate_to_resource({
  organization_id: "OrganizationId", # required
  resource_id: "EntityIdentifier", # required
  entity_id: "EntityIdentifier", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization under which the resource exists.

  • :resource_id (required, String)

    The resource for which members (users or groups) are associated.

    The identifier can accept ResourceId, Resourcename, or email. The following identity formats are available:

    • Resource ID: r-0123456789a0123456789b0123456789

    • Email address: resource@domain.tld

    • Resource name: resource

  • :entity_id (required, String)

    The member (user or group) to associate to the resource.

    The entity ID can accept *UserId or GroupID*, *Username or Groupname*, or email.

    • Entity: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: entity@domain.tld

    • Entity: entity

Returns:

  • (Struct)

    Returns an empty response.

See Also:



501
502
503
504
# File 'lib/aws-sdk-workmail/client.rb', line 501

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

#associate_member_to_group(params = {}) ⇒ Struct

Adds a member (user or group) to the group’s set.

Examples:

Request syntax with placeholder values


resp = client.associate_member_to_group({
  organization_id: "OrganizationId", # required
  group_id: "EntityIdentifier", # required
  member_id: "EntityIdentifier", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization under which the group exists.

  • :group_id (required, String)

    The group to which the member (user or group) is associated.

    The identifier can accept GroupId, Groupname, or email. The following identity formats are available:

    • Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: group@domain.tld

    • Group name: group

  • :member_id (required, String)

    The member (user or group) to associate to the group.

    The member ID can accept *UserID or GroupId*, *Username or Groupname*, or email.

    • Member: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: member@domain.tld

    • Member name: member

Returns:

  • (Struct)

    Returns an empty response.

See Also:



551
552
553
554
# File 'lib/aws-sdk-workmail/client.rb', line 551

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

#assume_impersonation_role(params = {}) ⇒ Types::AssumeImpersonationRoleResponse

Assumes an impersonation role for the given WorkMail organization. This method returns an authentication token you can use to make impersonated calls.

Examples:

Request syntax with placeholder values


resp = client.assume_impersonation_role({
  organization_id: "OrganizationId", # required
  impersonation_role_id: "ImpersonationRoleId", # required
})

Response structure


resp.token #=> String
resp.expires_in #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization under which the impersonation role will be assumed.

  • :impersonation_role_id (required, String)

    The impersonation role ID to assume.

Returns:

See Also:



588
589
590
591
# File 'lib/aws-sdk-workmail/client.rb', line 588

def assume_impersonation_role(params = {}, options = {})
  req = build_request(:assume_impersonation_role, 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: {})


4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
# File 'lib/aws-sdk-workmail/client.rb', line 4858

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::WorkMail')
  )
  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-workmail'
  context[:gem_version] = '1.78.0'
  Seahorse::Client::Request.new(handlers, context)
end

#cancel_mailbox_export_job(params = {}) ⇒ Struct

Cancels a mailbox export job.

<note markdown=“1”> If the mailbox export job is near completion, it might not be possible to cancel it.

</note>

Examples:

Request syntax with placeholder values


resp = client.cancel_mailbox_export_job({
  client_token: "IdempotencyClientToken", # required
  job_id: "MailboxExportJobId", # required
  organization_id: "OrganizationId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (required, String)

    The idempotency token for the client request.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

  • :job_id (required, String)

    The job ID.

  • :organization_id (required, String)

    The organization ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



626
627
628
629
# File 'lib/aws-sdk-workmail/client.rb', line 626

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

#create_alias(params = {}) ⇒ Struct

Adds an alias to the set of a given member (user or group) of WorkMail.

Examples:

Request syntax with placeholder values


resp = client.create_alias({
  organization_id: "OrganizationId", # required
  entity_id: "WorkMailIdentifier", # required
  alias: "EmailAddress", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization under which the member (user or group) exists.

  • :entity_id (required, String)

    The member (user or group) to which this alias is added.

  • :alias (required, String)

    The alias to add to the member set.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



657
658
659
660
# File 'lib/aws-sdk-workmail/client.rb', line 657

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

#create_availability_configuration(params = {}) ⇒ Struct

Creates an ‘AvailabilityConfiguration` for the given WorkMail organization and domain.

Examples:

Request syntax with placeholder values


resp = client.create_availability_configuration({
  client_token: "IdempotencyClientToken",
  organization_id: "OrganizationId", # required
  domain_name: "DomainName", # required
  ews_provider: {
    ews_endpoint: "Url", # required
    ews_username: "ExternalUserName", # required
    ews_password: "Password", # required
  },
  lambda_provider: {
    lambda_arn: "LambdaArn", # required
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    An idempotent token that ensures that an API request is executed only once.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

  • :organization_id (required, String)

    The WorkMail organization for which the ‘AvailabilityConfiguration` will be created.

  • :domain_name (required, String)

    The domain to which the provider applies.

  • :ews_provider (Types::EwsAvailabilityProvider)

    Exchange Web Services (EWS) availability provider definition. The request must contain exactly one provider definition, either ‘EwsProvider` or `LambdaProvider`.

  • :lambda_provider (Types::LambdaAvailabilityProvider)

    Lambda availability provider definition. The request must contain exactly one provider definition, either ‘EwsProvider` or `LambdaProvider`.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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

#create_group(params = {}) ⇒ Types::CreateGroupResponse

Creates a group that can be used in WorkMail by calling the RegisterToWorkMail operation.

Examples:

Request syntax with placeholder values


resp = client.create_group({
  organization_id: "OrganizationId", # required
  name: "GroupName", # required
  hidden_from_global_address_list: false,
})

Response structure


resp.group_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization under which the group is to be created.

  • :name (required, String)

    The name of the group.

  • :hidden_from_global_address_list (Boolean)

    If this parameter is enabled, the group will be hidden from the address book.

Returns:

See Also:



749
750
751
752
# File 'lib/aws-sdk-workmail/client.rb', line 749

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

#create_identity_center_application(params = {}) ⇒ Types::CreateIdentityCenterApplicationResponse

Creates the WorkMail application in IAM Identity Center that can be used later in the WorkMail - IdC integration. For more information, see PutIdentityProviderConfiguration. This action does not affect the authentication settings for any WorkMail organizations.

Examples:

Request syntax with placeholder values


resp = client.create_identity_center_application({
  name: "IdentityCenterApplicationName", # required
  instance_arn: "InstanceArn", # required
  client_token: "IdempotencyClientToken",
})

Response structure


resp.application_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the IAM Identity Center application.

  • :instance_arn (required, String)

    The Amazon Resource Name (ARN) of the instance.

  • :client_token (String)

    The idempotency token associated with the request.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

Returns:

See Also:



791
792
793
794
# File 'lib/aws-sdk-workmail/client.rb', line 791

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

#create_impersonation_role(params = {}) ⇒ Types::CreateImpersonationRoleResponse

Creates an impersonation role for the given WorkMail organization.

Idempotency ensures that an API request completes no more than one time. With an idempotent request, if the original request completes successfully, any subsequent retries also complete successfully without performing any further actions.

Examples:

Request syntax with placeholder values


resp = client.create_impersonation_role({
  client_token: "IdempotencyClientToken",
  organization_id: "OrganizationId", # required
  name: "ImpersonationRoleName", # required
  type: "FULL_ACCESS", # required, accepts FULL_ACCESS, READ_ONLY
  description: "ImpersonationRoleDescription",
  rules: [ # required
    {
      impersonation_rule_id: "ImpersonationRuleId", # required
      name: "ImpersonationRuleName",
      description: "ImpersonationRuleDescription",
      effect: "ALLOW", # required, accepts ALLOW, DENY
      target_users: ["EntityIdentifier"],
      not_target_users: ["EntityIdentifier"],
    },
  ],
})

Response structure


resp.impersonation_role_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    The idempotency token for the client request.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

  • :organization_id (required, String)

    The WorkMail organization to create the new impersonation role within.

  • :name (required, String)

    The name of the new impersonation role.

  • :type (required, String)

    The impersonation role’s type. The available impersonation role types are ‘READ_ONLY` or `FULL_ACCESS`.

  • :description (String)

    The description of the new impersonation role.

  • :rules (required, Array<Types::ImpersonationRule>)

    The list of rules for the impersonation role.

Returns:

See Also:



857
858
859
860
# File 'lib/aws-sdk-workmail/client.rb', line 857

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

#create_mobile_device_access_rule(params = {}) ⇒ Types::CreateMobileDeviceAccessRuleResponse

Creates a new mobile device access rule for the specified WorkMail organization.

Examples:

Request syntax with placeholder values


resp = client.create_mobile_device_access_rule({
  organization_id: "OrganizationId", # required
  client_token: "IdempotencyClientToken",
  name: "MobileDeviceAccessRuleName", # required
  description: "MobileDeviceAccessRuleDescription",
  effect: "ALLOW", # required, accepts ALLOW, DENY
  device_types: ["DeviceType"],
  not_device_types: ["DeviceType"],
  device_models: ["DeviceModel"],
  not_device_models: ["DeviceModel"],
  device_operating_systems: ["DeviceOperatingSystem"],
  not_device_operating_systems: ["DeviceOperatingSystem"],
  device_user_agents: ["DeviceUserAgent"],
  not_device_user_agents: ["DeviceUserAgent"],
})

Response structure


resp.mobile_device_access_rule_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization under which the rule will be created.

  • :client_token (String)

    The idempotency token for the client request.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

  • :name (required, String)

    The rule name.

  • :description (String)

    The rule description.

  • :effect (required, String)

    The effect of the rule when it matches. Allowed values are ‘ALLOW` or `DENY`.

  • :device_types (Array<String>)

    Device types that the rule will match.

  • :not_device_types (Array<String>)

    Device types that the rule **will not** match. All other device types will match.

  • :device_models (Array<String>)

    Device models that the rule will match.

  • :not_device_models (Array<String>)

    Device models that the rule **will not** match. All other device models will match.

  • :device_operating_systems (Array<String>)

    Device operating systems that the rule will match.

  • :not_device_operating_systems (Array<String>)

    Device operating systems that the rule **will not** match. All other device operating systems will match.

  • :device_user_agents (Array<String>)

    Device user agents that the rule will match.

  • :not_device_user_agents (Array<String>)

    Device user agents that the rule **will not** match. All other device user agents will match.

Returns:

See Also:



942
943
944
945
# File 'lib/aws-sdk-workmail/client.rb', line 942

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

#create_organization(params = {}) ⇒ Types::CreateOrganizationResponse

Creates a new WorkMail organization. Optionally, you can choose to associate an existing AWS Directory Service directory with your organization. If an AWS Directory Service directory ID is specified, the organization alias must match the directory alias. If you choose not to associate an existing directory with your organization, then we create a new WorkMail directory for you. For more information, see

Adding an organization][1

in the *WorkMail Administrator Guide*.

You can associate multiple email domains with an organization, then choose your default email domain from the WorkMail console. You can also associate a domain that is managed in an Amazon Route 53 public hosted zone. For more information, see [Adding a domain] and

Choosing the default domain][3

in the *WorkMail Administrator

Guide*.

Optionally, you can use a customer managed key from AWS Key Management Service (AWS KMS) to encrypt email for your organization. If you don’t associate an AWS KMS key, WorkMail creates a default, AWS managed key for you.

[1]: docs.aws.amazon.com/workmail/latest/adminguide/add_new_organization.html [2]: docs.aws.amazon.com/workmail/latest/adminguide/add_domain.html [3]: docs.aws.amazon.com/workmail/latest/adminguide/default_domain.html

Examples:

Request syntax with placeholder values


resp = client.create_organization({
  directory_id: "DirectoryId",
  alias: "OrganizationName", # required
  client_token: "IdempotencyClientToken",
  domains: [
    {
      domain_name: "DomainName", # required
      hosted_zone_id: "HostedZoneId",
    },
  ],
  kms_key_arn: "KmsKeyArn",
  enable_interoperability: false,
})

Response structure


resp.organization_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :directory_id (String)

    The AWS Directory Service directory ID.

  • :alias (required, String)

    The organization alias.

  • :client_token (String)

    The idempotency token associated with the request.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

  • :domains (Array<Types::Domain>)

    The email domains to associate with the organization.

  • :kms_key_arn (String)

    The Amazon Resource Name (ARN) of a customer managed key from AWS KMS.

  • :enable_interoperability (Boolean)

    When ‘true`, allows organization interoperability between WorkMail and Microsoft Exchange. If `true`, you must include a AD Connector directory ID in the request.

Returns:

See Also:



1024
1025
1026
1027
# File 'lib/aws-sdk-workmail/client.rb', line 1024

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

#create_resource(params = {}) ⇒ Types::CreateResourceResponse

Creates a new WorkMail resource.

Examples:

Request syntax with placeholder values


resp = client.create_resource({
  organization_id: "OrganizationId", # required
  name: "ResourceName", # required
  type: "ROOM", # required, accepts ROOM, EQUIPMENT
  description: "ResourceDescription",
  hidden_from_global_address_list: false,
})

Response structure


resp.resource_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier associated with the organization for which the resource is created.

  • :name (required, String)

    The name of the new resource.

  • :type (required, String)

    The type of the new resource. The available types are ‘equipment` and `room`.

  • :description (String)

    Resource description.

  • :hidden_from_global_address_list (Boolean)

    If this parameter is enabled, the resource will be hidden from the address book.

Returns:

See Also:



1071
1072
1073
1074
# File 'lib/aws-sdk-workmail/client.rb', line 1071

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

#create_user(params = {}) ⇒ Types::CreateUserResponse

Creates a user who can be used in WorkMail by calling the RegisterToWorkMail operation.

Examples:

Request syntax with placeholder values


resp = client.create_user({
  organization_id: "OrganizationId", # required
  name: "UserName", # required
  display_name: "UserAttribute", # required
  password: "Password",
  role: "USER", # accepts USER, RESOURCE, SYSTEM_USER, REMOTE_USER
  first_name: "UserAttribute",
  last_name: "UserAttribute",
  hidden_from_global_address_list: false,
  identity_provider_user_id: "IdentityProviderUserId",
})

Response structure


resp.user_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier of the organization for which the user is created.

  • :name (required, String)

    The name for the new user. WorkMail directory user names have a maximum length of 64. All others have a maximum length of 20.

  • :display_name (required, String)

    The display name for the new user.

  • :password (String)

    The password for the new user.

  • :role (String)

    The role of the new user.

    You cannot pass SYSTEM_USER or RESOURCE role in a single request. When a user role is not selected, the default role of USER is selected.

  • :first_name (String)

    The first name of the new user.

  • :last_name (String)

    The last name of the new user.

  • :hidden_from_global_address_list (Boolean)

    If this parameter is enabled, the user will be hidden from the address book.

  • :identity_provider_user_id (String)

    User ID from the IAM Identity Center. If this parameter is empty it will be updated automatically when the user logs in for the first time to the mailbox associated with WorkMail.

Returns:

See Also:



1140
1141
1142
1143
# File 'lib/aws-sdk-workmail/client.rb', line 1140

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

#delete_access_control_rule(params = {}) ⇒ Struct

Deletes an access control rule for the specified WorkMail organization.

<note markdown=“1”> Deleting already deleted and non-existing rules does not produce an error. In those cases, the service sends back an HTTP 200 response with an empty HTTP body.

</note>

Examples:

Request syntax with placeholder values


resp = client.delete_access_control_rule({
  organization_id: "OrganizationId", # required
  name: "AccessControlRuleName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization.

  • :name (required, String)

    The name of the access control rule.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1173
1174
1175
1176
# File 'lib/aws-sdk-workmail/client.rb', line 1173

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

#delete_alias(params = {}) ⇒ Struct

Remove one or more specified aliases from a set of aliases for a given user.

Examples:

Request syntax with placeholder values


resp = client.delete_alias({
  organization_id: "OrganizationId", # required
  entity_id: "WorkMailIdentifier", # required
  alias: "EmailAddress", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the user exists.

  • :entity_id (required, String)

    The identifier for the member (user or group) from which to have the aliases removed.

  • :alias (required, String)

    The aliases to be removed from the user’s set of aliases. Duplicate entries in the list are collapsed into single entries (the list is transformed into a set).

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1207
1208
1209
1210
# File 'lib/aws-sdk-workmail/client.rb', line 1207

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

#delete_availability_configuration(params = {}) ⇒ Struct

Deletes the ‘AvailabilityConfiguration` for the given WorkMail organization and domain.

Examples:

Request syntax with placeholder values


resp = client.delete_availability_configuration({
  organization_id: "OrganizationId", # required
  domain_name: "DomainName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization for which the ‘AvailabilityConfiguration` will be deleted.

  • :domain_name (required, String)

    The domain for which the ‘AvailabilityConfiguration` will be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1235
1236
1237
1238
# File 'lib/aws-sdk-workmail/client.rb', line 1235

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

#delete_email_monitoring_configuration(params = {}) ⇒ Struct

Deletes the email monitoring configuration for a specified organization.

Examples:

Request syntax with placeholder values


resp = client.delete_email_monitoring_configuration({
  organization_id: "OrganizationId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The ID of the organization from which the email monitoring configuration is deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1259
1260
1261
1262
# File 'lib/aws-sdk-workmail/client.rb', line 1259

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

#delete_group(params = {}) ⇒ Struct

Deletes a group from WorkMail.

Examples:

Request syntax with placeholder values


resp = client.delete_group({
  organization_id: "OrganizationId", # required
  group_id: "EntityIdentifier", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization that contains the group.

  • :group_id (required, String)

    The identifier of the group to be deleted.

    The identifier can be the GroupId, or Groupname. The following identity formats are available:

    • Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Group name: group

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1293
1294
1295
1296
# File 'lib/aws-sdk-workmail/client.rb', line 1293

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

#delete_identity_center_application(params = {}) ⇒ Struct

Deletes the IAM Identity Center application from WorkMail. This action does not affect the authentication settings for any WorkMail organizations.

Examples:

Request syntax with placeholder values


resp = client.delete_identity_center_application({
  application_arn: "ApplicationArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :application_arn (required, String)

    The Amazon Resource Name (ARN) of the application.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1317
1318
1319
1320
# File 'lib/aws-sdk-workmail/client.rb', line 1317

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

#delete_identity_provider_configuration(params = {}) ⇒ Struct

Disables the integration between IdC and WorkMail. Authentication will continue with the directory as it was before the IdC integration. You might have to reset your directory passwords and reconfigure your desktop and mobile email clients.

Examples:

Request syntax with placeholder values


resp = client.delete_identity_provider_configuration({
  organization_id: "OrganizationId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The Organization ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1342
1343
1344
1345
# File 'lib/aws-sdk-workmail/client.rb', line 1342

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

#delete_impersonation_role(params = {}) ⇒ Struct

Deletes an impersonation role for the given WorkMail organization.

Examples:

Request syntax with placeholder values


resp = client.delete_impersonation_role({
  organization_id: "OrganizationId", # required
  impersonation_role_id: "ImpersonationRoleId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization from which to delete the impersonation role.

  • :impersonation_role_id (required, String)

    The ID of the impersonation role to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1368
1369
1370
1371
# File 'lib/aws-sdk-workmail/client.rb', line 1368

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

#delete_mailbox_permissions(params = {}) ⇒ Struct

Deletes permissions granted to a member (user or group).

Examples:

Request syntax with placeholder values


resp = client.delete_mailbox_permissions({
  organization_id: "OrganizationId", # required
  entity_id: "EntityIdentifier", # required
  grantee_id: "EntityIdentifier", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier of the organization under which the member (user or group) exists.

  • :entity_id (required, String)

    The identifier of the entity that owns the mailbox.

    The identifier can be *UserId or Group Id*, *Username 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 (required, String)

    The identifier of the entity for which to delete granted permissions.

    The identifier can be *UserId, ResourceID, or Group Id*, *Username 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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1421
1422
1423
1424
# File 'lib/aws-sdk-workmail/client.rb', line 1421

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

#delete_mobile_device_access_override(params = {}) ⇒ Struct

Deletes the mobile device access override for the given WorkMail organization, user, and device.

<note markdown=“1”> Deleting already deleted and non-existing overrides does not produce an error. In those cases, the service sends back an HTTP 200 response with an empty HTTP body.

</note>

Examples:

Request syntax with placeholder values


resp = client.delete_mobile_device_access_override({
  organization_id: "OrganizationId", # required
  user_id: "EntityIdentifier", # required
  device_id: "DeviceId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization for which the access override will be deleted.

  • :user_id (required, String)

    The WorkMail user for which you want to delete the override. Accepts the following types of user identities:

    • User ID: ‘12345678-1234-1234-1234-123456789012` or `S-1-1-12-1234567890-123456789-123456789-1234`

    • Email address: ‘user@domain.tld`

    • User name: ‘user`

  • :device_id (required, String)

    The mobile device for which you delete the override. ‘DeviceId` is case insensitive.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1468
1469
1470
1471
# File 'lib/aws-sdk-workmail/client.rb', line 1468

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

#delete_mobile_device_access_rule(params = {}) ⇒ Struct

Deletes a mobile device access rule for the specified WorkMail organization.

<note markdown=“1”> Deleting already deleted and non-existing rules does not produce an error. In those cases, the service sends back an HTTP 200 response with an empty HTTP body.

</note>

Examples:

Request syntax with placeholder values


resp = client.delete_mobile_device_access_rule({
  organization_id: "OrganizationId", # required
  mobile_device_access_rule_id: "MobileDeviceAccessRuleId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization under which the rule will be deleted.

  • :mobile_device_access_rule_id (required, String)

    The identifier of the rule to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1501
1502
1503
1504
# File 'lib/aws-sdk-workmail/client.rb', line 1501

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

#delete_organization(params = {}) ⇒ Types::DeleteOrganizationResponse

Deletes an WorkMail organization and all underlying AWS resources managed by WorkMail as part of the organization. You can choose whether to delete the associated directory. For more information, see

Removing an organization][1

in the *WorkMail Administrator Guide*.

[1]: docs.aws.amazon.com/workmail/latest/adminguide/remove_organization.html

Examples:

Request syntax with placeholder values


resp = client.delete_organization({
  client_token: "IdempotencyClientToken",
  organization_id: "OrganizationId", # required
  delete_directory: false, # required
  force_delete: false,
  delete_identity_center_application: false,
})

Response structure


resp.organization_id #=> String
resp.state #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    The idempotency token associated with the request.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

  • :organization_id (required, String)

    The organization ID.

  • :delete_directory (required, Boolean)

    If true, deletes the AWS Directory Service directory associated with the organization.

  • :force_delete (Boolean)

    Deletes a WorkMail organization even if the organization has enabled users.

  • :delete_identity_center_application (Boolean)

    Deletes IAM Identity Center application for WorkMail. This action does not affect authentication settings for any organization.

Returns:

See Also:



1560
1561
1562
1563
# File 'lib/aws-sdk-workmail/client.rb', line 1560

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

#delete_personal_access_token(params = {}) ⇒ Struct

Deletes the Personal Access Token from the provided WorkMail Organization.

Examples:

Request syntax with placeholder values


resp = client.delete_personal_access_token({
  organization_id: "OrganizationId", # required
  personal_access_token_id: "PersonalAccessTokenId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The Organization ID.

  • :personal_access_token_id (required, String)

    The Personal Access Token ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1587
1588
1589
1590
# File 'lib/aws-sdk-workmail/client.rb', line 1587

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

#delete_resource(params = {}) ⇒ Struct

Deletes the specified resource.

Examples:

Request syntax with placeholder values


resp = client.delete_resource({
  organization_id: "OrganizationId", # required
  resource_id: "EntityIdentifier", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier associated with the organization from which the resource is deleted.

  • :resource_id (required, String)

    The identifier of the resource to be deleted.

    The identifier can accept ResourceId, or Resourcename. The following identity formats are available:

    • Resource ID: r-0123456789a0123456789b0123456789

    • Resource name: resource

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1621
1622
1623
1624
# File 'lib/aws-sdk-workmail/client.rb', line 1621

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

#delete_retention_policy(params = {}) ⇒ Struct

Deletes the specified retention policy from the specified organization.

Examples:

Request syntax with placeholder values


resp = client.delete_retention_policy({
  organization_id: "OrganizationId", # required
  id: "ShortString", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization ID.

  • :id (required, String)

    The retention policy ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1648
1649
1650
1651
# File 'lib/aws-sdk-workmail/client.rb', line 1648

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

#delete_user(params = {}) ⇒ Struct

Deletes a user from WorkMail and all subsequent systems. Before you can delete a user, the user state must be ‘DISABLED`. Use the DescribeUser action to confirm the user state.

Deleting a user is permanent and cannot be undone. WorkMail archives user mailboxes for 30 days before they are permanently removed.

Examples:

Request syntax with placeholder values


resp = client.delete_user({
  organization_id: "OrganizationId", # required
  user_id: "EntityIdentifier", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization that contains the user to be deleted.

  • :user_id (required, String)

    The identifier of the user to be deleted.

    The identifier can be the UserId or Username. The following identity formats are available:

    • User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • User name: user

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1687
1688
1689
1690
# File 'lib/aws-sdk-workmail/client.rb', line 1687

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

#deregister_from_work_mail(params = {}) ⇒ Struct

Mark a user, group, or resource as no longer used in WorkMail. This action disassociates the mailbox and schedules it for clean-up. WorkMail keeps mailboxes for 30 days before they are permanently removed. The functionality in the console is Disable.

Examples:

Request syntax with placeholder values


resp = client.deregister_from_work_mail({
  organization_id: "OrganizationId", # required
  entity_id: "EntityIdentifier", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the WorkMail entity exists.

  • :entity_id (required, String)

    The identifier for the member to be updated.

    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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1728
1729
1730
1731
# File 'lib/aws-sdk-workmail/client.rb', line 1728

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

#deregister_mail_domain(params = {}) ⇒ Struct

Removes a domain from WorkMail, stops email routing to WorkMail, and removes the authorization allowing WorkMail use. SES keeps the domain because other applications may use it. You must first remove any email address used by WorkMail entities before you remove the domain.

Examples:

Request syntax with placeholder values


resp = client.deregister_mail_domain({
  organization_id: "OrganizationId", # required
  domain_name: "WorkMailDomainName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization for which the domain will be deregistered.

  • :domain_name (required, String)

    The domain to deregister in WorkMail and SES.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1757
1758
1759
1760
# File 'lib/aws-sdk-workmail/client.rb', line 1757

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

#describe_email_monitoring_configuration(params = {}) ⇒ Types::DescribeEmailMonitoringConfigurationResponse

Describes the current email monitoring configuration for a specified organization.

Examples:

Request syntax with placeholder values


resp = client.describe_email_monitoring_configuration({
  organization_id: "OrganizationId", # required
})

Response structure


resp.role_arn #=> String
resp.log_group_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The ID of the organization for which the email monitoring configuration is described.

Returns:

See Also:



1789
1790
1791
1792
# File 'lib/aws-sdk-workmail/client.rb', line 1789

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

#describe_entity(params = {}) ⇒ Types::DescribeEntityResponse

Returns basic details about an entity in WorkMail.

Examples:

Request syntax with placeholder values


resp = client.describe_entity({
  organization_id: "OrganizationId", # required
  email: "EmailAddress", # required
})

Response structure


resp.entity_id #=> String
resp.name #=> String
resp.type #=> String, one of "GROUP", "USER", "RESOURCE"

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the entity exists.

  • :email (required, String)

    The email under which the entity exists.

Returns:

See Also:



1825
1826
1827
1828
# File 'lib/aws-sdk-workmail/client.rb', line 1825

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

#describe_group(params = {}) ⇒ Types::DescribeGroupResponse

Returns the data available for the group.

Examples:

Request syntax with placeholder values


resp = client.describe_group({
  organization_id: "OrganizationId", # required
  group_id: "EntityIdentifier", # required
})

Response structure


resp.group_id #=> String
resp.name #=> String
resp.email #=> String
resp.state #=> String, one of "ENABLED", "DISABLED", "DELETED"
resp.enabled_date #=> Time
resp.disabled_date #=> Time
resp.hidden_from_global_address_list #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the group exists.

  • :group_id (required, String)

    The identifier for the group to be described.

    The identifier can accept GroupId, Groupname, or email. The following identity formats are available:

    • Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: group@domain.tld

    • Group name: group

Returns:

See Also:



1879
1880
1881
1882
# File 'lib/aws-sdk-workmail/client.rb', line 1879

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

#describe_identity_provider_configuration(params = {}) ⇒ Types::DescribeIdentityProviderConfigurationResponse

Returns detailed information on the current IdC setup for the WorkMail organization.

Examples:

Request syntax with placeholder values


resp = client.describe_identity_provider_configuration({
  organization_id: "OrganizationId", # required
})

Response structure


resp.authentication_mode #=> String, one of "IDENTITY_PROVIDER_ONLY", "IDENTITY_PROVIDER_AND_DIRECTORY"
resp.identity_center_configuration.instance_arn #=> String
resp.identity_center_configuration.application_arn #=> String
resp.personal_access_token_configuration.status #=> String, one of "ACTIVE", "INACTIVE"
resp.personal_access_token_configuration.lifetime_in_days #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The Organization ID.

Returns:

See Also:



1914
1915
1916
1917
# File 'lib/aws-sdk-workmail/client.rb', line 1914

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

#describe_inbound_dmarc_settings(params = {}) ⇒ Types::DescribeInboundDmarcSettingsResponse

Lists the settings in a DMARC policy for a specified organization.

Examples:

Request syntax with placeholder values


resp = client.describe_inbound_dmarc_settings({
  organization_id: "OrganizationId", # required
})

Response structure


resp.enforced #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    Lists the ID of the given organization.

Returns:

See Also:



1942
1943
1944
1945
# File 'lib/aws-sdk-workmail/client.rb', line 1942

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

#describe_mailbox_export_job(params = {}) ⇒ Types::DescribeMailboxExportJobResponse

Describes the current status of a mailbox export job.

Examples:

Request syntax with placeholder values


resp = client.describe_mailbox_export_job({
  job_id: "MailboxExportJobId", # required
  organization_id: "OrganizationId", # required
})

Response structure


resp.entity_id #=> String
resp.description #=> String
resp.role_arn #=> String
resp.kms_key_arn #=> String
resp.s3_bucket_name #=> String
resp.s3_prefix #=> String
resp.s3_path #=> String
resp.estimated_progress #=> Integer
resp.state #=> String, one of "RUNNING", "COMPLETED", "FAILED", "CANCELLED"
resp.error_info #=> String
resp.start_time #=> Time
resp.end_time #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The mailbox export job ID.

  • :organization_id (required, String)

    The organization ID.

Returns:

See Also:



1996
1997
1998
1999
# File 'lib/aws-sdk-workmail/client.rb', line 1996

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

#describe_organization(params = {}) ⇒ Types::DescribeOrganizationResponse

Provides more information regarding a given organization based on its identifier.

Examples:

Request syntax with placeholder values


resp = client.describe_organization({
  organization_id: "OrganizationId", # required
})

Response structure


resp.organization_id #=> String
resp.alias #=> String
resp.state #=> String
resp.directory_id #=> String
resp.directory_type #=> String
resp.default_mail_domain #=> String
resp.completed_date #=> Time
resp.error_message #=> String
resp.arn #=> String
resp.migration_admin #=> String
resp.interoperability_enabled #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization to be described.

Returns:

See Also:



2045
2046
2047
2048
# File 'lib/aws-sdk-workmail/client.rb', line 2045

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

#describe_resource(params = {}) ⇒ Types::DescribeResourceResponse

Returns the data available for the resource.

Examples:

Request syntax with placeholder values


resp = client.describe_resource({
  organization_id: "OrganizationId", # required
  resource_id: "EntityIdentifier", # required
})

Response structure


resp.resource_id #=> String
resp.email #=> String
resp.name #=> String
resp.type #=> String, one of "ROOM", "EQUIPMENT"
resp.booking_options.auto_accept_requests #=> Boolean
resp.booking_options.auto_decline_recurring_requests #=> Boolean
resp.booking_options.auto_decline_conflicting_requests #=> Boolean
resp.state #=> String, one of "ENABLED", "DISABLED", "DELETED"
resp.enabled_date #=> Time
resp.disabled_date #=> Time
resp.description #=> String
resp.hidden_from_global_address_list #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier associated with the organization for which the resource is described.

  • :resource_id (required, String)

    The identifier of the resource to be described.

    The identifier can accept ResourceId, Resourcename, or email. The following identity formats are available:

    • Resource ID: r-0123456789a0123456789b0123456789

    • Email address: resource@domain.tld

    • Resource name: resource

Returns:

See Also:



2107
2108
2109
2110
# File 'lib/aws-sdk-workmail/client.rb', line 2107

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

#describe_user(params = {}) ⇒ Types::DescribeUserResponse

Provides information regarding the user.

Examples:

Request syntax with placeholder values


resp = client.describe_user({
  organization_id: "OrganizationId", # required
  user_id: "EntityIdentifier", # required
})

Response structure


resp.user_id #=> String
resp.name #=> String
resp.email #=> String
resp.display_name #=> String
resp.state #=> String, one of "ENABLED", "DISABLED", "DELETED"
resp.user_role #=> String, one of "USER", "RESOURCE", "SYSTEM_USER", "REMOTE_USER"
resp.enabled_date #=> Time
resp.disabled_date #=> Time
resp.mailbox_provisioned_date #=> Time
resp.mailbox_deprovisioned_date #=> Time
resp.first_name #=> String
resp.last_name #=> String
resp.hidden_from_global_address_list #=> Boolean
resp.initials #=> String
resp.telephone #=> String
resp.street #=> String
resp.job_title #=> String
resp.city #=> String
resp.company #=> String
resp.zip_code #=> String
resp.department #=> String
resp.country #=> String
resp.office #=> String
resp.identity_provider_user_id #=> String
resp.identity_provider_identity_store_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the user exists.

  • :user_id (required, String)

    The identifier for the user to be described.

    The identifier can be the UserId, Username, or email. The following identity formats are available:

    • User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: user@domain.tld

    • User name: user

Returns:

See Also:



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

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

#disassociate_delegate_from_resource(params = {}) ⇒ Struct

Removes a member from the resource’s set of delegates.

Examples:

Request syntax with placeholder values


resp = client.disassociate_delegate_from_resource({
  organization_id: "OrganizationId", # required
  resource_id: "EntityIdentifier", # required
  entity_id: "EntityIdentifier", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the resource exists.

  • :resource_id (required, String)

    The identifier of the resource from which delegates’ set members are removed.

    The identifier can accept ResourceId, Resourcename, or email. The following identity formats are available:

    • Resource ID: r-0123456789a0123456789b0123456789

    • Email address: resource@domain.tld

    • Resource name: resource

  • :entity_id (required, String)

    The identifier for the member (user, group) to be removed from the resource’s delegates.

    The entity ID can accept *UserId or GroupID*, *Username or Groupname*, or email.

    • Entity: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: entity@domain.tld

    • Entity: entity

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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

#disassociate_member_from_group(params = {}) ⇒ Struct

Removes a member from a group.

Examples:

Request syntax with placeholder values


resp = client.disassociate_member_from_group({
  organization_id: "OrganizationId", # required
  group_id: "EntityIdentifier", # required
  member_id: "EntityIdentifier", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the group exists.

  • :group_id (required, String)

    The identifier for the group from which members are removed.

    The identifier can accept GroupId, Groupname, or email. The following identity formats are available:

    • Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: group@domain.tld

    • Group name: group

  • :member_id (required, String)

    The identifier for the member to be removed from the group.

    The member ID can accept *UserID or GroupId*, *Username or Groupname*, or email.

    • Member ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: member@domain.tld

    • Member name: member

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2298
2299
2300
2301
# File 'lib/aws-sdk-workmail/client.rb', line 2298

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

#get_access_control_effect(params = {}) ⇒ Types::GetAccessControlEffectResponse

Gets the effects of an organization’s access control rules as they apply to a specified IPv4 address, access protocol action, and user ID or impersonation role ID. You must provide either the user ID or impersonation role ID. Impersonation role ID can only be used with Action EWS.

Examples:

Request syntax with placeholder values


resp = client.get_access_control_effect({
  organization_id: "OrganizationId", # required
  ip_address: "IpAddress", # required
  action: "AccessControlRuleAction", # required
  user_id: "WorkMailIdentifier",
  impersonation_role_id: "ImpersonationRoleId",
})

Response structure


resp.effect #=> String, one of "ALLOW", "DENY"
resp.matched_rules #=> Array
resp.matched_rules[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization.

  • :ip_address (required, String)

    The IPv4 address.

  • :action (required, String)

    The access protocol action. Valid values include ‘ActiveSync`, `AutoDiscover`, `EWS`, `IMAP`, `SMTP`, `WindowsOutlook`, and `WebMail`.

  • :user_id (String)

    The user ID.

  • :impersonation_role_id (String)

    The impersonation role ID.

Returns:

See Also:



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

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

#get_default_retention_policy(params = {}) ⇒ Types::GetDefaultRetentionPolicyResponse

Gets the default retention policy details for the specified organization.

Examples:

Request syntax with placeholder values


resp = client.get_default_retention_policy({
  organization_id: "OrganizationId", # required
})

Response structure


resp.id #=> String
resp.name #=> String
resp.description #=> String
resp.folder_configurations #=> Array
resp.folder_configurations[0].name #=> String, one of "INBOX", "DELETED_ITEMS", "SENT_ITEMS", "DRAFTS", "JUNK_EMAIL"
resp.folder_configurations[0].action #=> String, one of "NONE", "DELETE", "PERMANENTLY_DELETE"
resp.folder_configurations[0].period #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization ID.

Returns:

See Also:



2389
2390
2391
2392
# File 'lib/aws-sdk-workmail/client.rb', line 2389

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

#get_impersonation_role(params = {}) ⇒ Types::GetImpersonationRoleResponse

Gets the impersonation role details for the given WorkMail organization.

Examples:

Request syntax with placeholder values


resp = client.get_impersonation_role({
  organization_id: "OrganizationId", # required
  impersonation_role_id: "ImpersonationRoleId", # required
})

Response structure


resp.impersonation_role_id #=> String
resp.name #=> String
resp.type #=> String, one of "FULL_ACCESS", "READ_ONLY"
resp.description #=> String
resp.rules #=> Array
resp.rules[0].impersonation_rule_id #=> String
resp.rules[0].name #=> String
resp.rules[0].description #=> String
resp.rules[0].effect #=> String, one of "ALLOW", "DENY"
resp.rules[0].target_users #=> Array
resp.rules[0].target_users[0] #=> String
resp.rules[0].not_target_users #=> Array
resp.rules[0].not_target_users[0] #=> String
resp.date_created #=> Time
resp.date_modified #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization from which to retrieve the impersonation role.

  • :impersonation_role_id (required, String)

    The impersonation role ID to retrieve.

Returns:

See Also:



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

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

#get_impersonation_role_effect(params = {}) ⇒ Types::GetImpersonationRoleEffectResponse

Tests whether the given impersonation role can impersonate a target user.

Examples:

Request syntax with placeholder values


resp = client.get_impersonation_role_effect({
  organization_id: "OrganizationId", # required
  impersonation_role_id: "ImpersonationRoleId", # required
  target_user: "EntityIdentifier", # required
})

Response structure


resp.type #=> String, one of "FULL_ACCESS", "READ_ONLY"
resp.effect #=> String, one of "ALLOW", "DENY"
resp.matched_rules #=> Array
resp.matched_rules[0].impersonation_rule_id #=> String
resp.matched_rules[0].name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization where the impersonation role is defined.

  • :impersonation_role_id (required, String)

    The impersonation role ID to test.

  • :target_user (required, String)

    The WorkMail organization user chosen to test the impersonation role. The following identity formats are available:

    • User ID: ‘12345678-1234-1234-1234-123456789012` or `S-1-1-12-1234567890-123456789-123456789-1234`

    • Email address: ‘user@domain.tld`

    • User name: ‘user`

Returns:

See Also:



2494
2495
2496
2497
# File 'lib/aws-sdk-workmail/client.rb', line 2494

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

#get_mail_domain(params = {}) ⇒ Types::GetMailDomainResponse

Gets details for a mail domain, including domain records required to configure your domain with recommended security.

Examples:

Request syntax with placeholder values


resp = client.get_mail_domain({
  organization_id: "OrganizationId", # required
  domain_name: "WorkMailDomainName", # required
})

Response structure


resp.records #=> Array
resp.records[0].type #=> String
resp.records[0].hostname #=> String
resp.records[0].value #=> String
resp.is_test_domain #=> Boolean
resp.is_default #=> Boolean
resp.ownership_verification_status #=> String, one of "PENDING", "VERIFIED", "FAILED"
resp.dkim_verification_status #=> String, one of "PENDING", "VERIFIED", "FAILED"

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization for which the domain is retrieved.

  • :domain_name (required, String)

    The domain from which you want to retrieve details.

Returns:

See Also:



2538
2539
2540
2541
# File 'lib/aws-sdk-workmail/client.rb', line 2538

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

#get_mailbox_details(params = {}) ⇒ Types::GetMailboxDetailsResponse

Requests a user’s mailbox details for a specified organization and user.

Examples:

Request syntax with placeholder values


resp = client.get_mailbox_details({
  organization_id: "OrganizationId", # required
  user_id: "EntityIdentifier", # required
})

Response structure


resp.mailbox_quota #=> Integer
resp.mailbox_size #=> Float

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization that contains the user whose mailbox details are being requested.

  • :user_id (required, String)

    The identifier for the user whose mailbox details are being requested.

    The identifier can be the UserId, Username, or email. The following identity formats are available:

    • User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: user@domain.tld

    • User name: user

Returns:

See Also:



2584
2585
2586
2587
# File 'lib/aws-sdk-workmail/client.rb', line 2584

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

#get_mobile_device_access_effect(params = {}) ⇒ Types::GetMobileDeviceAccessEffectResponse

Simulates the effect of the mobile device access rules for the given attributes of a sample access event. Use this method to test the effects of the current set of mobile device access rules for the WorkMail organization for a particular user’s attributes.

Examples:

Request syntax with placeholder values


resp = client.get_mobile_device_access_effect({
  organization_id: "OrganizationId", # required
  device_type: "DeviceType",
  device_model: "DeviceModel",
  device_operating_system: "DeviceOperatingSystem",
  device_user_agent: "DeviceUserAgent",
})

Response structure


resp.effect #=> String, one of "ALLOW", "DENY"
resp.matched_rules #=> Array
resp.matched_rules[0].mobile_device_access_rule_id #=> String
resp.matched_rules[0].name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization to simulate the access effect for.

  • :device_type (String)

    Device type the simulated user will report.

  • :device_model (String)

    Device model the simulated user will report.

  • :device_operating_system (String)

    Device operating system the simulated user will report.

  • :device_user_agent (String)

    Device user agent the simulated user will report.

Returns:

See Also:



2635
2636
2637
2638
# File 'lib/aws-sdk-workmail/client.rb', line 2635

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

#get_mobile_device_access_override(params = {}) ⇒ Types::GetMobileDeviceAccessOverrideResponse

Gets the mobile device access override for the given WorkMail organization, user, and device.

Examples:

Request syntax with placeholder values


resp = client.get_mobile_device_access_override({
  organization_id: "OrganizationId", # required
  user_id: "EntityIdentifier", # required
  device_id: "DeviceId", # required
})

Response structure


resp.user_id #=> String
resp.device_id #=> String
resp.effect #=> String, one of "ALLOW", "DENY"
resp.description #=> String
resp.date_created #=> Time
resp.date_modified #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization to which you want to apply the override.

  • :user_id (required, String)

    Identifies the WorkMail user for the override. Accepts the following types of user identities:

    • User ID: ‘12345678-1234-1234-1234-123456789012` or `S-1-1-12-1234567890-123456789-123456789-1234`

    • Email address: ‘user@domain.tld`

    • User name: ‘user`

  • :device_id (required, String)

    The mobile device to which the override applies. ‘DeviceId` is case insensitive.

Returns:

See Also:



2691
2692
2693
2694
# File 'lib/aws-sdk-workmail/client.rb', line 2691

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

#get_personal_access_token_metadata(params = {}) ⇒ Types::GetPersonalAccessTokenMetadataResponse

Requests details of a specific Personal Access Token within the WorkMail organization.

Examples:

Request syntax with placeholder values


resp = client.({
  organization_id: "OrganizationId", # required
  personal_access_token_id: "PersonalAccessTokenId", # required
})

Response structure


resp.personal_access_token_id #=> String
resp.user_id #=> String
resp.name #=> String
resp.date_created #=> Time
resp.date_last_used #=> Time
resp.expires_time #=> Time
resp.scopes #=> Array
resp.scopes[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The Organization ID.

  • :personal_access_token_id (required, String)

    The Personal Access Token ID.

Returns:

See Also:



2737
2738
2739
2740
# File 'lib/aws-sdk-workmail/client.rb', line 2737

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

#list_access_control_rules(params = {}) ⇒ Types::ListAccessControlRulesResponse

Lists the access control rules for the specified organization.

Examples:

Request syntax with placeholder values


resp = client.list_access_control_rules({
  organization_id: "OrganizationId", # required
})

Response structure


resp.rules #=> Array
resp.rules[0].name #=> String
resp.rules[0].effect #=> String, one of "ALLOW", "DENY"
resp.rules[0].description #=> String
resp.rules[0].ip_ranges #=> Array
resp.rules[0].ip_ranges[0] #=> String
resp.rules[0].not_ip_ranges #=> Array
resp.rules[0].not_ip_ranges[0] #=> String
resp.rules[0].actions #=> Array
resp.rules[0].actions[0] #=> String
resp.rules[0].not_actions #=> Array
resp.rules[0].not_actions[0] #=> String
resp.rules[0].user_ids #=> Array
resp.rules[0].user_ids[0] #=> String
resp.rules[0].not_user_ids #=> Array
resp.rules[0].not_user_ids[0] #=> String
resp.rules[0].date_created #=> Time
resp.rules[0].date_modified #=> Time
resp.rules[0].impersonation_role_ids #=> Array
resp.rules[0].impersonation_role_ids[0] #=> String
resp.rules[0].not_impersonation_role_ids #=> Array
resp.rules[0].not_impersonation_role_ids[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization.

Returns:

See Also:



2786
2787
2788
2789
# File 'lib/aws-sdk-workmail/client.rb', line 2786

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

#list_aliases(params = {}) ⇒ Types::ListAliasesResponse

Creates a paginated call to list the aliases associated with a given entity.

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_aliases({
  organization_id: "OrganizationId", # required
  entity_id: "WorkMailIdentifier", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.aliases #=> Array
resp.aliases[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the entity exists.

  • :entity_id (required, String)

    The identifier for the entity for which to list the aliases.

  • :next_token (String)

    The token to use to retrieve the next page of results. The first call does not contain any tokens.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

Returns:

See Also:



2833
2834
2835
2836
# File 'lib/aws-sdk-workmail/client.rb', line 2833

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

#list_availability_configurations(params = {}) ⇒ Types::ListAvailabilityConfigurationsResponse

List all the ‘AvailabilityConfiguration`’s for the given WorkMail organization.

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_availability_configurations({
  organization_id: "OrganizationId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.availability_configurations #=> Array
resp.availability_configurations[0].domain_name #=> String
resp.availability_configurations[0].provider_type #=> String, one of "EWS", "LAMBDA"
resp.availability_configurations[0].ews_provider.ews_endpoint #=> String
resp.availability_configurations[0].ews_provider.ews_username #=> String
resp.availability_configurations[0].lambda_provider.lambda_arn #=> String
resp.availability_configurations[0].date_created #=> Time
resp.availability_configurations[0].date_modified #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization for which the ‘AvailabilityConfiguration`’s will be listed.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

  • :next_token (String)

    The token to use to retrieve the next page of results. The first call does not require a token.

Returns:

See Also:



2883
2884
2885
2886
# File 'lib/aws-sdk-workmail/client.rb', line 2883

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

#list_group_members(params = {}) ⇒ Types::ListGroupMembersResponse

Returns an overview of the members of a group. Users and groups can be members of a group.

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_group_members({
  organization_id: "OrganizationId", # required
  group_id: "EntityIdentifier", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.members #=> Array
resp.members[0].id #=> String
resp.members[0].name #=> String
resp.members[0].type #=> String, one of "GROUP", "USER"
resp.members[0].state #=> String, one of "ENABLED", "DISABLED", "DELETED"
resp.members[0].enabled_date #=> Time
resp.members[0].disabled_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the group exists.

  • :group_id (required, String)

    The identifier for the group to which the members (users or groups) are associated.

    The identifier can accept GroupId, Groupname, or email. The following identity formats are available:

    • Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: group@domain.tld

    • Group name: group

  • :next_token (String)

    The token to use to retrieve the next page of results. The first call does not contain any tokens.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

Returns:

See Also:



2946
2947
2948
2949
# File 'lib/aws-sdk-workmail/client.rb', line 2946

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

#list_groups(params = {}) ⇒ Types::ListGroupsResponse

Returns summaries of the organization’s groups.

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_groups({
  organization_id: "OrganizationId", # required
  next_token: "NextToken",
  max_results: 1,
  filters: {
    name_prefix: "String",
    primary_email_prefix: "String",
    state: "ENABLED", # accepts ENABLED, DISABLED, DELETED
  },
})

Response structure


resp.groups #=> Array
resp.groups[0].id #=> String
resp.groups[0].email #=> String
resp.groups[0].name #=> String
resp.groups[0].state #=> String, one of "ENABLED", "DISABLED", "DELETED"
resp.groups[0].enabled_date #=> Time
resp.groups[0].disabled_date #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the groups exist.

  • :next_token (String)

    The token to use to retrieve the next page of results. The first call does not contain any tokens.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

  • :filters (Types::ListGroupsFilters)

    Limit the search results based on the filter criteria. Only one filter per request is supported.

Returns:

See Also:



3002
3003
3004
3005
# File 'lib/aws-sdk-workmail/client.rb', line 3002

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

#list_groups_for_entity(params = {}) ⇒ Types::ListGroupsForEntityResponse

Returns all the groups to which an entity belongs.

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_groups_for_entity({
  organization_id: "OrganizationId", # required
  entity_id: "EntityIdentifier", # required
  filters: {
    group_name_prefix: "String",
  },
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.groups #=> Array
resp.groups[0].group_id #=> String
resp.groups[0].group_name #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the entity exists.

  • :entity_id (required, String)

    The identifier for the entity.

    The entity ID can accept *UserId or GroupID*, *Username or Groupname*, or email.

    • Entity ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: entity@domain.tld

    • Entity name: entity

  • :filters (Types::ListGroupsForEntityFilters)

    Limit the search results based on the filter criteria.

  • :next_token (String)

    The token to use to retrieve the next page of results. The first call does not contain any tokens.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

Returns:

See Also:



3065
3066
3067
3068
# File 'lib/aws-sdk-workmail/client.rb', line 3065

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

#list_impersonation_roles(params = {}) ⇒ Types::ListImpersonationRolesResponse

Lists all the impersonation roles for the given WorkMail organization.

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_impersonation_roles({
  organization_id: "OrganizationId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.roles #=> Array
resp.roles[0].impersonation_role_id #=> String
resp.roles[0].name #=> String
resp.roles[0].type #=> String, one of "FULL_ACCESS", "READ_ONLY"
resp.roles[0].date_created #=> Time
resp.roles[0].date_modified #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization to which the listed impersonation roles belong.

  • :next_token (String)

    The token used to retrieve the next page of results. The first call doesn’t require a token.

  • :max_results (Integer)

    The maximum number of results returned in a single call.

Returns:

See Also:



3112
3113
3114
3115
# File 'lib/aws-sdk-workmail/client.rb', line 3112

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

#list_mail_domains(params = {}) ⇒ Types::ListMailDomainsResponse

Lists the mail domains in a given WorkMail organization.

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_mail_domains({
  organization_id: "OrganizationId", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.mail_domains #=> Array
resp.mail_domains[0].domain_name #=> String
resp.mail_domains[0].default_domain #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization for which to list domains.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

  • :next_token (String)

    The token to use to retrieve the next page of results. The first call does not require a token.

Returns:

See Also:



3155
3156
3157
3158
# File 'lib/aws-sdk-workmail/client.rb', line 3155

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

#list_mailbox_export_jobs(params = {}) ⇒ Types::ListMailboxExportJobsResponse

Lists the mailbox export jobs started for the specified organization within the last seven days.

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_mailbox_export_jobs({
  organization_id: "OrganizationId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.jobs #=> Array
resp.jobs[0].job_id #=> String
resp.jobs[0].entity_id #=> String
resp.jobs[0].description #=> String
resp.jobs[0].s3_bucket_name #=> String
resp.jobs[0].s3_path #=> String
resp.jobs[0].estimated_progress #=> Integer
resp.jobs[0].state #=> String, one of "RUNNING", "COMPLETED", "FAILED", "CANCELLED"
resp.jobs[0].start_time #=> Time
resp.jobs[0].end_time #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization ID.

  • :next_token (String)

    The token to use to retrieve the next page of results.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

Returns:

See Also:



3205
3206
3207
3208
# File 'lib/aws-sdk-workmail/client.rb', line 3205

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

#list_mailbox_permissions(params = {}) ⇒ Types::ListMailboxPermissionsResponse

Lists the mailbox permissions associated with a user, group, or resource mailbox.

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_mailbox_permissions({
  organization_id: "OrganizationId", # required
  entity_id: "EntityIdentifier", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.permissions #=> Array
resp.permissions[0].grantee_id #=> String
resp.permissions[0].grantee_type #=> String, one of "GROUP", "USER"
resp.permissions[0].permission_values #=> Array
resp.permissions[0].permission_values[0] #=> String, one of "FULL_ACCESS", "SEND_AS", "SEND_ON_BEHALF"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

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

  • :entity_id (required, String)

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

    The entity ID can accept *UserId or ResourceId*, *Username or Resourcename*, or email.

    • Entity ID: 12345678-1234-1234-1234-123456789012, or r-0123456789a0123456789b0123456789

    • Email address: entity@domain.tld

    • Entity name: entity

  • :next_token (String)

    The token to use to retrieve the next page of results. The first call does not contain any tokens.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

Returns:

See Also:



3267
3268
3269
3270
# File 'lib/aws-sdk-workmail/client.rb', line 3267

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

#list_mobile_device_access_overrides(params = {}) ⇒ Types::ListMobileDeviceAccessOverridesResponse

Lists all the mobile device access overrides for any given combination of WorkMail organization, user, or device.

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_mobile_device_access_overrides({
  organization_id: "OrganizationId", # required
  user_id: "EntityIdentifier",
  device_id: "DeviceId",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.overrides #=> Array
resp.overrides[0].user_id #=> String
resp.overrides[0].device_id #=> String
resp.overrides[0].effect #=> String, one of "ALLOW", "DENY"
resp.overrides[0].description #=> String
resp.overrides[0].date_created #=> Time
resp.overrides[0].date_modified #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization under which to list mobile device access overrides.

  • :user_id (String)

    The WorkMail user under which you list the mobile device access overrides. Accepts the following types of user identities:

    • User ID: ‘12345678-1234-1234-1234-123456789012` or `S-1-1-12-1234567890-123456789-123456789-1234`

    • Email address: ‘user@domain.tld`

    • User name: ‘user`

  • :device_id (String)

    The mobile device to which the access override applies.

  • :next_token (String)

    The token to use to retrieve the next page of results. The first call does not require a token.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

Returns:

See Also:



3332
3333
3334
3335
# File 'lib/aws-sdk-workmail/client.rb', line 3332

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

#list_mobile_device_access_rules(params = {}) ⇒ Types::ListMobileDeviceAccessRulesResponse

Lists the mobile device access rules for the specified WorkMail organization.

Examples:

Request syntax with placeholder values


resp = client.list_mobile_device_access_rules({
  organization_id: "OrganizationId", # required
})

Response structure


resp.rules #=> Array
resp.rules[0].mobile_device_access_rule_id #=> String
resp.rules[0].name #=> String
resp.rules[0].description #=> String
resp.rules[0].effect #=> String, one of "ALLOW", "DENY"
resp.rules[0].device_types #=> Array
resp.rules[0].device_types[0] #=> String
resp.rules[0].not_device_types #=> Array
resp.rules[0].not_device_types[0] #=> String
resp.rules[0].device_models #=> Array
resp.rules[0].device_models[0] #=> String
resp.rules[0].not_device_models #=> Array
resp.rules[0].not_device_models[0] #=> String
resp.rules[0].device_operating_systems #=> Array
resp.rules[0].device_operating_systems[0] #=> String
resp.rules[0].not_device_operating_systems #=> Array
resp.rules[0].not_device_operating_systems[0] #=> String
resp.rules[0].device_user_agents #=> Array
resp.rules[0].device_user_agents[0] #=> String
resp.rules[0].not_device_user_agents #=> Array
resp.rules[0].not_device_user_agents[0] #=> String
resp.rules[0].date_created #=> Time
resp.rules[0].date_modified #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization for which to list the rules.

Returns:

See Also:



3383
3384
3385
3386
# File 'lib/aws-sdk-workmail/client.rb', line 3383

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

#list_organizations(params = {}) ⇒ Types::ListOrganizationsResponse

Returns summaries of the customer’s organizations.

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_organizations({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.organization_summaries #=> Array
resp.organization_summaries[0].organization_id #=> String
resp.organization_summaries[0].alias #=> String
resp.organization_summaries[0].default_mail_domain #=> String
resp.organization_summaries[0].error_message #=> String
resp.organization_summaries[0].state #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    The token to use to retrieve the next page of results. The first call does not contain any tokens.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

Returns:

See Also:



3425
3426
3427
3428
# File 'lib/aws-sdk-workmail/client.rb', line 3425

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

#list_personal_access_tokens(params = {}) ⇒ Types::ListPersonalAccessTokensResponse

Returns a summary of your Personal Access Tokens.

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_personal_access_tokens({
  organization_id: "OrganizationId", # required
  user_id: "EntityIdentifier",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.next_token #=> String
resp.personal_access_token_summaries #=> Array
resp.personal_access_token_summaries[0].personal_access_token_id #=> String
resp.personal_access_token_summaries[0].user_id #=> String
resp.personal_access_token_summaries[0].name #=> String
resp.personal_access_token_summaries[0].date_created #=> Time
resp.personal_access_token_summaries[0].date_last_used #=> Time
resp.personal_access_token_summaries[0].expires_time #=> Time
resp.personal_access_token_summaries[0].scopes #=> Array
resp.personal_access_token_summaries[0].scopes[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The Organization ID.

  • :user_id (String)

    The WorkMail User ID.

  • :next_token (String)

    The token from the previous response to query the next page.

  • :max_results (Integer)

    The maximum amount of items that should be returned in a response.

Returns:

See Also:



3477
3478
3479
3480
# File 'lib/aws-sdk-workmail/client.rb', line 3477

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

#list_resource_delegates(params = {}) ⇒ Types::ListResourceDelegatesResponse

Lists the delegates associated with a resource. Users and groups can be resource delegates and answer requests on behalf of the resource.

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_resource_delegates({
  organization_id: "OrganizationId", # required
  resource_id: "EntityIdentifier", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.delegates #=> Array
resp.delegates[0].id #=> String
resp.delegates[0].type #=> String, one of "GROUP", "USER"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization that contains the resource for which delegates are listed.

  • :resource_id (required, String)

    The identifier for the resource whose delegates are listed.

    The identifier can accept ResourceId, Resourcename, or email. The following identity formats are available:

    • Resource ID: r-0123456789a0123456789b0123456789

    • Email address: resource@domain.tld

    • Resource name: resource

  • :next_token (String)

    The token used to paginate through the delegates associated with a resource.

  • :max_results (Integer)

    The number of maximum results in a page.

Returns:

See Also:



3535
3536
3537
3538
# File 'lib/aws-sdk-workmail/client.rb', line 3535

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

#list_resources(params = {}) ⇒ Types::ListResourcesResponse

Returns summaries of the organization’s resources.

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_resources({
  organization_id: "OrganizationId", # required
  next_token: "NextToken",
  max_results: 1,
  filters: {
    name_prefix: "String",
    primary_email_prefix: "String",
    state: "ENABLED", # accepts ENABLED, DISABLED, DELETED
  },
})

Response structure


resp.resources #=> Array
resp.resources[0].id #=> String
resp.resources[0].email #=> String
resp.resources[0].name #=> String
resp.resources[0].type #=> String, one of "ROOM", "EQUIPMENT"
resp.resources[0].state #=> String, one of "ENABLED", "DISABLED", "DELETED"
resp.resources[0].enabled_date #=> Time
resp.resources[0].disabled_date #=> Time
resp.resources[0].description #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the resources exist.

  • :next_token (String)

    The token to use to retrieve the next page of results. The first call does not contain any tokens.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

  • :filters (Types::ListResourcesFilters)

    Limit the resource search results based on the filter criteria. You can only use one filter per request.

Returns:

See Also:



3593
3594
3595
3596
# File 'lib/aws-sdk-workmail/client.rb', line 3593

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

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

Lists the tags applied to an WorkMail organization resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "AmazonResourceName", # required
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The resource ARN.

Returns:

See Also:



3623
3624
3625
3626
# File 'lib/aws-sdk-workmail/client.rb', line 3623

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

#list_users(params = {}) ⇒ Types::ListUsersResponse

Returns summaries of the organization’s users.

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_users({
  organization_id: "OrganizationId", # required
  next_token: "NextToken",
  max_results: 1,
  filters: {
    username_prefix: "String",
    display_name_prefix: "UserAttribute",
    primary_email_prefix: "String",
    state: "ENABLED", # accepts ENABLED, DISABLED, DELETED
    identity_provider_user_id_prefix: "IdentityProviderUserIdPrefix",
  },
})

Response structure


resp.users #=> Array
resp.users[0].id #=> String
resp.users[0].email #=> String
resp.users[0].name #=> String
resp.users[0].display_name #=> String
resp.users[0].state #=> String, one of "ENABLED", "DISABLED", "DELETED"
resp.users[0].user_role #=> String, one of "USER", "RESOURCE", "SYSTEM_USER", "REMOTE_USER"
resp.users[0].enabled_date #=> Time
resp.users[0].disabled_date #=> Time
resp.users[0].identity_provider_user_id #=> String
resp.users[0].identity_provider_identity_store_id #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the users exist.

  • :next_token (String)

    The token to use to retrieve the next page of results. The first call does not contain any tokens.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

  • :filters (Types::ListUsersFilters)

    Limit the user search results based on the filter criteria. You can only use one filter per request.

Returns:

See Also:



3685
3686
3687
3688
# File 'lib/aws-sdk-workmail/client.rb', line 3685

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

#put_access_control_rule(params = {}) ⇒ Struct

Adds a new access control rule for the specified organization. The rule allows or denies access to the organization for the specified IPv4 addresses, access protocol actions, user IDs and impersonation IDs. Adding a new rule with the same name as an existing rule replaces the older rule.

Examples:

Request syntax with placeholder values


resp = client.put_access_control_rule({
  name: "AccessControlRuleName", # required
  effect: "ALLOW", # required, accepts ALLOW, DENY
  description: "AccessControlRuleDescription", # required
  ip_ranges: ["IpRange"],
  not_ip_ranges: ["IpRange"],
  actions: ["AccessControlRuleAction"],
  not_actions: ["AccessControlRuleAction"],
  user_ids: ["WorkMailIdentifier"],
  not_user_ids: ["WorkMailIdentifier"],
  organization_id: "OrganizationId", # required
  impersonation_role_ids: ["ImpersonationRoleId"],
  not_impersonation_role_ids: ["ImpersonationRoleId"],
})

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The rule name.

  • :effect (required, String)

    The rule effect.

  • :description (required, String)

    The rule description.

  • :ip_ranges (Array<String>)

    IPv4 CIDR ranges to include in the rule.

  • :not_ip_ranges (Array<String>)

    IPv4 CIDR ranges to exclude from the rule.

  • :actions (Array<String>)

    Access protocol actions to include in the rule. Valid values include ‘ActiveSync`, `AutoDiscover`, `EWS`, `IMAP`, `SMTP`, `WindowsOutlook`, and `WebMail`.

  • :not_actions (Array<String>)

    Access protocol actions to exclude from the rule. Valid values include ‘ActiveSync`, `AutoDiscover`, `EWS`, `IMAP`, `SMTP`, `WindowsOutlook`, and `WebMail`.

  • :user_ids (Array<String>)

    User IDs to include in the rule.

  • :not_user_ids (Array<String>)

    User IDs to exclude from the rule.

  • :organization_id (required, String)

    The identifier of the organization.

  • :impersonation_role_ids (Array<String>)

    Impersonation role IDs to include in the rule.

  • :not_impersonation_role_ids (Array<String>)

    Impersonation role IDs to exclude from the rule.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3759
3760
3761
3762
# File 'lib/aws-sdk-workmail/client.rb', line 3759

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

#put_email_monitoring_configuration(params = {}) ⇒ Struct

Creates or updates the email monitoring configuration for a specified organization.

Examples:

Request syntax with placeholder values


resp = client.put_email_monitoring_configuration({
  organization_id: "OrganizationId", # required
  role_arn: "RoleArn", # required
  log_group_arn: "LogGroupArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The ID of the organization for which the email monitoring configuration is set.

  • :role_arn (required, String)

    The Amazon Resource Name (ARN) of the IAM Role associated with the email monitoring configuration.

  • :log_group_arn (required, String)

    The Amazon Resource Name (ARN) of the CloudWatch Log group associated with the email monitoring configuration.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3793
3794
3795
3796
# File 'lib/aws-sdk-workmail/client.rb', line 3793

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

#put_identity_provider_configuration(params = {}) ⇒ Struct

Enables integration between IAM Identity Center (IdC) and WorkMail to proxy authentication requests for mailbox users. You can connect your IdC directory or your external directory to WorkMail through IdC and manage access to WorkMail mailboxes in a single place. For enhanced protection, you could enable Multifactor Authentication (MFA) and Personal Access Tokens.

Examples:

Request syntax with placeholder values


resp = client.put_identity_provider_configuration({
  organization_id: "OrganizationId", # required
  authentication_mode: "IDENTITY_PROVIDER_ONLY", # required, accepts IDENTITY_PROVIDER_ONLY, IDENTITY_PROVIDER_AND_DIRECTORY
  identity_center_configuration: { # required
    instance_arn: "InstanceArn", # required
    application_arn: "ApplicationArn", # required
  },
  personal_access_token_configuration: { # required
    status: "ACTIVE", # required, accepts ACTIVE, INACTIVE
    lifetime_in_days: 1,
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The ID of the WorkMail Organization.

  • :authentication_mode (required, String)

    The authentication mode used in WorkMail.

  • :identity_center_configuration (required, Types::IdentityCenterConfiguration)

    The details of the IAM Identity Center configuration.

  • :personal_access_token_configuration (required, Types::PersonalAccessTokenConfiguration)

    The details of the Personal Access Token configuration.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3838
3839
3840
3841
# File 'lib/aws-sdk-workmail/client.rb', line 3838

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

#put_inbound_dmarc_settings(params = {}) ⇒ Struct

Enables or disables a DMARC policy for a given organization.

Examples:

Request syntax with placeholder values


resp = client.put_inbound_dmarc_settings({
  organization_id: "OrganizationId", # required
  enforced: false, # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The ID of the organization that you are applying the DMARC policy to.

  • :enforced (required, Boolean)

    Enforces or suspends a policy after it’s applied.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3864
3865
3866
3867
# File 'lib/aws-sdk-workmail/client.rb', line 3864

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

#put_mailbox_permissions(params = {}) ⇒ Struct

Sets permissions for a user, group, or resource. This replaces any pre-existing permissions.

Examples:

Request syntax with placeholder values


resp = client.put_mailbox_permissions({
  organization_id: "OrganizationId", # required
  entity_id: "EntityIdentifier", # required
  grantee_id: "EntityIdentifier", # required
  permission_values: ["FULL_ACCESS"], # required, accepts FULL_ACCESS, SEND_AS, SEND_ON_BEHALF
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

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

  • :entity_id (required, String)

    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 (required, String)

    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 (required, Array<String>)

    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.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3930
3931
3932
3933
# File 'lib/aws-sdk-workmail/client.rb', line 3930

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

#put_mobile_device_access_override(params = {}) ⇒ Struct

Creates or updates a mobile device access override for the given WorkMail organization, user, and device.

Examples:

Request syntax with placeholder values


resp = client.put_mobile_device_access_override({
  organization_id: "OrganizationId", # required
  user_id: "EntityIdentifier", # required
  device_id: "DeviceId", # required
  effect: "ALLOW", # required, accepts ALLOW, DENY
  description: "MobileDeviceAccessRuleDescription",
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    Identifies the WorkMail organization for which you create the override.

  • :user_id (required, String)

    The WorkMail user for which you create the override. Accepts the following types of user identities:

    • User ID: ‘12345678-1234-1234-1234-123456789012` or `S-1-1-12-1234567890-123456789-123456789-1234`

    • Email address: ‘user@domain.tld`

    • User name: ‘user`

  • :device_id (required, String)

    The mobile device for which you create the override. ‘DeviceId` is case insensitive.

  • :effect (required, String)

    The effect of the override, ‘ALLOW` or `DENY`.

  • :description (String)

    A description of the override.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3979
3980
3981
3982
# File 'lib/aws-sdk-workmail/client.rb', line 3979

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

#put_retention_policy(params = {}) ⇒ Struct

Puts a retention policy to the specified organization.

Examples:

Request syntax with placeholder values


resp = client.put_retention_policy({
  organization_id: "OrganizationId", # required
  id: "ShortString",
  name: "ShortString", # required
  description: "PolicyDescription",
  folder_configurations: [ # required
    {
      name: "INBOX", # required, accepts INBOX, DELETED_ITEMS, SENT_ITEMS, DRAFTS, JUNK_EMAIL
      action: "NONE", # required, accepts NONE, DELETE, PERMANENTLY_DELETE
      period: 1,
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization ID.

  • :id (String)

    The retention policy ID.

  • :name (required, String)

    The retention policy name.

  • :description (String)

    The retention policy description.

  • :folder_configurations (required, Array<Types::FolderConfiguration>)

    The retention policy folder configurations.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4023
4024
4025
4026
# File 'lib/aws-sdk-workmail/client.rb', line 4023

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

#register_mail_domain(params = {}) ⇒ Struct

Registers a new domain in WorkMail and SES, and configures it for use by WorkMail. Emails received by SES for this domain are routed to the specified WorkMail organization, and WorkMail has permanent permission to use the specified domain for sending your users’ emails.

Examples:

Request syntax with placeholder values


resp = client.register_mail_domain({
  client_token: "IdempotencyClientToken",
  organization_id: "OrganizationId", # required
  domain_name: "WorkMailDomainName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (String)

    Idempotency token used when retrying requests.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

  • :organization_id (required, String)

    The WorkMail organization under which you’re creating the domain.

  • :domain_name (required, String)

    The name of the mail domain to create in WorkMail and SES.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4059
4060
4061
4062
# File 'lib/aws-sdk-workmail/client.rb', line 4059

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

#register_to_work_mail(params = {}) ⇒ Struct

Registers an existing and disabled user, group, or resource for WorkMail use by associating a mailbox and calendaring capabilities. It performs no change if the user, group, or resource is enabled and fails if the user, group, or resource is deleted. This operation results in the accumulation of costs. For more information, see [Pricing]. The equivalent console functionality for this operation is Enable.

Users can either be created by calling the CreateUser API operation or they can be synchronized from your directory. For more information, see DeregisterFromWorkMail.

[1]: aws.amazon.com/workmail/pricing

Examples:

Request syntax with placeholder values


resp = client.register_to_work_mail({
  organization_id: "OrganizationId", # required
  entity_id: "EntityIdentifier", # required
  email: "EmailAddress", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

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

  • :entity_id (required, String)

    The identifier for the user, group, or resource to be updated.

    The identifier can accept *UserId, ResourceId, or GroupId*, or *Username, Resourcename, or Groupname*. The following identity formats are available:

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

    • Entity name: entity

  • :email (required, String)

    The email for the user, group, or resource to be updated.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4114
4115
4116
4117
# File 'lib/aws-sdk-workmail/client.rb', line 4114

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

#reset_password(params = {}) ⇒ Struct

Allows the administrator to reset the password for a user.

Examples:

Request syntax with placeholder values


resp = client.reset_password({
  organization_id: "OrganizationId", # required
  user_id: "WorkMailIdentifier", # required
  password: "Password", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier of the organization that contains the user for which the password is reset.

  • :user_id (required, String)

    The identifier of the user for whom the password is reset.

  • :password (required, String)

    The new password for the user.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4145
4146
4147
4148
# File 'lib/aws-sdk-workmail/client.rb', line 4145

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

#start_mailbox_export_job(params = {}) ⇒ Types::StartMailboxExportJobResponse

Starts a mailbox export job to export MIME-format email messages and calendar items from the specified mailbox to the specified Amazon Simple Storage Service (Amazon S3) bucket. For more information, see

Exporting mailbox content][1

in the *WorkMail Administrator Guide*.

[1]: docs.aws.amazon.com/workmail/latest/adminguide/mail-export.html

Examples:

Request syntax with placeholder values


resp = client.start_mailbox_export_job({
  client_token: "IdempotencyClientToken", # required
  organization_id: "OrganizationId", # required
  entity_id: "EntityIdentifier", # required
  description: "Description",
  role_arn: "RoleArn", # required
  kms_key_arn: "KmsKeyArn", # required
  s3_bucket_name: "S3BucketName", # required
  s3_prefix: "S3ObjectKey", # required
})

Response structure


resp.job_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (required, String)

    The idempotency token for the client request.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

  • :organization_id (required, String)

    The identifier associated with the organization.

  • :entity_id (required, String)

    The identifier of the user or resource associated with the mailbox.

    The identifier can accept *UserId or ResourceId*, *Username or Resourcename*, or email. The following identity formats are available:

    • 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

  • :description (String)

    The mailbox export job description.

  • :role_arn (required, String)

    The ARN of the AWS Identity and Access Management (IAM) role that grants write permission to the S3 bucket.

  • :kms_key_arn (required, String)

    The Amazon Resource Name (ARN) of the symmetric AWS Key Management Service (AWS KMS) key that encrypts the exported mailbox content.

  • :s3_bucket_name (required, String)

    The name of the S3 bucket.

  • :s3_prefix (required, String)

    The S3 bucket prefix.

Returns:

See Also:



4225
4226
4227
4228
# File 'lib/aws-sdk-workmail/client.rb', line 4225

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

#tag_resource(params = {}) ⇒ Struct

Applies the specified tags to the specified WorkMailorganization resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "AmazonResourceName", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The resource ARN.

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

    The tag key-value pairs.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4257
4258
4259
4260
# File 'lib/aws-sdk-workmail/client.rb', line 4257

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

#test_availability_configuration(params = {}) ⇒ Types::TestAvailabilityConfigurationResponse

Performs a test on an availability provider to ensure that access is allowed. For EWS, it verifies the provided credentials can be used to successfully log in. For Lambda, it verifies that the Lambda function can be invoked and that the resource access policy was configured to deny anonymous access. An anonymous invocation is one done without providing either a ‘SourceArn` or `SourceAccount` header.

<note markdown=“1”> The request must contain either one provider definition (‘EwsProvider` or `LambdaProvider`) or the `DomainName` parameter. If the `DomainName` parameter is provided, the configuration stored under the `DomainName` will be tested.

</note>

Examples:

Request syntax with placeholder values


resp = client.test_availability_configuration({
  organization_id: "OrganizationId", # required
  domain_name: "DomainName",
  ews_provider: {
    ews_endpoint: "Url", # required
    ews_username: "ExternalUserName", # required
    ews_password: "Password", # required
  },
  lambda_provider: {
    lambda_arn: "LambdaArn", # required
  },
})

Response structure


resp.test_passed #=> Boolean
resp.failure_reason #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization where the availability provider will be tested.

  • :domain_name (String)

    The domain to which the provider applies. If this field is provided, a stored availability provider associated to this domain name will be tested.

  • :ews_provider (Types::EwsAvailabilityProvider)

    Describes an EWS based availability provider. This is only used as input to the service.

  • :lambda_provider (Types::LambdaAvailabilityProvider)

    Describes a Lambda based availability provider.

Returns:

See Also:



4321
4322
4323
4324
# File 'lib/aws-sdk-workmail/client.rb', line 4321

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

#untag_resource(params = {}) ⇒ Struct

Untags the specified tags from the specified WorkMail organization resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "AmazonResourceName", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The resource ARN.

  • :tag_keys (required, Array<String>)

    The tag keys.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4348
4349
4350
4351
# File 'lib/aws-sdk-workmail/client.rb', line 4348

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

#update_availability_configuration(params = {}) ⇒ Struct

Updates an existing ‘AvailabilityConfiguration` for the given WorkMail organization and domain.

Examples:

Request syntax with placeholder values


resp = client.update_availability_configuration({
  organization_id: "OrganizationId", # required
  domain_name: "DomainName", # required
  ews_provider: {
    ews_endpoint: "Url", # required
    ews_username: "ExternalUserName", # required
    ews_password: "Password", # required
  },
  lambda_provider: {
    lambda_arn: "LambdaArn", # required
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization for which the ‘AvailabilityConfiguration` will be updated.

  • :domain_name (required, String)

    The domain to which the provider applies the availability configuration.

  • :ews_provider (Types::EwsAvailabilityProvider)

    The EWS availability provider definition. The request must contain exactly one provider definition, either ‘EwsProvider` or `LambdaProvider`. The previously stored provider will be overridden by the one provided.

  • :lambda_provider (Types::LambdaAvailabilityProvider)

    The Lambda availability provider definition. The request must contain exactly one provider definition, either ‘EwsProvider` or `LambdaProvider`. The previously stored provider will be overridden by the one provided.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4397
4398
4399
4400
# File 'lib/aws-sdk-workmail/client.rb', line 4397

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

#update_default_mail_domain(params = {}) ⇒ Struct

Updates the default mail domain for an organization. The default mail domain is used by the WorkMail AWS Console to suggest an email address when enabling a mail user. You can only have one default domain.

Examples:

Request syntax with placeholder values


resp = client.update_default_mail_domain({
  organization_id: "OrganizationId", # required
  domain_name: "WorkMailDomainName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization for which to list domains.

  • :domain_name (required, String)

    The domain name that will become the default domain.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4425
4426
4427
4428
# File 'lib/aws-sdk-workmail/client.rb', line 4425

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

#update_group(params = {}) ⇒ Struct

Updates attributes in a group.

Examples:

Request syntax with placeholder values


resp = client.update_group({
  organization_id: "OrganizationId", # required
  group_id: "EntityIdentifier", # required
  hidden_from_global_address_list: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the group exists.

  • :group_id (required, String)

    The identifier for the group to be updated.

    The identifier can accept GroupId, Groupname, or email. The following identity formats are available:

    • Group ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: group@domain.tld

    • Group name: group

  • :hidden_from_global_address_list (Boolean)

    If enabled, the group is hidden from the global address list.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4465
4466
4467
4468
# File 'lib/aws-sdk-workmail/client.rb', line 4465

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

#update_impersonation_role(params = {}) ⇒ Struct

Updates an impersonation role for the given WorkMail organization.

Examples:

Request syntax with placeholder values


resp = client.update_impersonation_role({
  organization_id: "OrganizationId", # required
  impersonation_role_id: "ImpersonationRoleId", # required
  name: "ImpersonationRoleName", # required
  type: "FULL_ACCESS", # required, accepts FULL_ACCESS, READ_ONLY
  description: "ImpersonationRoleDescription",
  rules: [ # required
    {
      impersonation_rule_id: "ImpersonationRuleId", # required
      name: "ImpersonationRuleName",
      description: "ImpersonationRuleDescription",
      effect: "ALLOW", # required, accepts ALLOW, DENY
      target_users: ["EntityIdentifier"],
      not_target_users: ["EntityIdentifier"],
    },
  ],
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization that contains the impersonation role to update.

  • :impersonation_role_id (required, String)

    The ID of the impersonation role to update.

  • :name (required, String)

    The updated impersonation role name.

  • :type (required, String)

    The updated impersonation role type.

  • :description (String)

    The updated impersonation role description.

  • :rules (required, Array<Types::ImpersonationRule>)

    The updated list of rules.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4517
4518
4519
4520
# File 'lib/aws-sdk-workmail/client.rb', line 4517

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

#update_mailbox_quota(params = {}) ⇒ Struct

Updates a user’s current mailbox quota for a specified organization and user.

Examples:

Request syntax with placeholder values


resp = client.update_mailbox_quota({
  organization_id: "OrganizationId", # required
  user_id: "EntityIdentifier", # required
  mailbox_quota: 1, # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization that contains the user for whom to update the mailbox quota.

  • :user_id (required, String)

    The identifer for the user for whom to update the mailbox quota.

    The identifier can be the UserId, Username, or email. The following identity formats are available:

    • User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: user@domain.tld

    • User name: user

  • :mailbox_quota (required, Integer)

    The updated mailbox quota, in MB, for the specified user.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4559
4560
4561
4562
# File 'lib/aws-sdk-workmail/client.rb', line 4559

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

#update_mobile_device_access_rule(params = {}) ⇒ Struct

Updates a mobile device access rule for the specified WorkMail organization.

Examples:

Request syntax with placeholder values


resp = client.update_mobile_device_access_rule({
  organization_id: "OrganizationId", # required
  mobile_device_access_rule_id: "MobileDeviceAccessRuleId", # required
  name: "MobileDeviceAccessRuleName", # required
  description: "MobileDeviceAccessRuleDescription",
  effect: "ALLOW", # required, accepts ALLOW, DENY
  device_types: ["DeviceType"],
  not_device_types: ["DeviceType"],
  device_models: ["DeviceModel"],
  not_device_models: ["DeviceModel"],
  device_operating_systems: ["DeviceOperatingSystem"],
  not_device_operating_systems: ["DeviceOperatingSystem"],
  device_user_agents: ["DeviceUserAgent"],
  not_device_user_agents: ["DeviceUserAgent"],
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization under which the rule will be updated.

  • :mobile_device_access_rule_id (required, String)

    The identifier of the rule to be updated.

  • :name (required, String)

    The updated rule name.

  • :description (String)

    The updated rule description.

  • :effect (required, String)

    The effect of the rule when it matches. Allowed values are ‘ALLOW` or `DENY`.

  • :device_types (Array<String>)

    Device types that the updated rule will match.

  • :not_device_types (Array<String>)

    Device types that the updated rule **will not** match. All other device types will match.

  • :device_models (Array<String>)

    Device models that the updated rule will match.

  • :not_device_models (Array<String>)

    Device models that the updated rule **will not** match. All other device models will match.

  • :device_operating_systems (Array<String>)

    Device operating systems that the updated rule will match.

  • :not_device_operating_systems (Array<String>)

    Device operating systems that the updated rule **will not** match. All other device operating systems will match.

  • :device_user_agents (Array<String>)

    User agents that the updated rule will match.

  • :not_device_user_agents (Array<String>)

    User agents that the updated rule **will not** match. All other user agents will match.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4635
4636
4637
4638
# File 'lib/aws-sdk-workmail/client.rb', line 4635

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

#update_primary_email_address(params = {}) ⇒ Struct

Updates the primary email for a user, group, or resource. The current email is moved into the list of aliases (or swapped between an existing alias and the current primary email), and the email provided in the input is promoted as the primary.

Examples:

Request syntax with placeholder values


resp = client.update_primary_email_address({
  organization_id: "OrganizationId", # required
  entity_id: "EntityIdentifier", # required
  email: "EmailAddress", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization that contains the user, group, or resource to update.

  • :entity_id (required, String)

    The user, group, or resource to update.

    The identifier can accept *UseriD, ResourceId, or GroupId*, *Username, Resourcename, or Groupname*, or email. The following identity formats are available:

    • 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

  • :email (required, String)

    The value of the email to be updated as primary.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4680
4681
4682
4683
# File 'lib/aws-sdk-workmail/client.rb', line 4680

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

#update_resource(params = {}) ⇒ Struct

Updates data for the resource. To have the latest information, it must be preceded by a DescribeResource call. The dataset in the request should be the one expected when performing another ‘DescribeResource` call.

Examples:

Request syntax with placeholder values


resp = client.update_resource({
  organization_id: "OrganizationId", # required
  resource_id: "EntityIdentifier", # required
  name: "ResourceName",
  booking_options: {
    auto_accept_requests: false,
    auto_decline_recurring_requests: false,
    auto_decline_conflicting_requests: false,
  },
  description: "NewResourceDescription",
  type: "ROOM", # accepts ROOM, EQUIPMENT
  hidden_from_global_address_list: false,
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier associated with the organization for which the resource is updated.

  • :resource_id (required, String)

    The identifier of the resource to be updated.

    The identifier can accept ResourceId, Resourcename, or email. The following identity formats are available:

    • Resource ID: r-0123456789a0123456789b0123456789

    • Email address: resource@domain.tld

    • Resource name: resource

  • :name (String)

    The name of the resource to be updated.

  • :booking_options (Types::BookingOptions)

    The resource’s booking options to be updated.

  • :description (String)

    Updates the resource description.

  • :type (String)

    Updates the resource type.

  • :hidden_from_global_address_list (Boolean)

    If enabled, the resource is hidden from the global address list.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4743
4744
4745
4746
# File 'lib/aws-sdk-workmail/client.rb', line 4743

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

#update_user(params = {}) ⇒ Struct

Updates data for the user. To have the latest information, it must be preceded by a DescribeUser call. The dataset in the request should be the one expected when performing another ‘DescribeUser` call.

Examples:

Request syntax with placeholder values


resp = client.update_user({
  organization_id: "OrganizationId", # required
  user_id: "EntityIdentifier", # required
  role: "USER", # accepts USER, RESOURCE, SYSTEM_USER, REMOTE_USER
  display_name: "UserAttribute",
  first_name: "UserAttribute",
  last_name: "UserAttribute",
  hidden_from_global_address_list: false,
  initials: "UserAttribute",
  telephone: "UserAttribute",
  street: "UserAttribute",
  job_title: "UserAttribute",
  city: "UserAttribute",
  company: "UserAttribute",
  zip_code: "UserAttribute",
  department: "UserAttribute",
  country: "UserAttribute",
  office: "UserAttribute",
  identity_provider_user_id: "IdentityProviderUserIdForUpdate",
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization under which the user exists.

  • :user_id (required, String)

    The identifier for the user to be updated.

    The identifier can be the UserId, Username, or email. The following identity formats are available:

    • User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: user@domain.tld

    • User name: user

  • :role (String)

    Updates the user role.

    You cannot pass SYSTEM_USER or RESOURCE.

  • :display_name (String)

    Updates the display name of the user.

  • :first_name (String)

    Updates the user’s first name.

  • :last_name (String)

    Updates the user’s last name.

  • :hidden_from_global_address_list (Boolean)

    If enabled, the user is hidden from the global address list.

  • :initials (String)

    Updates the user’s initials.

  • :telephone (String)

    Updates the user’s contact details.

  • :street (String)

    Updates the user’s street address.

  • :job_title (String)

    Updates the user’s job title.

  • :city (String)

    Updates the user’s city.

  • :company (String)

    Updates the user’s company.

  • :zip_code (String)

    Updates the user’s zip code.

  • :department (String)

    Updates the user’s department.

  • :country (String)

    Updates the user’s country.

  • :office (String)

    Updates the user’s office.

  • :identity_provider_user_id (String)

    User ID from the IAM Identity Center. If this parameter is empty it will be updated automatically when the user logs in for the first time to the mailbox associated with WorkMail.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4849
4850
4851
4852
# File 'lib/aws-sdk-workmail/client.rb', line 4849

def update_user(params = {}, options = {})
  req = build_request(:update_user, 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.


4878
4879
4880
# File 'lib/aws-sdk-workmail/client.rb', line 4878

def waiter_names
  []
end