We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

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

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

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 ARN of the AppInstanceUser or AppInstanceBot 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 and bots 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 */
  ],
  SubChannelId: 'STRING_VALUE',
  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 or bots.

    • Type — (String)

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

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

      The ARNs of the members you want to add to the channel. Only AppInstanceUsers and AppInstanceBots can be added as a channel member.

    • ChimeBearer — (String)

      The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • SubChannelId — (String)

      The ID of the SubChannel in the request.

      Note: Only required when creating membership in a SubChannel for a moderator in an elastic channel.

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

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

        • SubChannelId — (String)

          The ID of the SubChannel.

      • 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 Amazon 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',
    ContentType: 'STRING_VALUE',
    MessageAttributes: {
      '<MessageAttributeName>': {
        StringValues: [
          'STRING_VALUE',
          /* more items */
        ]
      },
      /* '<MessageAttributeName>': ... */
    },
    Metadata: 'STRING_VALUE',
    PushNotification: {
      Body: 'STRING_VALUE',
      Title: 'STRING_VALUE',
      Type: DEFAULT | VOIP
    },
    SubChannelId: '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. For Amazon Lex V2 bot responses, this field holds a list of messages originating from the bot. For more information, refer to Processing responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.

      • Metadata — (String)

        The message metadata.

      • PushNotification — (map)

        The push notification configuration of the message.

        • Title — (String)

          The title of the push notification.

        • Body — (String)

          The body of the push notification.

        • Type — (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 channel message. For Amazon Lex V2 bot responses, the attributes are mapped to specific fields from the bot. For more information, refer to Processing responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.

        • StringValues — (Array<String>)

          The strings in a message attribute value.

      • SubChannelId — (String)

        The ID of the SubChannel.

      • ContentType — (String)

        The content type of the call-back message. For Amazon Lex V2 bot responses, the content type is application/amz-chime-lex-msgs for success responses and application/amz-chime-lex-error for failure responses. For more information, refer to Processing responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.

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 ARN of the AppInstanceUser or AppInstanceBot 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 */
  ChannelId: 'STRING_VALUE',
  ElasticChannelConfiguration: {
    MaximumSubChannels: 'NUMBER_VALUE', /* required */
    MinimumMembershipPercentage: 'NUMBER_VALUE', /* required */
    TargetMembershipsPerSubChannel: 'NUMBER_VALUE' /* required */
  },
  ExpirationSettings: {
    ExpirationCriterion: CREATED_TIMESTAMP | LAST_MESSAGE_TIMESTAMP, /* required */
    ExpirationDays: 'NUMBER_VALUE' /* required */
  },
  MemberArns: [
    'STRING_VALUE',
    /* more items */
  ],
  Metadata: 'STRING_VALUE',
  Mode: UNRESTRICTED | RESTRICTED,
  ModeratorArns: [
    'STRING_VALUE',
    /* more items */
  ],
  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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • ChannelId — (String)

      The ID of the channel in the request.

    • MemberArns — (Array<String>)

      The ARNs of the channel members in the request.

    • ModeratorArns — (Array<String>)

      The ARNs of the channel moderators in the request.

    • ElasticChannelConfiguration — (map)

      The attributes required to configure and create an elastic channel. An elastic channel can support a maximum of 1-million users, excluding moderators.

      • MaximumSubChannelsrequired — (Integer)

        The maximum number of SubChannels that you want to allow in the elastic channel.

      • TargetMembershipsPerSubChannelrequired — (Integer)

        The maximum number of members allowed in a SubChannel.

      • MinimumMembershipPercentagerequired — (Integer)

        The minimum allowed percentage of TargetMembershipsPerSubChannel users. Ceil of the calculated value is used in balancing members among SubChannels of the elastic channel.

    • ExpirationSettings — (map)

      Settings that control the interval after which the channel is automatically deleted.

      • ExpirationDaysrequired — (Integer)

        The period in days after which the system automatically deletes a channel.

      • ExpirationCriterionrequired — (String)

        The conditions that must be met for a channel to expire.

        Possible values include:
        • "CREATED_TIMESTAMP"
        • "LAST_MESSAGE_TIMESTAMP"

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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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.

      If a token is not provided, the SDK will use a version 4 UUID.

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 member 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 ARN of the AppInstanceUserArn or AppInstanceBot 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 */
  SubChannelId: 'STRING_VALUE'
};
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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • SubChannelId — (String)

      The ID of the SubChannel in the request.

      Note: Only required when creating membership in a SubChannel for a moderator in an elastic channel.

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.

      • SubChannelId — (String)

        The ID of the SubChannel in the response.

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 ARN of the AppInstanceUser or AppInstanceBotof 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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUserArn or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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 member from a channel's ban list.

Note: The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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 */
  SubChannelId: 'STRING_VALUE'
};
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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • SubChannelId — (String)

      The ID of the SubChannel in the request.

      Note: Only for use by moderators.

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 ARN of the AppInstanceUser or AppInstanceBot 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 */
  SubChannelId: 'STRING_VALUE'
};
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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • SubChannelId — (String)

      The ID of the SubChannel in the request.

      Note: Only required when deleting messages in a SubChannel that the user belongs 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.

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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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.

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

Deletes the streaming configurations for an AppInstance. For more information, see Streaming messaging data in the Amazon Chime SDK Developer Guide.

Examples:

Calling the deleteMessagingStreamingConfigurations operation

var params = {
  AppInstanceArn: 'STRING_VALUE' /* required */
};
chimesdkmessaging.deleteMessagingStreamingConfigurations(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 streaming configurations being deleted.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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.

        • ElasticChannelConfiguration — (map)

          The attributes required to configure and create an elastic channel. An elastic channel can support a maximum of 1-million members.

          • MaximumSubChannelsrequired — (Integer)

            The maximum number of SubChannels that you want to allow in the elastic channel.

          • TargetMembershipsPerSubChannelrequired — (Integer)

            The maximum number of members allowed in a SubChannel.

          • MinimumMembershipPercentagerequired — (Integer)

            The minimum allowed percentage of TargetMembershipsPerSubChannel users. Ceil of the calculated value is used in balancing members among SubChannels of the elastic channel.

        • ExpirationSettings — (map)

          Settings that control when a channel expires.

          • ExpirationDaysrequired — (Integer)

            The period in days after which the system automatically deletes a channel.

          • ExpirationCriterionrequired — (String)

            The conditions that must be met for a channel to expire.

            Possible values include:
            • "CREATED_TIMESTAMP"
            • "LAST_MESSAGE_TIMESTAMP"

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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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 */
  SubChannelId: 'STRING_VALUE'
};
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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • SubChannelId — (String)

      The ID of the SubChannel in the request. The response contains an ElasticChannelConfiguration object.

      Note: Only required to get a user’s SubChannel membership details.

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.

        • SubChannelId — (String)

          The ID of the SubChannel that a user belongs to.

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

Note: The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot 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 or bot in a channel.

    • ChimeBearer — (String)

      The ARN of the AppInstanceUser or AppInstanceBot 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 persistent message visible to the caller 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 an AppInstanceUser last marked a channel as read.

          • SubChannelId — (String)

            The ID of the SubChannel that the AppInstanceUser is a member of.

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

Note: The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot 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 user or bot in the moderated channel.

    • ChimeBearer — (String)

      The ARN of the AppInstanceUser or AppInstanceBot 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 persistent message visible to the caller 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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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 or AppInstanceBot for the specified channel. A user or a bot must be a member of the channel and own the membership in order to retrieve membership preferences. Users or bots in the AppInstanceAdmin and channel moderator roles can't retrieve preferences for other users or bots. Banned users or bots can't retrieve membership preferences for the channel from which they are banned.

Note: The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

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 ARN of the AppInstanceUser or AppInstanceBot 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 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 requested 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 ARN of the AppInstanceUser or AppInstanceBot 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 */
  SubChannelId: 'STRING_VALUE'
};
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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • SubChannelId — (String)

      The ID of the SubChannel in the request.

      Note: Only required when getting messages in a SubChannel that the user belongs 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:

      • 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 content of the channel message. For Amazon Lex V2 bot responses, this field holds a list of messages originating from the bot. For more information, refer to Processing responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.

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

        • MessageAttributes — (map<map>)

          The attributes for the channel message. For Amazon Lex V2 bot responses, the attributes are mapped to specific fields from the bot. For more information, refer to Processing responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.

          • StringValues — (Array<String>)

            The strings in a message attribute value.

        • SubChannelId — (String)

          The ID of the SubChannel.

        • ContentType — (String)

          The content type of the channel message. For Amazon Lex V2 bot responses, the content type is application/amz-chime-lex-msgs for success responses and application/amz-chime-lex-error for failure responses. For more information, refer to Processing responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.

        • Target — (Array<map>)

          The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.

          • MemberArn — (String)

            The ARN of the target channel member.

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

Message 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 ARN of the AppInstanceUser or AppInstanceBot 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 */
  SubChannelId: 'STRING_VALUE'
};
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.

    • SubChannelId — (String)

      The ID of the SubChannel in the request.

      Note: Only required when getting message status in a SubChannel that the user belongs 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:

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

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

Retrieves the data streaming configuration for an AppInstance. For more information, see Streaming messaging data in the Amazon Chime SDK Developer Guide.

Examples:

Calling the getMessagingStreamingConfigurations operation

var params = {
  AppInstanceArn: 'STRING_VALUE' /* required */
};
chimesdkmessaging.getMessagingStreamingConfigurations(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 streaming configurations.

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:

      • StreamingConfigurations — (Array<map>)

        The streaming settings.

        • DataTyperequired — (String)

          The data type of the configuration.

          Possible values include:
          • "Channel"
          • "ChannelMessage"
        • ResourceArnrequired — (String)

          The ARN of the resource in the configuration.

Returns:

  • (AWS.Request)

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

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

Lists all the users and bots banned from a particular channel.

Note: The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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',
  SubChannelId: '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 returned as part of ListChannelMemberships if no type is specified. Hidden members are only returned if the type filter in ListChannelMemberships equals HIDDEN.

      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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • SubChannelId — (String)

      The ID of the SubChannel in the request.

      Note: Only required when listing a user's memberships in a particular sub-channel of an elastic channel.

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 an AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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 user or bot.

    • 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 ARN of the AppInstanceUser or AppInstanceBot 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 information for the requested channel memberships.

        • 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 persistent message visible to the caller 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 an AppInstanceUser last marked a channel as read.

          • SubChannelId — (String)

            The ID of the SubChannel that the AppInstanceUser is a member of.

      • 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 ARN of the AppInstanceUser or AppInstanceBot 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,
  SubChannelId: 'STRING_VALUE'
};
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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • SubChannelId — (String)

      The ID of the SubChannel in the request.

      Note: Only required when listing the messages in a SubChannel that the user belongs 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:

      • 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 channel message. For Amazon Lex V2 bot responses, this field holds a list of messages originating from the bot. For more information, refer to Processing responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.

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

        • MessageAttributes — (map<map>)

          The attributes for the channel message. For Amazon Lex V2 bot responses, the attributes are mapped to specific fields from the bot. For more information, refer to Processing responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.

          • StringValues — (Array<String>)

            The strings in a message attribute value.

        • ContentType — (String)

          The content type of the channel message listed in the summary. For Amazon Lex V2 bot responses, the content type is application/amz-chime-lex-msgs for success responses and application/amz-chime-lex-error for failure responses. For more information, refer to Processing responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.

        • Target — (Array<map>)

          The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.

          • MemberArn — (String)

            The ARN of the target channel member.

      • SubChannelId — (String)

        The ID of the SubChannel in the response.

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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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 persistent message visible to the caller 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 ARN of the AppInstanceUser or AppInstanceBot 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 or bot 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 ARN of the AppInstanceUser or AppInstanceBot 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 persistent message visible to the caller 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.

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

Lists all the SubChannels in an elastic channel when given a channel ID. Available only to the app instance admins and channel moderators of elastic channels.

Service Reference:

Examples:

Calling the listSubChannels operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
chimesdkmessaging.listSubChannels(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 elastic channel.

    • ChimeBearer — (String)

      The AppInstanceUserArn of the user making the API call.

    • MaxResults — (Integer)

      The maximum number of sub-channels that you want to return.

    • NextToken — (String)

      The token passed by previous API calls until all requested sub-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:

      • ChannelArn — (String)

        The ARN of elastic channel.

      • SubChannels — (Array<map>)

        The information about each sub-channel.

        • SubChannelId — (String)

          The unique ID of a SubChannel.

        • MembershipCount — (Integer)

          The number of members in a SubChannel.

      • NextToken — (String)

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

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.

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

Sets the number of days before the channel is automatically deleted.

Note:
  • A background process deletes expired channels within 6 hours of expiration. Actual deletion times may vary.
  • Expired channels that have not yet been deleted appear as active, and you can update their expiration settings. The system honors the new settings.
  • The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the putChannelExpirationSettings operation

var params = {
  ChannelArn: 'STRING_VALUE', /* required */
  ChimeBearer: 'STRING_VALUE',
  ExpirationSettings: {
    ExpirationCriterion: CREATED_TIMESTAMP | LAST_MESSAGE_TIMESTAMP, /* required */
    ExpirationDays: 'NUMBER_VALUE' /* required */
  }
};
chimesdkmessaging.putChannelExpirationSettings(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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • ExpirationSettings — (map)

      Settings that control the interval after which a channel is deleted.

      • ExpirationDaysrequired — (Integer)

        The period in days after which the system automatically deletes a channel.

      • ExpirationCriterionrequired — (String)

        The conditions that must be met for a channel to expire.

        Possible values include:
        • "CREATED_TIMESTAMP"
        • "LAST_MESSAGE_TIMESTAMP"

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

      • ExpirationSettings — (map)

        Settings that control the interval after which a channel is deleted.

        • ExpirationDaysrequired — (Integer)

          The period in days after which the system automatically deletes a channel.

        • ExpirationCriterionrequired — (String)

          The conditions that must be met for a channel to expire.

          Possible values include:
          • "CREATED_TIMESTAMP"
          • "LAST_MESSAGE_TIMESTAMP"

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 or AppInstanceBot for the specified channel. The user or bot must be a member of the channel. Only the user or bot who owns the membership can set preferences. Users or bots in the AppInstanceAdmin and channel moderator roles can't set preferences for other users. Banned users or bots can't set membership preferences for the channel from which they are banned.

Note: The x-amz-chime-bearer request header is mandatory. Use the ARN of an AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

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 ARN of the member setting the preferences.

    • ChimeBearer — (String)

      The ARN of the AppInstanceUser or AppInstanceBot that makes 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 requested 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 requested member.

Returns:

  • (AWS.Request)

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

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

Sets the data streaming configuration for an AppInstance. For more information, see Streaming messaging data in the Amazon Chime SDK Developer Guide.

Examples:

Calling the putMessagingStreamingConfigurations operation

var params = {
  AppInstanceArn: 'STRING_VALUE', /* required */
  StreamingConfigurations: [ /* required */
    {
      DataType: Channel | ChannelMessage, /* required */
      ResourceArn: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
chimesdkmessaging.putMessagingStreamingConfigurations(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 streaming configuration.

    • StreamingConfigurations — (Array<map>)

      The streaming configurations.

      • DataTyperequired — (String)

        The data type of the configuration.

        Possible values include:
        • "Channel"
        • "ChannelMessage"
      • ResourceArnrequired — (String)

        The ARN of the resource in the configuration.

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:

      • StreamingConfigurations — (Array<map>)

        The requested streaming configurations.

        • DataTyperequired — (String)

          The data type of the configuration.

          Possible values include:
          • "Channel"
          • "ChannelMessage"
        • ResourceArnrequired — (String)

          The ARN of the resource in the configuration.

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 ARN of the AppInstanceUser or AppInstanceBot 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 */
  SubChannelId: 'STRING_VALUE'
};
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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • SubChannelId — (String)

      The ID of the SubChannel in the request.

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.

      • SubChannelId — (String)

        The ID of the SubChannel in the response.

        Note: Only required when redacting messages in a SubChannel that the user belongs to.

Returns:

  • (AWS.Request)

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

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

Allows the ChimeBearer to search channels by channel members. Users or bots can search across the channels that they belong to. Users in the AppInstanceAdmin role can search across all channels.

The x-amz-chime-bearer request header is mandatory. Use the ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header.

Service Reference:

Examples:

Calling the searchChannels operation

var params = {
  Fields: [ /* required */
    {
      Key: MEMBERS, /* required */
      Operator: EQUALS | INCLUDES, /* required */
      Values: [ /* required */
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* more items */
  ],
  ChimeBearer: 'STRING_VALUE',
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
chimesdkmessaging.searchChannels(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: {})
    • ChimeBearer — (String)

      The AppInstanceUserArn of the user making the API call.

    • Fields — (Array<map>)

      A list of the Field objects in the channel being searched.

      • Keyrequired — (String)

        An enum value that indicates the key to search the channel on. MEMBERS allows you to search channels based on memberships. You can use it with the EQUALS operator to get channels whose memberships are equal to the specified values, and with the INCLUDES operator to get channels whose memberships include the specified values.

        Possible values include:
        • "MEMBERS"
      • Valuesrequired — (Array<String>)

        The values that you want to search for, a list of strings. The values must be AppInstanceUserArns specified as a list of strings.

        Note: This operation isn't supported for AppInstanceUsers with large number of memberships.
      • Operatorrequired — (String)

        The operator used to compare field values, currently EQUALS or INCLUDES. Use the EQUALS operator to find channels whose memberships equal the specified values. Use the INCLUDES operator to find channels whose memberships include the specified values.

        Possible values include:
        • "EQUALS"
        • "INCLUDES"
    • MaxResults — (Integer)

      The maximum number of channels that you want returned.

    • NextToken — (String)

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

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

        A list of the channels in the request.

        • 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 persistent message visible to the caller in a channel was sent.

      • NextToken — (String)

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

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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in the header. Also, STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary, and you can use it in a variety of ways, such as containing a link to an attachment. CONTROL messages are limited to 30 bytes and do not contain 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 */
  ContentType: 'STRING_VALUE',
  MessageAttributes: {
    '<MessageAttributeName>': {
      StringValues: [
        'STRING_VALUE',
        /* more items */
      ]
    },
    /* '<MessageAttributeName>': ... */
  },
  Metadata: 'STRING_VALUE',
  PushNotification: {
    Body: 'STRING_VALUE',
    Title: 'STRING_VALUE',
    Type: DEFAULT | VOIP
  },
  SubChannelId: 'STRING_VALUE',
  Target: [
    {
      MemberArn: 'STRING_VALUE'
    },
    /* more items */
  ]
};
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 channel message.

    • Type — (String)

      The type of message, STANDARD or CONTROL.

      STANDARD messages can be up to 4KB in size and contain metadata. Metadata is arbitrary, and you can use it in a variety of ways, such as containing a link to an attachment.

      CONTROL messages are limited to 30 bytes and do not contain metadata.

      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 ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • PushNotification — (map)

      The push notification configuration of the message.

      • Title — (String)

        The title of the push notification.

      • Body — (String)

        The body of the push notification.

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

    • SubChannelId — (String)

      The ID of the SubChannel in the request.

    • ContentType — (String)

      The content type of the channel message.

    • Target — (Array<map>)

      The target of a message. Must be a member of the channel, such as another user, a bot, or the sender. Only the target and the sender can view targeted messages. Only users who can see targeted messages can take actions on them. However, administrators can delete targeted messages that they can’t see.

      • MemberArn — (String)

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

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

      • SubChannelId — (String)

        The ID of the SubChannel in the response.

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 ARN of the AppInstanceUser or AppInstanceBot 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 */
  Metadata: 'STRING_VALUE',
  Mode: UNRESTRICTED | RESTRICTED,
  Name: '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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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 */
  Content: 'STRING_VALUE', /* required */
  MessageId: 'STRING_VALUE', /* required */
  ContentType: 'STRING_VALUE',
  Metadata: 'STRING_VALUE',
  SubChannelId: '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 channel message.

    • Metadata — (String)

      The metadata of the message being updated.

    • ChimeBearer — (String)

      The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

    • SubChannelId — (String)

      The ID of the SubChannel in the request.

      Note: Only required when updating messages in a SubChannel that the user belongs to.
    • ContentType — (String)

      The content type of the channel message.

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

      • SubChannelId — (String)

        The ID of the SubChannel in the response.

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 ARN of the AppInstanceUser or AppInstanceBot 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 ARN of the AppInstanceUser or AppInstanceBot 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.