delete-operation-response-codes
@azure-tools/typespec-azure-resource-manager/delete-operation-response-codes
Synchronous
Section titled “Synchronous”Synchronous delete operations should use the ArmResourceDeleteSync
template. They must have 200, 204, default and no other responses.
❌ Incorrect
Section titled “❌ Incorrect”@armResourceOperationsinterface Employees { @armResourceDelete(Employee) delete(...ApiVersionParameter): { @statusCode _: 200; result: boolean; };}
âś… Correct
Section titled “✅ Correct”@armResourceOperationsinterface Employees { delete is ArmResourceDeleteSync<Employee>;}
Asynchronous
Section titled “Asynchronous”Long-running (LRO) delete operations should use the ArmResourceDeleteWithoutOkAsync
template. They must have 202, 204, default, and no other responses.
❌ Incorrect
Section titled “❌ Incorrect”@armResourceOperationsinterface Employees { delete is ArmResourceDeleteAsync<Employee>;}
âś… Correct
Section titled “✅ Correct”@armResourceOperationsinterface Employees { delete is ArmResourceDeleteWithoutOkAsync<Employee>;}