create_channel
async
¶
create_channel(
app_instance_arn: ChimeArn,
name: NonEmptyResourceName,
client_request_token: ClientRequestToken,
chime_bearer: ChimeArn,
*,
config_overrides: Optional[AsyncChimeSDKMessagingClientConfig] = None,
mode: Optional[ChannelMode] = None,
privacy: Optional[ChannelPrivacy] = None,
metadata: Optional[Metadata] = None,
tags: Optional[TagList] = None,
channel_id: Optional[ChannelId] = None,
member_arns: Optional[ChannelMemberArns] = None,
moderator_arns: Optional[ChannelModeratorArns] = None,
elastic_channel_configuration: Optional[ElasticChannelConfiguration] = None,
expiration_settings: Optional[ExpirationSettings] = None,
) -> CreateChannelResponse
Creates a channel to which you can add users and send messages.
Restriction: You can't change a channel's privacy.
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.
Parameters:
-
app_instance_arn(ChimeArn) –The ARN of the channel request.
-
name(NonEmptyResourceName) –The name of the channel.
-
mode(Optional[ChannelMode], default:None) –The channel mode:
UNRESTRICTEDorRESTRICTED. 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(Optional[ChannelPrivacy], default:None) –The channel's privacy level:
PUBLICorPRIVATE. Private channels aren't discoverable by users outside the channel. Public channels are discoverable by anyone in theAppInstance. -
metadata(Optional[Metadata], default:None) –The metadata of the creation request. Limited to 1KB and UTF-8.
-
client_request_token(ClientRequestToken) –The client token for the request. An
Idempotencytoken. -
tags(Optional[TagList], default:None) –The tags for the creation request.
-
chime_bearer(ChimeArn) –The ARN of the
AppInstanceUserorAppInstanceBotthat makes the API call. -
channel_id(Optional[ChannelId], default:None) –An ID for the channel being created. If you do not specify an ID, a UUID will be created for the channel.
-
member_arns(Optional[ChannelMemberArns], default:None) –The ARNs of the channel members in the request.
-
moderator_arns(Optional[ChannelModeratorArns], default:None) –The ARNs of the channel moderators in the request.
-
elastic_channel_configuration(Optional[ElasticChannelConfiguration], default:None) –The attributes required to configure and create an elastic channel. An elastic channel can support a maximum of 1-million users, excluding moderators.
-
expiration_settings(Optional[ExpirationSettings], default:None) –Settings that control the interval after which the channel is automatically deleted.
Raises:
-
BadRequestException–The input parameters don't match the service's restrictions.
-
ConflictException–The request could not be processed because of conflict in the current state of the resource.
-
ForbiddenException–The client is permanently forbidden from making the request.
-
ResourceLimitExceededException–The request exceeds the resource limit.
-
ServiceFailureException–The service encountered an unexpected error.
-
ServiceUnavailableException–The service is currently unavailable.
-
ThrottledClientException–The client exceeded its request rate limit.
-
UnauthorizedClientException–The client is not currently authorized to make the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_chime_sdk_messaging/_services/async_chime_sdk_messaging.py
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 | |