ApplicationDiscoveryService / Client / describe_agents

describe_agents#

ApplicationDiscoveryService.Client.describe_agents(**kwargs)#

Lists agents or connectors as specified by ID or other filters. All agents/connectors associated with your user account 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 Connector IDs for which you want information. If you specify no IDs, the system returns information about all agents/Connectors associated with your Amazon Web Services user account.

    • (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/Connectors 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 Connector by ID or lists all agents/Connectors associated with your user account if you did not specify an agent/Connector ID. The output includes agent/Connector IDs, IP addresses, media access control (MAC) addresses, agent/Connector health, host name where the agent/Connector resides, and the version number of each agent/Connector.

      • (dict) –

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

        • agentId (string) –

          The agent or connector ID.

        • hostName (string) –

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

        • agentNetworkInfoList (list) –

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

          • (dict) –

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

            • ipAddress (string) –

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

            • macAddress (string) –

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

        • connectorId (string) –

          The ID of the connector.

        • version (string) –

          The agent or connector version.

        • health (string) –

          The health of the agent or connector.

        • lastHealthPingTime (string) –

          Time since agent or connector health was reported.

        • collectionStatus (string) –

          Status of the collection process for an agent or connector.

        • 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

  • ApplicationDiscoveryService.Client.exceptions.AuthorizationErrorException

  • ApplicationDiscoveryService.Client.exceptions.InvalidParameterException

  • ApplicationDiscoveryService.Client.exceptions.InvalidParameterValueException

  • ApplicationDiscoveryService.Client.exceptions.ServerInternalErrorException

  • ApplicationDiscoveryService.Client.exceptions.HomeRegionNotSetException