Skip to content

list_approval_teams

list_approval_teams(
    *,
    config_overrides: Optional[MPAClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[Token] = None,
) -> ListApprovalTeamsResponse

Returns a list of approval teams.

Parameters:

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

    The maximum number of items to return in the response. If more results exist than the specified MaxResults value, a token is included in the response so that you can retrieve the remaining results.

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

    If present, indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a next call to the operation to get more output. You can repeat this until the NextToken response element returns null.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action. Check your permissions, and try again.

  • InternalServerException –

    The service encountered an internal error. Try your request again. If the problem persists, contact Amazon Web Services Support.

  • ThrottlingException –

    The request was denied due to request throttling.

  • ValidationException –

    The input fails to satisfy the constraints specified by an Amazon Web Services service.

  • UnknownServiceError –

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

Source code in docs_src/capo_mpa/_services/mpa.py
def list_approval_teams(
    self,
    *,
    config_overrides: Optional[MPAClientConfig] = None,
    max_results: Optional["capo_mpa.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_mpa.types.token.Token"] = None,
) -> "capo_mpa.types.list_approval_teams_response.ListApprovalTeamsResponse":
    """<p>Returns a list of approval teams.</p>

    Args:
        max_results: <p>The maximum number of items to return in the response. If more results exist than the specified <code>MaxResults</code> value, a token is included in the response so that you can retrieve the remaining results.</p>
        next_token: <p>If present, indicates that more output is available than is included in the current response. Use this value in the <code>NextToken</code> request parameter in a next call to the operation to get more output. You can repeat this until the <code>NextToken</code> response element returns <code>null</code>.</p>

    Raises:
        capo_mpa.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. Check your permissions, and try again.</p>
        capo_mpa.errors.internal_server_exception.InternalServerException: <p>The service encountered an internal error. Try your request again. If the problem persists, contact Amazon Web Services Support.</p>
        capo_mpa.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_mpa.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_mpa.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_mpa.types.list_approval_teams_request.ListApprovalTeamsRequest]",
    ) -> OperationResponse[
        "capo_mpa.types.list_approval_teams_response.ListApprovalTeamsResponse"
    ]:
        import capo_mpa._operations.aws_fluffy_core_service.list_approval_teams

        output, http_response = (
            capo_mpa._operations.aws_fluffy_core_service.list_approval_teams.list_approval_teams(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_mpa.types.list_approval_teams_response.ListApprovalTeamsResponse",
    ) -> dict[str, Any]:
        import capo_mpa.types.list_approval_teams_response

        return capo_mpa.types.list_approval_teams_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListApprovalTeams", redact_output=_redact_output),
    )
    input_: capo_mpa.types.list_approval_teams_request.ListApprovalTeamsRequest = {}
    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