Class: Aws::WorkMail::Client

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

Overview

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

client = Aws::WorkMail::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).

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

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • ‘Aws::Credentials` - Used for configuring static, non-refreshing credentials.

    • ‘Aws::SharedCredentials` - Used for loading static credentials from a shared file, such as `~/.aws/config`.

    • ‘Aws::AssumeRoleCredentials` - Used when you need to assume a role.

    • ‘Aws::AssumeRoleWebIdentityCredentials` - Used when you need to assume a role after providing credentials via the web.

    • ‘Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an access token generated from `aws login`.

    • ‘Aws::ProcessCredentials` - Used for loading credentials from a process that outputs to stdout.

    • ‘Aws::InstanceProfileCredentials` - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • ‘Aws::ECSCredentials` - Used for loading credentials from instances running in ECS.

    • ‘Aws::CognitoIdentityCredentials` - Used for loading credentials from the Cognito Identity service.

    When ‘:credentials` are not configured directly, the following locations will be searched for credentials:

    • Aws.config`

    • The ‘:access_key_id`, `:secret_access_key`, and `:session_token` options.

    • ENV, ENV

    • ‘~/.aws/credentials`

    • ‘~/.aws/config`

    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of ‘Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV to true.

  • :region (required, String)

    The AWS region to connect to. The configured ‘:region` is used to determine the service `:endpoint`. When not passed, a default `:region` is searched for in the following locations:

  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to ‘true`, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to `false`.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in ‘adaptive` retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a `RetryCapacityNotAvailableError` and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When ‘true`, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When ‘true`, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in ‘standard` and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to ‘true’ the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the ‘:endpoint` option directly. This is normally constructed from the `:region` option. Configuring `:endpoint` is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to ‘true`, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the ‘:logger` at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in ‘standard` and `adaptive` retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, ‘default’ is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the ‘legacy` retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the ‘legacy` retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the ‘legacy` retry mode.

    @see www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the ‘legacy` retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the ‘legacy` retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • ‘legacy` - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • ‘standard` - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • ‘adaptive` - An experimental retry mode that includes all the functionality of `standard` mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default ‘:sigv4a_signing_region_set` is searched for in the following locations:

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disables response data type conversions. The request parameters hash must be formatted exactly as the API expects.This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    ** Please note ** When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses ‘NoOpTelemetryProvider` which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the

    ‘opentelemetry-sdk` gem and then, pass in an instance of a `Aws::Telemetry::OTelProvider` for telemetry provider.

  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • ‘Aws::StaticTokenProvider` - Used for configuring static, non-refreshing tokens.

    • ‘Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an access token generated from `aws login`.

    When ‘:token_provider` is not configured directly, the `Aws::TokenProviderChain` will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to ‘true`, dualstack enabled endpoints (with `.aws` TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to ‘true`, fips compatible endpoints will be used if available. When a `fips` region is used, the region is normalized and this config is set to `true`.

  • :validate_params (Boolean) — default: true

    When ‘true`, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::WorkMail::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to ‘#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::WorkMail::EndpointParameters`

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has “Expect” header set to “100-continue”. Defaults to ‘nil` which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like ‘proxy.com:123’.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When ‘true`, HTTP debug output will be sent to the `:logger`.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a ‘content-length`).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When ‘true`, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass ‘:ssl_ca_bundle` or `:ssl_ca_directory` the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass ‘:ssl_ca_bundle` or `:ssl_ca_directory` the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_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.

[View source]

441
442
443
# File 'lib/aws-sdk-workmail/client.rb', line 441

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


4555
4556
4557
# File 'lib/aws-sdk-workmail/client.rb', line 4555

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

[View source]

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

def errors_module
  Errors
end

Instance Method Details

#associate_delegate_to_resource(params = {}) ⇒ Struct

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

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization under which the resource exists.

  • :resource_id (required, String)

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

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

    • Resource ID: r-0123456789a0123456789b0123456789

    • Email address: resource@domain.tld

    • Resource name: resource

  • :entity_id (required, String)

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

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

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

    • Email address: entity@domain.tld

    • Entity: entity

Returns:

  • (Struct)

    Returns an empty response.

See Also:

[View source]

491
492
493
494
# File 'lib/aws-sdk-workmail/client.rb', line 491

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:

[View source]

541
542
543
544
# File 'lib/aws-sdk-workmail/client.rb', line 541

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:

[View source]

578
579
580
581
# File 'lib/aws-sdk-workmail/client.rb', line 578

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

#build_request(operation_name, params = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • params ({}) (defaults to: {})
[View source]

4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
# File 'lib/aws-sdk-workmail/client.rb', line 4528

def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  tracer = config.telemetry_provider.tracer_provider.tracer(
    Aws::Telemetry.module_to_tracer_name('Aws::WorkMail')
  )
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config,
    tracer: tracer
  )
  context[:gem_name] = 'aws-sdk-workmail'
  context[:gem_version] = '1.71.0'
  Seahorse::Client::Request.new(handlers, context)
end

#cancel_mailbox_export_job(params = {}) ⇒ Struct

Cancels a mailbox export job.

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

</note>

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (required, String)

    The idempotency token for the client request.

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

  • :job_id (required, String)

    The job ID.

  • :organization_id (required, String)

    The organization ID.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

[View source]

616
617
618
619
# File 'lib/aws-sdk-workmail/client.rb', line 616

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:

[View source]

647
648
649
650
# File 'lib/aws-sdk-workmail/client.rb', line 647

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:

[View source]

701
702
703
704
# File 'lib/aws-sdk-workmail/client.rb', line 701

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:

[View source]

739
740
741
742
# File 'lib/aws-sdk-workmail/client.rb', line 739

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

[View source]

805
806
807
808
# File 'lib/aws-sdk-workmail/client.rb', line 805

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:

[View source]

890
891
892
893
# File 'lib/aws-sdk-workmail/client.rb', line 890

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

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

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

Adding an organization][1

in the *WorkMail Administrator Guide*.

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

Choosing the default domain][3

in the *WorkMail Administrator

Guide*.

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

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

Examples:

Request syntax with placeholder values


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

Response structure


resp.organization_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :directory_id (String)

    The AWS Directory Service directory ID.

  • :alias (required, String)

    The organization alias.

  • :client_token (String)

    The idempotency token associated with the request.

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

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

    The email domains to associate with the organization.

  • :kms_key_arn (String)

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

  • :enable_interoperability (Boolean)

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

Returns:

See Also:

[View source]

972
973
974
975
# File 'lib/aws-sdk-workmail/client.rb', line 972

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:

[View source]

1019
1020
1021
1022
# File 'lib/aws-sdk-workmail/client.rb', line 1019

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,
})

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.

Returns:

See Also:

[View source]

1082
1083
1084
1085
# File 'lib/aws-sdk-workmail/client.rb', line 1082

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

#delete_access_control_rule(params = {}) ⇒ Struct

Deletes an access control rule for the specified WorkMail organization.

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

</note>

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization.

  • :name (required, String)

    The name of the access control rule.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

[View source]

1115
1116
1117
1118
# File 'lib/aws-sdk-workmail/client.rb', line 1115

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:

[View source]

1149
1150
1151
1152
# File 'lib/aws-sdk-workmail/client.rb', line 1149

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:

[View source]

1177
1178
1179
1180
# File 'lib/aws-sdk-workmail/client.rb', line 1177

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:

[View source]

1201
1202
1203
1204
# File 'lib/aws-sdk-workmail/client.rb', line 1201

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:

[View source]

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

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

[View source]

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

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:

[View source]

1314
1315
1316
1317
# File 'lib/aws-sdk-workmail/client.rb', line 1314

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

#delete_mobile_device_access_override(params = {}) ⇒ Struct

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

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

</note>

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

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

  • :user_id (required, String)

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

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

    • Email address: ‘user@domain.tld`

    • User name: ‘user`

  • :device_id (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:

[View source]

1361
1362
1363
1364
# File 'lib/aws-sdk-workmail/client.rb', line 1361

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

#delete_mobile_device_access_rule(params = {}) ⇒ Struct

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

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

</note>

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization under which the rule will be deleted.

  • :mobile_device_access_rule_id (required, String)

    The identifier of the rule to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

[View source]

1394
1395
1396
1397
# File 'lib/aws-sdk-workmail/client.rb', line 1394

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

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

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

Removing an organization][1

in the *WorkMail Administrator Guide*.

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

Examples:

Request syntax with placeholder values


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

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.

Returns:

See Also:

[View source]

1448
1449
1450
1451
# File 'lib/aws-sdk-workmail/client.rb', line 1448

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

[View source]

1482
1483
1484
1485
# File 'lib/aws-sdk-workmail/client.rb', line 1482

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:

[View source]

1509
1510
1511
1512
# File 'lib/aws-sdk-workmail/client.rb', line 1509

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:

[View source]

1548
1549
1550
1551
# File 'lib/aws-sdk-workmail/client.rb', line 1548

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:

[View source]

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

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:

[View source]

1618
1619
1620
1621
# File 'lib/aws-sdk-workmail/client.rb', line 1618

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:

[View source]

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

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:

[View source]

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

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:

[View source]

1740
1741
1742
1743
# File 'lib/aws-sdk-workmail/client.rb', line 1740

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

[View source]

1768
1769
1770
1771
# File 'lib/aws-sdk-workmail/client.rb', line 1768

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:

[View source]

1822
1823
1824
1825
# File 'lib/aws-sdk-workmail/client.rb', line 1822

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:

[View source]

1871
1872
1873
1874
# File 'lib/aws-sdk-workmail/client.rb', line 1871

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:

[View source]

1933
1934
1935
1936
# File 'lib/aws-sdk-workmail/client.rb', line 1933

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

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:

[View source]

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

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:

[View source]

2070
2071
2072
2073
# File 'lib/aws-sdk-workmail/client.rb', line 2070

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:

[View source]

2120
2121
2122
2123
# File 'lib/aws-sdk-workmail/client.rb', line 2120

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:

[View source]

2173
2174
2175
2176
# File 'lib/aws-sdk-workmail/client.rb', line 2173

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:

[View source]

2211
2212
2213
2214
# File 'lib/aws-sdk-workmail/client.rb', line 2211

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:

[View source]

2265
2266
2267
2268
# File 'lib/aws-sdk-workmail/client.rb', line 2265

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:

[View source]

2316
2317
2318
2319
# File 'lib/aws-sdk-workmail/client.rb', line 2316

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:

[View source]

2360
2361
2362
2363
# File 'lib/aws-sdk-workmail/client.rb', line 2360

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:

[View source]

2406
2407
2408
2409
# File 'lib/aws-sdk-workmail/client.rb', line 2406

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:

[View source]

2457
2458
2459
2460
# File 'lib/aws-sdk-workmail/client.rb', line 2457

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:

[View source]

2513
2514
2515
2516
# File 'lib/aws-sdk-workmail/client.rb', line 2513

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

[View source]

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

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:

[View source]

2609
2610
2611
2612
# File 'lib/aws-sdk-workmail/client.rb', line 2609

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:

[View source]

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

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:

[View source]

2722
2723
2724
2725
# File 'lib/aws-sdk-workmail/client.rb', line 2722

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:

[View source]

2778
2779
2780
2781
# File 'lib/aws-sdk-workmail/client.rb', line 2778

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:

[View source]

2841
2842
2843
2844
# File 'lib/aws-sdk-workmail/client.rb', line 2841

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:

[View source]

2888
2889
2890
2891
# File 'lib/aws-sdk-workmail/client.rb', line 2888

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:

[View source]

2931
2932
2933
2934
# File 'lib/aws-sdk-workmail/client.rb', line 2931

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:

[View source]

2981
2982
2983
2984
# File 'lib/aws-sdk-workmail/client.rb', line 2981

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:

[View source]

3043
3044
3045
3046
# File 'lib/aws-sdk-workmail/client.rb', line 3043

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:

[View source]

3108
3109
3110
3111
# File 'lib/aws-sdk-workmail/client.rb', line 3108

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:

[View source]

3159
3160
3161
3162
# File 'lib/aws-sdk-workmail/client.rb', line 3159

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:

[View source]

3201
3202
3203
3204
# File 'lib/aws-sdk-workmail/client.rb', line 3201

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

[View source]

3259
3260
3261
3262
# File 'lib/aws-sdk-workmail/client.rb', line 3259

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:

[View source]

3317
3318
3319
3320
# File 'lib/aws-sdk-workmail/client.rb', line 3317

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:

[View source]

3347
3348
3349
3350
# File 'lib/aws-sdk-workmail/client.rb', line 3347

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
  },
})

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

[View source]

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

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:

[View source]

3480
3481
3482
3483
# File 'lib/aws-sdk-workmail/client.rb', line 3480

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:

[View source]

3514
3515
3516
3517
# File 'lib/aws-sdk-workmail/client.rb', line 3514

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

[View source]

3540
3541
3542
3543
# File 'lib/aws-sdk-workmail/client.rb', line 3540

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:

[View source]

3606
3607
3608
3609
# File 'lib/aws-sdk-workmail/client.rb', line 3606

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:

[View source]

3655
3656
3657
3658
# File 'lib/aws-sdk-workmail/client.rb', line 3655

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:

[View source]

3699
3700
3701
3702
# File 'lib/aws-sdk-workmail/client.rb', line 3699

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:

[View source]

3735
3736
3737
3738
# File 'lib/aws-sdk-workmail/client.rb', line 3735

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

#register_to_work_mail(params = {}) ⇒ Struct

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

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

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

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

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

  • :entity_id (required, String)

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

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

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

    • Entity name: entity

  • :email (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:

[View source]

3790
3791
3792
3793
# File 'lib/aws-sdk-workmail/client.rb', line 3790

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:

[View source]

3821
3822
3823
3824
# File 'lib/aws-sdk-workmail/client.rb', line 3821

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

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

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

Exporting mailbox content][1

in the *WorkMail Administrator Guide*.

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

Examples:

Request syntax with placeholder values


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

Response structure


resp.job_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :client_token (required, String)

    The idempotency token for the client request.

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

  • :organization_id (required, String)

    The identifier associated with the organization.

  • :entity_id (required, String)

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

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

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

    • Email address: entity@domain.tld

    • Entity name: entity

  • :description (String)

    The mailbox export job description.

  • :role_arn (required, String)

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

  • :kms_key_arn (required, String)

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

  • :s3_bucket_name (required, String)

    The name of the S3 bucket.

  • :s3_prefix (required, String)

    The S3 bucket prefix.

Returns:

See Also:

[View source]

3901
3902
3903
3904
# File 'lib/aws-sdk-workmail/client.rb', line 3901

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:

[View source]

3933
3934
3935
3936
# File 'lib/aws-sdk-workmail/client.rb', line 3933

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

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

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

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

</note>

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The WorkMail organization where the availability provider will be tested.

  • :domain_name (String)

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

  • :ews_provider (Types::EwsAvailabilityProvider)

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

  • :lambda_provider (Types::LambdaAvailabilityProvider)

    Describes a Lambda based availability provider.

Returns:

See Also:

[View source]

3997
3998
3999
4000
# File 'lib/aws-sdk-workmail/client.rb', line 3997

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:

[View source]

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

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:

[View source]

4073
4074
4075
4076
# File 'lib/aws-sdk-workmail/client.rb', line 4073

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:

[View source]

4101
4102
4103
4104
# File 'lib/aws-sdk-workmail/client.rb', line 4101

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 attibutes 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:

[View source]

4141
4142
4143
4144
# File 'lib/aws-sdk-workmail/client.rb', line 4141

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:

[View source]

4193
4194
4195
4196
# File 'lib/aws-sdk-workmail/client.rb', line 4193

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:

[View source]

4235
4236
4237
4238
# File 'lib/aws-sdk-workmail/client.rb', line 4235

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:

[View source]

4311
4312
4313
4314
# File 'lib/aws-sdk-workmail/client.rb', line 4311

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:

[View source]

4356
4357
4358
4359
# File 'lib/aws-sdk-workmail/client.rb', line 4356

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:

[View source]

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

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",
})

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

  • :department (String)

    Updates the user’s department.

  • :country (String)

    Updates the user’s country.

  • :office (String)

    Updates the user’s office.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

[View source]

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

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

#waiter_namesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated.
[View source]

4548
4549
4550
# File 'lib/aws-sdk-workmail/client.rb', line 4548

def waiter_names
  []
end