Skip to content

list_channel_namespaces

list_channel_namespaces(
    api_id: String,
    *,
    config_overrides: Optional[AppSyncClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListChannelNamespacesResponse

Lists the channel namespaces for a specified Api.

ListChannelNamespaces returns only high level details for the channel namespace. To retrieve code handlers, use GetChannelNamespace.

Parameters:

  • api_id (String) –

    The Api ID.

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

    An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.

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

    The maximum number of results that you want the request to return.

Raises:

  • BadRequestException –

    The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.

  • InternalFailureException –

    An internal AppSync error occurred. Try your request again.

  • NotFoundException –

    The resource specified in the request was not found. Check the resource, and then try again.

  • UnauthorizedException –

    You aren't authorized to perform this operation.

  • UnknownServiceError –

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

Source code in docs_src/capo_appsync/_services/app_sync.py
def list_channel_namespaces(
    self,
    api_id: "capo_appsync.types.string.String",
    *,
    config_overrides: Optional[AppSyncClientConfig] = None,
    next_token: Optional[
        "capo_appsync.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional["capo_appsync.types.max_results.MaxResults"] = None,
) -> "capo_appsync.types.list_channel_namespaces_response.ListChannelNamespacesResponse":
    """<p>Lists the channel namespaces for a specified <code>Api</code>.</p> <p> <code>ListChannelNamespaces</code> returns only high level details for the channel namespace. To retrieve code handlers, use <code>GetChannelNamespace</code>.</p>

    Args:
        api_id: <p>The <code>Api</code> ID.</p>
        next_token: <p>An identifier that was returned from the previous call to this operation, which you can use to return the next set of items in the list.</p>
        max_results: <p>The maximum number of results that you want the request to return.</p>

    Raises:
        capo_appsync.errors.bad_request_exception.BadRequestException: <p>The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.</p>
        capo_appsync.errors.internal_failure_exception.InternalFailureException: <p>An internal AppSync error occurred. Try your request again.</p>
        capo_appsync.errors.not_found_exception.NotFoundException: <p>The resource specified in the request was not found. Check the resource, and then try again.</p>
        capo_appsync.errors.unauthorized_exception.UnauthorizedException: <p>You aren't authorized to perform this operation.</p>
        capo_appsync.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_appsync.types.list_channel_namespaces_request.ListChannelNamespacesRequest]",
    ) -> OperationResponse[
        "capo_appsync.types.list_channel_namespaces_response.ListChannelNamespacesResponse"
    ]:
        import capo_appsync._operations.aws_deepdish_control_plane_service.list_channel_namespaces

        output, http_response = (
            capo_appsync._operations.aws_deepdish_control_plane_service.list_channel_namespaces.list_channel_namespaces(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListChannelNamespaces")
    )
    input_: capo_appsync.types.list_channel_namespaces_request.ListChannelNamespacesRequest = {
        "api_id": api_id
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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