Skip to content

arm-resource-interface-requires-decorator

Id
@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator

Each resource interface must have an @armResourceOperations decorator.

The decorator associates the interface with its ARM resource type so ARM operations can be validated against the correct resource.

  • Area: API

Without @armResourceOperations, the interface is not associated with its ARM resource type, so ARM operation validation cannot be applied and the generated operations may be incorrect.

interface FooResources extends TrackedResourceOperations<FooResource, FooProperties> {}
@armResourceOperations(FooResource)
interface FooResources extends TrackedResourceOperations<FooResource, FooProperties> {}

Do not suppress. Add the @armResourceOperations decorator to associate the interface with its resource.