Skip to content

list_channel_groups

list_channel_groups(
    *,
    config_overrides: Optional[MediaPackageV2ClientConfig] = None,
    max_results: Optional[ListResourceMaxResults] = None,
    next_token: Optional[str] = None,
) -> ListChannelGroupsResponse

Retrieves all channel groups that are configured in Elemental MediaPackage.

Parameters:

  • max_results (Optional[ListResourceMaxResults], default: None ) –

    The maximum number of results to return in the response.

  • next_token (Optional[str], default: None ) –

    The pagination token from the GET list request. Use the token to fetch the next page of results.

Raises:

  • AccessDeniedException –

    Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.

  • InternalServerException –

    Indicates that an error from the service occurred while trying to process a request.

  • ThrottlingException –

    The request throughput limit was exceeded.

  • ValidationException –

    The input failed to meet the constraints specified by the AWS service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

Listing all Channel Groups

>>> client.list_channel_groups()
Source code in docs_src/capo_mediapackagev2/_services/media_package_v2.py
def list_channel_groups(
    self,
    *,
    config_overrides: Optional[MediaPackageV2ClientConfig] = None,
    max_results: Optional[
        "capo_mediapackagev2.types.list_resource_max_results.ListResourceMaxResults"
    ] = None,
    next_token: Optional[str] = None,
) -> "capo_mediapackagev2.types.list_channel_groups_response.ListChannelGroupsResponse":
    """<p>Retrieves all channel groups that are configured in Elemental MediaPackage.</p>

    Args:
        max_results: <p>The maximum number of results to return in the response.</p>
        next_token: <p>The pagination token from the GET list request. Use the token to fetch the next page of results.</p>

    Raises:
        capo_mediapackagev2.errors.access_denied_exception.AccessDeniedException: <p>Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.</p>
        capo_mediapackagev2.errors.internal_server_exception.InternalServerException: <p>Indicates that an error from the service occurred while trying to process a request.</p>
        capo_mediapackagev2.errors.throttling_exception.ThrottlingException: <p>The request throughput limit was exceeded.</p>
        capo_mediapackagev2.errors.validation_exception.ValidationException: <p>The input failed to meet the constraints specified by the AWS service.</p>
        capo_mediapackagev2.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Listing all Channel Groups

        >>> client.list_channel_groups()
    """

    def _handler(
        req: "OperationRequest[capo_mediapackagev2.types.list_channel_groups_request.ListChannelGroupsRequest]",
    ) -> OperationResponse[
        "capo_mediapackagev2.types.list_channel_groups_response.ListChannelGroupsResponse"
    ]:
        import capo_mediapackagev2._operations.mediapackagev2.list_channel_groups

        output, http_response = (
            capo_mediapackagev2._operations.mediapackagev2.list_channel_groups.list_channel_groups(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListChannelGroups")
    )
    input_: capo_mediapackagev2.types.list_channel_groups_request.ListChannelGroupsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output