Skip to content

list_channels async

list_channels(
    *,
    config_overrides: Optional[AsyncivsClientConfig] = None,
    filter_by_name: Optional[ChannelName] = None,
    filter_by_recording_configuration_arn: Optional[
        ChannelRecordingConfigurationArn
    ] = None,
    filter_by_playback_restriction_policy_arn: Optional[
        ChannelPlaybackRestrictionPolicyArn
    ] = None,
    filter_by_ad_configuration_arn: Optional[ChannelAdConfigurationArn] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxChannelResults] = None,
) -> ListChannelsResponse

Gets summary information about all channels in your account, in the Amazon Web Services region where the API request is processed. This list can be filtered to match a specified name or recording-configuration ARN. Filters are mutually exclusive and cannot be used together. If you try to use both filters, you will get an error (409 ConflictException).

Parameters:

Raises:

Source code in docs_src/capo_ivs/_services/async_ivs.py
async def list_channels(
    self,
    *,
    config_overrides: Optional[AsyncivsClientConfig] = None,
    filter_by_name: Optional["capo_ivs.types.channel_name.ChannelName"] = None,
    filter_by_recording_configuration_arn: Optional[
        "capo_ivs.types.channel_recording_configuration_arn.ChannelRecordingConfigurationArn"
    ] = None,
    filter_by_playback_restriction_policy_arn: Optional[
        "capo_ivs.types.channel_playback_restriction_policy_arn.ChannelPlaybackRestrictionPolicyArn"
    ] = None,
    filter_by_ad_configuration_arn: Optional[
        "capo_ivs.types.channel_ad_configuration_arn.ChannelAdConfigurationArn"
    ] = None,
    next_token: Optional["capo_ivs.types.pagination_token.PaginationToken"] = None,
    max_results: Optional[
        "capo_ivs.types.max_channel_results.MaxChannelResults"
    ] = None,
) -> "capo_ivs.types.list_channels_response.ListChannelsResponse":
    """<p>Gets summary information about all channels in your account, in the Amazon Web Services region where the API request is processed. This list can be filtered to match a specified name or recording-configuration ARN. Filters are mutually exclusive and cannot be used together. If you try to use both filters, you will get an error (409 ConflictException).</p>

    Args:
        filter_by_name: <p>Filters the channel list to match the specified name.</p>
        filter_by_recording_configuration_arn: <p>Filters the channel list to match the specified recording-configuration ARN.</p>
        filter_by_playback_restriction_policy_arn: <p>Filters the channel list to match the specified policy.</p>
        filter_by_ad_configuration_arn: <p>Filters the channel list to match the specified ad configuration ARN.</p>
        next_token: <p>The first channel to retrieve. This is used for pagination; see the <code>nextToken</code> response field.</p>
        max_results: <p>Maximum number of channels to return. Default: 100.</p>

    Raises:
        capo_ivs.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_ivs.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_ivs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ivs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ivs.types.list_channels_request.ListChannelsRequest]",
    ) -> AsyncOperationResponse[
        "capo_ivs.types.list_channels_response.ListChannelsResponse"
    ]:
        import capo_ivs._operations.amazon_interactive_video_service.list_channels

        (
            output,
            http_response,
        ) = await capo_ivs._operations.amazon_interactive_video_service.list_channels.async_list_channels(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListChannels")
    )
    input_: capo_ivs.types.list_channels_request.ListChannelsRequest = {}
    if filter_by_name is not None:
        input_["filter_by_name"] = filter_by_name
    if filter_by_recording_configuration_arn is not None:
        input_["filter_by_recording_configuration_arn"] = (
            filter_by_recording_configuration_arn
        )
    if filter_by_playback_restriction_policy_arn is not None:
        input_["filter_by_playback_restriction_policy_arn"] = (
            filter_by_playback_restriction_policy_arn
        )
    if filter_by_ad_configuration_arn is not None:
        input_["filter_by_ad_configuration_arn"] = filter_by_ad_configuration_arn
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output