Skip to content

arm-resource-invalid-action-verb

Id
@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-action-verb

Actions must be HTTP Post or Get operations.

-
@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-action-verb

For ARM http operations, the action verb must be @post or @get. Any other action verb is flagged as incorrect.

  • Area: API, SDK

A resource action that does not use POST or GET produces an improper HTTP API and can break the C# SDK and emitters that model resource actions (service, portal).

This rule corresponds to the LintDiff rule InvalidVerbUsed.

@delete op getAction is ArmProviderActionAsync<
{
name: string;
},
ArmCombinedLroHeaders,
SubscriptionActionScope
>;
op postAction is ArmProviderActionAsync<
{
name: string;
},
ArmCombinedLroHeaders,
SubscriptionActionScope
>;
@get op getAction is ArmProviderActionSync<
{
name: string;
},
ArmCombinedLroHeaders,
SubscriptionActionScope
>;

Suppress only when needed to match an existing API. Use the standard resource action templates and do not override the verb with @put, @patch, @delete, or @head.