You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and 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 Amazon Chime SDK messaging

Sending a Request Using ChimeSDKMessaging

var chimesdkmessaging = new AWS.ChimeSDKMessaging();
chimesdkmessaging.associateChannelFlow(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 collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

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

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

Associates a channel flow with a channel. Once associated, all messages to that channel go through channel flow processors. To stop processing, use the DisassociateChannelFlow API.

Note: Only administrators or channel moderators can associate a channel flow. 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 associateChannelFlow operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChannelFlowArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE' /* required */
};
chimesdkmessaging.associateChannelFlow(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.

    • ChannelFlowArn — (String)

      The ARN of the channel flow.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user making 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.

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

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

Calls back Chime SDK Messaging with a processing response message. This should be invoked from the processor Lambda. This is a developer API.

You can return one of the following processing responses:

  • Update message content or metadata

  • Deny a message

  • Make no changes to the message

Service Reference:

Examples:

Calling the channelFlowCallback operation

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

      The identifier passed to the processor by the service when invoked. Use the identifier to call back the service.

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

      The ARN of the channel.

    • DeleteResource — (Boolean)

      When a processor determines that a message needs to be DENIED, pass this parameter with a value of true.

    • ChannelMessage — (map)

      Stores information about the processed message.

      • MessageIdrequired — (String)

        The message ID.

      • Content — (String)

        The message content.

      • Metadata — (String)

        The message metadata.

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.

      • CallbackId — (String)

        The call back ID passed in the request.

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 in a tag.

      • Valuerequired — (String)

        The value in a 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 AppInstanceUserArn 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.

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

Creates a channel flow, a container for processors. Processors are AWS Lambda functions that perform actions on chat messages, such as stripping out profanity. You can associate channel flows with channels, and the processors in the channel flow then take action on all messages sent to that channel. This is a developer API.

Channel flows process the following items:

  1. New and updated messages

  2. Persistent and non-persistent messages

  3. The Standard message type

Note: Channel flows don't process Control or System messages. For more information about the message types provided by Chime SDK Messaging, refer to Message types in the Amazon Chime developer guide.

Service Reference:

Examples:

Calling the createChannelFlow operation

var params = {
  AppInstanceArn: 'STRING_VALUE', /* required */
  ClientRequestToken: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  Processors: [ /* required */
    {
      Configuration: { /* required */
        Lambda: { /* required */
          InvocationType: ASYNC, /* required */
          ResourceArn: 'STRING_VALUE' /* required */
        }
      },
      ExecutionOrder: 'NUMBER_VALUE', /* required */
      FallbackAction: CONTINUE | ABORT, /* required */
      Name: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
chimesdkmessaging.createChannelFlow(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 flow request.

    • Processors — (Array<map>)

      Information about the processor Lambda functions.

      • Namerequired — (String)

        The name of the channel flow.

      • Configurationrequired — (map)

        The information about the type of processor and its identifier.

        • Lambdarequired — (map)

          Indicates that the processor is of type Lambda.

          • ResourceArnrequired — (String)

            The ARN of the Lambda message processing function.

          • InvocationTyperequired — (String)

            Controls how the Lambda function is invoked.

            Possible values include:
            • "ASYNC"
      • ExecutionOrderrequired — (Integer)

        The sequence in which processors run. If you have multiple processors in a channel flow, message processing goes through each processor in the sequence. The value determines the sequence. At this point, we support only 1 processor within a flow.

      • FallbackActionrequired — (String)

        Determines whether to continue with message processing or stop it in cases where communication with a processor fails. If a processor has a fallback action of ABORT and communication with it fails, the processor sets the message status to FAILED and does not send the message to any recipients. Note that if the last processor in the channel flow sequence has a fallback action of CONTINUE and communication with the processor fails, then the message is considered processed and sent to recipients of the channel.

        Possible values include:
        • "CONTINUE"
        • "ABORT"
    • Name — (String)

      The name of the channel flow.

    • Tags — (Array<map>)

      The tags for the creation request.

      • Keyrequired — (String)

        The key in a tag.

      • Valuerequired — (String)

        The value in a tag.

    • ClientRequestToken — (String)

      The client token for the request. An Idempotency token.

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:

      • ChannelFlowArn — (String)

        The ARN of the channel flow.

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 field in ChannelMembership 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 AppInstanceUserArn 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 AppInstanceUserArn 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.

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

Deletes a channel flow, an irreversible process. This is a developer API.

Note: This API works only when the channel flow is not associated with any channel. To get a list of all channels that a channel flow is associated with, use the ListChannelsAssociatedWithChannelFlow API. Use the DisassociateChannelFlow API to disassociate a channel flow from all channels.

Service Reference:

Examples:

Calling the deleteChannelFlow operation

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

      The ARN of the channel flow.

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

        • ChannelFlowArn — (String)

          The ARN of the channel flow.

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

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

Returns the full details of a channel flow in an Amazon Chime AppInstance. This is a developer API.

Service Reference:

Examples:

Calling the describeChannelFlow operation

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

      The ARN of the channel flow.

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:

      • ChannelFlow — (map)

        The channel flow details.

        • ChannelFlowArn — (String)

          The ARN of the channel flow.

        • Processors — (Array<map>)

          Information about the processor Lambda functions.

          • Namerequired — (String)

            The name of the channel flow.

          • Configurationrequired — (map)

            The information about the type of processor and its identifier.

            • Lambdarequired — (map)

              Indicates that the processor is of type Lambda.

              • ResourceArnrequired — (String)

                The ARN of the Lambda message processing function.

              • InvocationTyperequired — (String)

                Controls how the Lambda function is invoked.

                Possible values include:
                • "ASYNC"
          • ExecutionOrderrequired — (Integer)

            The sequence in which processors run. If you have multiple processors in a channel flow, message processing goes through each processor in the sequence. The value determines the sequence. At this point, we support only 1 processor within a flow.

          • FallbackActionrequired — (String)

            Determines whether to continue with message processing or stop it in cases where communication with a processor fails. If a processor has a fallback action of ABORT and communication with it fails, the processor sets the message status to FAILED and does not send the message to any recipients. Note that if the last processor in the channel flow sequence has a fallback action of CONTINUE and communication with the processor fails, then the message is considered processed and sent to recipients of the channel.

            Possible values include:
            • "CONTINUE"
            • "ABORT"
        • Name — (String)

          The name of the channel flow.

        • CreatedTimestamp — (Date)

          The time at which the channel flow was created.

        • LastUpdatedTimestamp — (Date)

          The time at which a channel flow was updated.

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

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

Disassociates a channel flow from all its channels. Once disassociated, all messages to that channel stop going through the channel flow processor.

Note: Only administrators or channel moderators can disassociate a channel flow. 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 disassociateChannelFlow operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChannelFlowArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE' /* required */
};
chimesdkmessaging.disassociateChannelFlow(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.

    • ChannelFlowArn — (String)

      The ARN of the channel flow.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user making 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.

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

Gets the membership preferences of an AppInstanceUser for the specified channel. The AppInstanceUser must be a member of the channel. Only the AppInstanceUser who owns the membership can retrieve preferences. Users in the AppInstanceAdmin and channel moderator roles can't retrieve preferences for other users. Banned users can't retrieve membership preferences for the channel from which they are banned.

Service Reference:

Examples:

Calling the getChannelMembershipPreferences operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MemberArn: 'STRING_VALUE' /* required */
};
chimesdkmessaging.getChannelMembershipPreferences(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 AppInstanceUserArn of the member retrieving the preferences.

    • ChimeBearer — (String)

      The AppInstanceUserARN of the user making 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 details of a user.

        • Arn — (String)

          The ARN in an Identity.

        • Name — (String)

          The name in an Identity.

      • Preferences — (map)

        The channel membership preferences for an AppInstanceUser .

        • PushNotifications — (map)

          The push notification configuration of a message.

          • AllowNotificationsrequired — (String)

            Enum value that indicates which push notifications to send to the requested member of a channel. ALL sends all push notifications, NONE sends no push notifications, FILTERED sends only filtered push notifications.

            Possible values include:
            • "ALL"
            • "NONE"
            • "FILTERED"
          • FilterRule — (String)

            The simple JSON object used to send a subset of a push notification to the requsted member.

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"
        • Status — (map)

          The status of the channel message.

          • Value — (String)

            The message status value.

            Possible values include:
            • "SENT"
            • "PENDING"
            • "FAILED"
            • "DENIED"
          • Detail — (String)

            Contains more details about the messasge status.

        • MessageAttributes — (map<map>)

          The attributes for the message, used for message filtering along with a FilterRule defined in the PushNotificationPreferences.

          • StringValues — (Array<String>)

            The strings in a message attribute value.

Returns:

  • (AWS.Request)

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

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

Gets message status for a specified messageId. Use this API to determine the intermediate status of messages going through channel flow processing. The API provides an alternative to retrieving message status if the event was not received because a client wasn't connected to a websocket.

Messages can have any one of these statuses.

SENT

Message processed successfully

PENDING

Ongoing processing

FAILED

Processing failed

DENIED

Messasge denied by the processor

Note:
  • This API does not return statuses for denied messages, because we don't store them once the processor denies them.
  • Only the message sender can invoke this API.
  • 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 getChannelMessageStatus operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MessageId: 'STRING_VALUE' /* required */
};
chimesdkmessaging.getChannelMessageStatus(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 making 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:

      • Status — (map)

        The message status and details.

        • Value — (String)

          The message status value.

          Possible values include:
          • "SENT"
          • "PENDING"
          • "FAILED"
          • "DENIED"
        • Detail — (String)

          Contains more details about the messasge status.

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.

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

Returns a paginated lists of all the channel flows created under a single Chime. This is a developer API.

Service Reference:

Examples:

Calling the listChannelFlows operation

var params = {
  AppInstanceArn: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
chimesdkmessaging.listChannelFlows(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 app instance.

    • MaxResults — (Integer)

      The maximum number of channel flows that you want to return.

    • NextToken — (String)

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

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:

      • ChannelFlows — (Array<map>)

        The information about each channel flow.

        • ChannelFlowArn — (String)

          The ARN of the channel flow.

        • Name — (String)

          The name of the channel flow.

        • Processors — (Array<map>)

          Information about the processor Lambda functions.

          • Namerequired — (String)

            The name of the channel flow.

          • Configurationrequired — (map)

            The information about the type of processor and its identifier.

            • Lambdarequired — (map)

              Indicates that the processor is of type Lambda.

              • ResourceArnrequired — (String)

                The ARN of the Lambda message processing function.

              • InvocationTyperequired — (String)

                Controls how the Lambda function is invoked.

                Possible values include:
                • "ASYNC"
          • ExecutionOrderrequired — (Integer)

            The sequence in which processors run. If you have multiple processors in a channel flow, message processing goes through each processor in the sequence. The value determines the sequence. At this point, we support only 1 processor within a flow.

          • FallbackActionrequired — (String)

            Determines whether to continue with message processing or stop it in cases where communication with a processor fails. If a processor has a fallback action of ABORT and communication with it fails, the processor sets the message status to FAILED and does not send the message to any recipients. Note that if the last processor in the channel flow sequence has a fallback action of CONTINUE and communication with the processor fails, then the message is considered processed and sent to recipients of the channel.

            Possible values include:
            • "CONTINUE"
            • "ABORT"
      • NextToken — (String)

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

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.

If you want to list the channels to which a specific app instance user belongs, see the ListChannelMembershipsForAppInstanceUser API.

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.

        • Status — (map)

          The message status. The status value is SENT for messages sent to a channel without a channel flow. For channels associated with channel flow, the value determines the processing stage.

          • Value — (String)

            The message status value.

            Possible values include:
            • "SENT"
            • "PENDING"
            • "FAILED"
            • "DENIED"
          • Detail — (String)

            Contains more details about the messasge status.

        • MessageAttributes — (map<map>)

          The message attribues listed in a the summary of a channel message.

          • StringValues — (Array<String>)

            The strings in a message attribute value.

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.

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

Lists all channels associated with a specified channel flow. You can associate a channel flow with multiple channels, but you can only associate a channel with one channel flow. This is a developer API.

Examples:

Calling the listChannelsAssociatedWithChannelFlow operation

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

      The ARN of the channel flow.

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

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

        • ChannelArn — (String)

          The ARN of the 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.

      • NextToken — (String)

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

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.

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

Lists the tags applied to an Amazon Chime SDK messaging resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

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

      The ARN of 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. The data object has the following properties:

      • Tags — (Array<map>)

        The tag key-value pairs.

        • Keyrequired — (String)

          The key in a tag.

        • Valuerequired — (String)

          The value in a tag.

Returns:

  • (AWS.Request)

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

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

Sets the membership preferences of an AppInstanceUser for the specified channel. The AppInstanceUser must be a member of the channel. Only the AppInstanceUser who owns the membership can set preferences. Users in the AppInstanceAdmin and channel moderator roles can't set preferences for other users. Banned users can't set membership preferences for the channel from which they are banned.

Service Reference:

Examples:

Calling the putChannelMembershipPreferences operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MemberArn: 'STRING_VALUE', /* required */
  Preferences: { /* required */
    PushNotifications: {
      AllowNotifications: ALL | NONE | FILTERED, /* required */
      FilterRule: 'STRING_VALUE'
    }
  }
};
chimesdkmessaging.putChannelMembershipPreferences(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 AppInstanceUserArn of the member setting the preferences.

    • ChimeBearer — (String)

      The AppInstanceUserARN of the user making the API call.

    • Preferences — (map)

      The channel membership preferences of an AppInstanceUser .

      • PushNotifications — (map)

        The push notification configuration of a message.

        • AllowNotificationsrequired — (String)

          Enum value that indicates which push notifications to send to the requested member of a channel. ALL sends all push notifications, NONE sends no push notifications, FILTERED sends only filtered push notifications.

          Possible values include:
          • "ALL"
          • "NONE"
          • "FILTERED"
        • FilterRule — (String)

          The simple JSON object used to send a subset of a push notification to the requsted member.

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 details of a user.

        • Arn — (String)

          The ARN in an Identity.

        • Name — (String)

          The name in an Identity.

      • Preferences — (map)

        The ARN and metadata of the member being added.

        • PushNotifications — (map)

          The push notification configuration of a message.

          • AllowNotificationsrequired — (String)

            Enum value that indicates which push notifications to send to the requested member of a channel. ALL sends all push notifications, NONE sends no push notifications, FILTERED sends only filtered push notifications.

            Possible values include:
            • "ALL"
            • "NONE"
            • "FILTERED"
          • FilterRule — (String)

            The simple JSON object used to send a subset of a push notification to the requsted member.

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 */
  MessageAttributes: {
    '<MessageAttributeName>': {
      StringValues: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* '<MessageAttributeName>': ... */
  },
  Metadata: 'STRING_VALUE',
  PushNotification: {
    Body: 'STRING_VALUE', /* required */
    Title: 'STRING_VALUE', /* required */
    Type: DEFAULT | VOIP /* required */
  }
};
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.

    • PushNotification — (map)

      The push notification configuration of the message.

      • Titlerequired — (String)

        The title of the push notification.

      • Bodyrequired — (String)

        The body of the push notification.

      • Typerequired — (String)

        Enum value that indicates the type of the push notification for a message. DEFAULT: Normal mobile push notification. VOIP: VOIP mobile push notification.

        Possible values include:
        • "DEFAULT"
        • "VOIP"
    • MessageAttributes — (map<map>)

      The attributes for the message, used for message filtering along with a FilterRule defined in the PushNotificationPreferences.

      • StringValues — (Array<String>)

        The strings in a message attribute value.

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.

      • Status — (map)

        The status of the channel message.

        • Value — (String)

          The message status value.

          Possible values include:
          • "SENT"
          • "PENDING"
          • "FAILED"
          • "DENIED"
        • Detail — (String)

          Contains more details about the messasge status.

Returns:

  • (AWS.Request)

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

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

Applies the specified tags to the specified Amazon Chime SDK messaging resource.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  Tags: [ /* required */
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
chimesdkmessaging.tagResource(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: {})
    • ResourceARN — (String)

      The resource ARN.

    • Tags — (Array<map>)

      The tag key-value pairs.

      • Keyrequired — (String)

        The key in a tag.

      • Valuerequired — (String)

        The value in a tag.

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.

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

Removes the specified tags from the specified Amazon Chime SDK messaging resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceARN: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
chimesdkmessaging.untagResource(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: {})
    • ResourceARN — (String)

      The resource ARN.

    • TagKeys — (Array<String>)

      The tag keys.

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.

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.

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

Updates channel flow attributes. This is a developer API.

Service Reference:

Examples:

Calling the updateChannelFlow operation

var params = {
  ChannelFlowArn: 'STRING_VALUE', /* required */
  Name: 'STRING_VALUE', /* required */
  Processors: [ /* required */
    {
      Configuration: { /* required */
        Lambda: { /* required */
          InvocationType: ASYNC, /* required */
          ResourceArn: 'STRING_VALUE' /* required */
        }
      },
      ExecutionOrder: 'NUMBER_VALUE', /* required */
      FallbackAction: CONTINUE | ABORT, /* required */
      Name: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
chimesdkmessaging.updateChannelFlow(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: {})
    • ChannelFlowArn — (String)

      The ARN of the channel flow.

    • Processors — (Array<map>)

      Information about the processor Lambda functions

      • Namerequired — (String)

        The name of the channel flow.

      • Configurationrequired — (map)

        The information about the type of processor and its identifier.

        • Lambdarequired — (map)

          Indicates that the processor is of type Lambda.

          • ResourceArnrequired — (String)

            The ARN of the Lambda message processing function.

          • InvocationTyperequired — (String)

            Controls how the Lambda function is invoked.

            Possible values include:
            • "ASYNC"
      • ExecutionOrderrequired — (Integer)

        The sequence in which processors run. If you have multiple processors in a channel flow, message processing goes through each processor in the sequence. The value determines the sequence. At this point, we support only 1 processor within a flow.

      • FallbackActionrequired — (String)

        Determines whether to continue with message processing or stop it in cases where communication with a processor fails. If a processor has a fallback action of ABORT and communication with it fails, the processor sets the message status to FAILED and does not send the message to any recipients. Note that if the last processor in the channel flow sequence has a fallback action of CONTINUE and communication with the processor fails, then the message is considered processed and sent to recipients of the channel.

        Possible values include:
        • "CONTINUE"
        • "ABORT"
    • Name — (String)

      The name of the channel flow.

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:

      • ChannelFlowArn — (String)

        The ARN of the channel flow.

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.

      • Status — (map)

        The status of the message update.

        • Value — (String)

          The message status value.

          Possible values include:
          • "SENT"
          • "PENDING"
          • "FAILED"
          • "DENIED"
        • Detail — (String)

          Contains more details about the messasge status.

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.