Skip to content

list_access_policies async

list_access_policies(
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
    max_results: Optional[ListAccessPoliciesRequestMaxResults] = None,
    next_token: Optional[String] = None,
) -> ListAccessPoliciesResponse

Lists the available access policies.

Parameters:

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

    The maximum number of results, returned in paginated output. You receive maxResults in a single page, along with a nextToken response element. You can see the remaining results of the initial request by sending another request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, 100 results and a nextToken value, if applicable, are returned.

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

    The nextToken value returned from a previous paginated request, where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.

    This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.

Raises:

Source code in docs_src/capo_eks/_services/async_eks.py
async def list_access_policies(
    self,
    *,
    config_overrides: Optional[AsyncEKSClientConfig] = None,
    max_results: Optional[
        "capo_eks.types.list_access_policies_request_max_results.ListAccessPoliciesRequestMaxResults"
    ] = None,
    next_token: Optional["capo_eks.types.string.String"] = None,
) -> "capo_eks.types.list_access_policies_response.ListAccessPoliciesResponse":
    """<p>Lists the available access policies. </p>

    Args:
        max_results: <p>The maximum number of results, returned in paginated output. You receive <code>maxResults</code> in a single page, along with a <code>nextToken</code> response element. You can see the remaining results of the initial request by sending another request with the returned <code>nextToken</code> value. This value can be between 1 and 100. If you don't use this parameter, 100 results and a <code>nextToken</code> value, if applicable, are returned.</p>
        next_token: <p>The <code>nextToken</code> value returned from a previous paginated request, where <code>maxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>nextToken</code> value. This value is null when there are no more results to return.</p> <note> <p>This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.</p> </note>

    Raises:
        capo_eks.errors.server_exception.ServerException: <p>These errors are usually caused by a server-side issue.</p>
        capo_eks.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_eks.types.list_access_policies_request.ListAccessPoliciesRequest]",
    ) -> AsyncOperationResponse[
        "capo_eks.types.list_access_policies_response.ListAccessPoliciesResponse"
    ]:
        import capo_eks._operations.aws_wesley_frontend.list_access_policies

        (
            output,
            http_response,
        ) = await capo_eks._operations.aws_wesley_frontend.list_access_policies.async_list_access_policies(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAccessPolicies")
    )
    input_: capo_eks.types.list_access_policies_request.ListAccessPoliciesRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    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