create_channel

create_channel(**kwargs)

Creates a channel to which you can add users and send messages.

Restriction : You can't change a channel's privacy.

Note

The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn of the user that makes the API call as the value in the header.

See also: AWS API Documentation

Request Syntax

response = client.create_channel(
    AppInstanceArn='string',
    Name='string',
    Mode='UNRESTRICTED'|'RESTRICTED',
    Privacy='PUBLIC'|'PRIVATE',
    Metadata='string',
    ClientRequestToken='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ChimeBearer='string'
)
Parameters
  • AppInstanceArn (string) --

    [REQUIRED]

    The ARN of the channel request.

  • Name (string) --

    [REQUIRED]

    The name of the channel.

  • Mode (string) -- The channel mode: UNRESTRICTED or RESTRICTED . Administrators, moderators, and channel members can add themselves and other members to unrestricted channels. Only administrators and moderators can add members to restricted channels.
  • Privacy (string) -- The channel's privacy level: PUBLIC or PRIVATE . Private channels aren't discoverable by users outside the channel. Public channels are discoverable by anyone in the AppInstance .
  • Metadata (string) -- The metadata of the creation request. Limited to 1KB and UTF-8.
  • ClientRequestToken (string) --

    [REQUIRED]

    The client token for the request. An Idempotency token.

    This field is autopopulated if not provided.

  • Tags (list) --

    The tags for the creation request.

    • (dict) --

      Describes a tag applied to a resource.

      • Key (string) -- [REQUIRED]

        The key of the tag.

      • Value (string) -- [REQUIRED]

        The value of the tag.

  • ChimeBearer (string) -- The AppInstanceUserArn of the user that makes the API call.
Return type

dict

Returns

Response Syntax

{
    'ChannelArn': 'string'
}

Response Structure

  • (dict) --

    • ChannelArn (string) --

      The ARN of the channel.

Exceptions

  • Chime.Client.exceptions.BadRequestException
  • Chime.Client.exceptions.ForbiddenException
  • Chime.Client.exceptions.UnauthorizedClientException
  • Chime.Client.exceptions.ConflictException
  • Chime.Client.exceptions.ResourceLimitExceededException
  • Chime.Client.exceptions.ThrottledClientException
  • Chime.Client.exceptions.ServiceUnavailableException
  • Chime.Client.exceptions.ServiceFailureException