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.
Parameters:
Raises:
Source code in docs_src/capo_application_discovery_service/_services/application_discovery_service.py
| def batch_delete_import_data(
self,
import_task_ids: "capo_application_discovery_service.types.to_delete_identifier_list.ToDeleteIdentifierList",
*,
config_overrides: Optional[ApplicationDiscoveryServiceClientConfig] = None,
delete_history: Optional[
"capo_application_discovery_service.types.boolean.Boolean"
] = None,
) -> "capo_application_discovery_service.types.batch_delete_import_data_response.BatchDeleteImportDataResponse":
"""<p>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. </p> <p>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.</p>
Args:
import_task_ids: <p>The IDs for the import tasks that you want to delete.</p>
delete_history: <p> Set to <code>true</code> to remove the deleted import task from <a>DescribeImportTasks</a>. </p>
Raises:
capo_application_discovery_service.errors.authorization_error_exception.AuthorizationErrorException: <p>The user does not have permission to perform the action. Check the IAM policy associated with this user.</p>
capo_application_discovery_service.errors.home_region_not_set_exception.HomeRegionNotSetException: <p>The home Region is not set. Set the home Region to continue.</p>
capo_application_discovery_service.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid. Verify the parameters and try again.</p>
capo_application_discovery_service.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value of one or more parameters are either invalid or out of range. Verify the parameter values and try again.</p>
capo_application_discovery_service.errors.server_internal_error_exception.ServerInternalErrorException: <p>The server experienced an internal error. Try again.</p>
capo_application_discovery_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_application_discovery_service.types.batch_delete_import_data_request.BatchDeleteImportDataRequest]",
) -> OperationResponse[
"capo_application_discovery_service.types.batch_delete_import_data_response.BatchDeleteImportDataResponse"
]:
import capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.batch_delete_import_data
output, http_response = (
capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.batch_delete_import_data.batch_delete_import_data(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("BatchDeleteImportData")
)
input_: capo_application_discovery_service.types.batch_delete_import_data_request.BatchDeleteImportDataRequest = {
"import_task_ids": import_task_ids
}
if delete_history is not None:
input_["delete_history"] = delete_history
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|