Table of Contents
A low-level client representing AWS Application Discovery Service:
import boto3
client = boto3.client('discovery')
These are the available methods:
Associates one or more configuration items with an application.
See also: AWS API Documentation
Request Syntax
response = client.associate_configuration_items_to_application(
applicationConfigurationId='string',
configurationIds=[
'string',
]
)
[REQUIRED]
The configuration ID of an application with which items are to be associated.
[REQUIRED]
The ID of each configuration item to be associated with an application.
dict
Response Syntax
{}
Response Structure
Check if an operation can be paginated.
Creates an application with the given name and description.
See also: AWS API Documentation
Request Syntax
response = client.create_application(
name='string',
description='string'
)
[REQUIRED]
Name of the application to be created.
dict
Response Syntax
{
'configurationId': 'string'
}
Response Structure
(dict) --
configurationId (string) --
Configuration ID of an application to be created.
Creates one or more tags for configuration items. Tags are metadata that help you categorize IT assets. This API accepts a list of multiple configuration items.
See also: AWS API Documentation
Request Syntax
response = client.create_tags(
configurationIds=[
'string',
],
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
A list of configuration items that you want to tag.
[REQUIRED]
Tags that you want to associate with one or more configuration items. Specify the tags that you want to create in a key -value format. For example:
{"key": "serverType", "value": "webServer"}
Metadata that help you categorize IT assets.
The type of tag on which to filter.
A value for a tag key on which to filter.
dict
Response Syntax
{}
Response Structure
Deletes a list of applications and their associations with configuration items.
See also: AWS API Documentation
Request Syntax
response = client.delete_applications(
configurationIds=[
'string',
]
)
[REQUIRED]
Configuration ID of an application to be deleted.
{}
Response Structure
Deletes the association between configuration items and one or more tags. This API accepts a list of multiple configuration items.
See also: AWS API Documentation
Request Syntax
response = client.delete_tags(
configurationIds=[
'string',
],
tags=[
{
'key': 'string',
'value': 'string'
},
]
)
[REQUIRED]
A list of configuration items with tags that you want to delete.
Tags that you want to delete from one or more configuration items. Specify the tags that you want to delete in a key -value format. For example:
{"key": "serverType", "value": "webServer"}
Metadata that help you categorize IT assets.
The type of tag on which to filter.
A value for a tag key on which to filter.
dict
Response Syntax
{}
Response Structure
Lists agents or the Connector by ID or lists all agents/Connectors associated with your user account if you did not specify an ID.
See also: AWS API Documentation
Request Syntax
response = client.describe_agents(
agentIds=[
'string',
],
filters=[
{
'name': 'string',
'values': [
'string',
],
'condition': 'string'
},
],
maxResults=123,
nextToken='string'
)
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 AWS user account.
You can filter the request using various logical operators and a key -value format. For example:
{"key": "collectionStatus", "value": "STARTED"}
A filter that can use conditional operators.
For more information about filters, see Querying Discovered Configuration Items .
The name of the filter.
A string value on which to filter. For example, if you choose the destinationServer.osVersion filter name, you could specify Ubuntu for the value.
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.
dict
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 AWS 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.
Retrieves attributes for a list of configuration item IDs. All of the supplied IDs must be for the same asset type (server, application, process, or connection). Output fields are specific to the asset type selected. For example, the output for a server configuration item includes a list of attributes about the server, such as host name, operating system, and number of network cards.
For a complete list of outputs for each asset type, see Using the DescribeConfigurations Action .
See also: AWS API Documentation
Request Syntax
response = client.describe_configurations(
configurationIds=[
'string',
]
)
[REQUIRED]
One or more configuration IDs.
{
'configurations': [
{
'string': 'string'
},
]
}
Response Structure
A key in the response map. The value is an array of data.
Deprecated. Use DescribeExportTasks instead.
Retrieves the status of a given export process. You can retrieve status from a maximum of 100 processes.
Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response = client.describe_export_configurations(
exportIds=[
'string',
],
maxResults=123,
nextToken='string'
)
A unique identifier that you can use to query the export status.
dict
Response Syntax
{
'exportsInfo': [
{
'exportId': 'string',
'exportStatus': 'FAILED'|'SUCCEEDED'|'IN_PROGRESS',
'statusMessage': 'string',
'configurationsDownloadUrl': 'string',
'exportRequestTime': datetime(2015, 1, 1),
'isTruncated': True|False,
'requestedStartTime': datetime(2015, 1, 1),
'requestedEndTime': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
exportsInfo (list) --
Returns export details. When the status is complete, the response includes a URL for an Amazon S3 bucket where you can view the data in a CSV file.
(dict) --
Information regarding the export status of discovered data. The value is an array of objects.
exportId (string) --
A unique identifier used to query an export.
exportStatus (string) --
The status of the data export job.
statusMessage (string) --
A status message provided for API callers.
configurationsDownloadUrl (string) --
A URL for an Amazon S3 bucket where you can review the exported data. The URL is displayed only if the export succeeded.
exportRequestTime (datetime) --
The time that the data export was initiated.
isTruncated (boolean) --
If true, the export of agent information exceeded the size limit for a single export and the exported data is incomplete for the requested time range. To address this, select a smaller time range for the export by using startDate and endDate .
requestedStartTime (datetime) --
The value of startTime parameter in the StartExportTask request. If no startTime was requested, this result does not appear in ExportInfo .
requestedEndTime (datetime) --
The endTime used in the StartExportTask request. If no endTime was requested, this result does not appear in ExportInfo .
nextToken (string) --
A token to get the next set of results. For example, if you specify 100 IDs for DescribeExportConfigurationsRequest$exportIds but set DescribeExportConfigurationsRequest$maxResults to 10, you get results in a set of 10. Use the token in the query to get the next set of 10.
Retrieve status of one or more export tasks. You can retrieve the status of up to 100 export tasks.
See also: AWS API Documentation
Request Syntax
response = client.describe_export_tasks(
exportIds=[
'string',
],
filters=[
{
'name': 'string',
'values': [
'string',
],
'condition': 'string'
},
],
maxResults=123,
nextToken='string'
)
One or more unique identifiers used to query the status of an export request.
One or more filters.
Used to select which agent's data is to be exported. A single agent ID may be selected for export using the StartExportTask action.
A single ExportFilter name. Supported filters: agentId .
A single agentId for a Discovery Agent. An agentId can be found using the DescribeAgents action. Typically an ADS agentId is in the form o-0123456789abcdef0 .
Supported condition: EQUALS
dict
Response Syntax
{
'exportsInfo': [
{
'exportId': 'string',
'exportStatus': 'FAILED'|'SUCCEEDED'|'IN_PROGRESS',
'statusMessage': 'string',
'configurationsDownloadUrl': 'string',
'exportRequestTime': datetime(2015, 1, 1),
'isTruncated': True|False,
'requestedStartTime': datetime(2015, 1, 1),
'requestedEndTime': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
exportsInfo (list) --
Contains one or more sets of export request details. When the status of a request is SUCCEEDED , the response includes a URL for an Amazon S3 bucket where you can view the data in a CSV file.
(dict) --
Information regarding the export status of discovered data. The value is an array of objects.
exportId (string) --
A unique identifier used to query an export.
exportStatus (string) --
The status of the data export job.
statusMessage (string) --
A status message provided for API callers.
configurationsDownloadUrl (string) --
A URL for an Amazon S3 bucket where you can review the exported data. The URL is displayed only if the export succeeded.
exportRequestTime (datetime) --
The time that the data export was initiated.
isTruncated (boolean) --
If true, the export of agent information exceeded the size limit for a single export and the exported data is incomplete for the requested time range. To address this, select a smaller time range for the export by using startDate and endDate .
requestedStartTime (datetime) --
The value of startTime parameter in the StartExportTask request. If no startTime was requested, this result does not appear in ExportInfo .
requestedEndTime (datetime) --
The endTime used in the StartExportTask request. If no endTime was requested, this result does not appear in ExportInfo .
nextToken (string) --
The nextToken value to include in a future DescribeExportTasks request. When the results of a DescribeExportTasks request exceed maxResults , this value can be used to retrieve the next page of results. This value is null when there are no more results to return.
Retrieves a list of configuration items that are tagged with a specific tag. Or retrieves a list of all tags assigned to a specific configuration item.
See also: AWS API Documentation
Request Syntax
response = client.describe_tags(
filters=[
{
'name': 'string',
'values': [
'string',
]
},
],
maxResults=123,
nextToken='string'
)
You can filter the list using a key -value format. You can separate these items by using logical operators. Allowed filters include tagKey , tagValue , and configurationId .
The tag filter. Valid names are: tagKey , tagValue , configurationId .
A name of the tag filter.
Values for the tag filter.
dict
Response Syntax
{
'tags': [
{
'configurationType': 'SERVER'|'PROCESS'|'CONNECTION'|'APPLICATION',
'configurationId': 'string',
'key': 'string',
'value': 'string',
'timeOfCreation': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
tags (list) --
Depending on the input, this is a list of configuration items tagged with a specific tag, or a list of tags for a specific configuration item.
(dict) --
Tags for a configuration item. Tags are metadata that help you categorize IT assets.
configurationType (string) --
A type of IT asset to tag.
configurationId (string) --
The configuration ID for the item to tag. You can specify a list of keys and values.
key (string) --
A type of tag on which to filter. For example, serverType .
value (string) --
A value on which to filter. For example key = serverType and value = web server .
timeOfCreation (datetime) --
The time the configuration tag was created in Coordinated Universal Time (UTC).
nextToken (string) --
The call returns a token. Use this token to get the next set of results.
Disassociates one or more configuration items from an application.
See also: AWS API Documentation
Request Syntax
response = client.disassociate_configuration_items_from_application(
applicationConfigurationId='string',
configurationIds=[
'string',
]
)
[REQUIRED]
Configuration ID of an application from which each item is disassociated.
[REQUIRED]
Configuration ID of each item to be disassociated from an application.
dict
Response Syntax
{}
Response Structure
Deprecated. Use StartExportTask instead.
Exports all discovered configuration data to an Amazon S3 bucket or an application that enables you to view and evaluate the data. Data includes tags and tag associations, processes, connections, servers, and system performance. This API returns an export ID that you can query using the DescribeExportConfigurations API. The system imposes a limit of two configuration exports in six hours.
Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response = client.export_configurations()
{
'exportId': 'string'
}
Response Structure
A unique identifier that you can use to query the export status.
Generate a presigned url given a client, its method, and arguments
The presigned url
Retrieves a short summary of discovered assets.
See also: AWS API Documentation
Request Syntax
response = client.get_discovery_summary()
{
'servers': 123,
'applications': 123,
'serversMappedToApplications': 123,
'serversMappedtoTags': 123,
'agentSummary': {
'activeAgents': 123,
'healthyAgents': 123,
'blackListedAgents': 123,
'shutdownAgents': 123,
'unhealthyAgents': 123,
'totalAgents': 123,
'unknownAgents': 123
},
'connectorSummary': {
'activeConnectors': 123,
'healthyConnectors': 123,
'blackListedConnectors': 123,
'shutdownConnectors': 123,
'unhealthyConnectors': 123,
'totalConnectors': 123,
'unknownConnectors': 123
}
}
Response Structure
The number of servers discovered.
The number of applications discovered.
The number of servers mapped to applications.
The number of servers mapped to tags.
Details about discovered agents, including agent status and health.
Number of active discovery agents.
Number of healthy discovery agents
Number of blacklisted discovery agents.
Number of discovery agents with status SHUTDOWN.
Number of unhealthy discovery agents.
Total number of discovery agents.
Number of unknown discovery agents.
Details about discovered connectors, including connector status and health.
Number of active discovery connectors.
Number of healthy discovery connectors.
Number of blacklisted discovery connectors.
Number of discovery connectors with status SHUTDOWN,
Number of unhealthy discovery connectors.
Total number of discovery connectors.
Number of unknown discovery connectors.
Create a paginator for an operation.
Returns an object that can wait for some condition.
Retrieves a list of configuration items according to criteria that you specify in a filter. The filter criteria identifies the relationship requirements.
See also: AWS API Documentation
Request Syntax
response = client.list_configurations(
configurationType='SERVER'|'PROCESS'|'CONNECTION'|'APPLICATION',
filters=[
{
'name': 'string',
'values': [
'string',
],
'condition': 'string'
},
],
maxResults=123,
nextToken='string',
orderBy=[
{
'fieldName': 'string',
'sortOrder': 'ASC'|'DESC'
},
]
)
[REQUIRED]
A valid configuration identified by Application Discovery Service.
You can filter the request using various logical operators and a key -value format. For example:
{"key": "serverType", "value": "webServer"}
For a complete list of filter options and guidance about using them with this action, see Querying Discovered Configuration Items .
A filter that can use conditional operators.
For more information about filters, see Querying Discovered Configuration Items .
The name of the filter.
A string value on which to filter. For example, if you choose the destinationServer.osVersion filter name, you could specify Ubuntu for the value.
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.
Certain filter criteria return output that can be sorted in ascending or descending order. For a list of output characteristics for each filter, see Using the ListConfigurations Action .
A field and direction for ordered output.
The field on which to order.
Ordering direction.
dict
Response Syntax
{
'configurations': [
{
'string': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
configurations (list) --
Returns configuration details, including the configuration ID, attribute names, and attribute values.
nextToken (string) --
Token to retrieve the next set of results. For example, if your call to ListConfigurations returned 100 items, but you set ListConfigurationsRequest$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.
Retrieves a list of servers that are one network hop away from a specified server.
See also: AWS API Documentation
Request Syntax
response = client.list_server_neighbors(
configurationId='string',
portInformationNeeded=True|False,
neighborConfigurationIds=[
'string',
],
maxResults=123,
nextToken='string'
)
[REQUIRED]
Configuration ID of the server for which neighbors are being listed.
List of configuration IDs to test for one-hop-away.
dict
Response Syntax
{
'neighbors': [
{
'sourceServerId': 'string',
'destinationServerId': 'string',
'destinationPort': 123,
'transportProtocol': 'string',
'connectionsCount': 123
},
],
'nextToken': 'string',
'knownDependencyCount': 123
}
Response Structure
(dict) --
neighbors (list) --
List of distinct servers that are one hop away from the given server.
(dict) --
Details about neighboring servers.
sourceServerId (string) --
The ID of the server that opened the network connection.
destinationServerId (string) --
The ID of the server that accepted the network connection.
destinationPort (integer) --
The destination network port for the connection.
transportProtocol (string) --
The network protocol used for the connection.
connectionsCount (integer) --
The number of open network connections with the neighboring server.
nextToken (string) --
Token to retrieve the next set of results. For example, if you specified 100 IDs for ListServerNeighborsRequest$neighborConfigurationIds but set ListServerNeighborsRequest$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.
knownDependencyCount (integer) --
Count of distinct servers that are one hop away from the given server.
Instructs the specified agents or connectors to start collecting data.
See also: AWS API Documentation
Request Syntax
response = client.start_data_collection_by_agent_ids(
agentIds=[
'string',
]
)
[REQUIRED]
The IDs of the agents or connectors from which to start collecting data. If you send a request to an agent/connector ID that you do not have permission to contact, according to your AWS account, the service does not throw an exception. Instead, it returns the error in the Description field. If you send a request to multiple agents/connectors and you do not have permission to contact some of those agents/connectors, the system does not throw an exception. Instead, the system shows Failed in the Description field.
{
'agentsConfigurationStatus': [
{
'agentId': 'string',
'operationSucceeded': True|False,
'description': 'string'
},
]
}
Response Structure
Information about agents or the connector that were instructed to start collecting data. Information includes the agent/connector ID, a description of the operation performed, and whether the agent/connector configuration was updated.
Information about agents or connectors that were instructed to start collecting data. Information includes the agent/connector ID, a description of the operation, and whether the agent/connector configuration was updated.
The agent/connector ID.
Information about the status of the StartDataCollection and StopDataCollection operations. The system has recorded the data collection operation. The agent/connector receives this command the next time it polls for a new command.
A description of the operation performed.
Begins the export of discovered data to an S3 bucket.
If you specify agentIds in a filter, the task exports up to 72 hours of detailed data collected by the identified Application Discovery Agent, including network, process, and performance details. A time range for exported agent data may be set by using startTime and endTime . Export of detailed agent data is limited to five concurrently running exports.
If you do not include an agentIds filter, summary data is exported that includes both AWS Agentless Discovery Connector data and summary data from AWS Discovery Agents. Export of summary data is limited to two exports per day.
See also: AWS API Documentation
Request Syntax
response = client.start_export_task(
exportDataFormat=[
'CSV'|'GRAPHML',
],
filters=[
{
'name': 'string',
'values': [
'string',
],
'condition': 'string'
},
],
startTime=datetime(2015, 1, 1),
endTime=datetime(2015, 1, 1)
)
The file format for the returned export data. Default value is CSV . Note: The GRAPHML option has been deprecated.
If a filter is present, it selects the single agentId of the Application Discovery Agent for which data is exported. The agentId can be found in the results of the DescribeAgents API or CLI. If no filter is present, startTime and endTime are ignored and exported data includes both Agentless Discovery Connector data and summary data from Application Discovery agents.
Used to select which agent's data is to be exported. A single agent ID may be selected for export using the StartExportTask action.
A single ExportFilter name. Supported filters: agentId .
A single agentId for a Discovery Agent. An agentId can be found using the DescribeAgents action. Typically an ADS agentId is in the form o-0123456789abcdef0 .
Supported condition: EQUALS
dict
Response Syntax
{
'exportId': 'string'
}
Response Structure
(dict) --
exportId (string) --
A unique identifier used to query the status of an export request.
Instructs the specified agents or connectors to stop collecting data.
See also: AWS API Documentation
Request Syntax
response = client.stop_data_collection_by_agent_ids(
agentIds=[
'string',
]
)
[REQUIRED]
The IDs of the agents or connectors from which to stop collecting data.
{
'agentsConfigurationStatus': [
{
'agentId': 'string',
'operationSucceeded': True|False,
'description': 'string'
},
]
}
Response Structure
Information about the agents or connector that were instructed to stop collecting data. Information includes the agent/connector ID, a description of the operation performed, and whether the agent/connector configuration was updated.
Information about agents or connectors that were instructed to start collecting data. Information includes the agent/connector ID, a description of the operation, and whether the agent/connector configuration was updated.
The agent/connector ID.
Information about the status of the StartDataCollection and StopDataCollection operations. The system has recorded the data collection operation. The agent/connector receives this command the next time it polls for a new command.
A description of the operation performed.
Updates metadata about an application.
See also: AWS API Documentation
Request Syntax
response = client.update_application(
configurationId='string',
name='string',
description='string'
)
[REQUIRED]
Configuration ID of the application to be updated.
dict
Response Syntax
{}
Response Structure
The available paginators are: