ChimeSDKMessaging / Client / put_channel_expiration_settings

put_channel_expiration_settings#

ChimeSDKMessaging.Client.put_channel_expiration_settings(**kwargs)#

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

Note

  • A background process deletes expired channels within 6 hours of expiration. Actual deletion times may vary.

  • Expired channels that have not yet been deleted appear as active, and you can update their expiration settings. The system honors the new settings.

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

See also: AWS API Documentation

Request Syntax

response = client.put_channel_expiration_settings(
    ChannelArn='string',
    ChimeBearer='string',
    ExpirationSettings={
        'ExpirationDays': 123,
        'ExpirationCriterion': 'CREATED_TIMESTAMP'|'LAST_MESSAGE_TIMESTAMP'
    }
)
Parameters:
  • ChannelArn (string) –

    [REQUIRED]

    The ARN of the channel.

  • ChimeBearer (string) – The ARN of the AppInstanceUser or AppInstanceBot that makes the API call.

  • ExpirationSettings (dict) –

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

    • ExpirationDays (integer) – [REQUIRED]

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

    • ExpirationCriterion (string) – [REQUIRED]

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

Return type:

dict

Returns:

Response Syntax

{
    'ChannelArn': 'string',
    'ExpirationSettings': {
        'ExpirationDays': 123,
        'ExpirationCriterion': 'CREATED_TIMESTAMP'|'LAST_MESSAGE_TIMESTAMP'
    }
}

Response Structure

  • (dict) –

    • ChannelArn (string) –

      The channel ARN.

    • ExpirationSettings (dict) –

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

      • ExpirationDays (integer) –

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

      • ExpirationCriterion (string) –

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

Exceptions

  • ChimeSDKMessaging.Client.exceptions.BadRequestException

  • ChimeSDKMessaging.Client.exceptions.ForbiddenException

  • ChimeSDKMessaging.Client.exceptions.ConflictException

  • ChimeSDKMessaging.Client.exceptions.UnauthorizedClientException

  • ChimeSDKMessaging.Client.exceptions.ThrottledClientException

  • ChimeSDKMessaging.Client.exceptions.ServiceUnavailableException

  • ChimeSDKMessaging.Client.exceptions.ServiceFailureException