Skip to content

list_nodes_summary async

list_nodes_summary(
    aggregators: NodeAggregatorList,
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    sync_name: Optional[ResourceDataSyncName] = None,
    filters: Optional[NodeFilterList] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListNodesSummaryResult

Generates a summary of managed instance/node metadata based on the filters and aggregators you specify. Results are grouped by the input aggregator you specify.

Parameters:

  • sync_name (Optional[ResourceDataSyncName], default: None ) –

    The name of the Amazon Web Services managed resource data sync to retrieve information about.

    For cross-account/cross-Region configurations, this parameter is required, and the name of the supported resource data sync is AWS-QuickSetup-ManagedNode.

    For single account/single-Region configurations, the parameter is not required.

  • filters (Optional[NodeFilterList], default: None ) –

    One or more filters. Use a filter to generate a summary that matches your specified filter criteria.

  • aggregators (NodeAggregatorList) –

    Specify one or more aggregators to return a count of managed nodes that match that expression. For example, a count of managed nodes by operating system.

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

    The token for the next set of items to return. (You received this token from a previous call.) The call also returns a token that you can specify in a subsequent call to get the next set of results.

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

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

Raises:

Examples:

ListNodesSummary This example illustrates one usage of ListNodesSummary

>>> await client.list_nodes_summary(sync_name='AWS-QuickSetup-ManagedNode', aggregators=[{'AggregatorType': 'Count', 'TypeName': 'Instance', 'AttributeName': 'Region'}], filters=[{'Key': 'InstanceStatus', 'Values': ['Active'], 'Type': 'Equal'}], max_results=2, next_token='A9lT8CAxj9aDFRi+MNAoFq08I---EXAMPLE')
Source code in docs_src/capo_ssm/_services/async_ssm.py
async def list_nodes_summary(
    self,
    aggregators: "capo_ssm.types.node_aggregator_list.NodeAggregatorList",
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    sync_name: Optional[
        "capo_ssm.types.resource_data_sync_name.ResourceDataSyncName"
    ] = None,
    filters: Optional["capo_ssm.types.node_filter_list.NodeFilterList"] = None,
    next_token: Optional["capo_ssm.types.next_token.NextToken"] = None,
    max_results: Optional["capo_ssm.types.max_results.MaxResults"] = None,
) -> "capo_ssm.types.list_nodes_summary_result.ListNodesSummaryResult":
    """<p>Generates a summary of managed instance/node metadata based on the filters and aggregators you specify. Results are grouped by the input aggregator you specify.</p>

    Args:
        sync_name: <p>The name of the Amazon Web Services managed resource data sync to retrieve information about.</p> <p>For cross-account/cross-Region configurations, this parameter is required, and the name of the supported resource data sync is <code>AWS-QuickSetup-ManagedNode</code>.</p> <p>For single account/single-Region configurations, the parameter is not required.</p>
        filters: <p>One or more filters. Use a filter to generate a summary that matches your specified filter criteria.</p>
        aggregators: <p>Specify one or more aggregators to return a count of managed nodes that match that expression. For example, a count of managed nodes by operating system.</p>
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.) The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
        max_results: <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>

    Raises:
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.invalid_aggregator_exception.InvalidAggregatorException: <p>The specified aggregator isn't valid for the group type. Verify that the aggregator you provided is supported.</p>
        capo_ssm.errors.invalid_filter.InvalidFilter: <p>The filter name isn't valid. Verify that you entered the correct name and try again.</p>
        capo_ssm.errors.invalid_next_token.InvalidNextToken: <p>The specified token isn't valid.</p>
        capo_ssm.errors.resource_data_sync_not_found_exception.ResourceDataSyncNotFoundException: <p>The specified sync name wasn't found.</p>
        capo_ssm.errors.unsupported_operation_exception.UnsupportedOperationException: <p>This operation is not supported for the current account. You must first enable the Systems Manager integrated experience in your account.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        ListNodesSummary
        This example illustrates one usage of ListNodesSummary

        >>> await client.list_nodes_summary(sync_name='AWS-QuickSetup-ManagedNode', aggregators=[{'AggregatorType': 'Count', 'TypeName': 'Instance', 'AttributeName': 'Region'}], filters=[{'Key': 'InstanceStatus', 'Values': ['Active'], 'Type': 'Equal'}], max_results=2, next_token='A9lT8CAxj9aDFRi+MNAoFq08I---EXAMPLE')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm.types.list_nodes_summary_request.ListNodesSummaryRequest]",
    ) -> AsyncOperationResponse[
        "capo_ssm.types.list_nodes_summary_result.ListNodesSummaryResult"
    ]:
        import capo_ssm._operations.amazon_ssm.list_nodes_summary

        (
            output,
            http_response,
        ) = await capo_ssm._operations.amazon_ssm.list_nodes_summary.async_list_nodes_summary(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListNodesSummary")
    )
    input_: capo_ssm.types.list_nodes_summary_request.ListNodesSummaryRequest = {
        "aggregators": aggregators
    }
    if sync_name is not None:
        input_["sync_name"] = sync_name
    if filters is not None:
        input_["filters"] = filters
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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