Deletes a network migration definition. This operation removes the migration definition and all associated metadata.
Parameters:
Raises:
Examples:
Sample DeleteNetworkMigrationDefinition call
>>> client.delete_network_migration_definition(network_migration_definition_id='nmd-01234567891234567')
Source code in docs_src/capo_mgn/_services/mgn.py
| def delete_network_migration_definition(
self,
network_migration_definition_id: "capo_mgn.types.network_migration_definition_id.NetworkMigrationDefinitionID",
*,
config_overrides: Optional[mgnClientConfig] = None,
) -> "capo_mgn.types.delete_network_migration_definition_response.DeleteNetworkMigrationDefinitionResponse":
"""<p>Deletes a network migration definition. This operation removes the migration definition and all associated metadata.</p>
Args:
network_migration_definition_id: <p>The unique identifier of the network migration definition to delete.</p>
Raises:
capo_mgn.errors.access_denied_exception.AccessDeniedException: <p>Operation denied due to a file permission or access check error.</p>
capo_mgn.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the target resource.</p>
capo_mgn.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found exception.</p>
capo_mgn.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Sample DeleteNetworkMigrationDefinition call
>>> client.delete_network_migration_definition(network_migration_definition_id='nmd-01234567891234567')
"""
def _handler(
req: "OperationRequest[capo_mgn.types.delete_network_migration_definition_request.DeleteNetworkMigrationDefinitionRequest]",
) -> OperationResponse[
"capo_mgn.types.delete_network_migration_definition_response.DeleteNetworkMigrationDefinitionResponse"
]:
import capo_mgn._operations.application_migration_service.delete_network_migration_definition
output, http_response = (
capo_mgn._operations.application_migration_service.delete_network_migration_definition.delete_network_migration_definition(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteNetworkMigrationDefinition")
)
input_: capo_mgn.types.delete_network_migration_definition_request.DeleteNetworkMigrationDefinitionRequest = {
"network_migration_definition_id": network_migration_definition_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|