You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::WorkMail::Client

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



183
184
185
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 183

def initialize(*args)
  super
end

Instance Method Details

#associate_delegate_to_resource(params = {}) ⇒ Struct

Adds a member 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: "ResourceId", # required
  entity_id: "WorkMailIdentifier", # 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 are associated.

  • :entity_id (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



214
215
216
217
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 214

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 to the group's set.

Examples:

Request syntax with placeholder values


resp = client.associate_member_to_group({
  organization_id: "OrganizationId", # required
  group_id: "WorkMailIdentifier", # required
  member_id: "WorkMailIdentifier", # 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 for which the member is associated.

  • :member_id (required, String)

    The member to associate to the group.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



244
245
246
247
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 244

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

#create_alias(params = {}) ⇒ Struct

Adds an alias to the set of a given member of Amazon 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 exists.

  • :entity_id (required, String)

    The alias is added to this Amazon WorkMail entity.

  • :alias (required, String)

    The alias to add to the user.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



274
275
276
277
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 274

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

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

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

Examples:

Request syntax with placeholder values


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

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.

Returns:

See Also:



307
308
309
310
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 307

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

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

Creates a new Amazon WorkMail resource. The available types are equipment and room.

Examples:

Request syntax with placeholder values


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

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

  • :type (required, String)

    The type of the created resource.

Returns:

See Also:



345
346
347
348
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 345

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 Amazon 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: "String", # required
  password: "Password", # required
})

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 user to be created.

  • :display_name (required, String)

    The display name for the user to be created.

  • :password (required, String)

    The password for the user to be created.

Returns:

See Also:



386
387
388
389
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 386

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

#delete_alias(params = {}) ⇒ Struct

Remove the alias 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 Amazon WorkMail entity 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:



419
420
421
422
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 419

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

#delete_group(params = {}) ⇒ Struct

Deletes a group from Amazon WorkMail.

Examples:

Request syntax with placeholder values


resp = client.delete_group({
  organization_id: "OrganizationId", # required
  group_id: "WorkMailIdentifier", # 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.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



445
446
447
448
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 445

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

#delete_mailbox_permissions(params = {}) ⇒ Struct

Deletes permissions granted to a user or group.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

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

  • :entity_id (required, String)

    The identifier of the entity (user or group) for which to delete mailbox permissions.

  • :grantee_id (required, String)

    The identifier of the entity (user or group) for which to delete granted permissions.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



478
479
480
481
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 478

def delete_mailbox_permissions(params = {}, options = {})
  req = build_request(:delete_mailbox_permissions, 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: "ResourceId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

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

  • :resource_id (required, String)

    The identifier of the resource to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



505
506
507
508
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 505

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

#delete_user(params = {}) ⇒ Struct

Deletes a user from Amazon WorkMail and all subsequent systems. The action can't be undone. The mailbox is kept as-is for a minimum of 30 days, without any means to restore it.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization that contains the user.

  • :user_id (required, String)

    The identifier of the user to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



533
534
535
536
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 533

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 Amazon WorkMail. This action disassociates the mailbox and schedules it for clean-up. Amazon 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: "WorkMailIdentifier", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

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

  • :entity_id (required, String)

    The identifier for the entity to be updated.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



563
564
565
566
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 563

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

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.

Returns:

See Also:



605
606
607
608
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 605

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

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The identifier for the organization to be described.

Returns:

See Also:



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

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: "ResourceId", # 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

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.

Returns:

See Also:



697
698
699
700
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 697

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: "WorkMailIdentifier", # 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"
resp.enabled_date #=> Time
resp.disabled_date #=> Time

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.

Returns:

See Also:



743
744
745
746
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 743

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: "ResourceId", # required
  entity_id: "WorkMailIdentifier", # 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.

  • :entity_id (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



775
776
777
778
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 775

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: "WorkMailIdentifier", # required
  member_id: "WorkMailIdentifier", # 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.

  • :member_id (required, String)

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

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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

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

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

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:



850
851
852
853
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 850

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

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

Returns an overview of the members of a group.

Examples:

Request syntax with placeholder values


resp = client.list_group_members({
  organization_id: "OrganizationId", # required
  group_id: "WorkMailIdentifier", # 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 are associated.

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



899
900
901
902
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 899

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.

Examples:

Request syntax with placeholder values


resp = client.list_groups({
  organization_id: "OrganizationId", # required
  next_token: "NextToken",
  max_results: 1,
})

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.

Returns:

See Also:



944
945
946
947
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 944

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

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

Lists the mailbox permissions associated with a mailbox.

Examples:

Request syntax with placeholder values


resp = client.list_mailbox_permissions({
  organization_id: "OrganizationId", # required
  entity_id: "WorkMailIdentifier", # 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 entity (user or group) exists.

  • :entity_id (required, String)

    The identifier of the entity (user or group) for which to list mailbox permissions.

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



993
994
995
996
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 993

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

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

Returns summaries of the customer's non-deleted organizations.

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



1032
1033
1034
1035
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1032

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.

Examples:

Request syntax with placeholder values


resp = client.list_resource_delegates({
  organization_id: "OrganizationId", # required
  resource_id: "WorkMailIdentifier", # 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.

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



1079
1080
1081
1082
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1079

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.

Examples:

Request syntax with placeholder values


resp = client.list_resources({
  organization_id: "OrganizationId", # required
  next_token: "NextToken",
  max_results: 1,
})

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

Returns:

See Also:



1125
1126
1127
1128
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1125

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

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

Returns summaries of the organization's users.

Examples:

Request syntax with placeholder values


resp = client.list_users({
  organization_id: "OrganizationId", # required
  next_token: "NextToken",
  max_results: 1,
})

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

    TBD

  • :max_results (Integer)

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

Returns:

See Also:



1171
1172
1173
1174
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1171

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

#put_mailbox_permissions(params = {}) ⇒ Struct

Sets permissions for a user or group. This replaces any pre-existing permissions set for the entity.

Examples:

Request syntax with placeholder values


resp = client.put_mailbox_permissions({
  organization_id: "OrganizationId", # required
  entity_id: "WorkMailIdentifier", # required
  grantee_id: "WorkMailIdentifier", # 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 entity (user or group) exists.

  • :entity_id (required, String)

    The identifier of the entity (user or group) for which to update mailbox permissions.

  • :grantee_id (required, String)

    The identifier of the entity (user or group) to which to grant the permissions.

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



1215
1216
1217
1218
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1215

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

#register_to_work_mail(params = {}) ⇒ Struct

Registers an existing and disabled user, group, or resource/entity for Amazon WorkMail use by associating a mailbox and calendaring capabilities. It performs no change if the entity is enabled and fails if the entity 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 or they can be synchronized from your directory. For more information, see DeregisterFromWorkMail.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

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

  • :entity_id (required, String)

    The identifier for the entity to be updated.

  • :email (required, String)

    The email for the entity to be updated.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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:



1288
1289
1290
1291
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1288

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

#update_primary_email_address(params = {}) ⇒ Struct

Updates the primary email for an entity. 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: "WorkMailIdentifier", # required
  email: "EmailAddress", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The organization that contains the entity to update.

  • :entity_id (required, String)

    The entity to update (user, group, or resource).

  • :email (required, String)

    The value of the email to be updated as primary.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1321
1322
1323
1324
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1321

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. It must be preceded by a describe call in order to have the latest information. The dataset in the request should be the one expected when performing another describe call.

Examples:

Request syntax with placeholder values


resp = client.update_resource({
  organization_id: "OrganizationId", # required
  resource_id: "ResourceId", # required
  name: "ResourceName",
  booking_options: {
    auto_accept_requests: false,
    auto_decline_recurring_requests: false,
    auto_decline_conflicting_requests: 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.

  • :name (String)

    The name of the resource to be updated.

  • :booking_options (Types::BookingOptions)

    The resource's booking options to be updated.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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