Class: Aws::WorkMail::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-workmail/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.

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

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[:credentials]
    • The :access_key_id, :secret_access_key, :session_token, and :account_id options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
    • ~/.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['AWS_EC2_METADATA_DISABLED'] 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:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :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_checksum_calculation (String) — default: "when_supported"

    Determines when a checksum will be calculated for request payloads. Values are:

    • when_supported - (default) When set, a checksum will be calculated for all request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true and/or a requestAlgorithmMember is modeled.
    • when_required - When set, a checksum will only be calculated for request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true or where a requestAlgorithmMember is modeled and supplied.
  • :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.

  • :response_checksum_validation (String) — default: "when_supported"

    Determines when checksum validation will be performed on response payloads. Values are:

    • when_supported - (default) When set, checksum validation is performed on all response payloads of operations modeled with the httpChecksum trait where responseAlgorithms is modeled, except when no modeled checksum algorithms are supported.
    • when_required - When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and the requestValidationModeMember member is set to ENABLED.
  • :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 https://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:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :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 'http://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.



474
475
476
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 474

def initialize(*args)
  super
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:



524
525
526
527
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 524

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:



574
575
576
577
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 574

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:



611
612
613
614
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 611

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

#cancel_mailbox_export_job(params = {}) ⇒ Struct

Cancels a mailbox export job.

If the mailbox export job is near completion, it might not be possible to cancel it.

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:



649
650
651
652
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 649

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:



680
681
682
683
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 680

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:



734
735
736
737
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 734

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:



772
773
774
775
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 772

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:



814
815
816
817
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 814

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:



880
881
882
883
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 880

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:



965
966
967
968
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 965

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 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 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.

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:



1047
1048
1049
1050
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1047

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:



1094
1095
1096
1097
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1094

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:



1163
1164
1165
1166
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1163

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.

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.

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:



1196
1197
1198
1199
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1196

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:



1230
1231
1232
1233
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1230

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:



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

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:



1282
1283
1284
1285
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1282

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:



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

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:



1340
1341
1342
1343
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1340

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:



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

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:



1391
1392
1393
1394
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1391

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:



1444
1445
1446
1447
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1444

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.

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.

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:



1491
1492
1493
1494
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1491

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.

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.

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:



1524
1525
1526
1527
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1524

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 in the WorkMail Administrator Guide.

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:



1583
1584
1585
1586
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1583

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:



1610
1611
1612
1613
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1610

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:



1644
1645
1646
1647
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1644

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:



1671
1672
1673
1674
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1671

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:



1710
1711
1712
1713
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1710

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:



1751
1752
1753
1754
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1751

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:



1780
1781
1782
1783
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1780

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:



1812
1813
1814
1815
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1812

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:



1848
1849
1850
1851
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1848

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:



1902
1903
1904
1905
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1902

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:



1937
1938
1939
1940
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1937

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:



1965
1966
1967
1968
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1965

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:



2019
2020
2021
2022
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2019

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:



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

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:



2130
2131
2132
2133
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2130

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:



2220
2221
2222
2223
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2220

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:



2271
2272
2273
2274
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2271

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:



2321
2322
2323
2324
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2321

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:



2374
2375
2376
2377
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2374

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:



2412
2413
2414
2415
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2412

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:



2466
2467
2468
2469
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2466

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:



2517
2518
2519
2520
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2517

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:



2561
2562
2563
2564
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2561

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:



2607
2608
2609
2610
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2607

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:



2658
2659
2660
2661
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2658

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:



2714
2715
2716
2717
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2714

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:



2760
2761
2762
2763
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2760

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:



2809
2810
2811
2812
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2809

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:



2856
2857
2858
2859
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2856

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:



2906
2907
2908
2909
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2906

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:



2969
2970
2971
2972
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 2969

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:



3025
3026
3027
3028
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3025

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:



3088
3089
3090
3091
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3088

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:



3135
3136
3137
3138
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3135

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:



3178
3179
3180
3181
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3178

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:



3228
3229
3230
3231
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3228

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:



3290
3291
3292
3293
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3290

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:



3355
3356
3357
3358
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3355

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:



3406
3407
3408
3409
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3406

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:



3448
3449
3450
3451
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3448

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:



3500
3501
3502
3503
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3500

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:



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

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:



3616
3617
3618
3619
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3616

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:



3646
3647
3648
3649
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3646

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:



3708
3709
3710
3711
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3708

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:



3782
3783
3784
3785
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3782

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:



3816
3817
3818
3819
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3816

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:



3861
3862
3863
3864
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3861

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:



3887
3888
3889
3890
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3887

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:



3953
3954
3955
3956
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 3953

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:



4002
4003
4004
4005
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4002

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:



4046
4047
4048
4049
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4046

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:



4082
4083
4084
4085
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4082

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.

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:



4137
4138
4139
4140
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4137

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:



4168
4169
4170
4171
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4168

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 in the WorkMail Administrator Guide.

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:



4248
4249
4250
4251
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4248

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:



4280
4281
4282
4283
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4280

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.

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.

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:



4344
4345
4346
4347
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4344

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:



4371
4372
4373
4374
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4371

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:



4420
4421
4422
4423
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4420

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:



4448
4449
4450
4451
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4448

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:



4488
4489
4490
4491
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4488

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:



4540
4541
4542
4543
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4540

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:



4582
4583
4584
4585
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4582

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:



4658
4659
4660
4661
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4658

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:



4703
4704
4705
4706
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4703

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:



4766
4767
4768
4769
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4766

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:



4872
4873
4874
4875
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 4872

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