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

Inherits:
AWS.Service show all
Identifier:
ivschat
API Version:
2020-07-14
Defined in:
(unknown)

Overview

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

Service Description

Introduction

The Amazon IVS Chat control-plane API enables you to create and manage Amazon IVS Chat resources. You also need to integrate with the Amazon IVS Chat Messaging API, to enable users to interact with chat rooms in real time.

The API is an AWS regional service. For a list of supported regions and Amazon IVS Chat HTTPS service endpoints, see the Amazon IVS Chat information on the Amazon IVS page in the AWS General Reference.

Notes on terminology:

  • You create service applications using the Amazon IVS Chat API. We refer to these as applications.

  • You create front-end client applications (browser and Android/iOS apps) using the Amazon IVS Chat Messaging API. We refer to these as clients.

Resources

The following resources are part of Amazon IVS Chat:

  • LoggingConfiguration — A configuration that allows customers to store and record sent messages in a chat room. See the Logging Configuration endpoints for more information.

  • Room — The central Amazon IVS Chat resource through which clients connect to and exchange chat messages. See the Room endpoints for more information.

Tagging

A tag is a metadata label that you assign to an AWS resource. A tag comprises a key and a value, both set by you. For example, you might set a tag as topic:nature to label a particular video category. See Tagging AWS Resources for more information, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no service-specific constraints beyond what is documented there.

Tags can help you identify and organize your AWS resources. For example, you can use the same tag for different resources to indicate that they are related. You can also use tags to manage access (see Access Tags).

The Amazon IVS Chat API has these tag-related endpoints: TagResource, UntagResource, and ListTagsForResource. The following resource supports tagging: Room.

At most 50 tags can be applied to a resource.

API Access Security

Your Amazon IVS Chat applications (service applications and clients) must be authenticated and authorized to access Amazon IVS Chat resources. Note the differences between these concepts:

  • Authentication is about verifying identity. Requests to the Amazon IVS Chat API must be signed to verify your identity.

  • Authorization is about granting permissions. Your IAM roles need to have permissions for Amazon IVS Chat API requests.

Users (viewers) connect to a room using secure access tokens that you create using the CreateChatToken endpoint through the AWS SDK. You call CreateChatToken for every user’s chat session, passing identity and authorization information about the user.

Signing API Requests

HTTP API requests must be signed with an AWS SigV4 signature using your AWS security credentials. The AWS Command Line Interface (CLI) and the AWS SDKs take care of signing the underlying API calls for you. However, if your application calls the Amazon IVS Chat HTTP API directly, it’s your responsibility to sign the requests.

You generate a signature using valid AWS credentials for an IAM role that has permission to perform the requested action. For example, DeleteMessage requests must be made using an IAM role that has the ivschat:DeleteMessage permission.

For more information:

Amazon Resource Names (ARNs)

ARNs uniquely identify AWS resources. An ARN is required when you need to specify a resource unambiguously across all of AWS, such as in IAM policies and API calls. For more information, see Amazon Resource Names in the AWS General Reference.

Messaging Endpoints

  • DeleteMessage — Sends an event to a specific room which directs clients to delete a specific message; that is, unrender it from view and delete it from the client’s chat history. This event’s EventName is aws:DELETE_MESSAGE. This replicates the DeleteMessage WebSocket operation in the Amazon IVS Chat Messaging API.

  • DisconnectUser — Disconnects all connections using a specified user ID from a room. This replicates the DisconnectUser WebSocket operation in the Amazon IVS Chat Messaging API.

  • SendEvent — Sends an event to a room. Use this within your application’s business logic to send events to clients of a room; e.g., to notify clients to change the way the chat UI is rendered.

Chat Token Endpoint

  • CreateChatToken — Creates an encrypted token that is used by a chat participant to establish an individual WebSocket chat connection to a room. When the token is used to connect to chat, the connection is valid for the session duration specified in the request. The token becomes invalid at the token-expiration timestamp included in the response.

Room Endpoints

  • CreateRoom — Creates a room that allows clients to connect and pass messages.

  • DeleteRoom — Deletes the specified room.

  • GetRoom — Gets the specified room.

  • ListRooms — Gets summary information about all your rooms in the AWS region where the API request is processed.

  • UpdateRoom — Updates a room’s configuration.

Logging Configuration Endpoints

Tags Endpoints

  • ListTagsForResource — Gets information about AWS tags for the specified ARN.

  • TagResource — Adds or updates tags for the AWS resource with the specified ARN.

  • UntagResource — Removes tags from the resource with the specified ARN.

All the above are HTTP operations. There is a separate messaging API for managing Chat resources; see the Amazon IVS Chat Messaging API Reference.

Sending a Request Using Ivschat

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

var ivschat = new AWS.Ivschat({apiVersion: '2020-07-14'});

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

AWS.config.apiVersions = {
  ivschat: '2020-07-14',
  // other service API versions
};

var ivschat = new AWS.Ivschat();

Version:

  • 2020-07-14

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

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

Examples:

Constructing a Ivschat object

var ivschat = new AWS.Ivschat({apiVersion: '2020-07-14'});

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

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

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

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

Creates an encrypted token that is used by a chat participant to establish an individual WebSocket chat connection to a room. When the token is used to connect to chat, the connection is valid for the session duration specified in the request. The token becomes invalid at the token-expiration timestamp included in the response.

Use the capabilities field to permit an end user to send messages or moderate a room.

The attributes field securely attaches structured data to the chat session; the data is included within each message sent by the end user and received by other participants in the room. Common use cases for attributes include passing end-user profile data like an icon, display name, colors, badges, and other display features.

Encryption keys are owned by Amazon IVS Chat and never used directly by your application.

Service Reference:

Examples:

Calling the createChatToken operation

var params = {
  roomIdentifier: 'STRING_VALUE', /* required */
  userId: 'STRING_VALUE', /* required */
  attributes: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  },
  capabilities: [
    SEND_MESSAGE | DISCONNECT_USER | DELETE_MESSAGE,
    /* more items */
  ],
  sessionDurationInMinutes: 'NUMBER_VALUE'
};
ivschat.createChatToken(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: {})
    • attributes — (map<String>)

      Application-provided attributes to encode into the token and attach to a chat session. Map keys and values can contain UTF-8 encoded text. The maximum length of this field is 1 KB total.

    • capabilities — (Array<String>)

      Set of capabilities that the user is allowed to perform in the room. Default: None (the capability to view messages is implicitly included in all requests).

    • roomIdentifier — (String)

      Identifier of the room that the client is trying to access. Currently this must be an ARN.

    • sessionDurationInMinutes — (Integer)

      Session duration (in minutes), after which the session expires. Default: 60 (1 hour).

    • userId — (String)

      Application-provided ID that uniquely identifies the user associated with this token. This can be any UTF-8 encoded text.

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:

      • sessionExpirationTime — (Date)

        Time after which an end user's session is no longer valid. This is an ISO 8601 timestamp; note that this is returned as a string.

      • token — (String)

        The issued client token, encrypted.

      • tokenExpirationTime — (Date)

        Time after which the token is no longer valid and cannot be used to connect to a room. This is an ISO 8601 timestamp; note that this is returned as a string.

Returns:

  • (AWS.Request)

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

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

Creates a logging configuration that allows clients to store and record sent messages.

Service Reference:

Examples:

Calling the createLoggingConfiguration operation

var params = {
  destinationConfiguration: { /* required */
    cloudWatchLogs: {
      logGroupName: 'STRING_VALUE' /* required */
    },
    firehose: {
      deliveryStreamName: 'STRING_VALUE' /* required */
    },
    s3: {
      bucketName: 'STRING_VALUE' /* required */
    }
  },
  name: 'STRING_VALUE',
  tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
ivschat.createLoggingConfiguration(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: {})
    • destinationConfiguration — (map)

      A complex type that contains a destination configuration for where chat content will be logged. There can be only one type of destination (cloudWatchLogs, firehose, or s3) in a destinationConfiguration.

      • cloudWatchLogs — (map)

        An Amazon CloudWatch Logs destination configuration where chat activity will be logged.

        • logGroupNamerequired — (String)

          Name of the Amazon Cloudwatch Logs destination where chat activity will be logged.

      • firehose — (map)

        An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged.

        • deliveryStreamNamerequired — (String)

          Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged.

      • s3 — (map)

        An Amazon S3 destination configuration where chat activity will be logged.

        • bucketNamerequired — (String)

          Name of the Amazon S3 bucket where chat activity will be logged.

    • name — (String)

      Logging-configuration name. The value does not need to be unique.

    • tags — (map<String>)

      Tags to attach to the resource. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints on tags beyond what is documented there.

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:

      • arn — (String)

        Logging-configuration ARN, assigned by the system.

      • createTime — (Date)

        Time when the logging configuration was created. This is an ISO 8601 timestamp; note that this is returned as a string.

      • destinationConfiguration — (map)

        A complex type that contains a destination configuration for where chat content will be logged, from the request. There is only one type of destination (cloudWatchLogs, firehose, or s3) in a destinationConfiguration.

        • cloudWatchLogs — (map)

          An Amazon CloudWatch Logs destination configuration where chat activity will be logged.

          • logGroupNamerequired — (String)

            Name of the Amazon Cloudwatch Logs destination where chat activity will be logged.

        • firehose — (map)

          An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged.

          • deliveryStreamNamerequired — (String)

            Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged.

        • s3 — (map)

          An Amazon S3 destination configuration where chat activity will be logged.

          • bucketNamerequired — (String)

            Name of the Amazon S3 bucket where chat activity will be logged.

      • id — (String)

        Logging-configuration ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the logging configuration.

      • name — (String)

        Logging-configuration name, from the request (if specified).

      • state — (String)

        The state of the logging configuration. When the state is ACTIVE, the configuration is ready to log chat content.

        Possible values include:
        • "ACTIVE"
      • tags — (map<String>)

        Tags attached to the resource, from the request (if specified). Array of maps, each of the form string:string (key:value).

      • updateTime — (Date)

        Time of the logging configuration’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.

Returns:

  • (AWS.Request)

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

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

Creates a room that allows clients to connect and pass messages.

Service Reference:

Examples:

Calling the createRoom operation

var params = {
  loggingConfigurationIdentifiers: [
    'STRING_VALUE',
    /* more items */
  ],
  maximumMessageLength: 'NUMBER_VALUE',
  maximumMessageRatePerSecond: 'NUMBER_VALUE',
  messageReviewHandler: {
    fallbackResult: ALLOW | DENY,
    uri: 'STRING_VALUE'
  },
  name: 'STRING_VALUE',
  tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
ivschat.createRoom(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: {})
    • loggingConfigurationIdentifiers — (Array<String>)

      Array of logging-configuration identifiers attached to the room.

    • maximumMessageLength — (Integer)

      Maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.

    • maximumMessageRatePerSecond — (Integer)

      Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.

    • messageReviewHandler — (map)

      Configuration information for optional review of messages.

      • fallbackResult — (String)

        Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: ALLOW.

        Possible values include:
        • "ALLOW"
        • "DENY"
      • uri — (String)

        Identifier of the message review handler. Currently this must be an ARN of a lambda function.

    • name — (String)

      Room name. The value does not need to be unique.

    • tags — (map<String>)

      Tags to attach to the resource. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints beyond what is documented there.

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:

      • arn — (String)

        Room ARN, assigned by the system.

      • createTime — (Date)

        Time when the room was created. This is an ISO 8601 timestamp; note that this is returned as a string.

      • id — (String)

        Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.

      • loggingConfigurationIdentifiers — (Array<String>)

        Array of logging configurations attached to the room, from the request (if specified).

      • maximumMessageLength — (Integer)

        Maximum number of characters in a single message, from the request (if specified).

      • maximumMessageRatePerSecond — (Integer)

        Maximum number of messages per second that can be sent to the room (by all clients), from the request (if specified).

      • messageReviewHandler — (map)

        Configuration information for optional review of messages.

        • fallbackResult — (String)

          Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: ALLOW.

          Possible values include:
          • "ALLOW"
          • "DENY"
        • uri — (String)

          Identifier of the message review handler. Currently this must be an ARN of a lambda function.

      • name — (String)

        Room name, from the request (if specified).

      • tags — (map<String>)

        Tags attached to the resource, from the request (if specified).

      • updateTime — (Date)

        Time of the room’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.

Returns:

  • (AWS.Request)

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

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

Deletes the specified logging configuration.

Service Reference:

Examples:

Calling the deleteLoggingConfiguration operation

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

      Identifier of the logging configuration to be deleted.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Sends an event to a specific room which directs clients to delete a specific message; that is, unrender it from view and delete it from the client’s chat history. This event’s EventName is aws:DELETE_MESSAGE. This replicates the DeleteMessage WebSocket operation in the Amazon IVS Chat Messaging API.

Service Reference:

Examples:

Calling the deleteMessage operation

var params = {
  id: 'STRING_VALUE', /* required */
  roomIdentifier: 'STRING_VALUE', /* required */
  reason: 'STRING_VALUE'
};
ivschat.deleteMessage(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: {})
    • id — (String)

      ID of the message to be deleted. This is the Id field in the received message (see Message (Subscribe) in the Chat Messaging API).

    • reason — (String)

      Reason for deleting the message.

    • roomIdentifier — (String)

      Identifier of the room where the message should be deleted. Currently this must be an ARN.

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:

      • id — (String)

        Operation identifier, generated by Amazon IVS Chat.

Returns:

  • (AWS.Request)

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

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

Deletes the specified room.

Service Reference:

Examples:

Calling the deleteRoom operation

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

      Identifier of the room to be deleted. Currently this must be an ARN.

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.

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

Disconnects all connections using a specified user ID from a room. This replicates the DisconnectUser WebSocket operation in the Amazon IVS Chat Messaging API.

Service Reference:

Examples:

Calling the disconnectUser operation

var params = {
  roomIdentifier: 'STRING_VALUE', /* required */
  userId: 'STRING_VALUE', /* required */
  reason: 'STRING_VALUE'
};
ivschat.disconnectUser(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: {})
    • reason — (String)

      Reason for disconnecting the user.

    • roomIdentifier — (String)

      Identifier of the room from which the user's clients should be disconnected. Currently this must be an ARN.

    • userId — (String)

      ID of the user (connection) to disconnect from the room.

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.

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

Gets the specified logging configuration.

Service Reference:

Examples:

Calling the getLoggingConfiguration operation

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

      Identifier of the logging configuration to be retrieved.

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:

      • arn — (String)

        Logging-configuration ARN, from the request (if identifier was an ARN).

      • createTime — (Date)

        Time when the logging configuration was created. This is an ISO 8601 timestamp; note that this is returned as a string.

      • destinationConfiguration — (map)

        A complex type that contains a destination configuration for where chat content will be logged. There is only one type of destination (cloudWatchLogs, firehose, or s3) in a destinationConfiguration.

        • cloudWatchLogs — (map)

          An Amazon CloudWatch Logs destination configuration where chat activity will be logged.

          • logGroupNamerequired — (String)

            Name of the Amazon Cloudwatch Logs destination where chat activity will be logged.

        • firehose — (map)

          An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged.

          • deliveryStreamNamerequired — (String)

            Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged.

        • s3 — (map)

          An Amazon S3 destination configuration where chat activity will be logged.

          • bucketNamerequired — (String)

            Name of the Amazon S3 bucket where chat activity will be logged.

      • id — (String)

        Logging-configuration ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the logging configuration.

      • name — (String)

        Logging-configuration name. This value does not need to be unique.

      • state — (String)

        The state of the logging configuration. When the state is ACTIVE, the configuration is ready to log chat content.

        Possible values include:
        • "CREATING"
        • "CREATE_FAILED"
        • "DELETING"
        • "DELETE_FAILED"
        • "UPDATING"
        • "UPDATE_FAILED"
        • "ACTIVE"
      • tags — (map<String>)

        Tags attached to the resource. Array of maps, each of the form string:string (key:value).

      • updateTime — (Date)

        Time of the logging configuration’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.

Returns:

  • (AWS.Request)

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

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

Gets the specified room.

Service Reference:

Examples:

Calling the getRoom operation

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

      Identifier of the room for which the configuration is to be retrieved. Currently this must be an ARN.

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:

      • arn — (String)

        Room ARN, from the request (if identifier was an ARN).

      • createTime — (Date)

        Time when the room was created. This is an ISO 8601 timestamp; note that this is returned as a string.

      • id — (String)

        Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.

      • loggingConfigurationIdentifiers — (Array<String>)

        Array of logging configurations attached to the room.

      • maximumMessageLength — (Integer)

        Maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.

      • maximumMessageRatePerSecond — (Integer)

        Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.

      • messageReviewHandler — (map)

        Configuration information for optional review of messages.

        • fallbackResult — (String)

          Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: ALLOW.

          Possible values include:
          • "ALLOW"
          • "DENY"
        • uri — (String)

          Identifier of the message review handler. Currently this must be an ARN of a lambda function.

      • name — (String)

        Room name. The value does not need to be unique.

      • tags — (map<String>)

        Tags attached to the resource. Array of maps, each of the form string:string (key:value).

      • updateTime — (Date)

        Time of the room’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.

Returns:

  • (AWS.Request)

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

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

Gets summary information about all your logging configurations in the AWS region where the API request is processed.

Service Reference:

Examples:

Calling the listLoggingConfigurations operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
ivschat.listLoggingConfigurations(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: {})
    • maxResults — (Integer)

      Maximum number of logging configurations to return. Default: 50.

    • nextToken — (String)

      The first logging configurations to retrieve. This is used for pagination; see the nextToken response field.

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:

      • loggingConfigurations — (Array<map>)

        List of the matching logging configurations (summary information only). There is only one type of destination (cloudWatchLogs, firehose, or s3) in a destinationConfiguration.

        • arn — (String)

          Logging-configuration ARN.

        • createTime — (Date)

          Time when the logging configuration was created. This is an ISO 8601 timestamp; note that this is returned as a string.

        • destinationConfiguration — (map)

          A complex type that contains a destination configuration for where chat content will be logged.

          • cloudWatchLogs — (map)

            An Amazon CloudWatch Logs destination configuration where chat activity will be logged.

            • logGroupNamerequired — (String)

              Name of the Amazon Cloudwatch Logs destination where chat activity will be logged.

          • firehose — (map)

            An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged.

            • deliveryStreamNamerequired — (String)

              Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged.

          • s3 — (map)

            An Amazon S3 destination configuration where chat activity will be logged.

            • bucketNamerequired — (String)

              Name of the Amazon S3 bucket where chat activity will be logged.

        • id — (String)

          Logging-configuration ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.

        • name — (String)

          Logging-configuration name. The value does not need to be unique.

        • state — (String)

          The state of the logging configuration. When this is ACTIVE, the configuration is ready for logging chat content.

          Possible values include:
          • "CREATING"
          • "CREATE_FAILED"
          • "DELETING"
          • "DELETE_FAILED"
          • "UPDATING"
          • "UPDATE_FAILED"
          • "ACTIVE"
        • tags — (map<String>)

          Tags to attach to the resource. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints on tags beyond what is documented there.

        • updateTime — (Date)

          Time of the logging configuration’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.

      • nextToken — (String)

        If there are more logging configurations than maxResults, use nextToken in the request to get the next set.

Returns:

  • (AWS.Request)

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

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

Gets summary information about all your rooms in the AWS region where the API request is processed. Results are sorted in descending order of updateTime.

Service Reference:

Examples:

Calling the listRooms operation

var params = {
  loggingConfigurationIdentifier: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  messageReviewHandlerUri: 'STRING_VALUE',
  name: 'STRING_VALUE',
  nextToken: 'STRING_VALUE'
};
ivschat.listRooms(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: {})
    • loggingConfigurationIdentifier — (String)

      Logging-configuration identifier.

    • maxResults — (Integer)

      Maximum number of rooms to return. Default: 50.

    • messageReviewHandlerUri — (String)

      Filters the list to match the specified message review handler URI.

    • name — (String)

      Filters the list to match the specified room name.

    • nextToken — (String)

      The first room to retrieve. This is used for pagination; see the nextToken response field.

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:

      • nextToken — (String)

        If there are more rooms than maxResults, use nextToken in the request to get the next set.

      • rooms — (Array<map>)

        List of the matching rooms (summary information only).

        • arn — (String)

          Room ARN.

        • createTime — (Date)

          Time when the room was created. This is an ISO 8601 timestamp; note that this is returned as a string.

        • id — (String)

          Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.

        • loggingConfigurationIdentifiers — (Array<String>)

          List of logging-configuration identifiers attached to the room.

        • messageReviewHandler — (map)

          Configuration information for optional review of messages.

          • fallbackResult — (String)

            Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: ALLOW.

            Possible values include:
            • "ALLOW"
            • "DENY"
          • uri — (String)

            Identifier of the message review handler. Currently this must be an ARN of a lambda function.

        • name — (String)

          Room name. The value does not need to be unique.

        • tags — (map<String>)

          Tags attached to the resource. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints beyond what is documented there.

        • updateTime — (Date)

          Time of the room’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.

Returns:

  • (AWS.Request)

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

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

Gets information about AWS tags for the specified ARN.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE' /* required */
};
ivschat.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 to be retrieved. The ARN must be URL-encoded.

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 — (map<String>)

        Tags attached to the resource. Array of maps, each of the form string:string (key:value).

Returns:

  • (AWS.Request)

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

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

Sends an event to a room. Use this within your application’s business logic to send events to clients of a room; e.g., to notify clients to change the way the chat UI is rendered.

Service Reference:

Examples:

Calling the sendEvent operation

var params = {
  eventName: 'STRING_VALUE', /* required */
  roomIdentifier: 'STRING_VALUE', /* required */
  attributes: {
    '<String>': 'STRING_VALUE',
    /* '<String>': ... */
  }
};
ivschat.sendEvent(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: {})
    • attributes — (map<String>)

      Application-defined metadata to attach to the event sent to clients. The maximum length of the metadata is 1 KB total.

    • eventName — (String)

      Application-defined name of the event to send to clients.

    • roomIdentifier — (String)

      Identifier of the room to which the event will be sent. Currently this must be an ARN.

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:

      • id — (String)

        An identifier generated by Amazon IVS Chat. This identifier must be used in subsequent operations for this message, such as DeleteMessage.

Returns:

  • (AWS.Request)

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

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

Adds or updates tags for the AWS resource with the specified ARN.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: { /* required */
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
ivschat.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 ARN of the resource to be tagged. The ARN must be URL-encoded.

    • tags — (map<String>)

      Array of tags to be added or updated. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints beyond what is documented there.

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 tags from the resource with the specified ARN.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
ivschat.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 ARN of the resource to be untagged. The ARN must be URL-encoded.

    • tagKeys — (Array<String>)

      Array of tags to be removed. Array of maps, each of the form string:string (key:value). See Tagging AWS Resources for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS Chat has no constraints beyond what is documented there.

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.

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

Updates a specified logging configuration.

Service Reference:

Examples:

Calling the updateLoggingConfiguration operation

var params = {
  identifier: 'STRING_VALUE', /* required */
  destinationConfiguration: {
    cloudWatchLogs: {
      logGroupName: 'STRING_VALUE' /* required */
    },
    firehose: {
      deliveryStreamName: 'STRING_VALUE' /* required */
    },
    s3: {
      bucketName: 'STRING_VALUE' /* required */
    }
  },
  name: 'STRING_VALUE'
};
ivschat.updateLoggingConfiguration(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: {})
    • destinationConfiguration — (map)

      A complex type that contains a destination configuration for where chat content will be logged. There can be only one type of destination (cloudWatchLogs, firehose, or s3) in a destinationConfiguration.

      • cloudWatchLogs — (map)

        An Amazon CloudWatch Logs destination configuration where chat activity will be logged.

        • logGroupNamerequired — (String)

          Name of the Amazon Cloudwatch Logs destination where chat activity will be logged.

      • firehose — (map)

        An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged.

        • deliveryStreamNamerequired — (String)

          Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged.

      • s3 — (map)

        An Amazon S3 destination configuration where chat activity will be logged.

        • bucketNamerequired — (String)

          Name of the Amazon S3 bucket where chat activity will be logged.

    • identifier — (String)

      Identifier of the logging configuration to be updated.

    • name — (String)

      Logging-configuration name. The value does not need to be unique.

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:

      • arn — (String)

        Logging-configuration ARN, from the request (if identifier was an ARN).

      • createTime — (Date)

        Time when the logging configuration was created. This is an ISO 8601 timestamp; note that this is returned as a string.

      • destinationConfiguration — (map)

        A complex type that contains a destination configuration for where chat content will be logged, from the request. There is only one type of destination (cloudWatchLogs, firehose, or s3) in a destinationConfiguration.

        • cloudWatchLogs — (map)

          An Amazon CloudWatch Logs destination configuration where chat activity will be logged.

          • logGroupNamerequired — (String)

            Name of the Amazon Cloudwatch Logs destination where chat activity will be logged.

        • firehose — (map)

          An Amazon Kinesis Data Firehose destination configuration where chat activity will be logged.

          • deliveryStreamNamerequired — (String)

            Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged.

        • s3 — (map)

          An Amazon S3 destination configuration where chat activity will be logged.

          • bucketNamerequired — (String)

            Name of the Amazon S3 bucket where chat activity will be logged.

      • id — (String)

        Logging-configuration ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.

      • name — (String)

        Logging-configuration name, from the request (if specified).

      • state — (String)

        The state of the logging configuration. When the state is ACTIVE, the configuration is ready to log chat content.

        Possible values include:
        • "ACTIVE"
      • tags — (map<String>)

        Tags attached to the resource. Array of maps, each of the form string:string (key:value).

      • updateTime — (Date)

        Time of the logging configuration’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.

Returns:

  • (AWS.Request)

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

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

Updates a room’s configuration.

Service Reference:

Examples:

Calling the updateRoom operation

var params = {
  identifier: 'STRING_VALUE', /* required */
  loggingConfigurationIdentifiers: [
    'STRING_VALUE',
    /* more items */
  ],
  maximumMessageLength: 'NUMBER_VALUE',
  maximumMessageRatePerSecond: 'NUMBER_VALUE',
  messageReviewHandler: {
    fallbackResult: ALLOW | DENY,
    uri: 'STRING_VALUE'
  },
  name: 'STRING_VALUE'
};
ivschat.updateRoom(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: {})
    • identifier — (String)

      Identifier of the room to be updated. Currently this must be an ARN.

    • loggingConfigurationIdentifiers — (Array<String>)

      Array of logging-configuration identifiers attached to the room.

    • maximumMessageLength — (Integer)

      The maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.

    • maximumMessageRatePerSecond — (Integer)

      Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.

    • messageReviewHandler — (map)

      Configuration information for optional review of messages. Specify an empty uri string to disassociate a message review handler from the specified room.

      • fallbackResult — (String)

        Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: ALLOW.

        Possible values include:
        • "ALLOW"
        • "DENY"
      • uri — (String)

        Identifier of the message review handler. Currently this must be an ARN of a lambda function.

    • name — (String)

      Room name. The value does not need to be unique.

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:

      • arn — (String)

        Room ARN, from the request (if identifier was an ARN).

      • createTime — (Date)

        Time when the room was created. This is an ISO 8601 timestamp; note that this is returned as a string.

      • id — (String)

        Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.

      • loggingConfigurationIdentifiers — (Array<String>)

        Array of logging configurations attached to the room, from the request (if specified).

      • maximumMessageLength — (Integer)

        Maximum number of characters in a single message, from the request (if specified).

      • maximumMessageRatePerSecond — (Integer)

        Maximum number of messages per second that can be sent to the room (by all clients), from the request (if specified).

      • messageReviewHandler — (map)

        Configuration information for optional review of messages.

        • fallbackResult — (String)

          Specifies the fallback behavior (whether the message is allowed or denied) if the handler does not return a valid response, encounters an error, or times out. (For the timeout period, see Service Quotas.) If allowed, the message is delivered with returned content to all users connected to the room. If denied, the message is not delivered to any user. Default: ALLOW.

          Possible values include:
          • "ALLOW"
          • "DENY"
        • uri — (String)

          Identifier of the message review handler. Currently this must be an ARN of a lambda function.

      • name — (String)

        Room name, from the request (if specified).

      • tags — (map<String>)

        Tags attached to the resource. Array of maps, each of the form string:string (key:value).

      • updateTime — (Date)

        Time of the room’s last update. This is an ISO 8601 timestamp; note that this is returned as a string.

Returns:

  • (AWS.Request)

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