Note: You are viewing the documentation for an older major version of the AWS SDK for JavaScript (v2).

The modular AWS SDK for JavaScript (v3) is now General Available. For more information see the Developer Guide or API Reference.

Class: AWS.ChimeSDKMessaging

Inherits:
AWS.Service show all
Identifier:
chimesdkmessaging
API Version:
2021-05-15
Defined in:
(unknown)

Overview

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

Service Description

The Amazon Chime SDK Messaging APIs in this section allow software developers to send and receive messages in custom messaging applications. These APIs depend on the frameworks provided by the Amazon Chime SDK Identity APIs. For more information about the messaging APIs, see .

Sending a Request Using ChimeSDKMessaging

var chimesdkmessaging = new AWS.ChimeSDKMessaging();
chimesdkmessaging.batchCreateChannelMembership(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 ChimeSDKMessaging object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var chimesdkmessaging = new AWS.ChimeSDKMessaging({apiVersion: '2021-05-15'});

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

AWS.config.apiVersions = {
  chimesdkmessaging: '2021-05-15',
  // other service API versions
};

var chimesdkmessaging = new AWS.ChimeSDKMessaging();

Version:

  • 2021-05-15

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.ChimeSDKMessaging(options = {}) ⇒ Object

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

Examples:

Constructing a ChimeSDKMessaging object

var chimesdkmessaging = new AWS.ChimeSDKMessaging({apiVersion: '2021-05-15'});

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|AWS.Endpoint)

    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' or an Endpoint object.

  • 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.ChimeSDKMessaging.region for more information.

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.ChimeSDKMessaging.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.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets 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 error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • 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|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

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

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

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

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

Adds a specified number of users to a channel.

Service Reference:

Examples:

Calling the batchCreateChannelMembership operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MemberArns: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  Type: DEFAULT | HIDDEN
};
chimesdkmessaging.batchCreateChannelMembership(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: {})
    • ChannelArn — (String)

      The ARN of the channel to which you're adding users.

    • Type — (String)

      The membership type of a user, DEFAULT or HIDDEN. Default members are always returned as part of ListChannelMemberships. Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden members are not returned. This is only supported by moderators.

      Possible values include:
      • "DEFAULT"
      • "HIDDEN"
    • MemberArns — (Array<String>)

      The ARNs of the members you want to add to the channel.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • BatchChannelMemberships — (map)

        The list of channel memberships in the response.

        • InvitedBy — (map)

          The identifier of the member who invited another member.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

        • Type — (String)

          The membership types set for the channel users.

          Possible values include:
          • "DEFAULT"
          • "HIDDEN"
        • Members — (Array<map>)

          The users successfully added to the request.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

        • ChannelArn — (String)

          The ARN of the channel to which you're adding users.

      • Errors — (Array<map>)

        If the action fails for one or more of the memberships in the request, a list of the memberships is returned, along with error codes and error messages.

        • MemberArn — (String)

          The ARN of the member that the service couldn't add.

        • ErrorCode — (String)

          The error code.

          Possible values include:
          • "BadRequest"
          • "Conflict"
          • "Forbidden"
          • "NotFound"
          • "PreconditionFailed"
          • "ResourceLimitExceeded"
          • "ServiceFailure"
          • "AccessDenied"
          • "ServiceUnavailable"
          • "Throttled"
          • "Throttling"
          • "Unauthorized"
          • "Unprocessable"
          • "VoiceConnectorGroupAssociationsExist"
          • "PhoneNumberAssociationsExist"
        • ErrorMessage — (String)

          The error message.

Returns:

  • (AWS.Request)

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

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

Creates a channel to which you can add users and send messages.

Restriction: You can't change a channel's privacy.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the createChannel operation

var params = {
  AppInstanceArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  ClientRequestToken: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  Metadata: 'STRING_VALUE',
  Mode: UNRESTRICTED | RESTRICTED,
  Privacy: PUBLIC | PRIVATE,
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
chimesdkmessaging.createChannel(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: {})
    • AppInstanceArn — (String)

      The ARN of the channel request.

    • Name — (String)

      The name of the channel.

    • Mode — (String)

      The channel mode: UNRESTRICTED or RESTRICTED. Administrators, moderators, and channel members can add themselves and other members to unrestricted channels. Only administrators and moderators can add members to restricted channels.

      Possible values include:
      • "UNRESTRICTED"
      • "RESTRICTED"
    • Privacy — (String)

      The channel's privacy level: PUBLIC or PRIVATE. Private channels aren't discoverable by users outside the channel. Public channels are discoverable by anyone in the AppInstance.

      Possible values include:
      • "PUBLIC"
      • "PRIVATE"
    • Metadata — (String)

      The metadata of the creation request. Limited to 1KB and UTF-8.

    • ClientRequestToken — (String)

      The client token for the request. An Idempotency token.

      If a token is not provided, the SDK will use a version 4 UUID.
    • Tags — (Array<map>)

      The tags for the creation request.

      • Keyrequired — (String)

        The key of the tag.

      • Valuerequired — (String)

        The value of the tag.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel.

Returns:

  • (AWS.Request)

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

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

Permanently bans a member from a channel. Moderators can't add banned members to a channel. To undo a ban, you first have to DeleteChannelBan, and then CreateChannelMembership. Bans are cleaned up when you delete users or channels.

If you ban a user who is already part of a channel, that user is automatically kicked from the channel.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the createChannelBan operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MemberArn: 'STRING_VALUE' /* required */
};
chimesdkmessaging.createChannelBan(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: {})
    • ChannelArn — (String)

      The ARN of the ban request.

    • MemberArn — (String)

      The ARN of the member being banned.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the response to the ban request.

      • Member — (map)

        The ChannelArn and BannedIdentity of the member in the ban response.

        • Arn — (String)

          The ARN in an Identity.

        • Name — (String)

          The name in an Identity.

Returns:

  • (AWS.Request)

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

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

Adds a user to a channel. The InvitedBy response field is derived from the request header. A channel member can:

  • List messages

  • Send messages

  • Receive messages

  • Edit their own messages

  • Leave the channel

Privacy settings impact this action as follows:

  • Public Channels: You do not need to be a member to list messages, but you must be a member to send messages.

  • Private Channels: You must be a member to list or send messages.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the createChannelMembership operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MemberArn: 'STRING_VALUE', /* required */
  Type: DEFAULT | HIDDEN /* required */
};
chimesdkmessaging.createChannelMembership(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: {})
    • ChannelArn — (String)

      The ARN of the channel to which you're adding users.

    • MemberArn — (String)

      The ARN of the member you want to add to the channel.

    • Type — (String)

      The membership type of a user, DEFAULT or HIDDEN. Default members are always returned as part of ListChannelMemberships. Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden members are not returned. This is only supported by moderators.

      Possible values include:
      • "DEFAULT"
      • "HIDDEN"
    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel.

      • Member — (map)

        The ARN and metadata of the member being added.

        • Arn — (String)

          The ARN in an Identity.

        • Name — (String)

          The name in an Identity.

Returns:

  • (AWS.Request)

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

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

Creates a new ChannelModerator. A channel moderator can:

  • Add and remove other members of the channel.

  • Add and remove other moderators of the channel.

  • Add and remove user bans for the channel.

  • Redact messages in the channel.

  • List messages in the channel.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the createChannelModerator operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChannelModeratorArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE' /* required */
};
chimesdkmessaging.createChannelModerator(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • ChannelModeratorArn — (String)

      The ARN of the moderator.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel.

      • ChannelModerator — (map)

        The ARNs of the channel and the moderator.

        • Arn — (String)

          The ARN in an Identity.

        • Name — (String)

          The name in an Identity.

Returns:

  • (AWS.Request)

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

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

Immediately makes a channel and its memberships inaccessible and marks them for deletion. This is an irreversible process.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the deleteChannel operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE' /* required */
};
chimesdkmessaging.deleteChannel(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: {})
    • ChannelArn — (String)

      The ARN of the channel being deleted.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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.

Returns:

  • (AWS.Request)

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

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

Removes a user from a channel's ban list.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the deleteChannelBan operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MemberArn: 'STRING_VALUE' /* required */
};
chimesdkmessaging.deleteChannelBan(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: {})
    • ChannelArn — (String)

      The ARN of the channel from which the AppInstanceUser was banned.

    • MemberArn — (String)

      The ARN of the AppInstanceUser that you want to reinstate.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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.

Returns:

  • (AWS.Request)

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

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

Removes a member from a channel.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the deleteChannelMembership operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MemberArn: 'STRING_VALUE' /* required */
};
chimesdkmessaging.deleteChannelMembership(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: {})
    • ChannelArn — (String)

      The ARN of the channel from which you want to remove the user.

    • MemberArn — (String)

      The ARN of the member that you're removing from the channel.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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.

Returns:

  • (AWS.Request)

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

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

Deletes a channel message. Only admins can perform this action. Deletion makes messages inaccessible immediately. A background process deletes any revisions created by UpdateChannelMessage.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the deleteChannelMessage operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MessageId: 'STRING_VALUE' /* required */
};
chimesdkmessaging.deleteChannelMessage(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • MessageId — (String)

      The ID of the message being deleted.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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.

Returns:

  • (AWS.Request)

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

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

Deletes a channel moderator.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the deleteChannelModerator operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChannelModeratorArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE' /* required */
};
chimesdkmessaging.deleteChannelModerator(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • ChannelModeratorArn — (String)

      The ARN of the moderator being deleted.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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.

Returns:

  • (AWS.Request)

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

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

Returns the full details of a channel in an Amazon Chime AppInstance.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the describeChannel operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE' /* required */
};
chimesdkmessaging.describeChannel(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • Channel — (map)

        The channel details.

        • Name — (String)

          The name of a channel.

        • ChannelArn — (String)

          The ARN of a channel.

        • Mode — (String)

          The mode of the channel.

          Possible values include:
          • "UNRESTRICTED"
          • "RESTRICTED"
        • Privacy — (String)

          The channel's privacy setting.

          Possible values include:
          • "PUBLIC"
          • "PRIVATE"
        • Metadata — (String)

          The channel's metadata.

        • CreatedBy — (map)

          The AppInstanceUser who created the channel.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

        • CreatedTimestamp — (Date)

          The time at which the AppInstanceUser created the channel.

        • LastMessageTimestamp — (Date)

          The time at which a member sent the last message in the channel.

        • LastUpdatedTimestamp — (Date)

          The time at which a channel was last updated.

Returns:

  • (AWS.Request)

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

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

Returns the full details of a channel ban.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the describeChannelBan operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MemberArn: 'STRING_VALUE' /* required */
};
chimesdkmessaging.describeChannelBan(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: {})
    • ChannelArn — (String)

      The ARN of the channel from which the user is banned.

    • MemberArn — (String)

      The ARN of the member being banned.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelBan — (map)

        The details of the ban.

        • Member — (map)

          The member being banned from the channel.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

        • ChannelArn — (String)

          The ARN of the channel from which a member is being banned.

        • CreatedTimestamp — (Date)

          The time at which the ban was created.

        • CreatedBy — (map)

          The AppInstanceUser who created the ban.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

Returns:

  • (AWS.Request)

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

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

Returns the full details of a user's channel membership.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the describeChannelMembership operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MemberArn: 'STRING_VALUE' /* required */
};
chimesdkmessaging.describeChannelMembership(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • MemberArn — (String)

      The ARN of the member.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelMembership — (map)

        The details of the membership.

        • InvitedBy — (map)

          The identifier of the member who invited another member.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

        • Type — (String)

          The membership type set for the channel member.

          Possible values include:
          • "DEFAULT"
          • "HIDDEN"
        • Member — (map)

          The data of the channel member.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

        • ChannelArn — (String)

          The ARN of the member's channel.

        • CreatedTimestamp — (Date)

          The time at which the channel membership was created.

        • LastUpdatedTimestamp — (Date)

          The time at which a channel membership was last updated.

Returns:

  • (AWS.Request)

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

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

Returns the details of a channel based on the membership of the specified AppInstanceUser.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Examples:

Calling the describeChannelMembershipForAppInstanceUser operation

var params = {
  AppInstanceUserArn: 'STRING_VALUE', /* required */
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE' /* required */
};
chimesdkmessaging.describeChannelMembershipForAppInstanceUser(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: {})
    • ChannelArn — (String)

      The ARN of the channel to which the user belongs.

    • AppInstanceUserArn — (String)

      The ARN of the user in a channel.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelMembership — (map)

        The channel to which a user belongs.

        • ChannelSummary — (map)

          Returns the channel data for an AppInstance.

          • Name — (String)

            The name of the channel.

          • ChannelArn — (String)

            The ARN of the channel.

          • Mode — (String)

            The mode of the channel.

            Possible values include:
            • "UNRESTRICTED"
            • "RESTRICTED"
          • Privacy — (String)

            The privacy setting of the channel.

            Possible values include:
            • "PUBLIC"
            • "PRIVATE"
          • Metadata — (String)

            The metadata of the channel.

          • LastMessageTimestamp — (Date)

            The time at which the last message in a channel was sent.

        • AppInstanceUserMembershipSummary — (map)

          Returns the channel membership data for an AppInstance.

          • Type — (String)

            The type of ChannelMembership.

            Possible values include:
            • "DEFAULT"
            • "HIDDEN"
          • ReadMarkerTimestamp — (Date)

            The time at which a message was last read.

Returns:

  • (AWS.Request)

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

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

Returns the full details of a channel moderated by the specified AppInstanceUser.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Examples:

Calling the describeChannelModeratedByAppInstanceUser operation

var params = {
  AppInstanceUserArn: 'STRING_VALUE', /* required */
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE' /* required */
};
chimesdkmessaging.describeChannelModeratedByAppInstanceUser(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: {})
    • ChannelArn — (String)

      The ARN of the moderated channel.

    • AppInstanceUserArn — (String)

      The ARN of the AppInstanceUser in the moderated channel.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • Channel — (map)

        The moderated channel.

        • ChannelSummary — (map)

          Summary of the details of a Channel.

          • Name — (String)

            The name of the channel.

          • ChannelArn — (String)

            The ARN of the channel.

          • Mode — (String)

            The mode of the channel.

            Possible values include:
            • "UNRESTRICTED"
            • "RESTRICTED"
          • Privacy — (String)

            The privacy setting of the channel.

            Possible values include:
            • "PUBLIC"
            • "PRIVATE"
          • Metadata — (String)

            The metadata of the channel.

          • LastMessageTimestamp — (Date)

            The time at which the last message in a channel was sent.

Returns:

  • (AWS.Request)

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

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

Returns the full details of a single ChannelModerator.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the describeChannelModerator operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChannelModeratorArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE' /* required */
};
chimesdkmessaging.describeChannelModerator(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • ChannelModeratorArn — (String)

      The ARN of the channel moderator.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelModerator — (map)

        The details of the channel moderator.

        • Moderator — (map)

          The moderator's data.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

        • ChannelArn — (String)

          The ARN of the moderator's channel.

        • CreatedTimestamp — (Date)

          The time at which the moderator was created.

        • CreatedBy — (map)

          The AppInstanceUser who created the moderator.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

Returns:

  • (AWS.Request)

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

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

Gets the full details of a channel message.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the getChannelMessage operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MessageId: 'STRING_VALUE' /* required */
};
chimesdkmessaging.getChannelMessage(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • MessageId — (String)

      The ID of the message.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelMessage — (map)

        The details of and content in the message.

        • ChannelArn — (String)

          The ARN of the channel.

        • MessageId — (String)

          The ID of a message.

        • Content — (String)

          The message content.

        • Metadata — (String)

          The message metadata.

        • Type — (String)

          The message type.

          Possible values include:
          • "STANDARD"
          • "CONTROL"
        • CreatedTimestamp — (Date)

          The time at which the message was created.

        • LastEditedTimestamp — (Date)

          The time at which a message was edited.

        • LastUpdatedTimestamp — (Date)

          The time at which a message was updated.

        • Sender — (map)

          The message sender.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

        • Redacted — (Boolean)

          Hides the content of a message.

        • Persistence — (String)

          The persistence setting for a channel message.

          Possible values include:
          • "PERSISTENT"
          • "NON_PERSISTENT"

Returns:

  • (AWS.Request)

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

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

The details of the endpoint for the messaging session.

Service Reference:

Examples:

Calling the getMessagingSessionEndpoint operation

var params = {
};
chimesdkmessaging.getMessagingSessionEndpoint(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: {})

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:

      • Endpoint — (map)

        The endpoint returned in the response.

        • Url — (String)

          The endpoint to which you establish a websocket connection.

Returns:

  • (AWS.Request)

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

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

Lists all the users banned from a particular channel.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the listChannelBans operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
chimesdkmessaging.listChannelBans(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • MaxResults — (Integer)

      The maximum number of bans that you want returned.

    • NextToken — (String)

      The token passed by previous API calls until all requested bans are returned.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel.

      • NextToken — (String)

        The token passed by previous API calls until all requested bans are returned.

      • ChannelBans — (Array<map>)

        The information for each requested ban.

        • Member — (map)

          The member being banned from a channel.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

Returns:

  • (AWS.Request)

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

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

Lists all channel memberships in a channel.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the listChannelMemberships operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  Type: DEFAULT | HIDDEN
};
chimesdkmessaging.listChannelMemberships(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: {})
    • ChannelArn — (String)

      The maximum number of channel memberships that you want returned.

    • Type — (String)

      The membership type of a user, DEFAULT or HIDDEN. Default members are always returned as part of ListChannelMemberships. Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN. Otherwise hidden members are not returned.

      Possible values include:
      • "DEFAULT"
      • "HIDDEN"
    • MaxResults — (Integer)

      The maximum number of channel memberships that you want returned.

    • NextToken — (String)

      The token passed by previous API calls until all requested channel memberships are returned.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel.

      • ChannelMemberships — (Array<map>)

        The information for the requested channel memberships.

        • Member — (map)

          A member's summary data.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

      • NextToken — (String)

        The token passed by previous API calls until all requested channel memberships are returned.

Returns:

  • (AWS.Request)

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

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

Lists all channels that a particular AppInstanceUser is a part of. Only an AppInstanceAdmin can call the API with a user ARN that is not their own.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Examples:

Calling the listChannelMembershipsForAppInstanceUser operation

var params = {
  ChimeBearer: 'STRING_VALUE', /* required */
  AppInstanceUserArn: 'STRING_VALUE',
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
chimesdkmessaging.listChannelMembershipsForAppInstanceUser(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: {})
    • AppInstanceUserArn — (String)

      The ARN of the AppInstanceUsers

    • MaxResults — (Integer)

      The maximum number of users that you want returned.

    • NextToken — (String)

      The token returned from previous API requests until the number of channel memberships is reached.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelMemberships — (Array<map>)

        The token passed by previous API calls until all requested users are returned.

        • ChannelSummary — (map)

          Returns the channel data for an AppInstance.

          • Name — (String)

            The name of the channel.

          • ChannelArn — (String)

            The ARN of the channel.

          • Mode — (String)

            The mode of the channel.

            Possible values include:
            • "UNRESTRICTED"
            • "RESTRICTED"
          • Privacy — (String)

            The privacy setting of the channel.

            Possible values include:
            • "PUBLIC"
            • "PRIVATE"
          • Metadata — (String)

            The metadata of the channel.

          • LastMessageTimestamp — (Date)

            The time at which the last message in a channel was sent.

        • AppInstanceUserMembershipSummary — (map)

          Returns the channel membership data for an AppInstance.

          • Type — (String)

            The type of ChannelMembership.

            Possible values include:
            • "DEFAULT"
            • "HIDDEN"
          • ReadMarkerTimestamp — (Date)

            The time at which a message was last read.

      • NextToken — (String)

        The token passed by previous API calls until all requested users are returned.

Returns:

  • (AWS.Request)

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

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

List all the messages in a channel. Returns a paginated list of ChannelMessages. By default, sorted by creation timestamp in descending order.

Note: Redacted messages appear in the results as empty, since they are only redacted, not deleted. Deleted messages do not appear in the results. This action always returns the latest version of an edited message. Also, the x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the listChannelMessages operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  NotAfter: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  NotBefore: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  SortOrder: ASCENDING | DESCENDING
};
chimesdkmessaging.listChannelMessages(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • SortOrder — (String)

      The order in which you want messages sorted. Default is Descending, based on time created.

      Possible values include:
      • "ASCENDING"
      • "DESCENDING"
    • NotBefore — (Date)

      The initial or starting time stamp for your requested messages.

    • NotAfter — (Date)

      The final or ending time stamp for your requested messages.

    • MaxResults — (Integer)

      The maximum number of messages that you want returned.

    • NextToken — (String)

      The token passed by previous API calls until all requested messages are returned.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel containing the requested messages.

      • NextToken — (String)

        The token passed by previous API calls until all requested messages are returned.

      • ChannelMessages — (Array<map>)

        The information about, and content of, each requested message.

        • MessageId — (String)

          The ID of the message.

        • Content — (String)

          The content of the message.

        • Metadata — (String)

          The metadata of the message.

        • Type — (String)

          The type of message.

          Possible values include:
          • "STANDARD"
          • "CONTROL"
        • CreatedTimestamp — (Date)

          The time at which the message summary was created.

        • LastUpdatedTimestamp — (Date)

          The time at which a message was last updated.

        • LastEditedTimestamp — (Date)

          The time at which a message was last edited.

        • Sender — (map)

          The message sender.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

        • Redacted — (Boolean)

          Indicates whether a message was redacted.

Returns:

  • (AWS.Request)

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

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

Lists all the moderators for a channel.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the listChannelModerators operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
chimesdkmessaging.listChannelModerators(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • MaxResults — (Integer)

      The maximum number of moderators that you want returned.

    • NextToken — (String)

      The token passed by previous API calls until all requested moderators are returned.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel.

      • NextToken — (String)

        The token passed by previous API calls until all requested moderators are returned.

      • ChannelModerators — (Array<map>)

        The information about and names of each moderator.

        • Moderator — (map)

          The data for a moderator.

          • Arn — (String)

            The ARN in an Identity.

          • Name — (String)

            The name in an Identity.

Returns:

  • (AWS.Request)

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

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

Lists all Channels created under a single Chime App as a paginated list. You can specify filters to narrow results.

Functionality & restrictions

  • Use privacy = PUBLIC to retrieve all public channels in the account.

  • Only an AppInstanceAdmin can set privacy = PRIVATE to list the private channels in an account.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the listChannels operation

var params = {
  AppInstanceArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  Privacy: PUBLIC | PRIVATE
};
chimesdkmessaging.listChannels(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: {})
    • AppInstanceArn — (String)

      The ARN of the AppInstance.

    • Privacy — (String)

      The privacy setting. PUBLIC retrieves all the public channels. PRIVATE retrieves private channels. Only an AppInstanceAdmin can retrieve private channels.

      Possible values include:
      • "PUBLIC"
      • "PRIVATE"
    • MaxResults — (Integer)

      The maximum number of channels that you want to return.

    • NextToken — (String)

      The token passed by previous API calls until all requested channels are returned.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • Channels — (Array<map>)

        The information about each channel.

        • Name — (String)

          The name of the channel.

        • ChannelArn — (String)

          The ARN of the channel.

        • Mode — (String)

          The mode of the channel.

          Possible values include:
          • "UNRESTRICTED"
          • "RESTRICTED"
        • Privacy — (String)

          The privacy setting of the channel.

          Possible values include:
          • "PUBLIC"
          • "PRIVATE"
        • Metadata — (String)

          The metadata of the channel.

        • LastMessageTimestamp — (Date)

          The time at which the last message in a channel was sent.

      • NextToken — (String)

        The token returned from previous API requests until the number of channels is reached.

Returns:

  • (AWS.Request)

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

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

A list of the channels moderated by an AppInstanceUser.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Examples:

Calling the listChannelsModeratedByAppInstanceUser operation

var params = {
  ChimeBearer: 'STRING_VALUE', /* required */
  AppInstanceUserArn: 'STRING_VALUE',
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
chimesdkmessaging.listChannelsModeratedByAppInstanceUser(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: {})
    • AppInstanceUserArn — (String)

      The ARN of the user in the moderated channel.

    • MaxResults — (Integer)

      The maximum number of channels in the request.

    • NextToken — (String)

      The token returned from previous API requests until the number of channels moderated by the user is reached.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • Channels — (Array<map>)

        The moderated channels in the request.

        • ChannelSummary — (map)

          Summary of the details of a Channel.

          • Name — (String)

            The name of the channel.

          • ChannelArn — (String)

            The ARN of the channel.

          • Mode — (String)

            The mode of the channel.

            Possible values include:
            • "UNRESTRICTED"
            • "RESTRICTED"
          • Privacy — (String)

            The privacy setting of the channel.

            Possible values include:
            • "PUBLIC"
            • "PRIVATE"
          • Metadata — (String)

            The metadata of the channel.

          • LastMessageTimestamp — (Date)

            The time at which the last message in a channel was sent.

      • NextToken — (String)

        The token returned from previous API requests until the number of channels moderated by the user is reached.

Returns:

  • (AWS.Request)

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

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

Redacts message content, but not metadata. The message exists in the back end, but the action returns null content, and the state shows as redacted.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the redactChannelMessage operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MessageId: 'STRING_VALUE' /* required */
};
chimesdkmessaging.redactChannelMessage(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: {})
    • ChannelArn — (String)

      The ARN of the channel containing the messages that you want to redact.

    • MessageId — (String)

      The ID of the message being redacted.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel containing the messages that you want to redact.

      • MessageId — (String)

        The ID of the message being redacted.

Returns:

  • (AWS.Request)

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

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

Sends a message to a particular channel that the member is a part of.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header. Also, STANDARD messages can contain 4KB of data and the 1KB of metadata. CONTROL messages can contain 30 bytes of data and no metadata.

Service Reference:

Examples:

Calling the sendChannelMessage operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  ClientRequestToken: 'STRING_VALUE', /* required */
  Content: 'STRING_VALUE', /* required */
  Persistence: PERSISTENT | NON_PERSISTENT, /* required */
  Type: STANDARD | CONTROL, /* required */
  Metadata: 'STRING_VALUE'
};
chimesdkmessaging.sendChannelMessage(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • Content — (String)

      The content of the message.

    • Type — (String)

      The type of message, STANDARD or CONTROL.

      Possible values include:
      • "STANDARD"
      • "CONTROL"
    • Persistence — (String)

      Boolean that controls whether the message is persisted on the back end. Required.

      Possible values include:
      • "PERSISTENT"
      • "NON_PERSISTENT"
    • Metadata — (String)

      The optional metadata for each message.

    • ClientRequestToken — (String)

      The Idempotency token for each client request.

      If a token is not provided, the SDK will use a version 4 UUID.
    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel.

      • MessageId — (String)

        The ID string assigned to each message.

Returns:

  • (AWS.Request)

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

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

Update a channel's attributes.

Restriction: You can't change a channel's privacy.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the updateChannel operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  Mode: UNRESTRICTED | RESTRICTED, /* required */
  Name: 'STRING_VALUE', /* required */
  Metadata: 'STRING_VALUE'
};
chimesdkmessaging.updateChannel(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • Name — (String)

      The name of the channel.

    • Mode — (String)

      The mode of the update request.

      Possible values include:
      • "UNRESTRICTED"
      • "RESTRICTED"
    • Metadata — (String)

      The metadata for the update request.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel.

Returns:

  • (AWS.Request)

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

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

Updates the content of a message.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the updateChannelMessage operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MessageId: 'STRING_VALUE', /* required */
  Content: 'STRING_VALUE',
  Metadata: 'STRING_VALUE'
};
chimesdkmessaging.updateChannelMessage(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • MessageId — (String)

      The ID string of the message being updated.

    • Content — (String)

      The content of the message being updated.

    • Metadata — (String)

      The metadata of the message being updated.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel.

      • MessageId — (String)

        The ID string of the message being updated.

Returns:

  • (AWS.Request)

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

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

The details of the time when a user last read messages in a channel.

Note: The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the updateChannelReadMarker operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE' /* required */
};
chimesdkmessaging.updateChannelReadMarker(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: {})
    • ChannelArn — (String)

      The ARN of the channel.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user that makes the API 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:

      • ChannelArn — (String)

        The ARN of the channel.

Returns:

  • (AWS.Request)

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