arm-agent-base-type-lifecycle-operations
@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-lifecycle-operationsConversation and Response child resources of an Agent must define create, read, update, and delete lifecycle operations.
Implement the full lifecycle on each required child resource so Agent clients can manage conversations and responses consistently.
Impact
Section titled “Impact”- Area: API, SDK
Agent base types must correctly model their lifecycle operations; violations can misrepresent the resource for emitters and tooling.
❌ Incorrect
Section titled “❌ Incorrect”@armProviderNamespacenamespace Microsoft.Contoso;
model MyAgent is Agent<MyAgentProperties> { ...ResourceNameParameter<MyAgent>;}
model MyConversation is AgentConversation<MyConversationProperties, MyAgent> { ...ResourceNameParameter<MyConversation>;}
@armResourceOperationsinterface Conversations { get is ArmResourceRead<MyConversation>; // Missing createOrUpdate, update, and delete}✅ Correct
Section titled “✅ Correct”@armProviderNamespacenamespace Microsoft.Contoso;
model MyAgent is Agent<MyAgentProperties> { ...ResourceNameParameter<MyAgent>;}
model MyConversation is AgentConversation<MyConversationProperties, MyAgent> { ...ResourceNameParameter<MyConversation>;}
@armResourceOperationsinterface Conversations { get is ArmResourceRead<MyConversation>; createOrUpdate is ArmResourceCreateOrReplaceAsync<MyConversation>; update is ArmCustomPatchSync< MyConversation, Azure.ResourceManager.Foundations.ResourceUpdateModel<MyConversation, MyConversationProperties> >; delete is ArmResourceDeleteWithoutOkAsync<MyConversation>; listByAgent is ArmResourceListByParent<MyConversation>;}Suppression
Section titled “Suppression”Suppress only when required to match an existing API; otherwise use the standard agent base type patterns.