Skip to content

no-resource-delete-operation

Id
@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation

Check for resources that must have a delete operation.

-
@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation

Every ARM resource that provides a create operation must also provide a delete operation.

  • Area: API

A tracked resource without a delete operation violates the RPC contract.

This rule corresponds to the LintDiff rule AllTrackedResourcesMustHaveDelete.

@armResourceOperations
interface EmployeeOperations {
createOrUpdate is ArmResourceCreateOrReplaceAsync<Employee>;
}
@armResourceOperations
interface EmployeeOperations {
createOrUpdate is ArmResourceCreateOrReplaceAsync<Employee>;
delete is ArmResourceDeleteWithoutOkAsync<Store>; // delete operation for a different resource
}
@armResourceOperations
interface EmployeeOperations {
createOrUpdate is ArmResourceCreateOrReplaceAsync<Employee>;
delete is ArmResourceDeleteWithoutOkAsync<Employee>;
}

Suppress per the RPC guidelines; otherwise add a standard delete operation for the resource.