list_channels
¶
list_channels(
app_instance_arn: ChimeArn,
chime_bearer: ChimeArn,
*,
config_overrides: Optional[ChimeSDKMessagingClientConfig] = None,
privacy: Optional[ChannelPrivacy] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[NextToken] = None,
) -> ListChannelsResponse
Lists all Channels created under a single Chime App as a paginated list. You can specify filters to narrow results.
Functionality & restrictions
-
Use privacy =
PUBLICto retrieve all public channels in the account. -
Only an
AppInstanceAdmincan set privacy =PRIVATEto list the private channels in an account.
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
AppInstance. -
privacy(Optional[ChannelPrivacy], default:None) –The privacy setting.
PUBLICretrieves all the public channels.PRIVATEretrieves private channels. Only anAppInstanceAdmincan retrieve private channels. -
max_results(Optional[MaxResults], default:None) –The maximum number of channels that you want to return.
-
next_token(Optional[NextToken], default:None) –The token passed by previous API calls until all requested channels are returned.
-
chime_bearer(ChimeArn) –The ARN of the
AppInstanceUserorAppInstanceBotthat makes the API call.
Raises:
-
BadRequestException–The input parameters don't match the service's restrictions.
-
ForbiddenException–The client is permanently forbidden from making the request.
-
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/chime_sdk_messaging.py
2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 | |