Skip to content

list_protocols_lists async

list_protocols_lists(
    max_results: PaginationMaxResults,
    *,
    config_overrides: Optional[AsyncFMSClientConfig] = None,
    default_lists: Optional[Boolean] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListProtocolsListsResponse

Returns an array of ProtocolsListDataSummary objects.

Parameters:

  • default_lists (Optional[Boolean], default: None ) –

    Specifies whether the lists to retrieve are default lists owned by Firewall Manager.

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

    If you specify a value for MaxResults in your list request, and you have more objects than the maximum, Firewall Manager returns this token in the response. For all but the first request, you provide the token returned by the prior request in the request parameters, to retrieve the next batch of objects.

  • max_results (PaginationMaxResults) –

    The maximum number of objects that you want Firewall Manager to return for this request. If more objects are available, in the response, Firewall Manager provides a NextToken value that you can use in a subsequent call to get the next batch of objects.

    If you don't specify this, Firewall Manager returns all available objects.

Raises:

  • InternalErrorException –

    The operation failed because of a system problem, even though the request was valid. Retry your request.

  • InvalidOperationException –

    The operation failed because there was nothing to do or the operation wasn't possible. For example, you might have submitted an AssociateAdminAccount request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that's disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.

  • ResourceNotFoundException –

    The specified resource was not found.

  • UnknownServiceError –

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

Source code in docs_src/capo_fms/_services/async_fms.py
async def list_protocols_lists(
    self,
    max_results: "capo_fms.types.pagination_max_results.PaginationMaxResults",
    *,
    config_overrides: Optional[AsyncFMSClientConfig] = None,
    default_lists: Optional["capo_fms.types.boolean.Boolean"] = None,
    next_token: Optional["capo_fms.types.pagination_token.PaginationToken"] = None,
) -> "capo_fms.types.list_protocols_lists_response.ListProtocolsListsResponse":
    """<p>Returns an array of <code>ProtocolsListDataSummary</code> objects.</p>

    Args:
        default_lists: <p>Specifies whether the lists to retrieve are default lists owned by Firewall Manager.</p>
        next_token: <p>If you specify a value for <code>MaxResults</code> in your list request, and you have more objects than the maximum, Firewall Manager returns this token in the response. For all but the first request, you provide the token returned by the prior request in the request parameters, to retrieve the next batch of objects.</p>
        max_results: <p>The maximum number of objects that you want Firewall Manager to return for this request. If more objects are available, in the response, Firewall Manager provides a <code>NextToken</code> value that you can use in a subsequent call to get the next batch of objects.</p> <p>If you don't specify this, Firewall Manager returns all available objects.</p>

    Raises:
        capo_fms.errors.internal_error_exception.InternalErrorException: <p>The operation failed because of a system problem, even though the request was valid. Retry your request.</p>
        capo_fms.errors.invalid_operation_exception.InvalidOperationException: <p>The operation failed because there was nothing to do or the operation wasn't possible. For example, you might have submitted an <code>AssociateAdminAccount</code> request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that's disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.</p>
        capo_fms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_fms.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_fms.types.list_protocols_lists_request.ListProtocolsListsRequest]",
    ) -> AsyncOperationResponse[
        "capo_fms.types.list_protocols_lists_response.ListProtocolsListsResponse"
    ]:
        import capo_fms._operations.awsfms_20180101.list_protocols_lists

        (
            output,
            http_response,
        ) = await capo_fms._operations.awsfms_20180101.list_protocols_lists.async_list_protocols_lists(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListProtocolsLists")
    )
    input_: capo_fms.types.list_protocols_lists_request.ListProtocolsListsRequest = {
        "max_results": max_results
    }
    if default_lists is not None:
        input_["default_lists"] = default_lists
    if next_token is not None:
        input_["next_token"] = next_token

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