Skip to content

arm-resource-invalid-action-verb

-
@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.

@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
>;

Impacts the API and generated SDKs: using a verb other than POST or GET for a resource action can cause failures in the C# SDK and emitters that model resource actions. Ask the author to use the standard resource action templates and not override the verb with @put, @patch, @delete, or @head. Accept a suppression only when needed to match an existing API.