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

#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



163
164
165
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 163

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:



194
195
196
197
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 194

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:



224
225
226
227
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 224

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:



254
255
256
257
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 254

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:



287
288
289
290
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 287

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:



325
326
327
328
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 325

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:



366
367
368
369
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 366

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:



399
400
401
402
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 399

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:



425
426
427
428
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 425

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:



458
459
460
461
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 458

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:



485
486
487
488
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 485

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:



513
514
515
516
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 513

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:



543
544
545
546
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 543

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:



585
586
587
588
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 585

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:



628
629
630
631
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 628

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:



677
678
679
680
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 677

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:



723
724
725
726
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 723

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:



755
756
757
758
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 755

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:



785
786
787
788
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 785

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:



830
831
832
833
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 830

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:



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

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:



924
925
926
927
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 924

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:



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

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:



1012
1013
1014
1015
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1012

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:



1059
1060
1061
1062
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1059

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:



1105
1106
1107
1108
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1105

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:



1151
1152
1153
1154
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1151

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:



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

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:



1237
1238
1239
1240
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1237

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:



1268
1269
1270
1271
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1268

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:



1301
1302
1303
1304
# File 'gems/aws-sdk-workmail/lib/aws-sdk-workmail/client.rb', line 1301

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:



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

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