Amazon Chime SDK Messaging

2021/10/19 - Amazon Chime SDK Messaging - 13 new5 updated api methods

Changes  The Amazon Chime SDK now allows developers to execute business logic on in-flight messages before they are delivered to members of a messaging channel with channel flows.

DescribeChannelFlow (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.describe_channel_flow(
    ChannelFlowArn='string'
)
type ChannelFlowArn:

string

param ChannelFlowArn:

[REQUIRED]

The ARN of the channel flow.

rtype:

dict

returns:

Response Syntax

{
    'ChannelFlow': {
        'ChannelFlowArn': 'string',
        'Processors': [
            {
                'Name': 'string',
                'Configuration': {
                    'Lambda': {
                        'ResourceArn': 'string',
                        'InvocationType': 'ASYNC'
                    }
                },
                'ExecutionOrder': 123,
                'FallbackAction': 'CONTINUE'|'ABORT'
            },
        ],
        'Name': 'string',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'LastUpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • ChannelFlow (dict) --

      The channel flow details.

      • ChannelFlowArn (string) --

        The ARN of the channel flow.

      • Processors (list) --

        Information about the processor Lambda functions.

        • (dict) --

          The information about a processor in a channel flow.

          • Name (string) --

            The name of the channel flow.

          • Configuration (dict) --

            The information about the type of processor and its identifier.

            • Lambda (dict) --

              Indicates that the processor is of type Lambda.

              • ResourceArn (string) --

                The ARN of the Lambda message processing function.

              • InvocationType (string) --

                Controls how the Lambda function is invoked.

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

          • FallbackAction (string) --

            Determines whether to continue or stop processing if communication with processor fails. If the last processor in a channel flow sequence has a fallback action of CONTINUE, and communication with the processor fails, the message is considered processed and sent to the recipients in the channel.

      • Name (string) --

        The name of the channel flow.

      • CreatedTimestamp (datetime) --

        The time at which the channel flow was created.

      • LastUpdatedTimestamp (datetime) --

        The time at which a channel flow was updated.

DisassociateChannelFlow (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.disassociate_channel_flow(
    ChannelArn='string',
    ChannelFlowArn='string',
    ChimeBearer='string'
)
type ChannelArn:

string

param ChannelArn:

[REQUIRED]

The ARN of the channel.

type ChannelFlowArn:

string

param ChannelFlowArn:

[REQUIRED]

The ARN of the channel flow.

type ChimeBearer:

string

param ChimeBearer:

[REQUIRED]

The AppInstanceUserArn of the user making the API call.

returns:

None

GetChannelMessageStatus (new) Link ¶

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

Messages can have any one of these statuses.

SENT

Message processed successfully

PENDING

Ongoing processing

FAILED

Processing failed

DENIED

Messasge denied by the processor

See also: AWS API Documentation

Request Syntax

client.get_channel_message_status(
    ChannelArn='string',
    MessageId='string',
    ChimeBearer='string'
)
type ChannelArn:

string

param ChannelArn:

[REQUIRED]

The ARN of the channel

type MessageId:

string

param MessageId:

[REQUIRED]

The ID of the message.

type ChimeBearer:

string

param ChimeBearer:

[REQUIRED]

The AppInstanceUserArn of the user making the API call.

rtype:

dict

returns:

Response Syntax

{
    'Status': {
        'Value': 'SENT'|'PENDING'|'FAILED'|'DENIED',
        'Detail': 'string'
    }
}

Response Structure

  • (dict) --

    • Status (dict) --

      The message status and details.

      • Value (string) --

        The message status value.

      • Detail (string) --

        Contains more details about the messasge status.

UntagResource (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    ResourceARN='string',
    TagKeys=[
        'string',
    ]
)
type ResourceARN:

string

param ResourceARN:

[REQUIRED]

The resource ARN.

type TagKeys:

list

param TagKeys:

[REQUIRED]

The tag keys.

  • (string) --

returns:

None

UpdateChannelFlow (new) Link ¶

Updates channel flow attributes. This is a developer API.

See also: AWS API Documentation

Request Syntax

client.update_channel_flow(
    ChannelFlowArn='string',
    Processors=[
        {
            'Name': 'string',
            'Configuration': {
                'Lambda': {
                    'ResourceArn': 'string',
                    'InvocationType': 'ASYNC'
                }
            },
            'ExecutionOrder': 123,
            'FallbackAction': 'CONTINUE'|'ABORT'
        },
    ],
    Name='string'
)
type ChannelFlowArn:

string

param ChannelFlowArn:

[REQUIRED]

The ARN of the channel flow.

type Processors:

list

param Processors:

[REQUIRED]

Information about the processor Lambda functions

  • (dict) --

    The information about a processor in a channel flow.

    • Name (string) -- [REQUIRED]

      The name of the channel flow.

    • Configuration (dict) -- [REQUIRED]

      The information about the type of processor and its identifier.

      • Lambda (dict) -- [REQUIRED]

        Indicates that the processor is of type Lambda.

        • ResourceArn (string) -- [REQUIRED]

          The ARN of the Lambda message processing function.

        • InvocationType (string) -- [REQUIRED]

          Controls how the Lambda function is invoked.

    • ExecutionOrder (integer) -- [REQUIRED]

      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.

    • FallbackAction (string) -- [REQUIRED]

      Determines whether to continue or stop processing if communication with processor fails. If the last processor in a channel flow sequence has a fallback action of CONTINUE, and communication with the processor fails, the message is considered processed and sent to the recipients in the channel.

type Name:

string

param Name:

[REQUIRED]

The name of the channel flow.

rtype:

dict

returns:

Response Syntax

{
    'ChannelFlowArn': 'string'
}

Response Structure

  • (dict) --

    • ChannelFlowArn (string) --

      The ARN of the channel flow.

AssociateChannelFlow (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.associate_channel_flow(
    ChannelArn='string',
    ChannelFlowArn='string',
    ChimeBearer='string'
)
type ChannelArn:

string

param ChannelArn:

[REQUIRED]

The ARN of the channel.

type ChannelFlowArn:

string

param ChannelFlowArn:

[REQUIRED]

The ARN of the channel flow.

type ChimeBearer:

string

param ChimeBearer:

[REQUIRED]

The AppInstanceUserArn of the user making the API call.

returns:

None

ListChannelFlows (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.list_channel_flows(
    AppInstanceArn='string',
    MaxResults=123,
    NextToken='string'
)
type AppInstanceArn:

string

param AppInstanceArn:

[REQUIRED]

The ARN of the app instance.

type MaxResults:

integer

param MaxResults:

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

type NextToken:

string

param NextToken:

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

rtype:

dict

returns:

Response Syntax

{
    'ChannelFlows': [
        {
            'ChannelFlowArn': 'string',
            'Name': 'string',
            'Processors': [
                {
                    'Name': 'string',
                    'Configuration': {
                        'Lambda': {
                            'ResourceArn': 'string',
                            'InvocationType': 'ASYNC'
                        }
                    },
                    'ExecutionOrder': 123,
                    'FallbackAction': 'CONTINUE'|'ABORT'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • ChannelFlows (list) --

      The information about each channel flow.

      • (dict) --

        Summary of details of a channel flow.

        • ChannelFlowArn (string) --

          The ARN of the channel flow.

        • Name (string) --

          The name of the channel flow.

        • Processors (list) --

          Information about the processor Lambda functions.

          • (dict) --

            The information about a processor in a channel flow.

            • Name (string) --

              The name of the channel flow.

            • Configuration (dict) --

              The information about the type of processor and its identifier.

              • Lambda (dict) --

                Indicates that the processor is of type Lambda.

                • ResourceArn (string) --

                  The ARN of the Lambda message processing function.

                • InvocationType (string) --

                  Controls how the Lambda function is invoked.

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

            • FallbackAction (string) --

              Determines whether to continue or stop processing if communication with processor fails. If the last processor in a channel flow sequence has a fallback action of CONTINUE, and communication with the processor fails, the message is considered processed and sent to the recipients in the channel.

    • NextToken (string) --

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

ChannelFlowCallback (new) Link ¶

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

You can return one of the following processing responses:

  • Update message content or metadata

  • Deny a message

  • Make no changes to the message

See also: AWS API Documentation

Request Syntax

client.channel_flow_callback(
    CallbackId='string',
    ChannelArn='string',
    DeleteResource=True|False,
    ChannelMessage={
        'MessageId': 'string',
        'Content': 'string',
        'Metadata': 'string'
    }
)
type CallbackId:

string

param CallbackId:

[REQUIRED]

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

This field is autopopulated if not provided.

type ChannelArn:

string

param ChannelArn:

[REQUIRED]

The ARN of the channel.

type DeleteResource:

boolean

param DeleteResource:

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

type ChannelMessage:

dict

param ChannelMessage:

[REQUIRED]

Stores information about the processed message.

  • MessageId (string) -- [REQUIRED]

    The message ID.

  • Content (string) --

    The message content.

  • Metadata (string) --

    The message metadata.

rtype:

dict

returns:

Response Syntax

{
    'ChannelArn': 'string',
    'CallbackId': 'string'
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

    • CallbackId (string) --

      The call back ID passed in the request.

TagResource (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    ResourceARN='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
type ResourceARN:

string

param ResourceARN:

[REQUIRED]

The resource ARN.

type Tags:

list

param Tags:

[REQUIRED]

The tag key-value pairs.

  • (dict) --

    A tag object containing a key-value pair.

    • Key (string) -- [REQUIRED]

      The key in a tag.

    • Value (string) -- [REQUIRED]

      The value in a tag.

returns:

None

DeleteChannelFlow (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.delete_channel_flow(
    ChannelFlowArn='string'
)
type ChannelFlowArn:

string

param ChannelFlowArn:

[REQUIRED]

The ARN of the channel flow.

returns:

None

ListChannelsAssociatedWithChannelFlow (new) Link ¶

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.

See also: AWS API Documentation

Request Syntax

client.list_channels_associated_with_channel_flow(
    ChannelFlowArn='string',
    MaxResults=123,
    NextToken='string'
)
type ChannelFlowArn:

string

param ChannelFlowArn:

[REQUIRED]

The ARN of the channel flow.

type MaxResults:

integer

param MaxResults:

The maximum number of channels that you want to return.

type NextToken:

string

param NextToken:

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

rtype:

dict

returns:

Response Syntax

{
    'Channels': [
        {
            'Name': 'string',
            'ChannelArn': 'string',
            'Mode': 'UNRESTRICTED'|'RESTRICTED',
            'Privacy': 'PUBLIC'|'PRIVATE',
            'Metadata': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Channels (list) --

      The information about each channel.

      • (dict) --

        Summary of details of a channel associated with channel flow.

        • Name (string) --

          The name of the channel flow.

        • ChannelArn (string) --

          The ARN of the channel.

        • Mode (string) --

          The mode of the channel.

        • Privacy (string) --

          The channel's privacy setting.

        • Metadata (string) --

          The channel's metadata.

    • NextToken (string) --

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

ListTagsForResource (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    ResourceARN='string'
)
type ResourceARN:

string

param ResourceARN:

[REQUIRED]

The ARN of the resource.

rtype:

dict

returns:

Response Syntax

{
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • Tags (list) --

      The tag key-value pairs.

      • (dict) --

        A tag object containing a key-value pair.

        • Key (string) --

          The key in a tag.

        • Value (string) --

          The value in a tag.

CreateChannelFlow (new) Link ¶

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:

  • New and updated messages

  • Persistent and non-persistent messages

  • The Standard message type

See also: AWS API Documentation

Request Syntax

client.create_channel_flow(
    AppInstanceArn='string',
    Processors=[
        {
            'Name': 'string',
            'Configuration': {
                'Lambda': {
                    'ResourceArn': 'string',
                    'InvocationType': 'ASYNC'
                }
            },
            'ExecutionOrder': 123,
            'FallbackAction': 'CONTINUE'|'ABORT'
        },
    ],
    Name='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ClientRequestToken='string'
)
type AppInstanceArn:

string

param AppInstanceArn:

[REQUIRED]

The ARN of the channel flow request.

type Processors:

list

param Processors:

[REQUIRED]

Information about the processor Lambda functions.

  • (dict) --

    The information about a processor in a channel flow.

    • Name (string) -- [REQUIRED]

      The name of the channel flow.

    • Configuration (dict) -- [REQUIRED]

      The information about the type of processor and its identifier.

      • Lambda (dict) -- [REQUIRED]

        Indicates that the processor is of type Lambda.

        • ResourceArn (string) -- [REQUIRED]

          The ARN of the Lambda message processing function.

        • InvocationType (string) -- [REQUIRED]

          Controls how the Lambda function is invoked.

    • ExecutionOrder (integer) -- [REQUIRED]

      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.

    • FallbackAction (string) -- [REQUIRED]

      Determines whether to continue or stop processing if communication with processor fails. If the last processor in a channel flow sequence has a fallback action of CONTINUE, and communication with the processor fails, the message is considered processed and sent to the recipients in the channel.

type Name:

string

param Name:

[REQUIRED]

The name of the channel flow.

type Tags:

list

param Tags:

The tags for the creation request.

  • (dict) --

    A tag object containing a key-value pair.

    • Key (string) -- [REQUIRED]

      The key in a tag.

    • Value (string) -- [REQUIRED]

      The value in a tag.

type ClientRequestToken:

string

param ClientRequestToken:

[REQUIRED]

The client token for the request. An Idempotency token.

rtype:

dict

returns:

Response Syntax

{
    'ChannelFlowArn': 'string'
}

Response Structure

  • (dict) --

    • ChannelFlowArn (string) --

      The ARN of the channel flow.

DescribeChannel (updated) Link ¶
Changes (response)
{'Channel': {'ChannelFlowArn': 'string'}}

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

See also: AWS API Documentation

Request Syntax

client.describe_channel(
    ChannelArn='string',
    ChimeBearer='string'
)
type ChannelArn:

string

param ChannelArn:

[REQUIRED]

The ARN of the channel.

type ChimeBearer:

string

param ChimeBearer:

[REQUIRED]

The AppInstanceUserArn of the user that makes the API call.

rtype:

dict

returns:

Response Syntax

{
    'Channel': {
        'Name': 'string',
        'ChannelArn': 'string',
        'Mode': 'UNRESTRICTED'|'RESTRICTED',
        'Privacy': 'PUBLIC'|'PRIVATE',
        'Metadata': 'string',
        'CreatedBy': {
            'Arn': 'string',
            'Name': 'string'
        },
        'CreatedTimestamp': datetime(2015, 1, 1),
        'LastMessageTimestamp': datetime(2015, 1, 1),
        'LastUpdatedTimestamp': datetime(2015, 1, 1),
        'ChannelFlowArn': 'string'
    }
}

Response Structure

  • (dict) --

    • Channel (dict) --

      The channel details.

      • Name (string) --

        The name of a channel.

      • ChannelArn (string) --

        The ARN of a channel.

      • Mode (string) --

        The mode of the channel.

      • Privacy (string) --

        The channel's privacy setting.

      • Metadata (string) --

        The channel's metadata.

      • CreatedBy (dict) --

        The AppInstanceUser who created the channel.

        • Arn (string) --

          The ARN in an Identity.

        • Name (string) --

          The name in an Identity.

      • CreatedTimestamp (datetime) --

        The time at which the AppInstanceUser created the channel.

      • LastMessageTimestamp (datetime) --

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

      • LastUpdatedTimestamp (datetime) --

        The time at which a channel was last updated.

      • ChannelFlowArn (string) --

        The ARN of the channel flow.

GetChannelMessage (updated) Link ¶
Changes (response)
{'ChannelMessage': {'Status': {'Detail': 'string',
                               'Value': 'SENT | PENDING | FAILED | DENIED'}}}

Gets the full details of a channel message.

See also: AWS API Documentation

Request Syntax

client.get_channel_message(
    ChannelArn='string',
    MessageId='string',
    ChimeBearer='string'
)
type ChannelArn:

string

param ChannelArn:

[REQUIRED]

The ARN of the channel.

type MessageId:

string

param MessageId:

[REQUIRED]

The ID of the message.

type ChimeBearer:

string

param ChimeBearer:

[REQUIRED]

The AppInstanceUserArn of the user that makes the API call.

rtype:

dict

returns:

Response Syntax

{
    'ChannelMessage': {
        'ChannelArn': 'string',
        'MessageId': 'string',
        'Content': 'string',
        'Metadata': 'string',
        'Type': 'STANDARD'|'CONTROL',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'LastEditedTimestamp': datetime(2015, 1, 1),
        'LastUpdatedTimestamp': datetime(2015, 1, 1),
        'Sender': {
            'Arn': 'string',
            'Name': 'string'
        },
        'Redacted': True|False,
        'Persistence': 'PERSISTENT'|'NON_PERSISTENT',
        'Status': {
            'Value': 'SENT'|'PENDING'|'FAILED'|'DENIED',
            'Detail': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • ChannelMessage (dict) --

      The details of and content in the message.

      • ChannelArn (string) --

        The ARN of the channel.

      • MessageId (string) --

        The ID of a message.

      • Content (string) --

        The message content.

      • Metadata (string) --

        The message metadata.

      • Type (string) --

        The message type.

      • CreatedTimestamp (datetime) --

        The time at which the message was created.

      • LastEditedTimestamp (datetime) --

        The time at which a message was edited.

      • LastUpdatedTimestamp (datetime) --

        The time at which a message was updated.

      • Sender (dict) --

        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.

      • Status (dict) --

        The status of the channel message.

        • Value (string) --

          The message status value.

        • Detail (string) --

          Contains more details about the messasge status.

ListChannelMessages (updated) Link ¶
Changes (response)
{'ChannelMessages': {'Status': {'Detail': 'string',
                                'Value': 'SENT | PENDING | FAILED | DENIED'}}}

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

See also: AWS API Documentation

Request Syntax

client.list_channel_messages(
    ChannelArn='string',
    SortOrder='ASCENDING'|'DESCENDING',
    NotBefore=datetime(2015, 1, 1),
    NotAfter=datetime(2015, 1, 1),
    MaxResults=123,
    NextToken='string',
    ChimeBearer='string'
)
type ChannelArn:

string

param ChannelArn:

[REQUIRED]

The ARN of the channel.

type SortOrder:

string

param SortOrder:

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

type NotBefore:

datetime

param NotBefore:

The initial or starting time stamp for your requested messages.

type NotAfter:

datetime

param NotAfter:

The final or ending time stamp for your requested messages.

type MaxResults:

integer

param MaxResults:

The maximum number of messages that you want returned.

type NextToken:

string

param NextToken:

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

type ChimeBearer:

string

param ChimeBearer:

[REQUIRED]

The AppInstanceUserArn of the user that makes the API call.

rtype:

dict

returns:

Response Syntax

{
    'ChannelArn': 'string',
    'NextToken': 'string',
    'ChannelMessages': [
        {
            'MessageId': 'string',
            'Content': 'string',
            'Metadata': 'string',
            'Type': 'STANDARD'|'CONTROL',
            'CreatedTimestamp': datetime(2015, 1, 1),
            'LastUpdatedTimestamp': datetime(2015, 1, 1),
            'LastEditedTimestamp': datetime(2015, 1, 1),
            'Sender': {
                'Arn': 'string',
                'Name': 'string'
            },
            'Redacted': True|False,
            'Status': {
                'Value': 'SENT'|'PENDING'|'FAILED'|'DENIED',
                'Detail': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • 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 (list) --

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

      • (dict) --

        Summary of the messages in a Channel.

        • MessageId (string) --

          The ID of the message.

        • Content (string) --

          The content of the message.

        • Metadata (string) --

          The metadata of the message.

        • Type (string) --

          The type of message.

        • CreatedTimestamp (datetime) --

          The time at which the message summary was created.

        • LastUpdatedTimestamp (datetime) --

          The time at which a message was last updated.

        • LastEditedTimestamp (datetime) --

          The time at which a message was last edited.

        • Sender (dict) --

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

          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.

          • Detail (string) --

            Contains more details about the messasge status.

SendChannelMessage (updated) Link ¶
Changes (response)
{'Status': {'Detail': 'string', 'Value': 'SENT | PENDING | FAILED | DENIED'}}

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

See also: AWS API Documentation

Request Syntax

client.send_channel_message(
    ChannelArn='string',
    Content='string',
    Type='STANDARD'|'CONTROL',
    Persistence='PERSISTENT'|'NON_PERSISTENT',
    Metadata='string',
    ClientRequestToken='string',
    ChimeBearer='string'
)
type ChannelArn:

string

param ChannelArn:

[REQUIRED]

The ARN of the channel.

type Content:

string

param Content:

[REQUIRED]

The content of the message.

type Type:

string

param Type:

[REQUIRED]

The type of message, STANDARD or CONTROL.

type Persistence:

string

param Persistence:

[REQUIRED]

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

type Metadata:

string

param Metadata:

The optional metadata for each message.

type ClientRequestToken:

string

param ClientRequestToken:

[REQUIRED]

The Idempotency token for each client request.

This field is autopopulated if not provided.

type ChimeBearer:

string

param ChimeBearer:

[REQUIRED]

The AppInstanceUserArn of the user that makes the API call.

rtype:

dict

returns:

Response Syntax

{
    'ChannelArn': 'string',
    'MessageId': 'string',
    'Status': {
        'Value': 'SENT'|'PENDING'|'FAILED'|'DENIED',
        'Detail': 'string'
    }
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

    • MessageId (string) --

      The ID string assigned to each message.

    • Status (dict) --

      The status of the channel message.

      • Value (string) --

        The message status value.

      • Detail (string) --

        Contains more details about the messasge status.

UpdateChannelMessage (updated) Link ¶
Changes (response)
{'Status': {'Detail': 'string', 'Value': 'SENT | PENDING | FAILED | DENIED'}}

Updates the content of a message.

See also: AWS API Documentation

Request Syntax

client.update_channel_message(
    ChannelArn='string',
    MessageId='string',
    Content='string',
    Metadata='string',
    ChimeBearer='string'
)
type ChannelArn:

string

param ChannelArn:

[REQUIRED]

The ARN of the channel.

type MessageId:

string

param MessageId:

[REQUIRED]

The ID string of the message being updated.

type Content:

string

param Content:

The content of the message being updated.

type Metadata:

string

param Metadata:

The metadata of the message being updated.

type ChimeBearer:

string

param ChimeBearer:

[REQUIRED]

The AppInstanceUserArn of the user that makes the API call.

rtype:

dict

returns:

Response Syntax

{
    'ChannelArn': 'string',
    'MessageId': 'string',
    'Status': {
        'Value': 'SENT'|'PENDING'|'FAILED'|'DENIED',
        'Detail': 'string'
    }
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

    • MessageId (string) --

      The ID string of the message being updated.

    • Status (dict) --

      The status of the message update.

      • Value (string) --

        The message status value.

      • Detail (string) --

        Contains more details about the messasge status.