ApplicationDiscoveryService / Client / describe_agents

describe_agents#

ApplicationDiscoveryService.Client.describe_agents(**kwargs)#

Lists agents or collectors as specified by ID or other filters. All agents/collectors associated with your user can be listed if you call DescribeAgents as is without passing any parameters.

See also: AWS API Documentation

Request Syntax

response = client.describe_agents(
    agentIds=[
        'string',
    ],
    filters=[
        {
            'name': 'string',
            'values': [
                'string',
            ],
            'condition': 'string'
        },
    ],
    maxResults=123,
    nextToken='string'
)
Parameters:
  • agentIds (list) –

    The agent or the collector IDs for which you want information. If you specify no IDs, the system returns information about all agents/collectors associated with your user.

    • (string) –

  • filters (list) –

    You can filter the request using various logical operators and a key-value format. For example:

    {"key": "collectionStatus", "value": "STARTED"}

    • (dict) –

      A filter that can use conditional operators.

      For more information about filters, see Querying Discovered Configuration Items in the Amazon Web Services Application Discovery Service User Guide.

      • name (string) – [REQUIRED]

        The name of the filter.

      • values (list) – [REQUIRED]

        A string value on which to filter. For example, if you choose the destinationServer.osVersion filter name, you could specify Ubuntu for the value.

        • (string) –

      • condition (string) – [REQUIRED]

        A conditional operator. The following operators are valid: EQUALS, NOT_EQUALS, CONTAINS, NOT_CONTAINS. If you specify multiple filters, the system utilizes all filters as though concatenated by AND. If you specify multiple values for a particular filter, the system differentiates the values using OR. Calling either DescribeConfigurations or ListConfigurations returns attributes of matching configuration items.

  • maxResults (integer) – The total number of agents/collectors to return in a single page of output. The maximum value is 100.

  • nextToken (string) – Token to retrieve the next set of results. For example, if you previously specified 100 IDs for DescribeAgentsRequest$agentIds but set DescribeAgentsRequest$maxResults to 10, you received a set of 10 results along with a token. Use that token in this query to get the next set of 10.

Return type:

dict

Returns:

Response Syntax

{
    'agentsInfo': [
        {
            'agentId': 'string',
            'hostName': 'string',
            'agentNetworkInfoList': [
                {
                    'ipAddress': 'string',
                    'macAddress': 'string'
                },
            ],
            'connectorId': 'string',
            'version': 'string',
            'health': 'HEALTHY'|'UNHEALTHY'|'RUNNING'|'UNKNOWN'|'BLACKLISTED'|'SHUTDOWN',
            'lastHealthPingTime': 'string',
            'collectionStatus': 'string',
            'agentType': 'string',
            'registeredTime': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • agentsInfo (list) –

      Lists agents or the collector by ID or lists all agents/collectors associated with your user, if you did not specify an agent/collector ID. The output includes agent/collector IDs, IP addresses, media access control (MAC) addresses, agent/collector health, host name where the agent/collector resides, and the version number of each agent/collector.

      • (dict) –

        Information about agents associated with the user’s Amazon Web Services account. Information includes agent IDs, IP addresses, media access control (MAC) addresses, agent or collector status, hostname where the agent resides, and agent version for each agent.

        • agentId (string) –

          The agent or collector ID.

        • hostName (string) –

          The name of the host where the agent or collector resides. The host can be a server or virtual machine.

        • agentNetworkInfoList (list) –

          Network details about the host where the agent or collector resides.

          • (dict) –

            Network details about the host where the agent/collector resides.

            • ipAddress (string) –

              The IP address for the host where the agent/collector resides.

            • macAddress (string) –

              The MAC address for the host where the agent/collector resides.

        • connectorId (string) –

          The ID of the connector.

        • version (string) –

          The agent or collector version.

        • health (string) –

          The health of the agent.

        • lastHealthPingTime (string) –

          Time since agent health was reported.

        • collectionStatus (string) –

          Status of the collection process for an agent.

        • agentType (string) –

          Type of agent.

        • registeredTime (string) –

          Agent’s first registration timestamp in UTC.

    • nextToken (string) –

      Token to retrieve the next set of results. For example, if you specified 100 IDs for DescribeAgentsRequest$agentIds but set DescribeAgentsRequest$maxResults to 10, you received a set of 10 results along with this token. Use this token in the next query to retrieve the next set of 10.

Exceptions