Class: AWS.WorkMail

Inherits:
AWS.Service show all
Identifier:
workmail
API Version:
2017-10-01
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Amazon WorkMail is a secure, managed business email and calendaring service with support for existing desktop and mobile email clients. You can access your email, contacts, and calendars using Microsoft Outlook, your browser, or other native iOS and Android email applications. You can integrate WorkMail with your existing corporate directory and control both the keys that encrypt your data and the location in which your data is stored.

The WorkMail API is designed for the following scenarios:

  • Listing and describing organizations

  • Managing users

  • Managing groups

  • Managing resources

All WorkMail API operations are Amazon-authenticated and certificate-signed. They not only require the use of the AWS SDK, but also allow for the exclusive use of AWS Identity and Access Management users and roles to help facilitate access, trust, and permission policies. By creating a role and allowing an IAM user to access the WorkMail site, the IAM user gains full administrative visibility into the entire WorkMail organization (or as set in the IAM policy). This includes, but is not limited to, the ability to create, update, and delete users, groups, and resources. This allows developers to perform the scenarios listed above, as well as give users the ability to grant access on a selective basis using the IAM model.

Sending a Request Using WorkMail

var workmail = new AWS.WorkMail();
workmail.associateDelegateToResource(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the WorkMail object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var workmail = new AWS.WorkMail({apiVersion: '2017-10-01'});

You can also set the API version globally in AWS.config.apiVersions using the workmail service identifier:

AWS.config.apiVersions = {
  workmail: '2017-10-01',
  // other service API versions
};

var workmail = new AWS.WorkMail();

Version:

  • 2017-10-01

Constructor Summary

Property Summary

Properties inherited from AWS.Service

apiVersions

Method Summary

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.WorkMail(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a WorkMail object

var workmail = new AWS.WorkMail({apiVersion: '2017-10-01'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com'.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.WorkMail.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.WorkMail.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.WorkMail.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and returns the amount of time to delay in milliseconds. The base option will be ignored if this option is supplied.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean)

    whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

associateDelegateToResource(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the associateDelegateToResource operation

var params = {
  EntityId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE', /* required */
  ResourceId: 'STRING_VALUE' /* required */
};
workmail.associateDelegateToResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The organization under which the resource exists.

    • ResourceId — (String)

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

    • EntityId — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

associateMemberToGroup(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the associateMemberToGroup operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  MemberId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.associateMemberToGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The organization under which the group exists.

    • GroupId — (String)

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

    • MemberId — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createAlias(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createAlias operation

var params = {
  Alias: 'STRING_VALUE', /* required */
  EntityId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.createAlias(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • EntityId — (String)

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

    • Alias — (String)

      The alias to add to the member set.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createGroup(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createGroup operation

var params = {
  Name: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.createGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The organization under which the group is to be created.

    • Name — (String)

      The name of the group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GroupId — (String)

        The identifier of the group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createResource(params = {}, callback) ⇒ AWS.Request

Creates a new Amazon WorkMail resource.

Service Reference:

Examples:

Calling the createResource operation

var params = {
  Name: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE', /* required */
  Type: ROOM | EQUIPMENT /* required */
};
workmail.createResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • Name — (String)

      The name of the new resource.

    • Type — (String)

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

      Possible values include:
      • "ROOM"
      • "EQUIPMENT"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ResourceId — (String)

        The identifier of the new resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createUser(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createUser operation

var params = {
  DisplayName: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE', /* required */
  Password: 'STRING_VALUE' /* required */
};
workmail.createUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • Name — (String)

      The name for the new user. Simple AD or AD Connector user names have a maximum length of 20. All others have a maximum length of 64.

    • DisplayName — (String)

      The display name for the new user.

    • Password — (String)

      The password for the new user.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • UserId — (String)

        The identifier for the new user.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteAlias(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the deleteAlias operation

var params = {
  Alias: 'STRING_VALUE', /* required */
  EntityId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.deleteAlias(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The identifier for the organization under which the user exists.

    • EntityId — (String)

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

    • Alias — (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).

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteGroup(params = {}, callback) ⇒ AWS.Request

Deletes a group from Amazon WorkMail.

Service Reference:

Examples:

Calling the deleteGroup operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.deleteGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The organization that contains the group.

    • GroupId — (String)

      The identifier of the group to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteMailboxPermissions(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the deleteMailboxPermissions operation

var params = {
  EntityId: 'STRING_VALUE', /* required */
  GranteeId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.deleteMailboxPermissions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • EntityId — (String)

      The identifier of the member (user or group)that owns the mailbox.

    • GranteeId — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteResource(params = {}, callback) ⇒ AWS.Request

Deletes the specified resource.

Service Reference:

Examples:

Calling the deleteResource operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  ResourceId: 'STRING_VALUE' /* required */
};
workmail.deleteResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • ResourceId — (String)

      The identifier of the resource to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteUser(params = {}, callback) ⇒ AWS.Request

Deletes a user from Amazon 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.

Service Reference:

Examples:

Calling the deleteUser operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  UserId: 'STRING_VALUE' /* required */
};
workmail.deleteUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The organization that contains the user to be deleted.

    • UserId — (String)

      The identifier of the user to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deregisterFromWorkMail(params = {}, callback) ⇒ AWS.Request

Mark a user, group, or resource as no longer used in Amazon 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.

Service Reference:

Examples:

Calling the deregisterFromWorkMail operation

var params = {
  EntityId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.deregisterFromWorkMail(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • EntityId — (String)

      The identifier for the member (user or group) to be updated.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeGroup(params = {}, callback) ⇒ AWS.Request

Returns the data available for the group.

Service Reference:

Examples:

Calling the describeGroup operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.describeGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The identifier for the organization under which the group exists.

    • GroupId — (String)

      The identifier for the group to be described.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • GroupId — (String)

        The identifier of the described group.

      • Name — (String)

        The name of the described group.

      • Email — (String)

        The email of the described group.

      • State — (String)

        The state of the user: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to WorkMail).

        Possible values include:
        • "ENABLED"
        • "DISABLED"
        • "DELETED"
      • EnabledDate — (Date)

        The date and time when a user was registered to WorkMail, in UNIX epoch time format.

      • DisabledDate — (Date)

        The date and time when a user was deregistered from WorkMail, in UNIX epoch time format.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeOrganization(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the describeOrganization operation

var params = {
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.describeOrganization(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The identifier for the organization to be described.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • OrganizationId — (String)

        The identifier of an organization.

      • Alias — (String)

        The alias for an organization.

      • State — (String)

        The state of an organization.

      • DirectoryId — (String)

        The identifier for the directory associated with an Amazon WorkMail organization.

      • DirectoryType — (String)

        The type of directory associated with the WorkMail organization.

      • DefaultMailDomain — (String)

        The default mail domain associated with the organization.

      • CompletedDate — (Date)

        The date at which the organization became usable in the WorkMail context, in UNIX epoch time format.

      • ErrorMessage — (String)

        (Optional) The error message indicating if unexpected behavior was encountered with regards to the organization.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeResource(params = {}, callback) ⇒ AWS.Request

Returns the data available for the resource.

Service Reference:

Examples:

Calling the describeResource operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  ResourceId: 'STRING_VALUE' /* required */
};
workmail.describeResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • ResourceId — (String)

      The identifier of the resource to be described.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ResourceId — (String)

        The identifier of the described resource.

      • Email — (String)

        The email of the described resource.

      • Name — (String)

        The name of the described resource.

      • Type — (String)

        The type of the described resource.

        Possible values include:
        • "ROOM"
        • "EQUIPMENT"
      • BookingOptions — (map)

        The booking options for the described resource.

        • AutoAcceptRequests — (Boolean)

          The resource's ability to automatically reply to requests. If disabled, delegates must be associated to the resource.

        • AutoDeclineRecurringRequests — (Boolean)

          The resource's ability to automatically decline any recurring requests.

        • AutoDeclineConflictingRequests — (Boolean)

          The resource's ability to automatically decline any conflicting requests.

      • State — (String)

        The state of the resource: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to WorkMail).

        Possible values include:
        • "ENABLED"
        • "DISABLED"
        • "DELETED"
      • EnabledDate — (Date)

        The date and time when a resource was enabled for WorkMail, in UNIX epoch time format.

      • DisabledDate — (Date)

        The date and time when a resource was disabled from WorkMail, in UNIX epoch time format.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeUser(params = {}, callback) ⇒ AWS.Request

Provides information regarding the user.

Service Reference:

Examples:

Calling the describeUser operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  UserId: 'STRING_VALUE' /* required */
};
workmail.describeUser(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The identifier for the organization under which the user exists.

    • UserId — (String)

      The identifier for the user to be described.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • UserId — (String)

        The identifier for the described user.

      • Name — (String)

        The name for the user.

      • Email — (String)

        The email of the user.

      • DisplayName — (String)

        The display name of the user.

      • State — (String)

        The state of a user: enabled (registered to Amazon WorkMail) or disabled (deregistered or never registered to WorkMail).

        Possible values include:
        • "ENABLED"
        • "DISABLED"
        • "DELETED"
      • UserRole — (String)

        In certain cases, other entities are modeled as users. If interoperability is enabled, resources are imported into Amazon WorkMail as users. Because different WorkMail organizations rely on different directory types, administrators can distinguish between an unregistered user (account is disabled and has a user role) and the directory administrators. The values are USER, RESOURCE, and SYSTEM_USER.

        Possible values include:
        • "USER"
        • "RESOURCE"
        • "SYSTEM_USER"
      • EnabledDate — (Date)

        The date and time at which the user was enabled for Amazon WorkMail usage, in UNIX epoch time format.

      • DisabledDate — (Date)

        The date and time at which the user was disabled for Amazon WorkMail usage, in UNIX epoch time format.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateDelegateFromResource(params = {}, callback) ⇒ AWS.Request

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

Examples:

Calling the disassociateDelegateFromResource operation

var params = {
  EntityId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE', /* required */
  ResourceId: 'STRING_VALUE' /* required */
};
workmail.disassociateDelegateFromResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The identifier for the organization under which the resource exists.

    • ResourceId — (String)

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

    • EntityId — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateMemberFromGroup(params = {}, callback) ⇒ AWS.Request

Removes a member from a group.

Service Reference:

Examples:

Calling the disassociateMemberFromGroup operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  MemberId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.disassociateMemberFromGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The identifier for the organization under which the group exists.

    • GroupId — (String)

      The identifier for the group from which members are removed.

    • MemberId — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAliases(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listAliases operation

var params = {
  EntityId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
workmail.listAliases(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The identifier for the organization under which the entity exists.

    • EntityId — (String)

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

    • NextToken — (String)

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

    • MaxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Aliases — (Array<String>)

        The entity's paginated aliases.

      • NextToken — (String)

        The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGroupMembers(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listGroupMembers operation

var params = {
  GroupId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
workmail.listGroupMembers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The identifier for the organization under which the group exists.

    • GroupId — (String)

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

    • NextToken — (String)

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

    • MaxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Members — (Array<map>)

        The members associated to the group.

        • Id — (String)

          The identifier of the member.

        • Name — (String)

          The name of the member.

        • Type — (String)

          A member can be a user or group.

          Possible values include:
          • "GROUP"
          • "USER"
        • State — (String)

          The state of the member, which can be ENABLED, DISABLED, or DELETED.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
          • "DELETED"
        • EnabledDate — (Date)

          The date indicating when the member was enabled for Amazon WorkMail use.

        • DisabledDate — (Date)

          The date indicating when the member was disabled from Amazon WorkMail use.

      • NextToken — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGroups(params = {}, callback) ⇒ AWS.Request

Returns summaries of the organization's groups.

Service Reference:

Examples:

Calling the listGroups operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
workmail.listGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The identifier for the organization under which the groups exist.

    • NextToken — (String)

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

    • MaxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Groups — (Array<map>)

        The overview of groups for an organization.

        • Id — (String)

          The identifier of the group.

        • Email — (String)

          The email of the group.

        • Name — (String)

          The name of the group.

        • State — (String)

          The state of the group, which can be ENABLED, DISABLED, or DELETED.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
          • "DELETED"
        • EnabledDate — (Date)

          The date indicating when the group was enabled for Amazon WorkMail use.

        • DisabledDate — (Date)

          The date indicating when the group was disabled from Amazon WorkMail use.

      • NextToken — (String)

        The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listMailboxPermissions(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listMailboxPermissions operation

var params = {
  EntityId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
workmail.listMailboxPermissions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • EntityId — (String)

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

    • NextToken — (String)

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

    • MaxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Permissions — (Array<map>)

        One page of the user, group, or resource mailbox permissions.

        • GranteeIdrequired — (String)

          The identifier of the user, group, or resource to which the permissions are granted.

        • GranteeTyperequired — (String)

          The type of user, group, or resource referred to in GranteeId.

          Possible values include:
          • "GROUP"
          • "USER"
        • PermissionValuesrequired — (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.

      • NextToken — (String)

        The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listOrganizations(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listOrganizations operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
workmail.listOrganizations(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

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

    • MaxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • OrganizationSummaries — (Array<map>)

        The overview of owned organizations presented as a list of organization summaries.

        • OrganizationId — (String)

          The identifier associated with the organization.

        • Alias — (String)

          The alias associated with the organization.

        • ErrorMessage — (String)

          The error message associated with the organization. It is only present if unexpected behavior has occurred with regards to the organization. It provides insight or solutions regarding unexpected behavior.

        • State — (String)

          The state associated with the organization.

      • NextToken — (String)

        The token to use to retrieve the next page of results. The value is "null" when there are no more results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listResourceDelegates(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the listResourceDelegates operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  ResourceId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
workmail.listResourceDelegates(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • ResourceId — (String)

      The identifier for the resource whose delegates are listed.

    • NextToken — (String)

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

    • MaxResults — (Integer)

      The number of maximum results in a page.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Delegates — (Array<map>)

        One page of the resource's delegates.

        • Idrequired — (String)

          The identifier for the user or group associated as the resource's delegate.

        • Typerequired — (String)

          The type of the delegate: user or group.

          Possible values include:
          • "GROUP"
          • "USER"
      • NextToken — (String)

        The token used to paginate through the delegates associated with a resource. While results are still available, it has an associated value. When the last page is reached, the token is empty.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listResources(params = {}, callback) ⇒ AWS.Request

Returns summaries of the organization's resources.

Service Reference:

Examples:

Calling the listResources operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
workmail.listResources(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The identifier for the organization under which the resources exist.

    • NextToken — (String)

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

    • MaxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Resources — (Array<map>)

        One page of the organization's resource representation.

        • Id — (String)

          The identifier of the resource.

        • Email — (String)

          The email of the resource.

        • Name — (String)

          The name of the resource.

        • Type — (String)

          The type of the resource: equipment or room.

          Possible values include:
          • "ROOM"
          • "EQUIPMENT"
        • State — (String)

          The state of the resource, which can be ENABLED, DISABLED, or DELETED.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
          • "DELETED"
        • EnabledDate — (Date)

          The date indicating when the resource was enabled for Amazon WorkMail use.

        • DisabledDate — (Date)

          The date indicating when the resource was disabled from Amazon WorkMail use.

      • NextToken — (String)

        The token used to paginate through all the organization's resources. While results are still available, it has an associated value. When the last page is reached, the token is empty.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listUsers(params = {}, callback) ⇒ AWS.Request

Returns summaries of the organization's users.

Service Reference:

Examples:

Calling the listUsers operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
workmail.listUsers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

      The identifier for the organization under which the users exist.

    • NextToken — (String)

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

    • MaxResults — (Integer)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Users — (Array<map>)

        The overview of users for an organization.

        • Id — (String)

          The identifier of the user.

        • Email — (String)

          The email of the user.

        • Name — (String)

          The name of the user.

        • DisplayName — (String)

          The display name of the user.

        • State — (String)

          The state of the user, which can be ENABLED, DISABLED, or DELETED.

          Possible values include:
          • "ENABLED"
          • "DISABLED"
          • "DELETED"
        • UserRole — (String)

          The role of the user.

          Possible values include:
          • "USER"
          • "RESOURCE"
          • "SYSTEM_USER"
        • EnabledDate — (Date)

          The date indicating when the user was enabled for Amazon WorkMail use.

        • DisabledDate — (Date)

          The date indicating when the user was disabled from Amazon WorkMail use.

      • NextToken — (String)

        The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putMailboxPermissions(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the putMailboxPermissions operation

var params = {
  EntityId: 'STRING_VALUE', /* required */
  GranteeId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE', /* required */
  PermissionValues: [ /* required */
    FULL_ACCESS | SEND_AS | SEND_ON_BEHALF,
    /* more items */
  ]
};
workmail.putMailboxPermissions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • EntityId — (String)

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

    • GranteeId — (String)

      The identifier of the user, group, or resource to which to grant the permissions.

    • PermissionValues — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

registerToWorkMail(params = {}, callback) ⇒ AWS.Request

Registers an existing and disabled user, group, or resource for Amazon 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.

Service Reference:

Examples:

Calling the registerToWorkMail operation

var params = {
  Email: 'STRING_VALUE', /* required */
  EntityId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.registerToWorkMail(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • EntityId — (String)

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

    • Email — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

resetPassword(params = {}, callback) ⇒ AWS.Request

Allows the administrator to reset the password for a user.

Service Reference:

Examples:

Calling the resetPassword operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  Password: 'STRING_VALUE', /* required */
  UserId: 'STRING_VALUE' /* required */
};
workmail.resetPassword(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • UserId — (String)

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

    • Password — (String)

      The new password for the user.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updatePrimaryEmailAddress(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updatePrimaryEmailAddress operation

var params = {
  Email: 'STRING_VALUE', /* required */
  EntityId: 'STRING_VALUE', /* required */
  OrganizationId: 'STRING_VALUE' /* required */
};
workmail.updatePrimaryEmailAddress(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • EntityId — (String)

      The user, group, or resource to update.

    • Email — (String)

      The value of the email to be updated as primary.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateResource(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the updateResource operation

var params = {
  OrganizationId: 'STRING_VALUE', /* required */
  ResourceId: 'STRING_VALUE', /* required */
  BookingOptions: {
    AutoAcceptRequests: true || false,
    AutoDeclineConflictingRequests: true || false,
    AutoDeclineRecurringRequests: true || false
  },
  Name: 'STRING_VALUE'
};
workmail.updateResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • OrganizationId — (String)

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

    • ResourceId — (String)

      The identifier of the resource to be updated.

    • Name — (String)

      The name of the resource to be updated.

    • BookingOptions — (map)

      The resource's booking options to be updated.

      • AutoAcceptRequests — (Boolean)

        The resource's ability to automatically reply to requests. If disabled, delegates must be associated to the resource.

      • AutoDeclineRecurringRequests — (Boolean)

        The resource's ability to automatically decline any recurring requests.

      • AutoDeclineConflictingRequests — (Boolean)

        The resource's ability to automatically decline any conflicting requests.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.