AWS Application Discovery Service

2023/10/20 - AWS Application Discovery Service - 3 new 1 updated api methods

Changes  This release introduces three new APIs: StartBatchDeleteConfigurationTask, DescribeBatchDeleteConfigurationTask, and BatchDeleteAgents.

StartBatchDeleteConfigurationTask (new) Link ¶

Takes a list of configurationId as input and starts an asynchronous deletion task to remove the configurationItems. Returns a unique deletion task identifier.

See also: AWS API Documentation

Request Syntax

client.start_batch_delete_configuration_task(
    configurationType='SERVER',
    configurationIds=[
        'string',
    ]
)
type configurationType

string

param configurationType

[REQUIRED]

The type of configuration item to delete. Supported types are: SERVER.

type configurationIds

list

param configurationIds

[REQUIRED]

The list of configuration IDs that will be deleted by the task.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'taskId': 'string'
}

Response Structure

  • (dict) --

    • taskId (string) --

      The unique identifier associated with the newly started deletion task.

BatchDeleteAgents (new) Link ¶

Deletes one or more agents or collectors as specified by ID. Deleting an agent or collector does not delete the previously discovered data. To delete the data collected, use StartBatchDeleteConfigurationTask .

See also: AWS API Documentation

Request Syntax

client.batch_delete_agents(
    deleteAgents=[
        {
            'agentId': 'string',
            'force': True|False
        },
    ]
)
type deleteAgents

list

param deleteAgents

[REQUIRED]

The list of agents to delete.

  • (dict) --

    An object representing the agent or data collector to be deleted along with the optional configurations for error handling.

    • agentId (string) -- [REQUIRED]

      The ID of the agent or data collector to delete.

    • force (boolean) --

      Optional flag used to force delete an agent or data collector. It is needed to delete any agent in HEALTHY/UNHEALTHY/RUNNING status. Note that deleting an agent that is actively reporting health causes it to be re-registered with a different agent ID after data collector re-connects with Amazon Web Services.

rtype

dict

returns

Response Syntax

{
    'errors': [
        {
            'agentId': 'string',
            'errorMessage': 'string',
            'errorCode': 'NOT_FOUND'|'INTERNAL_SERVER_ERROR'|'AGENT_IN_USE'
        },
    ]
}

Response Structure

  • (dict) --

    • errors (list) --

      A list of agent IDs that failed to delete during the deletion task, each paired with an error message.

      • (dict) --

        An object representing the agent or data collector that failed to delete, each containing agentId, errorMessage, and errorCode.

        • agentId (string) --

          The ID of the agent or data collector to delete.

        • errorMessage (string) --

          The description of the error that occurred for the delete failed agent.

        • errorCode (string) --

          The type of error that occurred for the delete failed agent. Valid status are: AGENT_IN_USE | NOT_FOUND | INTERNAL_SERVER_ERROR.

DescribeBatchDeleteConfigurationTask (new) Link ¶

Takes a unique deletion task identifier as input and returns metadata about a configuration deletion task.

See also: AWS API Documentation

Request Syntax

client.describe_batch_delete_configuration_task(
    taskId='string'
)
type taskId

string

param taskId

[REQUIRED]

The ID of the task to delete.

rtype

dict

returns

Response Syntax

{
    'task': {
        'taskId': 'string',
        'status': 'INITIALIZING'|'VALIDATING'|'DELETING'|'COMPLETED'|'FAILED',
        'startTime': datetime(2015, 1, 1),
        'endTime': datetime(2015, 1, 1),
        'configurationType': 'SERVER',
        'requestedConfigurations': [
            'string',
        ],
        'deletedConfigurations': [
            'string',
        ],
        'failedConfigurations': [
            {
                'configurationId': 'string',
                'errorStatusCode': 123,
                'errorMessage': 'string'
            },
        ],
        'deletionWarnings': [
            {
                'configurationId': 'string',
                'warningCode': 123,
                'warningText': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • task (dict) --

      The BatchDeleteConfigurationTask that represents the deletion task being executed.

      • taskId (string) --

        The deletion task's unique identifier.

      • status (string) --

        The current execution status of the deletion task. Valid status are: INITIALIZING | VALIDATING | DELETING | COMPLETED | FAILED.

      • startTime (datetime) --

        An epoch seconds timestamp (UTC) of when the deletion task was started.

      • endTime (datetime) --

        An epoch seconds timestamp (UTC) of when the deletion task was completed or failed.

      • configurationType (string) --

        The type of configuration item to delete. Supported types are: SERVER.

      • requestedConfigurations (list) --

        The list of configuration IDs that were originally requested to be deleted by the deletion task.

        • (string) --

      • deletedConfigurations (list) --

        The list of configuration IDs that were successfully deleted by the deletion task.

        • (string) --

      • failedConfigurations (list) --

        A list of configuration IDs that failed to delete during the deletion task, each paired with an error message.

        • (dict) --

          A configuration ID paired with an error message.

          • configurationId (string) --

            The unique identifier of the configuration the failed to delete.

          • errorStatusCode (integer) --

            The integer error code associated with the error message.

          • errorMessage (string) --

            A descriptive message indicating why the associated configuration failed to delete.

      • deletionWarnings (list) --

        A list of configuration IDs that produced warnings regarding their deletion, paired with a warning message.

        • (dict) --

          A configuration ID paired with a warning message.

          • configurationId (string) --

            The unique identifier of the configuration that produced a warning.

          • warningCode (integer) --

            The integer warning code associated with the warning message.

          • warningText (string) --

            A descriptive message of the warning the associated configuration ID produced.

BatchDeleteImportData (updated) Link ¶
Changes (request)
{'deleteHistory': 'boolean'}

Deletes one or more import tasks, each identified by their import ID. Each import task has a number of records that can identify servers or applications.

Amazon Web Services Application Discovery Service has built-in matching logic that will identify when discovered servers match existing entries that you've previously discovered, the information for the already-existing discovered server is updated. When you delete an import task that contains records that were used to match, the information in those matched records that comes from the deleted records will also be deleted.

See also: AWS API Documentation

Request Syntax

client.batch_delete_import_data(
    importTaskIds=[
        'string',
    ],
    deleteHistory=True|False
)
type importTaskIds

list

param importTaskIds

[REQUIRED]

The IDs for the import tasks that you want to delete.

  • (string) --

type deleteHistory

boolean

param deleteHistory

Set to true to remove the deleted import task from DescribeImportTasks .

rtype

dict

returns

Response Syntax

{
    'errors': [
        {
            'importTaskId': 'string',
            'errorCode': 'NOT_FOUND'|'INTERNAL_SERVER_ERROR'|'OVER_LIMIT',
            'errorDescription': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • errors (list) --

      Error messages returned for each import task that you deleted as a response for this command.

      • (dict) --

        Error messages returned for each import task that you deleted as a response for this command.

        • importTaskId (string) --

          The unique import ID associated with the error that occurred.

        • errorCode (string) --

          The type of error that occurred for a specific import task.

        • errorDescription (string) --

          The description of the error that occurred for a specific import task.