Skip to content

list_scopes

list_scopes(
    *,
    config_overrides: Optional[NetworkFlowMonitorClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[MaxResults] = None,
) -> ListScopesOutput

List all the scopes for an account.

Parameters:

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

    The token for the next set of results. You receive this token from a previous call.

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

    The number of query results that you want to return with this call.

Raises:

Source code in docs_src/capo_networkflowmonitor/_services/network_flow_monitor.py
def list_scopes(
    self,
    *,
    config_overrides: Optional[NetworkFlowMonitorClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[
        "capo_networkflowmonitor.types.max_results.MaxResults"
    ] = None,
) -> "capo_networkflowmonitor.types.list_scopes_output.ListScopesOutput":
    """<p>List all the scopes for an account.</p>

    Args:
        next_token: <p>The token for the next set of results. You receive this token from a previous call.</p>
        max_results: <p>The number of query results that you want to return with this call.</p>

    Raises:
        capo_networkflowmonitor.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permission to perform this action.</p>
        capo_networkflowmonitor.errors.internal_server_exception.InternalServerException: <p>An internal error occurred.</p>
        capo_networkflowmonitor.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeded a service quota.</p>
        capo_networkflowmonitor.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_networkflowmonitor.errors.validation_exception.ValidationException: <p>Invalid request.</p>
        capo_networkflowmonitor.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_networkflowmonitor.types.list_scopes_input.ListScopesInput]",
    ) -> OperationResponse[
        "capo_networkflowmonitor.types.list_scopes_output.ListScopesOutput"
    ]:
        import capo_networkflowmonitor._operations.network_flow_monitor.list_scopes

        output, http_response = (
            capo_networkflowmonitor._operations.network_flow_monitor.list_scopes.list_scopes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListScopes")
    )
    input_: capo_networkflowmonitor.types.list_scopes_input.ListScopesInput = {}
    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