Skip to content

list_performance_monitors async

list_performance_monitors(
    *,
    config_overrides: Optional[AsyncNetworkFlowMonitorClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[MaxResults] = None,
    monitor_status: Optional[MonitorStatus] = None,
    monitor_type: Optional[PerformanceMonitorType] = None,
) -> ListPerformanceMonitorsOutput

Returns a list of the performance monitors in an account. You can optionally return only the monitors that have a specific status or type.

Results are paginated. Use the nextToken parameter to return additional results.

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 performance monitors that you want to return with this call. If you don't specify a value, the default is 25.

  • monitor_status (Optional[MonitorStatus], default: None ) –

    The status of the performance monitors that you want to return. If you don't specify a status, Network Flow Monitor returns performance monitors with any status.

  • monitor_type (Optional[PerformanceMonitorType], default: None ) –

    The type of the performance monitors that you want to return. If you don't specify a type, Network Flow Monitor returns performance monitors of any type.

Raises:

Source code in docs_src/capo_networkflowmonitor/_services/async_network_flow_monitor.py
async def list_performance_monitors(
    self,
    *,
    config_overrides: Optional[AsyncNetworkFlowMonitorClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[
        "capo_networkflowmonitor.types.max_results.MaxResults"
    ] = None,
    monitor_status: Optional[
        "capo_networkflowmonitor.types.monitor_status.MonitorStatus"
    ] = None,
    monitor_type: Optional[
        "capo_networkflowmonitor.types.performance_monitor_type.PerformanceMonitorType"
    ] = None,
) -> "capo_networkflowmonitor.types.list_performance_monitors_output.ListPerformanceMonitorsOutput":
    """<p>Returns a list of the performance monitors in an account. You can optionally return only the monitors that have a specific status or type.</p> <p>Results are paginated. Use the <code>nextToken</code> parameter to return additional results.</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 performance monitors that you want to return with this call. If you don't specify a value, the default is 25.</p>
        monitor_status: <p>The status of the performance monitors that you want to return. If you don't specify a status, Network Flow Monitor returns performance monitors with any status.</p>
        monitor_type: <p>The type of the performance monitors that you want to return. If you don't specify a type, Network Flow Monitor returns performance monitors of any type.</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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_networkflowmonitor.types.list_performance_monitors_input.ListPerformanceMonitorsInput]",
    ) -> AsyncOperationResponse[
        "capo_networkflowmonitor.types.list_performance_monitors_output.ListPerformanceMonitorsOutput"
    ]:
        import capo_networkflowmonitor._operations.network_flow_monitor.list_performance_monitors

        (
            output,
            http_response,
        ) = await capo_networkflowmonitor._operations.network_flow_monitor.list_performance_monitors.async_list_performance_monitors(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPerformanceMonitors")
    )
    input_: capo_networkflowmonitor.types.list_performance_monitors_input.ListPerformanceMonitorsInput = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if monitor_status is not None:
        input_["monitor_status"] = monitor_status
    if monitor_type is not None:
        input_["monitor_type"] = monitor_type

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