From d6f08e66c0989c512a07c04bd3af75ebd968c6f9 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 8 Jun 2026 15:22:27 +0800 Subject: [PATCH 01/49] Add CSharp customizations for Monitor migration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../ServiceDiagnosticSettingsResource.tsp | 1 - .../Microsoft.Insights/Insights/client.tsp | 217 +++++++++++++++++- .../Insights/tspconfig.yaml | 3 + 3 files changed, 218 insertions(+), 3 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp index 5cfbc0a86ce3..814afe3956ad 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp @@ -14,7 +14,6 @@ namespace ServiceDiagnosticsSettingsApi; * Description of a service diagnostic setting */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-base-parameter" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" -@singleton("service") @extensionResource model ServiceDiagnosticSettingsResource is Azure.ResourceManager.ExtensionResource { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index d466b1aeffce..151826558f27 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -22,8 +22,14 @@ using TypeSpec.Versioning; using TypeSpec.Http; using TypeSpec.Rest; using Microsoft.Insights; +using ActionGroupsApi; +using ActivityLogAlertsApi; +using AlertRulesIncidentsApi; using ScheduledQueryRuleApi; using AutoScaleApi; +using DataCollectionApi; +using LogProfilesApi; +using MetricAlertApi; using Microsoft.Common; using PrivateLinkScopesApi; using MetricsApi; @@ -63,6 +69,213 @@ namespace Microsoft.InsightsCombinedClient; "python" ); +// C# compatibility names from the shipped AutoRest-based Azure.ResourceManager.Monitor package. +@@clientName( + PrivateLinkScopesApi.AzureMonitorPrivateLinkScope, + "MonitorPrivateLinkScope", + "csharp" +); +@@clientName( + PrivateLinkScopesApi.PrivateEndpointConnection, + "MonitorPrivateEndpointConnection", + "csharp" +); +@@clientName( + PrivateLinkScopesApi.PrivateLinkResource, + "MonitorPrivateLink", + "csharp" +); +@@clientName( + PrivateLinkScopesApi.ScopedResource, + "MonitorPrivateLinkScoped", + "csharp" +); +@@clientLocation( + NetworkSecurityPerimeterApi.NetworkSecurityPerimeterConfigurations.getNSP, + "NspActionGroup", + "csharp" +); +@@clientLocation( + NetworkSecurityPerimeterApi.NetworkSecurityPerimeterConfigurations.listNSP, + "NspActionGroup", + "csharp" +); +@@clientLocation( + NetworkSecurityPerimeterApi.NetworkSecurityPerimeterConfigurations.reconcileNSP, + "NspActionGroup", + "csharp" +); +@@clientName( + DataCollectionApi.KnownPerfCounterDataSourceStreams, + "PerfCounterDataSourceStream", + "csharp" +); +@@clientName( + DataCollectionApi.KnownWindowsEventLogDataSourceStreams, + "WindowsEventLogDataSourceStream", + "csharp" +); +@@clientName( + DataCollectionApi.KnownSyslogDataSourceStreams, + "SyslogDataSourceStream", + "csharp" +); +@@clientName( + DataCollectionApi.KnownSyslogDataSourceFacilityNames, + "SyslogDataSourceFacilityName", + "csharp" +); +@@clientName( + DataCollectionApi.KnownExtensionDataSourceStreams, + "ExtensionDataSourceStream", + "csharp" +); +@@clientName( + DataCollectionApi.KnownLogFilesDataSourceFormat, + "LogFilesDataSourceFormat", + "csharp" +); +@@clientName( + DataCollectionApi.KnownPrometheusForwarderDataSourceStreams, + "DataCollectionRuleKnownPrometheusForwarderDataSourceStream", + "csharp" +); +@@clientName( + DataCollectionApi.EventHubDestination, + "DataCollectionRuleEventHubDestination", + "csharp" +); +@@clientName( + DataCollectionApi.KnownDataFlowStreams, + "DataFlowStream", + "csharp" +); +@@clientName( + DataCollectionApi.LocationSpec, + "DataCollectionRuleBcdrLocationSpec", + "csharp" +); +@@clientName( + DataCollectionApi.KnownLocationSpecProvisioningStatus, + "DataCollectionRuleBcdrLocationSpecProvisioningStatus", + "csharp" +); +@@clientName( + DataCollectionApi.KnownSyslogDataSourceLogLevels, + "SyslogDataSourceLogLevel", + "csharp" +); +@@clientName( + DataCollectionApi.EventHubDirectDestination, + "DataCollectionRuleEventHubDirectDestination", + "csharp" +); +@@clientName( + DataCollectionApi.StorageBlobDestination, + "DataCollectionRuleStorageBlobDestination", + "csharp" +); +@@clientName( + DataCollectionApi.StorageTableDestination, + "DataCollectionRuleStorageTableDestination", + "csharp" +); +@@clientName( + PrivateLinkScopesApi.AccessModeSettings, + "MonitorPrivateLinkAccessModeSettings", + "csharp" +); +@@clientName( + PrivateLinkScopesApi.AccessModeSettingsExclusion, + "MonitorPrivateLinkAccessModeSettingsExclusion", + "csharp" +); +@@clientName( + PrivateLinkScopesApi.AccessMode, + "MonitorPrivateLinkAccessMode", + "csharp" +); +@@clientName(AutoScaleApi.TimeWindow, "MonitorTimeWindow", "csharp"); +@@clientName(AutoScaleApi.Recurrence, "MonitorRecurrence", "csharp"); +@@clientName(AutoScaleApi.ScaleAction, "MonitorScaleAction", "csharp"); +@@clientName( + AutoScaleApi.ScaleCapacity, + "MonitorScaleCapacity", + "csharp" +); +@@clientName(AutoScaleApi.ScaleRule, "AutoscaleRule", "csharp"); +@@clientName( + AutoScaleApi.TimeAggregationType, + "MetricTriggerTimeAggregationType", + "csharp" +); +@@clientName(AutoScaleApi.ScaleDirection, "MonitorScaleDirection", "csharp"); +@@clientName( + AutoScaleApi.ComparisonOperationType, + "MetricTriggerComparisonOperation", + "csharp" +); +@@clientName( + AutoScaleApi.ScaleRuleMetricDimension, + "AutoscaleRuleMetricDimension", + "csharp" +); +@@clientName( + MetricAlertApi.AggregationTypeEnum, + "MetricCriteriaTimeAggregationType", + "csharp" +); +@@clientName(MetricAlertApi.Operator, "MetricCriteriaOperator", "csharp"); +@@clientName( + ScheduledQueryRuleApi.ConditionOperator, + "MonitorConditionOperator", + "csharp" +); +@@clientName( + AutoScaleApi.ScaleRuleMetricDimensionOperationType.Equals, + "Equal", + "csharp" +); +@@clientName(MetricAlertApi.Operator.Equals, "Equal", "csharp"); +@@clientName(ScheduledQueryRuleApi.ConditionOperator.Equals, "Equal", "csharp"); +@@clientName(ActivityLogAlertsApi.AlertRuleLeafCondition.equals, "Equal", "csharp"); +@@clientName(AutoScaleApi.AutoscaleSetting.name, "AutoscaleSettingName", "csharp"); +@@clientName(MetricsApi.MetricDefinitionsOperationGroup.list, "GetMonitorMetricDefinitions", "csharp"); +@@clientName( + MetricsApi.MetricDefinitionsOperationGroup.listAtSubscriptionScope, + "GetSubscriptionMonitorMetricDefinitions", + "csharp" +); +@@clientName(MetricsApi.MetricNamespacesOperationGroup.list, "GetMonitorMetricNamespaces", "csharp"); +@@clientName( + PrivateLinkScopesApi.PrivateLinkResources.listByPrivateLinkScope, + "GetAllPrivateLinkResources", + "csharp" +); + +union MonitorDayOfWeek { + string, + Sunday: "Sunday", + Monday: "Monday", + Tuesday: "Tuesday", + Wednesday: "Wednesday", + Thursday: "Thursday", + Friday: "Friday", + Saturday: "Saturday", +} + +union MonitorOperationType { + string, + Scale: "Scale", +} + +@@alternateType(AutoScaleApi.RecurrentSchedule.days, MonitorDayOfWeek[], "csharp"); +@@alternateType( + AutoScaleApi.AutoscaleNotification.operation, + MonitorOperationType, + "csharp" +); + #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "list should be pageable" @@Azure.ClientGenerator.Core.Legacy.markAsPageable( PrivateLinkScopesApi.PrivateEndpointConnections.listByPrivateLinkScope, @@ -105,12 +318,12 @@ namespace Microsoft.InsightsCombinedClient; @@clientName( Azure.ResourceManager.CommonTypes.ErrorResponse, "ErrorResponseAutoGenerated", - "java,python" + "java,python,csharp" ); @@clientName( Azure.ResourceManager.CommonTypes.ErrorDetail, "ErrorDetailAutoGenerated", - "java,python" + "java,python,csharp" ); // Response.resourceregion - rename to resourceRegion for Java camelCase diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/tspconfig.yaml b/specification/monitor/resource-manager/Microsoft.Insights/Insights/tspconfig.yaml index 629598a7966b..a3b15a353a46 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/tspconfig.yaml +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/tspconfig.yaml @@ -55,3 +55,6 @@ options: generate-fakes: true head-as-boolean: true inject-spans: true + "@azure-typespec/http-client-csharp-mgmt": + namespace: "Azure.ResourceManager.Monitor" + emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" From d7e5a4586fe44dfe5c2d0485e3514cb9752ee36b Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 11 Jun 2026 14:56:32 +0800 Subject: [PATCH 02/49] Split Monitor NSP clients for CSharp generation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 151826558f27..d8dfc520beb3 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -90,6 +90,9 @@ namespace Microsoft.InsightsCombinedClient; "MonitorPrivateLinkScoped", "csharp" ); + +// Split NSP operations by resource type for C# so each generated client has a single API version. +// Keeping ActionGroup NSP operations in ActionGroups mixes 2021-10-01 with 2024-10-01-preview. @@clientLocation( NetworkSecurityPerimeterApi.NetworkSecurityPerimeterConfigurations.getNSP, "NspActionGroup", @@ -105,6 +108,24 @@ namespace Microsoft.InsightsCombinedClient; "NspActionGroup", "csharp" ); + +// Split DataCollectionEndpoint NSP operations from the main DataCollectionEndpoints client. +// The main endpoint operations use 2024-03-11, while NSP operations use 2021-10-01. +@@clientLocation( + NetworkSecurityPerimeterApi.DataCollectionEndpoints.getNSP, + "NspDataCollectionEndpoint", + "csharp" +); +@@clientLocation( + NetworkSecurityPerimeterApi.DataCollectionEndpoints.listNSP, + "NspDataCollectionEndpoint", + "csharp" +); +@@clientLocation( + NetworkSecurityPerimeterApi.DataCollectionEndpoints.reconcileNSP, + "NspDataCollectionEndpoint", + "csharp" +); @@clientName( DataCollectionApi.KnownPerfCounterDataSourceStreams, "PerfCounterDataSourceStream", From 26f9ec32d84306ae0e349cdde079a6738020da78 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 12 Jun 2026 19:01:27 +0800 Subject: [PATCH 03/49] Align Monitor extension resource names for CSharp Use named legacy extension operations and C# client names so data collection rule associations and diagnostic settings keep the GA Azure.ResourceManager.Monitor resource names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...ectionRuleAssociationProxyOnlyResource.tsp | 26 ++++++------ .../ServiceDiagnosticSettingsResource.tsp | 42 +++++++++++++++---- .../Microsoft.Insights/Insights/client.tsp | 27 ++++++++++++ 3 files changed, 74 insertions(+), 21 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp index 1f5da6eebb01..a59dc1498ea4 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp @@ -27,7 +27,7 @@ model DataCollectionRuleAssociationProxyOnlyResource ...Azure.ResourceManager.Legacy.EntityTagProperty; } -alias DataCollectionRuleAssociationProxyOnlyResourcesOps = Azure.ResourceManager.Legacy.LegacyOperations< +alias DataCollectionRuleAssociationProxyOnlyResourcesOps = Azure.ResourceManager.Legacy.ExtensionOperations< { ...ApiVersionParameter; @@ -38,6 +38,11 @@ alias DataCollectionRuleAssociationProxyOnlyResourcesOps = Azure.ResourceManager @minLength(1) resourceUri: string; + }, + { + ...Azure.ResourceManager.Legacy.Provider; + }, + { ...Azure.ResourceManager.Legacy.Provider; /** @@ -47,7 +52,7 @@ alias DataCollectionRuleAssociationProxyOnlyResourcesOps = Azure.ResourceManager @segment("dataCollectionRuleAssociations") associationName: string; }, - {} + "DataCollectionRuleAssociation" >; @armResourceOperations(#{ omitTags: true }) @@ -57,10 +62,9 @@ interface DataCollectionRuleAssociationProxyOnlyResources { */ @tag("DataCollectionRuleAssociations") @summary("Returns the specified association.") - get is Extension.Read< - Extension.ScopeParameter, + get is DataCollectionRuleAssociationProxyOnlyResourcesOps.Read< DataCollectionRuleAssociationProxyOnlyResource, - Error = ErrorResponseCommonV2 + ErrorType = ErrorResponseCommonV2 >; /** @@ -75,7 +79,7 @@ interface DataCollectionRuleAssociationProxyOnlyResources { Response = | DataCollectionRuleAssociationProxyOnlyResource | ArmResourceCreatedSyncResponse, - OverrideErrorType = ErrorResponseCommonV2 + ErrorType = ErrorResponseCommonV2 >; /** @@ -83,10 +87,9 @@ interface DataCollectionRuleAssociationProxyOnlyResources { */ @tag("DataCollectionRuleAssociations") @summary("Deletes an association.") - delete is Extension.DeleteSync< - Extension.ScopeParameter, + delete is DataCollectionRuleAssociationProxyOnlyResourcesOps.DeleteSync< DataCollectionRuleAssociationProxyOnlyResource, - Error = ErrorResponseCommonV2 + ErrorType = ErrorResponseCommonV2 >; /** @@ -94,10 +97,9 @@ interface DataCollectionRuleAssociationProxyOnlyResources { */ @tag("DataCollectionRuleAssociations") @summary("Lists associations for the specified resource.") - listByResource is Extension.ListByTarget< - Extension.ScopeParameter, + listByResource is DataCollectionRuleAssociationProxyOnlyResourcesOps.List< DataCollectionRuleAssociationProxyOnlyResource, - Error = ErrorResponseCommonV2 + ErrorType = ErrorResponseCommonV2 >; } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp index 814afe3956ad..ff6103c9999b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp @@ -39,6 +39,33 @@ model ServiceDiagnosticSettingsResource tags?: Record; } +alias ServiceDiagnosticSettingsResourcesOps = Azure.ResourceManager.Legacy.ExtensionOperations< + { + ...ApiVersionParameter; + + /** + * The identifier of the resource. + */ + @path(#{ allowReserved: true }) + @minLength(1) + resourceUri: string; + }, + { + ...Azure.ResourceManager.Legacy.Provider; + }, + { + ...Azure.ResourceManager.Legacy.Provider; + + /** + * The name of the diagnostic setting. + */ + @path + @segment("diagnosticSettings") + diagnosticSetting: string; + }, + "DiagnosticSetting" +>; + #suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @armResourceOperations(#{ omitTags: true }) interface ServiceDiagnosticSettingsResources { @@ -46,10 +73,9 @@ interface ServiceDiagnosticSettingsResources { * Gets the active diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases. */ @tag("ServiceDiagnosticSettings") - get is Extension.Read< - Extension.ScopeParameter, + get is ServiceDiagnosticSettingsResourcesOps.Read< ServiceDiagnosticSettingsResource, - Error = Microsoft.Common.ErrorResponse + ErrorType = Microsoft.Common.ErrorResponse >; /** @@ -57,22 +83,20 @@ interface ServiceDiagnosticSettingsResources { */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @tag("ServiceDiagnosticSettings") - createOrUpdate is Extension.CreateOrReplaceSync< - Extension.ScopeParameter, + createOrUpdate is ServiceDiagnosticSettingsResourcesOps.CreateOrUpdateSync< ServiceDiagnosticSettingsResource, Response = ArmResourceUpdatedResponse, - Error = Microsoft.Common.ErrorResponse + ErrorType = Microsoft.Common.ErrorResponse >; /** * Updates an existing ServiceDiagnosticSettingsResource. To update other fields use the CreateOrUpdate method. **WARNING**: This method will be deprecated in future releases. */ @patch(#{ implicitOptionality: false }) - update is Extension.CustomPatchSync< - Extension.ScopeParameter, + update is ServiceDiagnosticSettingsResourcesOps.CustomPatchSync< ServiceDiagnosticSettingsResource, PatchModel = ServiceDiagnosticSettingsResourcePatch, - Error = Microsoft.Common.ErrorResponse + ErrorType = Microsoft.Common.ErrorResponse >; } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index d8dfc520beb3..7f9b54d48702 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -70,6 +70,33 @@ namespace Microsoft.InsightsCombinedClient; ); // C# compatibility names from the shipped AutoRest-based Azure.ResourceManager.Monitor package. +// DCR association and diagnostic setting are extension resources whose GA SDK surface +// used resource names without the TypeSpec proxy/service prefixes. +@@clientName( + DataCollectionApi.DataCollectionRuleAssociation, + "DataCollectionRuleAssociationProperties", + "csharp" +); +@@clientName( + DataCollectionApi.DataCollectionRuleAssociationProxyOnlyResource, + "DataCollectionRuleAssociation", + "csharp" +); +@@clientName( + DataCollectionApi.KnownDataCollectionRuleAssociationProvisioningState, + "DataCollectionRuleAssociationProvisioningState", + "csharp" +); +@@clientName( + ServiceDiagnosticsSettingsApi.ServiceDiagnosticSettings, + "DiagnosticSettingsProperties", + "csharp" +); +@@clientName( + ServiceDiagnosticsSettingsApi.ServiceDiagnosticSettingsResource, + "DiagnosticSetting", + "csharp" +); @@clientName( PrivateLinkScopesApi.AzureMonitorPrivateLinkScope, "MonitorPrivateLinkScope", From 4fcaea53b4a3130a8ea6496831d6deafd4467962 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 12 Jun 2026 20:07:08 +0800 Subject: [PATCH 04/49] Mitigate Monitor CSharp API naming drift Add CSharp customizations for resource data, collection, action group, notification, data collection, autoscale, and scheduled query rule names to preserve more of the shipped Azure.ResourceManager.Monitor API surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../ActivityLogAlertResource.tsp | 11 +- .../Microsoft.Insights/Insights/client.tsp | 194 +++++++++++++++++- 2 files changed, 189 insertions(+), 16 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ActivityLogAlertsApi/ActivityLogAlertResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ActivityLogAlertsApi/ActivityLogAlertResource.tsp index db3c601a21b0..e7c610205c2e 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ActivityLogAlertsApi/ActivityLogAlertResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ActivityLogAlertsApi/ActivityLogAlertResource.tsp @@ -14,7 +14,7 @@ namespace ActivityLogAlertsApi; * An Activity Log Alert rule resource. */ model ActivityLogAlertResource - is Azure.ResourceManager.ProxyResource { + is Azure.ResourceManager.TrackedResource { ...ResourceNameParameter< Resource = ActivityLogAlertResource, KeyName = "activityLogAlertName", @@ -22,15 +22,6 @@ model ActivityLogAlertResource NamePattern = "^[-\\w\\._\\(\\)]+$" >; - /** The tags of the resource. */ - #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" - #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" - tags?: Record; - - /** The location of the resource. Azure Activity Log Alert rules are supported on Global, West Europe and North Europe regions. */ - #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" - @visibility(Lifecycle.Read, Lifecycle.Create) - location?: string; } @armResourceOperations(#{ omitTags: true }) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 7f9b54d48702..00609eba33d3 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -70,6 +70,62 @@ namespace Microsoft.InsightsCombinedClient; ); // C# compatibility names from the shipped AutoRest-based Azure.ResourceManager.Monitor package. +@@clientName(ActionGroupsApi.ActionGroup, "ActionGroupProperties", "csharp"); +@@clientName(ActionGroupsApi.ActionGroup.enabled, "IsEnabled", "csharp"); +@@clientName(ActionGroupsApi.ActionGroupResource, "ActionGroup", "csharp"); +@@clientName(ActionGroupsApi.ActionGroupPatchBody, "ActionGroupPatch", "csharp"); +@@clientName(ActionGroupsApi.ActionGroupPatch, "ActionGroupPatchProperties", "csharp"); +@@clientName(ActionGroupsApi.ActionGroupPatch.enabled, "IsEnabled", "csharp"); +@@clientName(ActionGroupsApi.NotificationRequestBody, "NotificationContent", "csharp"); +@@clientName(ActionGroupsApi.TestNotificationDetailsResponse, "NotificationStatus", "csharp"); +@@clientName(ActionGroupsApi.Context, "NotificationContext", "csharp"); +@@clientName(ActionGroupsApi.ActionDetail, "NotificationActionDetail", "csharp"); +@@clientName(ActionGroupsApi.EnableRequest, "ActionGroupEnableContent", "csharp"); +@@clientName( + ActionGroupsApi.ActionGroupResources.createNotificationsAtActionGroupResourceLevel, + "CreateNotifications", + "csharp" +); +@@clientName( + ActionGroupsApi.ActionGroupResources.getTestNotificationsAtActionGroupResourceLevel, + "GetNotificationStatus", + "csharp" +); +@@clientName( + ActivityLogAlertsApi.ActivityLogAlertResource, + "ActivityLogAlert", + "csharp" +); +@@clientName(ActivityLogAlertsApi.AlertRuleProperties.enabled, "IsEnabled", "csharp"); +@@clientName(AutoScaleApi.AutoscaleSetting, "AutoscaleSettingProperties", "csharp"); +@@clientName(AutoScaleApi.AutoscaleSettingResource, "AutoscaleSetting", "csharp"); +@@clientName( + DataCollectionApi.DataCollectionEndpoint, + "DataCollectionEndpointProperties", + "csharp" +); +@@clientName( + DataCollectionApi.DataCollectionEndpointResource, + "DataCollectionEndpoint", + "csharp" +); +@@clientName( + DataCollectionApi.DataCollectionRule, + "DataCollectionRuleProperties", + "csharp" +); +@@clientName( + DataCollectionApi.DataCollectionRuleResource, + "DataCollectionRule", + "csharp" +); +@@clientName(LogProfilesApi.LogProfileResource, "LogProfile", "csharp"); +@@clientName(MetricAlertApi.MetricAlertResource, "MetricAlert", "csharp"); +@@clientName( + ScheduledQueryRuleApi.ScheduledQueryRuleResource, + "ScheduledQueryRule", + "csharp" +); // DCR association and diagnostic setting are extension resources whose GA SDK surface // used resource names without the TypeSpec proxy/service prefixes. @@clientName( @@ -274,20 +330,133 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); @@clientName(MetricAlertApi.Operator, "MetricCriteriaOperator", "csharp"); -@@clientName( - ScheduledQueryRuleApi.ConditionOperator, - "MonitorConditionOperator", - "csharp" -); @@clientName( AutoScaleApi.ScaleRuleMetricDimensionOperationType.Equals, "Equal", "csharp" ); @@clientName(MetricAlertApi.Operator.Equals, "Equal", "csharp"); -@@clientName(ScheduledQueryRuleApi.ConditionOperator.Equals, "Equal", "csharp"); +@@clientName(AutoScaleApi.AutoscaleSetting.enabled, "IsEnabled", "csharp"); +@@clientName(AutoScaleApi.AutoscaleSetting.notifications, "Notifications", "csharp"); +@@clientName(AutoScaleApi.AutoscaleSetting.targetResourceUri, "TargetResourceId", "csharp"); +@@alternateType( + AutoScaleApi.AutoscaleSetting.targetResourceUri, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType( + AutoScaleApi.AutoscaleSetting.targetResourceLocation, + Azure.Core.azureLocation, + "csharp" +); +@@clientName( + DataCollectionApi.DataCollectionEndpointResource.etag, + "ETag", + "csharp" +); +@@clientName( + DataCollectionApi.DataCollectionEndpointResource.identity, + "Identity", + "csharp" +); +@@alternateType( + DataCollectionApi.DataCollectionRule.dataCollectionEndpointId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType( + DataCollectionApi.DataCollectionRuleAssociation.dataCollectionRuleId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType( + DataCollectionApi.DataCollectionRuleAssociation.dataCollectionEndpointId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@clientName( + DataCollectionApi.DataCollectionRuleAssociationProxyOnlyResource.etag, + "ETag", + "csharp" +); @@clientName(ActivityLogAlertsApi.AlertRuleLeafCondition.equals, "Equal", "csharp"); +@@clientName( + ActivityLogAlertsApi.AlertRuleAnyOfOrLeafCondition, + "ActivityLogAlertAnyOfOrLeafCondition", + "csharp" +); +@@clientName(ActionGroupsApi.EmailReceiver, "MonitorEmailReceiver", "csharp"); +@@clientName(ActionGroupsApi.SmsReceiver, "MonitorSmsReceiver", "csharp"); +@@clientName(ActionGroupsApi.WebhookReceiver, "MonitorWebhookReceiver", "csharp"); +@@clientName(ActionGroupsApi.ItsmReceiver, "MonitorItsmReceiver", "csharp"); +@@clientName( + ActionGroupsApi.AzureAppPushReceiver, + "MonitorAzureAppPushReceiver", + "csharp" +); +@@clientName( + ActionGroupsApi.AutomationRunbookReceiver, + "MonitorAutomationRunbookReceiver", + "csharp" +); +@@clientName(ActionGroupsApi.VoiceReceiver, "MonitorVoiceReceiver", "csharp"); +@@clientName(ActionGroupsApi.LogicAppReceiver, "MonitorLogicAppReceiver", "csharp"); +@@clientName( + ActionGroupsApi.AzureFunctionReceiver, + "MonitorAzureFunctionReceiver", + "csharp" +); +@@clientName(ActionGroupsApi.ArmRoleReceiver, "MonitorArmRoleReceiver", "csharp"); +@@clientName(ActionGroupsApi.EventHubReceiver, "MonitorEventHubReceiver", "csharp"); +@@clientName(ActionGroupsApi.ReceiverStatus, "MonitorReceiverStatus", "csharp"); +@@clientName( + DataCollectionApi.KnownDataCollectionEndpointResourceKind, + "DataCollectionEndpointResourceKind", + "csharp" +); +@@clientName( + DataCollectionApi.KnownDataCollectionEndpointProvisioningState, + "DataCollectionEndpointProvisioningState", + "csharp" +); +@@clientName( + DataCollectionApi.KnownPublicNetworkAccessOptions, + "MonitorPublicNetworkAccess", + "csharp" +); +@@clientName( + DataCollectionApi.PrivateLinkScopedResource, + "DataCollectionRulePrivateLinkScopedResourceInfo", + "csharp" +); +@@clientName( + DataCollectionApi.KnownDataCollectionRuleResourceKind, + "DataCollectionRuleResourceKind", + "csharp" +); +@@clientName( + DataCollectionApi.KnownDataCollectionRuleProvisioningState, + "DataCollectionRuleProvisioningState", + "csharp" +); +@@clientName(DataCollectionApi.StreamDeclaration, "DataStreamDeclaration", "csharp"); +@@clientName(DataCollectionApi.ColumnDefinition, "DataColumnDefinition", "csharp"); +@@clientName(ScheduledQueryRuleApi.Kind, "ScheduledQueryRuleKind", "csharp"); +@@clientName( + ScheduledQueryRuleApi.TimeAggregation, + "ScheduledQueryRuleTimeAggregationType", + "csharp" +); +@@clientName(ScheduledQueryRuleApi.Dimension, "MonitorDimension", "csharp"); +@@clientName(ScheduledQueryRuleApi.DimensionOperator, "MonitorDimensionOperator", "csharp"); +@@clientName(ScheduledQueryRuleApi.Condition, "ScheduledQueryRuleCondition", "csharp"); +@@clientName(ScheduledQueryRuleApi.Actions, "ScheduledQueryRuleActions", "csharp"); @@clientName(AutoScaleApi.AutoscaleSetting.name, "AutoscaleSettingName", "csharp"); +@@clientName( + AutoScaleApi.AutoscaleSettingResources.predictiveMetricGet, + "GetPredictiveMetric", + "csharp" +); @@clientName(MetricsApi.MetricDefinitionsOperationGroup.list, "GetMonitorMetricDefinitions", "csharp"); @@clientName( MetricsApi.MetricDefinitionsOperationGroup.listAtSubscriptionScope, @@ -317,12 +486,25 @@ union MonitorOperationType { Scale: "Scale", } +enum MonitorConditionOperator { + GreaterThan: "GreaterThan", + GreaterThanOrEqual: "GreaterThanOrEqual", + LessThan: "LessThan", + LessThanOrEqual: "LessThanOrEqual", + EqualsValue: "Equals", +} + @@alternateType(AutoScaleApi.RecurrentSchedule.days, MonitorDayOfWeek[], "csharp"); @@alternateType( AutoScaleApi.AutoscaleNotification.operation, MonitorOperationType, "csharp" ); +@@alternateType( + ScheduledQueryRuleApi.Condition.operator, + MonitorConditionOperator, + "csharp" +); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "list should be pageable" @@Azure.ClientGenerator.Core.Legacy.markAsPageable( From ffd8387bc9cdf654c8c5b297fb88785218fc329d Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 12 Jun 2026 20:12:39 +0800 Subject: [PATCH 05/49] Expand Monitor CSharp compatibility customizations Add additional CSharp names and alternate types for Monitor resource data, notification, autoscale, data collection, and scheduled query rule compatibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 00609eba33d3..ace52bc06ace 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -349,16 +349,41 @@ namespace Microsoft.InsightsCombinedClient; Azure.Core.azureLocation, "csharp" ); +@@clientName( + AutoScaleApi.PredictiveResponse, + "AutoscaleSettingPredicativeResult", + "csharp" +); @@clientName( DataCollectionApi.DataCollectionEndpointResource.etag, "ETag", "csharp" ); +@@alternateType( + DataCollectionApi.DataCollectionEndpointResource.etag, + Azure.Core.eTag, + "csharp" +); @@clientName( DataCollectionApi.DataCollectionEndpointResource.identity, "Identity", "csharp" ); +@@alternateType( + DataCollectionApi.DataCollectionEndpointResource.identity, + Azure.ResourceManager.CommonTypes.ManagedServiceIdentity, + "csharp" +); +@@alternateType( + DataCollectionApi.DataCollectionRuleResource.etag, + Azure.Core.eTag, + "csharp" +); +@@alternateType( + DataCollectionApi.DataCollectionRuleResource.identity, + Azure.ResourceManager.CommonTypes.ManagedServiceIdentity, + "csharp" +); @@alternateType( DataCollectionApi.DataCollectionRule.dataCollectionEndpointId, Azure.Core.armResourceIdentifier, From 8e39cc9490d0d06ebea14caaf997523e66db8033 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 12 Jun 2026 20:28:43 +0800 Subject: [PATCH 06/49] Use ETag type for Monitor data collection resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Insights/DataCollectionApi/back-compatible.tsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp index 2f74f4116951..c7a1f5d93c04 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp @@ -91,3 +91,8 @@ using DataCollectionApi; Azure.ResourceManager.Legacy.EntityTagProperty.etag, "Resource entity tag (ETag)." ); +@@alternateType( + Azure.ResourceManager.Legacy.EntityTagProperty.etag, + Azure.Core.eTag, + "csharp" +); From d95669153e948b370c612f08e8f4fc9a7487aca1 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 12 Jun 2026 20:47:09 +0800 Subject: [PATCH 07/49] Restore Monitor diagnostic setting ID types for CSharp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index ace52bc06ace..877d78b1b9bb 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -153,6 +153,26 @@ namespace Microsoft.InsightsCombinedClient; "DiagnosticSetting", "csharp" ); +@@alternateType( + ServiceDiagnosticsSettingsApi.ServiceDiagnosticSettings.storageAccountId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType( + ServiceDiagnosticsSettingsApi.ServiceDiagnosticSettings.serviceBusRuleId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType( + ServiceDiagnosticsSettingsApi.ServiceDiagnosticSettings.eventHubAuthorizationRuleId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType( + ServiceDiagnosticsSettingsApi.ServiceDiagnosticSettings.workspaceId, + Azure.Core.armResourceIdentifier, + "csharp" +); @@clientName( PrivateLinkScopesApi.AzureMonitorPrivateLinkScope, "MonitorPrivateLinkScope", From 449bae130f3e27c817be94bdcc512245b0ac4c8c Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 12 Jun 2026 20:58:26 +0800 Subject: [PATCH 08/49] Mitigate Monitor log profile and metric alert CSharp drift Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 877d78b1b9bb..687b7912d1ba 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -120,7 +120,38 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); @@clientName(LogProfilesApi.LogProfileResource, "LogProfile", "csharp"); +@@alternateType( + LogProfilesApi.LogProfileProperties.storageAccountId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType( + LogProfilesApi.LogProfileProperties.serviceBusRuleId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType( + LogProfilesApi.LogProfileProperties.locations, + Azure.Core.azureLocation[], + "csharp" +); @@clientName(MetricAlertApi.MetricAlertResource, "MetricAlert", "csharp"); +@@clientName(MetricAlertApi.MetricAlertProperties.enabled, "IsEnabled", "csharp"); +@@clientName( + MetricAlertApi.MetricAlertProperties.autoMitigate, + "IsAutoMitigateEnabled", + "csharp" +); +@@alternateType( + MetricAlertApi.MetricAlertProperties.targetResourceType, + Azure.Core.armResourceType, + "csharp" +); +@@alternateType( + MetricAlertApi.MetricAlertProperties.targetResourceRegion, + Azure.Core.azureLocation, + "csharp" +); @@clientName( ScheduledQueryRuleApi.ScheduledQueryRuleResource, "ScheduledQueryRule", From 86d127cbc57d62fe7997dd939b3c4ae395f90228 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 12 Jun 2026 21:52:25 +0800 Subject: [PATCH 09/49] Restore Monitor metrics CSharp model names Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 687b7912d1ba..66925ce2b3b7 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -528,6 +528,21 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(ScheduledQueryRuleApi.Condition, "ScheduledQueryRuleCondition", "csharp"); @@clientName(ScheduledQueryRuleApi.Actions, "ScheduledQueryRuleActions", "csharp"); @@clientName(AutoScaleApi.AutoscaleSetting.name, "AutoscaleSettingName", "csharp"); +@@clientName(ActivityLogsApi.EventData, "EventDataInfo", "csharp"); +@@clientName(ActivityLogsApi.HttpRequestInfo, "EventDataHttpRequestInfo", "csharp"); +@@clientName(ActivityLogsApi.EventLevel, "MonitorEventLevel", "csharp"); +@@clientName(LocalizableString, "MonitorLocalizableString", "csharp"); +@@clientName(MetricBaselinesApi.SingleMetricBaseline, "MonitorSingleMetricBaseline", "csharp"); +@@clientName(MetricBaselinesApi.TimeSeriesBaseline, "MonitorTimeSeriesBaseline", "csharp"); +@@clientName(MetricsApi.MetricDefinition, "MonitorMetricDefinition", "csharp"); +@@clientName(MetricsApi.MetricClass, "MonitorMetricClass", "csharp"); +@@clientName(MetricsApi.MetricAvailability, "MonitorMetricAvailability", "csharp"); +@@clientName(MetricsApi.MetricAggregationType, "MonitorAggregationType", "csharp"); +@@clientName(MetricsApi.MetricUnit, "MonitorMetricUnit", "csharp"); +@@clientName(MetricsApi.MetricNamespace, "MonitorMetricNamespace", "csharp"); +@@clientName(MetricsApi.NamespaceClassification, "MonitorNamespaceClassification", "csharp"); +@@clientName(MetricsApi.Metric, "MonitorMetric", "csharp"); +@@clientName(MetricsApi.TimeSeriesElement, "MonitorTimeSeriesElement", "csharp"); @@clientName( AutoScaleApi.AutoscaleSettingResources.predictiveMetricGet, "GetPredictiveMetric", From dc691dda6d974657c4c5ed21bbe2baf5777473e2 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 12 Jun 2026 21:56:31 +0800 Subject: [PATCH 10/49] Restore Monitor metric dependent CSharp model names Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Insights/Insights/client.tsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 66925ce2b3b7..237eaf170b0d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -534,6 +534,9 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(LocalizableString, "MonitorLocalizableString", "csharp"); @@clientName(MetricBaselinesApi.SingleMetricBaseline, "MonitorSingleMetricBaseline", "csharp"); @@clientName(MetricBaselinesApi.TimeSeriesBaseline, "MonitorTimeSeriesBaseline", "csharp"); +@@clientName(MetricBaselinesApi.MetricSingleDimension, "MonitorMetricSingleDimension", "csharp"); +@@clientName(MetricBaselinesApi.SingleBaseline, "MonitorSingleBaseline", "csharp"); +@@clientName(MetricBaselinesApi.BaselineMetadata, "MonitorBaselineMetadata", "csharp"); @@clientName(MetricsApi.MetricDefinition, "MonitorMetricDefinition", "csharp"); @@clientName(MetricsApi.MetricClass, "MonitorMetricClass", "csharp"); @@clientName(MetricsApi.MetricAvailability, "MonitorMetricAvailability", "csharp"); @@ -543,6 +546,8 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(MetricsApi.NamespaceClassification, "MonitorNamespaceClassification", "csharp"); @@clientName(MetricsApi.Metric, "MonitorMetric", "csharp"); @@clientName(MetricsApi.TimeSeriesElement, "MonitorTimeSeriesElement", "csharp"); +@@clientName(MetricsApi.MetadataValue, "MonitorMetadataValue", "csharp"); +@@clientName(MetricsApi.MetricValue, "MonitorMetricValue", "csharp"); @@clientName( AutoScaleApi.AutoscaleSettingResources.predictiveMetricGet, "GetPredictiveMetric", From 07cec4f37331115aaad5586ca5fdf7e6b4123ed2 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Fri, 12 Jun 2026 21:59:48 +0800 Subject: [PATCH 11/49] Restore Monitor baseline sensitivity CSharp name Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Insights/Insights/client.tsp | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 237eaf170b0d..48e23c9d45b7 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -536,6 +536,7 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(MetricBaselinesApi.TimeSeriesBaseline, "MonitorTimeSeriesBaseline", "csharp"); @@clientName(MetricBaselinesApi.MetricSingleDimension, "MonitorMetricSingleDimension", "csharp"); @@clientName(MetricBaselinesApi.SingleBaseline, "MonitorSingleBaseline", "csharp"); +@@clientName(MetricBaselinesApi.BaselineSensitivity, "MonitorBaselineSensitivity", "csharp"); @@clientName(MetricBaselinesApi.BaselineMetadata, "MonitorBaselineMetadata", "csharp"); @@clientName(MetricsApi.MetricDefinition, "MonitorMetricDefinition", "csharp"); @@clientName(MetricsApi.MetricClass, "MonitorMetricClass", "csharp"); From 75b24e2f6c7538a4b37a1c771704bab0d79b72d7 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 15 Jun 2026 10:53:33 +0800 Subject: [PATCH 12/49] Fix Monitor private link resource TypeSpec shape Model private link resources with PrivateLinks over the PrivateLinkScope parent instead of declaring PrivateLinkResource as a child ARM resource. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../PrivateLinkScopesApi/PrivateLinkResource.tsp | 15 +++++++-------- .../Microsoft.Insights/Insights/client.tsp | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/PrivateLinkResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/PrivateLinkResource.tsp index c3138f09e5d6..32156f48d9a3 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/PrivateLinkResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/PrivateLinkResource.tsp @@ -14,7 +14,6 @@ namespace PrivateLinkScopesApi; /** * A private link resource */ -@parentResource(AzureMonitorPrivateLinkScope) model PrivateLinkResource is PrivateLink; alias PrivateLinkOperations = PrivateLinks; @@ -23,25 +22,25 @@ interface PrivateLinkResources { /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. */ - #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" - #suppress "@azure-tools/typespec-azure-resource-manager/invalid-parameter-rename" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "legacy private link operation" + #suppress "@azure-tools/typespec-azure-resource-manager/invalid-parameter-rename" "preserve existing wire parameter name" @Azure.ResourceManager.Legacy.renamePathParameter( "privateLinkResourceName", "groupName" ) - get is PrivateLinkOperations.Read; + get is PrivateLinkOperations.Read; /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. */ - #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" - #suppress "@azure-tools/typespec-azure-resource-manager/invalid-parameter-rename" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" - #suppress "@azure-tools/typespec-azure-resource-manager/legacy-type-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "legacy operation returns a single page" + #suppress "@azure-tools/typespec-azure-resource-manager/invalid-parameter-rename" "preserve existing wire parameter name" + #suppress "@azure-tools/typespec-azure-resource-manager/legacy-type-usage" "legacy operation returns a single page" @Azure.ResourceManager.Legacy.renamePathParameter( "privateLinkResourceName", "groupName" ) - listByPrivateLinkScope is PrivateLinkOperations.ListSinglePageByParent; + listByPrivateLinkScope is PrivateLinkOperations.ListSinglePageByParent; } @@doc(PrivateLinkResource.properties, "Resource properties."); diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 48e23c9d45b7..a1b25deafe3c 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -216,12 +216,12 @@ namespace Microsoft.InsightsCombinedClient; ); @@clientName( PrivateLinkScopesApi.PrivateLinkResource, - "MonitorPrivateLink", + "MonitorPrivateLinkResource", "csharp" ); @@clientName( PrivateLinkScopesApi.ScopedResource, - "MonitorPrivateLinkScoped", + "MonitorPrivateLinkScopedResource", "csharp" ); From 76e369c398eec75ad2d846100bddfab52318887f Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 15 Jun 2026 12:47:19 +0800 Subject: [PATCH 13/49] Restore Monitor AlertSeverity CSharp names Add csharp to AlertSeverity clientName decorators so generated values use Zero through Four. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index a1b25deafe3c..1616e0df1856 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -746,11 +746,11 @@ model LogSettings { "java" ); -@@clientName(AlertSeverity.`0`, "Zero", "go,javascript"); -@@clientName(AlertSeverity.`1`, "One", "go,javascript"); -@@clientName(AlertSeverity.`2`, "Two", "go,javascript"); -@@clientName(AlertSeverity.`3`, "Three", "go,javascript"); -@@clientName(AlertSeverity.`4`, "Four", "go,javascript"); +@@clientName(AlertSeverity.`0`, "Zero", "csharp,go,javascript"); +@@clientName(AlertSeverity.`1`, "One", "csharp,go,javascript"); +@@clientName(AlertSeverity.`2`, "Two", "csharp,go,javascript"); +@@clientName(AlertSeverity.`3`, "Three", "csharp,go,javascript"); +@@clientName(AlertSeverity.`4`, "Four", "csharp,go,javascript"); @@alternateType(AutoscaleNotification.operation, "Scale", "go"); From 9a7914ebc0b30ba85a6fcaa0193d351359e5a1f7 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 15 Jun 2026 14:56:36 +0800 Subject: [PATCH 14/49] Restore Monitor private link compatibility Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Insights/PrivateLinkScopesApi/back-compatible.tsp | 4 ++++ .../resource-manager/Microsoft.Insights/Insights/client.tsp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp index 60e9e14c4417..dd402d919ce4 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp @@ -33,6 +33,10 @@ using PrivateLinkScopesApi; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@Legacy.flattenProperty(PrivateEndpointConnection.properties); +@@usage(PrivateLinkResource, Usage.input, "csharp"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "restore flattened private link resource data shape for C# compatibility" +@@Legacy.flattenProperty(PrivateLinkResource.properties); + @@clientLocation(ScopedResources.get, "PrivateLinkScopedResources"); @@clientLocation(ScopedResources.createOrUpdate, "PrivateLinkScopedResources"); @@clientName(ScopedResources.createOrUpdate::parameters.resource, "parameters"); diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 1616e0df1856..5e7cf7c054bd 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -606,7 +606,7 @@ enum MonitorConditionOperator { #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "list should be pageable" @@Azure.ClientGenerator.Core.Legacy.markAsPageable( PrivateLinkScopesApi.PrivateEndpointConnections.listByPrivateLinkScope, - "java" + "csharp,java" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "list should be pageable" @@Azure.ClientGenerator.Core.Legacy.markAsPageable( From 8310991711c9b9efcafd6948fe524b0bb0f5c116 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 15 Jun 2026 15:34:01 +0800 Subject: [PATCH 15/49] Hide Monitor private link operation status from CSharp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Insights/Insights/client.tsp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 5e7cf7c054bd..ed11e511032d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -567,6 +567,9 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); +// LRO status polling endpoints are implementation details and should not generate public C# SDK methods. +@@scope(PrivateLinkScopeOperationStatusOperationGroup.get, "!csharp"); + union MonitorDayOfWeek { string, Sunday: "Sunday", From e520752f31b35359c26a638673699a6443d70854 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 15 Jun 2026 16:01:49 +0800 Subject: [PATCH 16/49] Mark Monitor private link resources pageable for CSharp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Insights/Insights/client.tsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index ed11e511032d..d7ffbc275e98 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -612,6 +612,11 @@ enum MonitorConditionOperator { "csharp,java" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "list should be pageable" +@@Azure.ClientGenerator.Core.Legacy.markAsPageable( + PrivateLinkScopesApi.PrivateLinkResources.listByPrivateLinkScope, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "list should be pageable" @@Azure.ClientGenerator.Core.Legacy.markAsPageable( MetricAlertApi.MetricAlertResources.list, "java" From 0e6935fcb5451ebfd7f6d0d873fccf6d2ec0c201 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 15 Jun 2026 17:25:18 +0800 Subject: [PATCH 17/49] Restore Monitor compatibility names Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index d7ffbc275e98..f20a69181e3d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -97,6 +97,7 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); @@clientName(ActivityLogAlertsApi.AlertRuleProperties.enabled, "IsEnabled", "csharp"); +@@clientName(ActivityLogAlertsApi.AlertRulePatchProperties.enabled, "IsEnabled", "csharp"); @@clientName(AutoScaleApi.AutoscaleSetting, "AutoscaleSettingProperties", "csharp"); @@clientName(AutoScaleApi.AutoscaleSettingResource, "AutoscaleSetting", "csharp"); @@clientName( @@ -142,6 +143,12 @@ namespace Microsoft.InsightsCombinedClient; "IsAutoMitigateEnabled", "csharp" ); +@@clientName(MetricAlertApi.MetricAlertPropertiesPatch.enabled, "IsEnabled", "csharp"); +@@clientName( + MetricAlertApi.MetricAlertPropertiesPatch.autoMitigate, + "IsAutoMitigateEnabled", + "csharp" +); @@alternateType( MetricAlertApi.MetricAlertProperties.targetResourceType, Azure.Core.armResourceType, @@ -305,11 +312,31 @@ namespace Microsoft.InsightsCombinedClient; "DataFlowStream", "csharp" ); +@@clientName( + DataCollectionApi.KnownColumnDefinitionType, + "DataColumnDefinitionType", + "csharp" +); +@@clientName( + DataCollectionApi.KnownLogFileTextSettingsRecordStartTimestampFormat, + "LogFileTextSettingsRecordStartTimestampFormat", + "csharp" +); @@clientName( DataCollectionApi.LocationSpec, "DataCollectionRuleBcdrLocationSpec", "csharp" ); +@@clientName( + DataCollectionApi.FailoverConfigurationSpec, + "DataCollectionRuleBcdrFailoverConfigurationSpec", + "csharp" +); +@@clientName( + DataCollectionApi.Metadata, + "DataCollectionRuleRelatedResourceMetadata", + "csharp" +); @@clientName( DataCollectionApi.KnownLocationSpecProvisioningStatus, "DataCollectionRuleBcdrLocationSpecProvisioningStatus", @@ -325,6 +352,11 @@ namespace Microsoft.InsightsCombinedClient; "DataCollectionRuleEventHubDirectDestination", "csharp" ); +@@clientName( + DataCollectionApi.EventHubDataSource, + "DataCollectionRuleEventHubDataSource", + "csharp" +); @@clientName( DataCollectionApi.StorageBlobDestination, "DataCollectionRuleStorageBlobDestination", @@ -370,11 +402,30 @@ namespace Microsoft.InsightsCombinedClient; "MetricTriggerComparisonOperation", "csharp" ); +@@clientName(AutoScaleApi.ScaleType, "MonitorScaleType", "csharp"); @@clientName( AutoScaleApi.ScaleRuleMetricDimension, "AutoscaleRuleMetricDimension", "csharp" ); +@@clientName( + AutoScaleApi.MetricTrigger.metricResourceUri, + "MetricResourceId", + "csharp" +); +@@alternateType( + AutoScaleApi.MetricTrigger.metricResourceUri, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@clientName( + AutoScaleApi.MetricTrigger.dividePerInstance, + "IsDividedPerInstance", + "csharp" +); +@@clientName(AutoScaleApi.ScaleAction.type, "ScaleType", "csharp"); +@@clientName(AutoScaleApi.TimeWindow.start, "StartOn", "csharp"); +@@clientName(AutoScaleApi.TimeWindow.end, "EndOn", "csharp"); @@clientName( MetricAlertApi.AggregationTypeEnum, "MetricCriteriaTimeAggregationType", @@ -505,6 +556,7 @@ namespace Microsoft.InsightsCombinedClient; "DataCollectionRulePrivateLinkScopedResourceInfo", "csharp" ); +@@clientName(DataCollectionApi.ColumnDefinition.type, "DefinitionType", "csharp"); @@clientName( DataCollectionApi.KnownDataCollectionRuleResourceKind, "DataCollectionRuleResourceKind", @@ -545,7 +597,10 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(MetricsApi.MetricUnit, "MonitorMetricUnit", "csharp"); @@clientName(MetricsApi.MetricNamespace, "MonitorMetricNamespace", "csharp"); @@clientName(MetricsApi.NamespaceClassification, "MonitorNamespaceClassification", "csharp"); +@@clientName(MetricsApi.MetricResultType, "MonitorMetricResultType", "csharp"); +@@clientName(MetricsApi.MetricNamespaceName.metricNamespaceName, "MetricNamespaceNameValue", "csharp"); @@clientName(MetricsApi.Metric, "MonitorMetric", "csharp"); +@@clientName(MetricsApi.Metric.type, "MetricType", "csharp"); @@clientName(MetricsApi.TimeSeriesElement, "MonitorTimeSeriesElement", "csharp"); @@clientName(MetricsApi.MetadataValue, "MonitorMetadataValue", "csharp"); @@clientName(MetricsApi.MetricValue, "MonitorMetricValue", "csharp"); @@ -561,6 +616,14 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); @@clientName(MetricsApi.MetricNamespacesOperationGroup.list, "GetMonitorMetricNamespaces", "csharp"); +@@clientName(ResultType, "MonitorResultType", "csharp"); +@@clientName(ServiceDiagnosticsSettingsApi.MetricSettings.enabled, "IsEnabled", "csharp"); +@@clientName(ServiceDiagnosticsSettingsApi.LogSettings.enabled, "IsEnabled", "csharp"); +@@clientName(Microsoft.Common.RetentionPolicy.enabled, "IsEnabled", "csharp"); +@@clientName(ActionGroupsApi.ActionDetail.SendTime, "SendOn", "csharp"); +@@clientName(ActionGroupsApi.TestNotificationDetailsResponse.completedTime, "CompletedOn", "csharp"); +@@clientName(ActionGroupsApi.TestNotificationDetailsResponse.createdTime, "CreatedOn", "csharp"); +@@clientName(ScheduledQueryRuleApi.ScheduledQueryRuleProperties.enabled, "IsEnabled", "csharp"); @@clientName( PrivateLinkScopesApi.PrivateLinkResources.listByPrivateLinkScope, "GetAllPrivateLinkResources", @@ -825,6 +888,46 @@ model AccessRulePropertiesSubscriptionsItem { "DD_MMM_YYYY_HH_MM_SS_ZZZ", "python" ); +@@clientName( + DataCollectionApi.KnownLogFileTextSettingsRecordStartTimestampFormat.`YYYY-MM-DD HH:MM:SS`, + "YyyyMmDdHhMmSs", + "csharp" +); +@@clientName( + DataCollectionApi.KnownLogFileTextSettingsRecordStartTimestampFormat.`M/D/YYYY HH:MM:SS AM/PM`, + "MDYyyyHhMmSsAMPM", + "csharp" +); +@@clientName( + DataCollectionApi.KnownLogFileTextSettingsRecordStartTimestampFormat.`Mon DD, YYYY HH:MM:SS`, + "MonDdYyyyHhMmSs", + "csharp" +); +@@clientName( + DataCollectionApi.KnownLogFileTextSettingsRecordStartTimestampFormat.`yyMMdd HH:mm:ss`, + "YyMMddHhMmSs", + "csharp" +); +@@clientName( + DataCollectionApi.KnownLogFileTextSettingsRecordStartTimestampFormat.`ddMMyy HH:mm:ss`, + "DdMMyyHhMmSs", + "csharp" +); +@@clientName( + DataCollectionApi.KnownLogFileTextSettingsRecordStartTimestampFormat.`MMM d hh:mm:ss`, + "MmmDHhMmSs", + "csharp" +); +@@clientName( + DataCollectionApi.KnownLogFileTextSettingsRecordStartTimestampFormat.`dd/MMM/yyyy:HH:mm:ss zzz`, + "DdMmmYyyyHhMmSsZzz", + "csharp" +); +@@clientName( + DataCollectionApi.KnownLogFileTextSettingsRecordStartTimestampFormat.`yyyy-MM-ddTHH:mm:ssK`, + "YyyyMmDdTHHMmSsK", + "csharp" +); @@clientName(AlertSeverity.`0`, "ZERO", "python"); @@clientName(AlertSeverity.`1`, "ONE", "python"); @@clientName(AlertSeverity.`2`, "TWO", "python"); From 34f423fd6f08db9e92f5cfe57d8e70b1a7912538 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 10:05:21 +0800 Subject: [PATCH 18/49] Restore Monitor compatibility property names Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index f20a69181e3d..529d121ff1a4 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -434,10 +434,10 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(MetricAlertApi.Operator, "MetricCriteriaOperator", "csharp"); @@clientName( AutoScaleApi.ScaleRuleMetricDimensionOperationType.Equals, - "Equal", + "EqualsValue", "csharp" ); -@@clientName(MetricAlertApi.Operator.Equals, "Equal", "csharp"); +@@clientName(MetricAlertApi.Operator.Equals, "EqualsValue", "csharp"); @@clientName(AutoScaleApi.AutoscaleSetting.enabled, "IsEnabled", "csharp"); @@clientName(AutoScaleApi.AutoscaleSetting.notifications, "Notifications", "csharp"); @@clientName(AutoScaleApi.AutoscaleSetting.targetResourceUri, "TargetResourceId", "csharp"); @@ -506,7 +506,7 @@ namespace Microsoft.InsightsCombinedClient; "ETag", "csharp" ); -@@clientName(ActivityLogAlertsApi.AlertRuleLeafCondition.equals, "Equal", "csharp"); +@@clientName(ActivityLogAlertsApi.AlertRuleLeafCondition.equals, "EqualsValue", "csharp"); @@clientName( ActivityLogAlertsApi.AlertRuleAnyOfOrLeafCondition, "ActivityLogAlertAnyOfOrLeafCondition", @@ -624,6 +624,11 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(ActionGroupsApi.TestNotificationDetailsResponse.completedTime, "CompletedOn", "csharp"); @@clientName(ActionGroupsApi.TestNotificationDetailsResponse.createdTime, "CreatedOn", "csharp"); @@clientName(ScheduledQueryRuleApi.ScheduledQueryRuleProperties.enabled, "IsEnabled", "csharp"); +@@clientName( + Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.privateLinkServiceConnectionState, + "ConnectionState", + "csharp" +); @@clientName( PrivateLinkScopesApi.PrivateLinkResources.listByPrivateLinkScope, "GetAllPrivateLinkResources", From cdacde87f4e585d2ba02e3d4e8a2c580344e0033 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 12:12:23 +0800 Subject: [PATCH 19/49] Restore Monitor property type compatibility Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 529d121ff1a4..a1e6efc4b938 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -159,6 +159,16 @@ namespace Microsoft.InsightsCombinedClient; Azure.Core.azureLocation, "csharp" ); +@@alternateType( + MetricAlertApi.MetricAlertPropertiesPatch.targetResourceType, + Azure.Core.armResourceType, + "csharp" +); +@@alternateType( + MetricAlertApi.MetricAlertPropertiesPatch.targetResourceRegion, + Azure.Core.azureLocation, + "csharp" +); @@clientName( ScheduledQueryRuleApi.ScheduledQueryRuleResource, "ScheduledQueryRule", @@ -231,6 +241,21 @@ namespace Microsoft.InsightsCombinedClient; "MonitorPrivateLinkScopedResource", "csharp" ); +@@clientName( + PrivateLinkScopesApi.AzureMonitorPrivateLinkScopeProperties.provisioningState, + "PrivateLinkScopeProvisioningState", + "csharp" +); +@@alternateType( + PrivateLinkScopesApi.ScopedResourceProperties.linkedResourceId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@clientName( + PrivateLinkScopesApi.ScopedResourceProperties.provisioningState, + "ScopedResourceProvisioningState", + "csharp" +); // Split NSP operations by resource type for C# so each generated client has a single API version. // Keeping ActionGroup NSP operations in ActionGroups mixes 2021-10-01 with 2024-10-01-preview. @@ -582,6 +607,12 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(AutoScaleApi.AutoscaleSetting.name, "AutoscaleSettingName", "csharp"); @@clientName(ActivityLogsApi.EventData, "EventDataInfo", "csharp"); @@clientName(ActivityLogsApi.HttpRequestInfo, "EventDataHttpRequestInfo", "csharp"); +@@clientName(ActivityLogsApi.HttpRequestInfo.clientIpAddress, "ClientIPAddress", "csharp"); +@@alternateType( + ActivityLogsApi.HttpRequestInfo.clientIpAddress, + Azure.Core.ipV4Address, + "csharp" +); @@clientName(ActivityLogsApi.EventLevel, "MonitorEventLevel", "csharp"); @@clientName(LocalizableString, "MonitorLocalizableString", "csharp"); @@clientName(MetricBaselinesApi.SingleMetricBaseline, "MonitorSingleMetricBaseline", "csharp"); From a22bcd3b1b8795c867a3d30fd17c67c46b2a4514 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 14:21:30 +0800 Subject: [PATCH 20/49] Rename Monitor metric trigger comparison enum Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Insights/Insights/client.tsp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index a1e6efc4b938..ffdc8edac818 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -424,7 +424,7 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(AutoScaleApi.ScaleDirection, "MonitorScaleDirection", "csharp"); @@clientName( AutoScaleApi.ComparisonOperationType, - "MetricTriggerComparisonOperation", + "MetricTriggerComparisonOperator", "csharp" ); @@clientName(AutoScaleApi.ScaleType, "MonitorScaleType", "csharp"); @@ -443,6 +443,7 @@ namespace Microsoft.InsightsCombinedClient; Azure.Core.armResourceIdentifier, "csharp" ); +@@clientName(AutoScaleApi.MetricTrigger.operator, "ComparisonOperator", "csharp"); @@clientName( AutoScaleApi.MetricTrigger.dividePerInstance, "IsDividedPerInstance", From fdccb48914ada30c2e39a67a0f754921918a8a53 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 17:18:56 +0800 Subject: [PATCH 21/49] Rename Monitor aggregation APIs for CSharp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index ffdc8edac818..4ccbad68513f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -623,9 +623,19 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(MetricBaselinesApi.BaselineSensitivity, "MonitorBaselineSensitivity", "csharp"); @@clientName(MetricBaselinesApi.BaselineMetadata, "MonitorBaselineMetadata", "csharp"); @@clientName(MetricsApi.MetricDefinition, "MonitorMetricDefinition", "csharp"); +@@clientName( + MetricsApi.MetricDefinition.primaryAggregationType, + "PrimaryAggregationKind", + "csharp" +); +@@clientName( + MetricsApi.MetricDefinition.supportedAggregationTypes, + "SupportedAggregationKinds", + "csharp" +); @@clientName(MetricsApi.MetricClass, "MonitorMetricClass", "csharp"); @@clientName(MetricsApi.MetricAvailability, "MonitorMetricAvailability", "csharp"); -@@clientName(MetricsApi.MetricAggregationType, "MonitorAggregationType", "csharp"); +@@clientName(MetricsApi.MetricAggregationType, "MonitorAggregationKind", "csharp"); @@clientName(MetricsApi.MetricUnit, "MonitorMetricUnit", "csharp"); @@clientName(MetricsApi.MetricNamespace, "MonitorMetricNamespace", "csharp"); @@clientName(MetricsApi.NamespaceClassification, "MonitorNamespaceClassification", "csharp"); @@ -649,6 +659,16 @@ namespace Microsoft.InsightsCombinedClient; ); @@clientName(MetricsApi.MetricNamespacesOperationGroup.list, "GetMonitorMetricNamespaces", "csharp"); @@clientName(ResultType, "MonitorResultType", "csharp"); +@@clientName( + MetricsApi.SubscriptionScopeMetricDefinition.primaryAggregationType, + "PrimaryAggregationKind", + "csharp" +); +@@clientName( + MetricsApi.SubscriptionScopeMetricDefinition.supportedAggregationTypes, + "SupportedAggregationKinds", + "csharp" +); @@clientName(ServiceDiagnosticsSettingsApi.MetricSettings.enabled, "IsEnabled", "csharp"); @@clientName(ServiceDiagnosticsSettingsApi.LogSettings.enabled, "IsEnabled", "csharp"); @@clientName(Microsoft.Common.RetentionPolicy.enabled, "IsEnabled", "csharp"); From 5fd819bfa2ce2f9b828fc7899dcc862d1f476edc Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 17:31:46 +0800 Subject: [PATCH 22/49] Fix Monitor service diagnostic setting route Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../ServiceDiagnosticSettingsResource.tsp | 5 +- .../serviceDiagnosticsSettings_API.json | 412 ------------------ 2 files changed, 2 insertions(+), 415 deletions(-) delete mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2016-09-01/serviceDiagnosticsSettings_API.json diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp index ff6103c9999b..a7b82de6f5a7 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp @@ -44,10 +44,9 @@ alias ServiceDiagnosticSettingsResourcesOps = Azure.ResourceManager.Legacy.Exten ...ApiVersionParameter; /** - * The identifier of the resource. + * The fully qualified Azure Resource manager identifier of the resource. */ @path(#{ allowReserved: true }) - @minLength(1) resourceUri: string; }, { @@ -61,7 +60,7 @@ alias ServiceDiagnosticSettingsResourcesOps = Azure.ResourceManager.Legacy.Exten */ @path @segment("diagnosticSettings") - diagnosticSetting: string; + diagnosticSetting: "service"; }, "DiagnosticSetting" >; diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2016-09-01/serviceDiagnosticsSettings_API.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2016-09-01/serviceDiagnosticsSettings_API.json deleted file mode 100644 index 78d7e6da8eb7..000000000000 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2016-09-01/serviceDiagnosticsSettings_API.json +++ /dev/null @@ -1,412 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "MonitorManagementClient", - "version": "2016-09-01" - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service": { - "get": { - "tags": [ - "ServiceDiagnosticSettings" - ], - "operationId": "ServiceDiagnosticSettings_Get", - "description": "Gets the active diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases.", - "parameters": [ - { - "$ref": "#/parameters/ResourceUriParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "200": { - "description": "Successful request to get more information about service diagnostic setting", - "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" - }, - "examples": { - "application/json": { - "id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", - "type": "", - "name": "service", - "location": "", - "tags": null, - "properties": { - "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", - "serviceBusRuleId": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey", - "workspaceId": "", - "metrics": [ - { - "timeGrain": "PT1M", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - } - ], - "logs": [ - { - "category": "WorkflowRuntime", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - } - ] - } - } - } - } - }, - "x-ms-examples": { - "Get service diagnostic setting": { - "$ref": "./examples/getServiceDiagnosticSetting.json" - } - } - }, - "put": { - "tags": [ - "ServiceDiagnosticSettings" - ], - "operationId": "ServiceDiagnosticSettings_CreateOrUpdate", - "description": "Create or update new diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases.", - "parameters": [ - { - "$ref": "#/parameters/ResourceUriParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" - }, - "description": "Parameters supplied to the operation." - } - ], - "responses": { - "200": { - "description": "Successful request to create a service diagnostic setting", - "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" - }, - "examples": { - "application/json": { - "id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", - "type": "", - "name": "service", - "location": "", - "tags": null, - "properties": { - "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", - "serviceBusRuleId": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey", - "workspaceId": "", - "eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule", - "metrics": [ - { - "timeGrain": "PT1M", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - } - ], - "logs": [ - { - "category": "WorkflowRuntime", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - } - ] - } - } - } - } - }, - "x-ms-examples": { - "Create or update a service diagnostic setting": { - "$ref": "./examples/createOrUpdateServiceDiagnosticSetting.json" - } - } - }, - "patch": { - "description": "Updates an existing ServiceDiagnosticSettingsResource. To update other fields use the CreateOrUpdate method. **WARNING**: This method will be deprecated in future releases.", - "operationId": "ServiceDiagnosticSettings_Update", - "parameters": [ - { - "$ref": "#/parameters/ResourceUriParameter" - }, - { - "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" - }, - { - "name": "serviceDiagnosticSettingsResource", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResourcePatch" - }, - "description": "Parameters supplied to the operation." - } - ], - "responses": { - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "200": { - "description": "An existing service diagnostics setting resource was successfully updated.", - "schema": { - "$ref": "#/definitions/ServiceDiagnosticSettingsResource" - } - } - }, - "x-ms-examples": { - "Update a service diagnostic setting": { - "$ref": "./examples/updateServiceDiagnosticSetting.json" - } - } - } - } - }, - "definitions": { - "Resource": { - "properties": { - "id": { - "type": "string", - "readOnly": true, - "description": "Azure resource Id" - }, - "name": { - "type": "string", - "readOnly": true, - "description": "Azure resource name" - }, - "type": { - "type": "string", - "readOnly": true, - "description": "Azure resource type" - }, - "location": { - "type": "string", - "description": "Resource location", - "x-ms-mutability": [ - "create", - "read" - ] - }, - "tags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags" - } - }, - "required": [ - "location" - ], - "x-ms-azure-resource": true, - "description": "An azure resource object" - }, - "RetentionPolicy": { - "properties": { - "enabled": { - "type": "boolean", - "description": "a value indicating whether the retention policy is enabled." - }, - "days": { - "type": "integer", - "format": "int32", - "minimum": 0, - "description": "the number of days for the retention in days. A value of 0 will retain the events indefinitely." - } - }, - "required": [ - "enabled", - "days" - ], - "description": "Specifies the retention policy for the log." - }, - "MetricSettings": { - "properties": { - "timeGrain": { - "type": "string", - "format": "duration", - "description": "the timegrain of the metric in ISO8601 format." - }, - "enabled": { - "type": "boolean", - "description": "a value indicating whether this timegrain is enabled." - }, - "retentionPolicy": { - "$ref": "#/definitions/RetentionPolicy", - "description": "the retention policy for this timegrain." - } - }, - "required": [ - "enabled", - "timeGrain" - ], - "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric." - }, - "LogSettings": { - "properties": { - "category": { - "type": "string", - "description": "Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation." - }, - "enabled": { - "type": "boolean", - "description": "a value indicating whether this log is enabled." - }, - "retentionPolicy": { - "$ref": "#/definitions/RetentionPolicy", - "description": "the retention policy for this log." - } - }, - "required": [ - "enabled" - ], - "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log." - }, - "ServiceDiagnosticSettings": { - "properties": { - "storageAccountId": { - "type": "string", - "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." - }, - "serviceBusRuleId": { - "type": "string", - "description": "The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'." - }, - "eventHubAuthorizationRuleId": { - "type": "string", - "description": "The resource Id for the event hub namespace authorization rule." - }, - "metrics": { - "type": "array", - "items": { - "$ref": "#/definitions/MetricSettings" - }, - "description": "the list of metric settings." - }, - "logs": { - "type": "array", - "items": { - "$ref": "#/definitions/LogSettings" - }, - "description": "the list of logs settings." - }, - "workspaceId": { - "type": "string", - "description": "The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2" - } - }, - "description": "The diagnostic settings for service." - }, - "ServiceDiagnosticSettingsResource": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ServiceDiagnosticSettings", - "description": "The service diagnostics settings of the resource." - } - }, - "description": "Description of a service diagnostic setting" - }, - "ServiceDiagnosticSettingsResourcePatch": { - "description": "Service diagnostic setting resource for patch operations", - "properties": { - "tags": { - "additionalProperties": { - "type": "string" - }, - "description": "Resource tags" - }, - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/ServiceDiagnosticSettings", - "description": "The service diagnostics settings for an update operation." - } - } - }, - "ErrorResponse": { - "description": "Describes the format of Error response.", - "type": "object", - "properties": { - "code": { - "description": "Error code", - "type": "string" - }, - "message": { - "description": "Error message indicating why the operation failed.", - "type": "string" - } - } - } - }, - "parameters": { - "ResourceUriParameter": { - "name": "resourceUri", - "in": "path", - "required": true, - "type": "string", - "description": "The identifier of the resource.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - } - } -} From 142400936b00111287fff5f6a06e5ab883e46df8 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 21:32:54 +0800 Subject: [PATCH 23/49] Separate Monitor service diagnostic setting client Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../ServiceDiagnosticSettingsResource.tsp | 42 +++++-------------- .../Microsoft.Insights/Insights/client.tsp | 2 +- 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp index a7b82de6f5a7..5cfbc0a86ce3 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ServiceDiagnosticsSettingsApi/ServiceDiagnosticSettingsResource.tsp @@ -14,6 +14,7 @@ namespace ServiceDiagnosticsSettingsApi; * Description of a service diagnostic setting */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-base-parameter" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" +@singleton("service") @extensionResource model ServiceDiagnosticSettingsResource is Azure.ResourceManager.ExtensionResource { @@ -39,32 +40,6 @@ model ServiceDiagnosticSettingsResource tags?: Record; } -alias ServiceDiagnosticSettingsResourcesOps = Azure.ResourceManager.Legacy.ExtensionOperations< - { - ...ApiVersionParameter; - - /** - * The fully qualified Azure Resource manager identifier of the resource. - */ - @path(#{ allowReserved: true }) - resourceUri: string; - }, - { - ...Azure.ResourceManager.Legacy.Provider; - }, - { - ...Azure.ResourceManager.Legacy.Provider; - - /** - * The name of the diagnostic setting. - */ - @path - @segment("diagnosticSettings") - diagnosticSetting: "service"; - }, - "DiagnosticSetting" ->; - #suppress "@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @armResourceOperations(#{ omitTags: true }) interface ServiceDiagnosticSettingsResources { @@ -72,9 +47,10 @@ interface ServiceDiagnosticSettingsResources { * Gets the active diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases. */ @tag("ServiceDiagnosticSettings") - get is ServiceDiagnosticSettingsResourcesOps.Read< + get is Extension.Read< + Extension.ScopeParameter, ServiceDiagnosticSettingsResource, - ErrorType = Microsoft.Common.ErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -82,20 +58,22 @@ interface ServiceDiagnosticSettingsResources { */ #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @tag("ServiceDiagnosticSettings") - createOrUpdate is ServiceDiagnosticSettingsResourcesOps.CreateOrUpdateSync< + createOrUpdate is Extension.CreateOrReplaceSync< + Extension.ScopeParameter, ServiceDiagnosticSettingsResource, Response = ArmResourceUpdatedResponse, - ErrorType = Microsoft.Common.ErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** * Updates an existing ServiceDiagnosticSettingsResource. To update other fields use the CreateOrUpdate method. **WARNING**: This method will be deprecated in future releases. */ @patch(#{ implicitOptionality: false }) - update is ServiceDiagnosticSettingsResourcesOps.CustomPatchSync< + update is Extension.CustomPatchSync< + Extension.ScopeParameter, ServiceDiagnosticSettingsResource, PatchModel = ServiceDiagnosticSettingsResourcePatch, - ErrorType = Microsoft.Common.ErrorResponse + Error = Microsoft.Common.ErrorResponse >; } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 2a3a4013595e..65090fc8c6ad 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -198,7 +198,7 @@ namespace Microsoft.InsightsCombinedClient; ); @@clientName( ServiceDiagnosticsSettingsApi.ServiceDiagnosticSettingsResource, - "DiagnosticSetting", + "ServiceDiagnosticSetting", "csharp" ); @@alternateType( From 3670db86949699ebfb4eb5e41815e7288bf4a7dc Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 16 Jun 2026 22:02:14 +0800 Subject: [PATCH 24/49] Restore Monitor diagnostic setting accessors for CSharp Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Insights/Insights/client.tsp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 65090fc8c6ad..b2c5dbafa4b9 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -814,11 +814,12 @@ model MetricSettings { */ retentionPolicy?: Microsoft.Common.RetentionPolicy; } +@@clientName(MetricSettings.enabled, "IsEnabled", "csharp"); @@alternateType( ServiceDiagnosticsSettingsApi.MetricSettings, MetricSettings, - "java,python" + "csharp,java,python" ); /** @@ -845,11 +846,12 @@ model LogSettings { */ retentionPolicy?: Microsoft.Common.RetentionPolicy; } +@@clientName(LogSettings.enabled, "IsEnabled", "csharp"); @@alternateType( ServiceDiagnosticsSettingsApi.LogSettings, LogSettings, - "java,python" + "csharp,java,python" ); @@clientLocation( From 4cdcdd465131d26a1371a4e72bf92f66ed102a8d Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 17 Jun 2026 16:19:38 +0800 Subject: [PATCH 25/49] Add C# client name for data collection rule associations Rename DataCollectionRuleResources.listByRule to GetDataCollectionRuleAssociationsByRule for C# to preserve stable method naming during Monitor migration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Insights/DataCollectionApi/back-compatible.tsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp index c7a1f5d93c04..d942d0e6d15a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp @@ -85,6 +85,11 @@ using DataCollectionApi; DataCollectionRuleResources.listByRule, "DataCollectionRuleAssociations" ); +@@clientName( + DataCollectionRuleResources.listByRule, + "GetDataCollectionRuleAssociationsByRule", + "csharp" +); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@Legacy.flattenProperty(DataCollectionRuleResource.properties); @@doc( From 3ea102d0ea80f7be45e232ff1f991c672141e7fd Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 17 Jun 2026 17:19:15 +0800 Subject: [PATCH 26/49] Move Monitor TypeSpec @@clientName mappings to client.tsp Moved operation rename decorators from subproject back-compatible.tsp files to the main client.tsp file per spec conventions: - ActivityLogsOperationGroup.list -> GetActivityLogs - TenantActivityLogsOperationGroup.list -> GetTenantActivityLogs - EventCategoriesOperationGroup.list -> GetEventCategories - DataCollectionEndpointResources.listByDataCollectionEndpoint -> GetDataCollectionRuleAssociations Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index b2c5dbafa4b9..b36b5081dc3a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -91,6 +91,22 @@ namespace Microsoft.InsightsCombinedClient; "GetNotificationStatus", "csharp" ); +@@clientName(ActivityLogsApi.ActivityLogsOperationGroup.list, "GetActivityLogs", "csharp"); +@@clientName( + ActivityLogsApi.TenantActivityLogsOperationGroup.list, + "GetTenantActivityLogs", + "csharp" +); +@@clientName( + ActivityLogsApi.EventCategoriesOperationGroup.list, + "GetEventCategories", + "csharp" +); +@@clientName( + DataCollectionApi.DataCollectionEndpointResources.listByDataCollectionEndpoint, + "GetDataCollectionRuleAssociations", + "csharp" +); @@clientName( ActivityLogAlertsApi.ActivityLogAlertResource, "ActivityLogAlert", From fc7e6bfeaeac86ed3b12c36feb17e000f35a3adf Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 17 Jun 2026 21:38:33 +0800 Subject: [PATCH 27/49] Restore Monitor metric alert status client names Add C# client name and pageable mappings for MetricAlert status operations so the generated .NET API matches the shipped SDK surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index b36b5081dc3a..cd367d603889 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -102,6 +102,16 @@ namespace Microsoft.InsightsCombinedClient; "GetEventCategories", "csharp" ); +@@clientName( + MetricAlertApi.MetricAlertResources.list, + "GetAllMetricAlertsStatus", + "csharp" +); +@@clientName( + MetricAlertApi.MetricAlertResources.listByName, + "GetAllMetricAlertsStatusByName", + "csharp" +); @@clientName( DataCollectionApi.DataCollectionEndpointResources.listByDataCollectionEndpoint, "GetDataCollectionRuleAssociations", @@ -755,12 +765,12 @@ enum MonitorConditionOperator { #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "list should be pageable" @@Azure.ClientGenerator.Core.Legacy.markAsPageable( MetricAlertApi.MetricAlertResources.list, - "java" + "csharp,java" ); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "list should be pageable" @@Azure.ClientGenerator.Core.Legacy.markAsPageable( MetricAlertApi.MetricAlertResources.listByName, - "java" + "csharp,java" ); // ActivityLogAlerts - rename back to match fluent SDK expected names From 1196a3d11dda5a675fec5585b0224845a37e6baf Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 18 Jun 2026 12:28:12 +0800 Subject: [PATCH 28/49] Restore Monitor metrics client name Rename the resource-scope metrics operation for C# back to GetMonitorMetrics to match the shipped SDK surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Insights/Insights/client.tsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index cd367d603889..75d16dc6269b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -112,6 +112,11 @@ namespace Microsoft.InsightsCombinedClient; "GetAllMetricAlertsStatusByName", "csharp" ); +@@clientName( + MetricsApi.MetricsOperationGroup.list, + "GetMonitorMetrics", + "csharp" +); @@clientName( DataCollectionApi.DataCollectionEndpointResources.listByDataCollectionEndpoint, "GetDataCollectionRuleAssociations", From 6477c7b2aa1eb2bb62492bcea8c13fe84baaef70 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 18 Jun 2026 15:27:36 +0800 Subject: [PATCH 29/49] Restore Monitor metric operation client names Add C# client name mappings for resource metrics, subscription metrics, subscription metrics POST, and metric baselines so generated .NET names align with the shipped SDK surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 75d16dc6269b..e3ae2279a654 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -117,6 +117,21 @@ namespace Microsoft.InsightsCombinedClient; "GetMonitorMetrics", "csharp" ); +@@clientName( + MetricsApi.MetricsOperationGroup.listAtSubscriptionScope, + "GetMonitorMetrics", + "csharp" +); +@@clientName( + MetricsApi.MetricsOperationGroup.listAtSubscriptionScopePost, + "GetMonitorMetricsWithPost", + "csharp" +); +@@clientName( + MetricBaselinesApi.BaselinesOperationGroup.list, + "GetMonitorMetricBaselines", + "csharp" +); @@clientName( DataCollectionApi.DataCollectionEndpointResources.listByDataCollectionEndpoint, "GetDataCollectionRuleAssociations", From b30e3afbea0fcf3411483017c473810cea591d54 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 22 Jun 2026 14:23:56 +0800 Subject: [PATCH 30/49] Rename Monitor metrics response for CSharp --- .../resource-manager/Microsoft.Insights/Insights/client.tsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index e3ae2279a654..675fbff4d4b6 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -117,6 +117,11 @@ namespace Microsoft.InsightsCombinedClient; "GetMonitorMetrics", "csharp" ); +@@clientName( + MetricsApi.Response, + "MonitorMetricsResult", + "csharp" +); @@clientName( MetricsApi.MetricsOperationGroup.listAtSubscriptionScope, "GetMonitorMetrics", From 80e38c24c678eeccedaccde0a4c620bf0be74958 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 22 Jun 2026 16:20:25 +0800 Subject: [PATCH 31/49] Restore Monitor activity log alert resource shape Restore the service diagnostics swagger file and keep ActivityLogAlertResource as a proxy resource with explicit tags and location. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../ActivityLogAlertResource.tsp | 11 +- .../serviceDiagnosticsSettings_API.json | 412 ++++++++++++++++++ 2 files changed, 422 insertions(+), 1 deletion(-) create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2016-09-01/serviceDiagnosticsSettings_API.json diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ActivityLogAlertsApi/ActivityLogAlertResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ActivityLogAlertsApi/ActivityLogAlertResource.tsp index e7c610205c2e..db3c601a21b0 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/ActivityLogAlertsApi/ActivityLogAlertResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/ActivityLogAlertsApi/ActivityLogAlertResource.tsp @@ -14,7 +14,7 @@ namespace ActivityLogAlertsApi; * An Activity Log Alert rule resource. */ model ActivityLogAlertResource - is Azure.ResourceManager.TrackedResource { + is Azure.ResourceManager.ProxyResource { ...ResourceNameParameter< Resource = ActivityLogAlertResource, KeyName = "activityLogAlertName", @@ -22,6 +22,15 @@ model ActivityLogAlertResource NamePattern = "^[-\\w\\._\\(\\)]+$" >; + /** The tags of the resource. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + tags?: Record; + + /** The location of the resource. Azure Activity Log Alert rules are supported on Global, West Europe and North Europe regions. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + @visibility(Lifecycle.Read, Lifecycle.Create) + location?: string; } @armResourceOperations(#{ omitTags: true }) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2016-09-01/serviceDiagnosticsSettings_API.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2016-09-01/serviceDiagnosticsSettings_API.json new file mode 100644 index 000000000000..78d7e6da8eb7 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2016-09-01/serviceDiagnosticsSettings_API.json @@ -0,0 +1,412 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "version": "2016-09-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service": { + "get": { + "tags": [ + "ServiceDiagnosticSettings" + ], + "operationId": "ServiceDiagnosticSettings_Get", + "description": "Gets the active diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to get more information about service diagnostic setting", + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "examples": { + "application/json": { + "id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type": "", + "name": "service", + "location": "", + "tags": null, + "properties": { + "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "serviceBusRuleId": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey", + "workspaceId": "", + "metrics": [ + { + "timeGrain": "PT1M", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ], + "logs": [ + { + "category": "WorkflowRuntime", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ] + } + } + } + } + }, + "x-ms-examples": { + "Get service diagnostic setting": { + "$ref": "./examples/getServiceDiagnosticSetting.json" + } + } + }, + "put": { + "tags": [ + "ServiceDiagnosticSettings" + ], + "operationId": "ServiceDiagnosticSettings_CreateOrUpdate", + "description": "Create or update new diagnostic settings for the specified resource. **WARNING**: This method will be deprecated in future releases.", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "200": { + "description": "Successful request to create a service diagnostic setting", + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + }, + "examples": { + "application/json": { + "id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6/diagnosticSettings/service", + "type": "", + "name": "service", + "location": "", + "tags": null, + "properties": { + "storageAccountId": "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1", + "serviceBusRuleId": "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/andy1101/providers/Microsoft.EventHub/namespaces/andy1101/authorizationrules/RootManageSharedAccessKey", + "workspaceId": "", + "eventHubAuthorizationRuleId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule", + "metrics": [ + { + "timeGrain": "PT1M", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ], + "logs": [ + { + "category": "WorkflowRuntime", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ] + } + } + } + } + }, + "x-ms-examples": { + "Create or update a service diagnostic setting": { + "$ref": "./examples/createOrUpdateServiceDiagnosticSetting.json" + } + } + }, + "patch": { + "description": "Updates an existing ServiceDiagnosticSettingsResource. To update other fields use the CreateOrUpdate method. **WARNING**: This method will be deprecated in future releases.", + "operationId": "ServiceDiagnosticSettings_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "serviceDiagnosticSettingsResource", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResourcePatch" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "An existing service diagnostics setting resource was successfully updated.", + "schema": { + "$ref": "#/definitions/ServiceDiagnosticSettingsResource" + } + } + }, + "x-ms-examples": { + "Update a service diagnostic setting": { + "$ref": "./examples/updateServiceDiagnosticSetting.json" + } + } + } + } + }, + "definitions": { + "Resource": { + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Azure resource name" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "required": [ + "location" + ], + "x-ms-azure-resource": true, + "description": "An azure resource object" + }, + "RetentionPolicy": { + "properties": { + "enabled": { + "type": "boolean", + "description": "a value indicating whether the retention policy is enabled." + }, + "days": { + "type": "integer", + "format": "int32", + "minimum": 0, + "description": "the number of days for the retention in days. A value of 0 will retain the events indefinitely." + } + }, + "required": [ + "enabled", + "days" + ], + "description": "Specifies the retention policy for the log." + }, + "MetricSettings": { + "properties": { + "timeGrain": { + "type": "string", + "format": "duration", + "description": "the timegrain of the metric in ISO8601 format." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this timegrain is enabled." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "the retention policy for this timegrain." + } + }, + "required": [ + "enabled", + "timeGrain" + ], + "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric." + }, + "LogSettings": { + "properties": { + "category": { + "type": "string", + "description": "Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation." + }, + "enabled": { + "type": "boolean", + "description": "a value indicating whether this log is enabled." + }, + "retentionPolicy": { + "$ref": "#/definitions/RetentionPolicy", + "description": "the retention policy for this log." + } + }, + "required": [ + "enabled" + ], + "description": "Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log." + }, + "ServiceDiagnosticSettings": { + "properties": { + "storageAccountId": { + "type": "string", + "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs." + }, + "serviceBusRuleId": { + "type": "string", + "description": "The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming Diagnostic Logs. The rule ID is of the format: '{service bus resource ID}/authorizationrules/{key name}'." + }, + "eventHubAuthorizationRuleId": { + "type": "string", + "description": "The resource Id for the event hub namespace authorization rule." + }, + "metrics": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricSettings" + }, + "description": "the list of metric settings." + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/LogSettings" + }, + "description": "the list of logs settings." + }, + "workspaceId": { + "type": "string", + "description": "The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2" + } + }, + "description": "The diagnostic settings for service." + }, + "ServiceDiagnosticSettingsResource": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ServiceDiagnosticSettings", + "description": "The service diagnostics settings of the resource." + } + }, + "description": "Description of a service diagnostic setting" + }, + "ServiceDiagnosticSettingsResourcePatch": { + "description": "Service diagnostic setting resource for patch operations", + "properties": { + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ServiceDiagnosticSettings", + "description": "The service diagnostics settings for an update operation." + } + } + }, + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + } + }, + "parameters": { + "ResourceUriParameter": { + "name": "resourceUri", + "in": "path", + "required": true, + "type": "string", + "description": "The identifier of the resource.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + } + } +} From 62f51e3083bbecbad7b04e87455a2c64b7da9318 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Tue, 23 Jun 2026 11:01:58 +0800 Subject: [PATCH 32/49] Rename Monitor log profile list result for CSharp Avoid generating a public model named LogProfileCollection so inheritance checks only see the ARM collection type with that suffix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 311 ++++++++++++++---- 1 file changed, 252 insertions(+), 59 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 675fbff4d4b6..d3dd86ef147f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -73,14 +73,38 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(ActionGroupsApi.ActionGroup, "ActionGroupProperties", "csharp"); @@clientName(ActionGroupsApi.ActionGroup.enabled, "IsEnabled", "csharp"); @@clientName(ActionGroupsApi.ActionGroupResource, "ActionGroup", "csharp"); -@@clientName(ActionGroupsApi.ActionGroupPatchBody, "ActionGroupPatch", "csharp"); -@@clientName(ActionGroupsApi.ActionGroupPatch, "ActionGroupPatchProperties", "csharp"); +@@clientName( + ActionGroupsApi.ActionGroupPatchBody, + "ActionGroupPatch", + "csharp" +); +@@clientName( + ActionGroupsApi.ActionGroupPatch, + "ActionGroupPatchProperties", + "csharp" +); @@clientName(ActionGroupsApi.ActionGroupPatch.enabled, "IsEnabled", "csharp"); -@@clientName(ActionGroupsApi.NotificationRequestBody, "NotificationContent", "csharp"); -@@clientName(ActionGroupsApi.TestNotificationDetailsResponse, "NotificationStatus", "csharp"); +@@clientName( + ActionGroupsApi.NotificationRequestBody, + "NotificationContent", + "csharp" +); +@@clientName( + ActionGroupsApi.TestNotificationDetailsResponse, + "NotificationStatus", + "csharp" +); @@clientName(ActionGroupsApi.Context, "NotificationContext", "csharp"); -@@clientName(ActionGroupsApi.ActionDetail, "NotificationActionDetail", "csharp"); -@@clientName(ActionGroupsApi.EnableRequest, "ActionGroupEnableContent", "csharp"); +@@clientName( + ActionGroupsApi.ActionDetail, + "NotificationActionDetail", + "csharp" +); +@@clientName( + ActionGroupsApi.EnableRequest, + "ActionGroupEnableContent", + "csharp" +); @@clientName( ActionGroupsApi.ActionGroupResources.createNotificationsAtActionGroupResourceLevel, "CreateNotifications", @@ -91,7 +115,11 @@ namespace Microsoft.InsightsCombinedClient; "GetNotificationStatus", "csharp" ); -@@clientName(ActivityLogsApi.ActivityLogsOperationGroup.list, "GetActivityLogs", "csharp"); +@@clientName( + ActivityLogsApi.ActivityLogsOperationGroup.list, + "GetActivityLogs", + "csharp" +); @@clientName( ActivityLogsApi.TenantActivityLogsOperationGroup.list, "GetTenantActivityLogs", @@ -117,11 +145,7 @@ namespace Microsoft.InsightsCombinedClient; "GetMonitorMetrics", "csharp" ); -@@clientName( - MetricsApi.Response, - "MonitorMetricsResult", - "csharp" -); +@@clientName(MetricsApi.Response, "MonitorMetricsResult", "csharp"); @@clientName( MetricsApi.MetricsOperationGroup.listAtSubscriptionScope, "GetMonitorMetrics", @@ -147,10 +171,26 @@ namespace Microsoft.InsightsCombinedClient; "ActivityLogAlert", "csharp" ); -@@clientName(ActivityLogAlertsApi.AlertRuleProperties.enabled, "IsEnabled", "csharp"); -@@clientName(ActivityLogAlertsApi.AlertRulePatchProperties.enabled, "IsEnabled", "csharp"); -@@clientName(AutoScaleApi.AutoscaleSetting, "AutoscaleSettingProperties", "csharp"); -@@clientName(AutoScaleApi.AutoscaleSettingResource, "AutoscaleSetting", "csharp"); +@@clientName( + ActivityLogAlertsApi.AlertRuleProperties.enabled, + "IsEnabled", + "csharp" +); +@@clientName( + ActivityLogAlertsApi.AlertRulePatchProperties.enabled, + "IsEnabled", + "csharp" +); +@@clientName( + AutoScaleApi.AutoscaleSetting, + "AutoscaleSettingProperties", + "csharp" +); +@@clientName( + AutoScaleApi.AutoscaleSettingResource, + "AutoscaleSetting", + "csharp" +); @@clientName( DataCollectionApi.DataCollectionEndpoint, "DataCollectionEndpointProperties", @@ -172,6 +212,11 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); @@clientName(LogProfilesApi.LogProfileResource, "LogProfile", "csharp"); +@@clientName( + LogProfilesApi.LogProfileCollection, + "LogProfileListResult", + "csharp" +); @@alternateType( LogProfilesApi.LogProfileProperties.storageAccountId, Azure.Core.armResourceIdentifier, @@ -188,13 +233,21 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); @@clientName(MetricAlertApi.MetricAlertResource, "MetricAlert", "csharp"); -@@clientName(MetricAlertApi.MetricAlertProperties.enabled, "IsEnabled", "csharp"); +@@clientName( + MetricAlertApi.MetricAlertProperties.enabled, + "IsEnabled", + "csharp" +); @@clientName( MetricAlertApi.MetricAlertProperties.autoMitigate, "IsAutoMitigateEnabled", "csharp" ); -@@clientName(MetricAlertApi.MetricAlertPropertiesPatch.enabled, "IsEnabled", "csharp"); +@@clientName( + MetricAlertApi.MetricAlertPropertiesPatch.enabled, + "IsEnabled", + "csharp" +); @@clientName( MetricAlertApi.MetricAlertPropertiesPatch.autoMitigate, "IsAutoMitigateEnabled", @@ -461,11 +514,7 @@ namespace Microsoft.InsightsCombinedClient; @@clientName(AutoScaleApi.TimeWindow, "MonitorTimeWindow", "csharp"); @@clientName(AutoScaleApi.Recurrence, "MonitorRecurrence", "csharp"); @@clientName(AutoScaleApi.ScaleAction, "MonitorScaleAction", "csharp"); -@@clientName( - AutoScaleApi.ScaleCapacity, - "MonitorScaleCapacity", - "csharp" -); +@@clientName(AutoScaleApi.ScaleCapacity, "MonitorScaleCapacity", "csharp"); @@clientName(AutoScaleApi.ScaleRule, "AutoscaleRule", "csharp"); @@clientName( AutoScaleApi.TimeAggregationType, @@ -494,7 +543,11 @@ namespace Microsoft.InsightsCombinedClient; Azure.Core.armResourceIdentifier, "csharp" ); -@@clientName(AutoScaleApi.MetricTrigger.operator, "ComparisonOperator", "csharp"); +@@clientName( + AutoScaleApi.MetricTrigger.operator, + "ComparisonOperator", + "csharp" +); @@clientName( AutoScaleApi.MetricTrigger.dividePerInstance, "IsDividedPerInstance", @@ -516,8 +569,16 @@ namespace Microsoft.InsightsCombinedClient; ); @@clientName(MetricAlertApi.Operator.Equals, "EqualsValue", "csharp"); @@clientName(AutoScaleApi.AutoscaleSetting.enabled, "IsEnabled", "csharp"); -@@clientName(AutoScaleApi.AutoscaleSetting.notifications, "Notifications", "csharp"); -@@clientName(AutoScaleApi.AutoscaleSetting.targetResourceUri, "TargetResourceId", "csharp"); +@@clientName( + AutoScaleApi.AutoscaleSetting.notifications, + "Notifications", + "csharp" +); +@@clientName( + AutoScaleApi.AutoscaleSetting.targetResourceUri, + "TargetResourceId", + "csharp" +); @@alternateType( AutoScaleApi.AutoscaleSetting.targetResourceUri, Azure.Core.armResourceIdentifier, @@ -583,7 +644,11 @@ namespace Microsoft.InsightsCombinedClient; "ETag", "csharp" ); -@@clientName(ActivityLogAlertsApi.AlertRuleLeafCondition.equals, "EqualsValue", "csharp"); +@@clientName( + ActivityLogAlertsApi.AlertRuleLeafCondition.equals, + "EqualsValue", + "csharp" +); @@clientName( ActivityLogAlertsApi.AlertRuleAnyOfOrLeafCondition, "ActivityLogAlertAnyOfOrLeafCondition", @@ -591,7 +656,11 @@ namespace Microsoft.InsightsCombinedClient; ); @@clientName(ActionGroupsApi.EmailReceiver, "MonitorEmailReceiver", "csharp"); @@clientName(ActionGroupsApi.SmsReceiver, "MonitorSmsReceiver", "csharp"); -@@clientName(ActionGroupsApi.WebhookReceiver, "MonitorWebhookReceiver", "csharp"); +@@clientName( + ActionGroupsApi.WebhookReceiver, + "MonitorWebhookReceiver", + "csharp" +); @@clientName(ActionGroupsApi.ItsmReceiver, "MonitorItsmReceiver", "csharp"); @@clientName( ActionGroupsApi.AzureAppPushReceiver, @@ -604,14 +673,26 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); @@clientName(ActionGroupsApi.VoiceReceiver, "MonitorVoiceReceiver", "csharp"); -@@clientName(ActionGroupsApi.LogicAppReceiver, "MonitorLogicAppReceiver", "csharp"); +@@clientName( + ActionGroupsApi.LogicAppReceiver, + "MonitorLogicAppReceiver", + "csharp" +); @@clientName( ActionGroupsApi.AzureFunctionReceiver, "MonitorAzureFunctionReceiver", "csharp" ); -@@clientName(ActionGroupsApi.ArmRoleReceiver, "MonitorArmRoleReceiver", "csharp"); -@@clientName(ActionGroupsApi.EventHubReceiver, "MonitorEventHubReceiver", "csharp"); +@@clientName( + ActionGroupsApi.ArmRoleReceiver, + "MonitorArmRoleReceiver", + "csharp" +); +@@clientName( + ActionGroupsApi.EventHubReceiver, + "MonitorEventHubReceiver", + "csharp" +); @@clientName(ActionGroupsApi.ReceiverStatus, "MonitorReceiverStatus", "csharp"); @@clientName( DataCollectionApi.KnownDataCollectionEndpointResourceKind, @@ -633,7 +714,11 @@ namespace Microsoft.InsightsCombinedClient; "DataCollectionRulePrivateLinkScopedResourceInfo", "csharp" ); -@@clientName(DataCollectionApi.ColumnDefinition.type, "DefinitionType", "csharp"); +@@clientName( + DataCollectionApi.ColumnDefinition.type, + "DefinitionType", + "csharp" +); @@clientName( DataCollectionApi.KnownDataCollectionRuleResourceKind, "DataCollectionRuleResourceKind", @@ -644,8 +729,16 @@ namespace Microsoft.InsightsCombinedClient; "DataCollectionRuleProvisioningState", "csharp" ); -@@clientName(DataCollectionApi.StreamDeclaration, "DataStreamDeclaration", "csharp"); -@@clientName(DataCollectionApi.ColumnDefinition, "DataColumnDefinition", "csharp"); +@@clientName( + DataCollectionApi.StreamDeclaration, + "DataStreamDeclaration", + "csharp" +); +@@clientName( + DataCollectionApi.ColumnDefinition, + "DataColumnDefinition", + "csharp" +); @@clientName(ScheduledQueryRuleApi.Kind, "ScheduledQueryRuleKind", "csharp"); @@clientName( ScheduledQueryRuleApi.TimeAggregation, @@ -653,13 +746,37 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); @@clientName(ScheduledQueryRuleApi.Dimension, "MonitorDimension", "csharp"); -@@clientName(ScheduledQueryRuleApi.DimensionOperator, "MonitorDimensionOperator", "csharp"); -@@clientName(ScheduledQueryRuleApi.Condition, "ScheduledQueryRuleCondition", "csharp"); -@@clientName(ScheduledQueryRuleApi.Actions, "ScheduledQueryRuleActions", "csharp"); -@@clientName(AutoScaleApi.AutoscaleSetting.name, "AutoscaleSettingName", "csharp"); +@@clientName( + ScheduledQueryRuleApi.DimensionOperator, + "MonitorDimensionOperator", + "csharp" +); +@@clientName( + ScheduledQueryRuleApi.Condition, + "ScheduledQueryRuleCondition", + "csharp" +); +@@clientName( + ScheduledQueryRuleApi.Actions, + "ScheduledQueryRuleActions", + "csharp" +); +@@clientName( + AutoScaleApi.AutoscaleSetting.name, + "AutoscaleSettingName", + "csharp" +); @@clientName(ActivityLogsApi.EventData, "EventDataInfo", "csharp"); -@@clientName(ActivityLogsApi.HttpRequestInfo, "EventDataHttpRequestInfo", "csharp"); -@@clientName(ActivityLogsApi.HttpRequestInfo.clientIpAddress, "ClientIPAddress", "csharp"); +@@clientName( + ActivityLogsApi.HttpRequestInfo, + "EventDataHttpRequestInfo", + "csharp" +); +@@clientName( + ActivityLogsApi.HttpRequestInfo.clientIpAddress, + "ClientIPAddress", + "csharp" +); @@alternateType( ActivityLogsApi.HttpRequestInfo.clientIpAddress, Azure.Core.ipV4Address, @@ -667,12 +784,36 @@ namespace Microsoft.InsightsCombinedClient; ); @@clientName(ActivityLogsApi.EventLevel, "MonitorEventLevel", "csharp"); @@clientName(LocalizableString, "MonitorLocalizableString", "csharp"); -@@clientName(MetricBaselinesApi.SingleMetricBaseline, "MonitorSingleMetricBaseline", "csharp"); -@@clientName(MetricBaselinesApi.TimeSeriesBaseline, "MonitorTimeSeriesBaseline", "csharp"); -@@clientName(MetricBaselinesApi.MetricSingleDimension, "MonitorMetricSingleDimension", "csharp"); -@@clientName(MetricBaselinesApi.SingleBaseline, "MonitorSingleBaseline", "csharp"); -@@clientName(MetricBaselinesApi.BaselineSensitivity, "MonitorBaselineSensitivity", "csharp"); -@@clientName(MetricBaselinesApi.BaselineMetadata, "MonitorBaselineMetadata", "csharp"); +@@clientName( + MetricBaselinesApi.SingleMetricBaseline, + "MonitorSingleMetricBaseline", + "csharp" +); +@@clientName( + MetricBaselinesApi.TimeSeriesBaseline, + "MonitorTimeSeriesBaseline", + "csharp" +); +@@clientName( + MetricBaselinesApi.MetricSingleDimension, + "MonitorMetricSingleDimension", + "csharp" +); +@@clientName( + MetricBaselinesApi.SingleBaseline, + "MonitorSingleBaseline", + "csharp" +); +@@clientName( + MetricBaselinesApi.BaselineSensitivity, + "MonitorBaselineSensitivity", + "csharp" +); +@@clientName( + MetricBaselinesApi.BaselineMetadata, + "MonitorBaselineMetadata", + "csharp" +); @@clientName(MetricsApi.MetricDefinition, "MonitorMetricDefinition", "csharp"); @@clientName( MetricsApi.MetricDefinition.primaryAggregationType, @@ -685,16 +826,36 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); @@clientName(MetricsApi.MetricClass, "MonitorMetricClass", "csharp"); -@@clientName(MetricsApi.MetricAvailability, "MonitorMetricAvailability", "csharp"); -@@clientName(MetricsApi.MetricAggregationType, "MonitorAggregationKind", "csharp"); +@@clientName( + MetricsApi.MetricAvailability, + "MonitorMetricAvailability", + "csharp" +); +@@clientName( + MetricsApi.MetricAggregationType, + "MonitorAggregationKind", + "csharp" +); @@clientName(MetricsApi.MetricUnit, "MonitorMetricUnit", "csharp"); @@clientName(MetricsApi.MetricNamespace, "MonitorMetricNamespace", "csharp"); -@@clientName(MetricsApi.NamespaceClassification, "MonitorNamespaceClassification", "csharp"); +@@clientName( + MetricsApi.NamespaceClassification, + "MonitorNamespaceClassification", + "csharp" +); @@clientName(MetricsApi.MetricResultType, "MonitorMetricResultType", "csharp"); -@@clientName(MetricsApi.MetricNamespaceName.metricNamespaceName, "MetricNamespaceNameValue", "csharp"); +@@clientName( + MetricsApi.MetricNamespaceName.metricNamespaceName, + "MetricNamespaceNameValue", + "csharp" +); @@clientName(MetricsApi.Metric, "MonitorMetric", "csharp"); @@clientName(MetricsApi.Metric.type, "MetricType", "csharp"); -@@clientName(MetricsApi.TimeSeriesElement, "MonitorTimeSeriesElement", "csharp"); +@@clientName( + MetricsApi.TimeSeriesElement, + "MonitorTimeSeriesElement", + "csharp" +); @@clientName(MetricsApi.MetadataValue, "MonitorMetadataValue", "csharp"); @@clientName(MetricsApi.MetricValue, "MonitorMetricValue", "csharp"); @@clientName( @@ -702,13 +863,21 @@ namespace Microsoft.InsightsCombinedClient; "GetPredictiveMetric", "csharp" ); -@@clientName(MetricsApi.MetricDefinitionsOperationGroup.list, "GetMonitorMetricDefinitions", "csharp"); +@@clientName( + MetricsApi.MetricDefinitionsOperationGroup.list, + "GetMonitorMetricDefinitions", + "csharp" +); @@clientName( MetricsApi.MetricDefinitionsOperationGroup.listAtSubscriptionScope, "GetSubscriptionMonitorMetricDefinitions", "csharp" ); -@@clientName(MetricsApi.MetricNamespacesOperationGroup.list, "GetMonitorMetricNamespaces", "csharp"); +@@clientName( + MetricsApi.MetricNamespacesOperationGroup.list, + "GetMonitorMetricNamespaces", + "csharp" +); @@clientName(ResultType, "MonitorResultType", "csharp"); @@clientName( MetricsApi.SubscriptionScopeMetricDefinition.primaryAggregationType, @@ -720,13 +889,33 @@ namespace Microsoft.InsightsCombinedClient; "SupportedAggregationKinds", "csharp" ); -@@clientName(ServiceDiagnosticsSettingsApi.MetricSettings.enabled, "IsEnabled", "csharp"); -@@clientName(ServiceDiagnosticsSettingsApi.LogSettings.enabled, "IsEnabled", "csharp"); +@@clientName( + ServiceDiagnosticsSettingsApi.MetricSettings.enabled, + "IsEnabled", + "csharp" +); +@@clientName( + ServiceDiagnosticsSettingsApi.LogSettings.enabled, + "IsEnabled", + "csharp" +); @@clientName(Microsoft.Common.RetentionPolicy.enabled, "IsEnabled", "csharp"); @@clientName(ActionGroupsApi.ActionDetail.SendTime, "SendOn", "csharp"); -@@clientName(ActionGroupsApi.TestNotificationDetailsResponse.completedTime, "CompletedOn", "csharp"); -@@clientName(ActionGroupsApi.TestNotificationDetailsResponse.createdTime, "CreatedOn", "csharp"); -@@clientName(ScheduledQueryRuleApi.ScheduledQueryRuleProperties.enabled, "IsEnabled", "csharp"); +@@clientName( + ActionGroupsApi.TestNotificationDetailsResponse.completedTime, + "CompletedOn", + "csharp" +); +@@clientName( + ActionGroupsApi.TestNotificationDetailsResponse.createdTime, + "CreatedOn", + "csharp" +); +@@clientName( + ScheduledQueryRuleApi.ScheduledQueryRuleProperties.enabled, + "IsEnabled", + "csharp" +); @@clientName( Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.privateLinkServiceConnectionState, "ConnectionState", @@ -765,7 +954,11 @@ enum MonitorConditionOperator { EqualsValue: "Equals", } -@@alternateType(AutoScaleApi.RecurrentSchedule.days, MonitorDayOfWeek[], "csharp"); +@@alternateType( + AutoScaleApi.RecurrentSchedule.days, + MonitorDayOfWeek[], + "csharp" +); @@alternateType( AutoScaleApi.AutoscaleNotification.operation, MonitorOperationType, From 571cfe4f0330cbf042f526544540254c96a366c8 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 24 Jun 2026 11:06:26 +0800 Subject: [PATCH 33/49] Move Monitor CSharp scoped decorators to client Keep CSharp-specific compatibility decorators in the combined Monitor client.tsp so subproject back-compatible files remain language-neutral. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Insights/DataCollectionApi/back-compatible.tsp | 10 ---------- .../Insights/PrivateLinkScopesApi/back-compatible.tsp | 1 - .../Microsoft.Insights/Insights/client.tsp | 11 +++++++++++ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp index d942d0e6d15a..2f74f4116951 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/back-compatible.tsp @@ -85,19 +85,9 @@ using DataCollectionApi; DataCollectionRuleResources.listByRule, "DataCollectionRuleAssociations" ); -@@clientName( - DataCollectionRuleResources.listByRule, - "GetDataCollectionRuleAssociationsByRule", - "csharp" -); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@Legacy.flattenProperty(DataCollectionRuleResource.properties); @@doc( Azure.ResourceManager.Legacy.EntityTagProperty.etag, "Resource entity tag (ETag)." ); -@@alternateType( - Azure.ResourceManager.Legacy.EntityTagProperty.etag, - Azure.Core.eTag, - "csharp" -); diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp index dd402d919ce4..bfb912d7c6c8 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp @@ -33,7 +33,6 @@ using PrivateLinkScopesApi; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@Legacy.flattenProperty(PrivateEndpointConnection.properties); -@@usage(PrivateLinkResource, Usage.input, "csharp"); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "restore flattened private link resource data shape for C# compatibility" @@Legacy.flattenProperty(PrivateLinkResource.properties); diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index d3dd86ef147f..4704ee687166 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -166,6 +166,11 @@ namespace Microsoft.InsightsCombinedClient; "GetDataCollectionRuleAssociations", "csharp" ); +@@clientName( + DataCollectionApi.DataCollectionRuleResources.listByRule, + "GetDataCollectionRuleAssociationsByRule", + "csharp" +); @@clientName( ActivityLogAlertsApi.ActivityLogAlertResource, "ActivityLogAlert", @@ -340,6 +345,7 @@ namespace Microsoft.InsightsCombinedClient; "MonitorPrivateLinkResource", "csharp" ); +@@usage(PrivateLinkScopesApi.PrivateLinkResource, Usage.input, "csharp"); @@clientName( PrivateLinkScopesApi.ScopedResource, "MonitorPrivateLinkScopedResource", @@ -604,6 +610,11 @@ namespace Microsoft.InsightsCombinedClient; Azure.Core.eTag, "csharp" ); +@@alternateType( + Azure.ResourceManager.Legacy.EntityTagProperty.etag, + Azure.Core.eTag, + "csharp" +); @@clientName( DataCollectionApi.DataCollectionEndpointResource.identity, "Identity", From 99bc662e4526c72c54cab1e3c4431f90264d5e60 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 24 Jun 2026 11:26:29 +0800 Subject: [PATCH 34/49] Scope Monitor private link parameter rename Move the CSharp compatibility parameter rename from the private link back-compatible file into the combined Monitor client.tsp with an explicit CSharp scope. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Insights/PrivateLinkScopesApi/back-compatible.tsp | 1 - .../resource-manager/Microsoft.Insights/Insights/client.tsp | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp index bfb912d7c6c8..fb532c5d5539 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp @@ -38,7 +38,6 @@ using PrivateLinkScopesApi; @@clientLocation(ScopedResources.get, "PrivateLinkScopedResources"); @@clientLocation(ScopedResources.createOrUpdate, "PrivateLinkScopedResources"); -@@clientName(ScopedResources.createOrUpdate::parameters.resource, "parameters"); @@clientLocation(ScopedResources.delete, "PrivateLinkScopedResources"); @@clientLocation( ScopedResources.listByPrivateLinkScope, diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 4704ee687166..b5cea4877d21 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -351,6 +351,11 @@ namespace Microsoft.InsightsCombinedClient; "MonitorPrivateLinkScopedResource", "csharp" ); +@@clientName( + PrivateLinkScopesApi.ScopedResources.createOrUpdate::parameters.resource, + "parameters", + "csharp" +); @@clientName( PrivateLinkScopesApi.AzureMonitorPrivateLinkScopeProperties.provisioningState, "PrivateLinkScopeProvisioningState", From fee48e535688913d74f89f5294f16455423b79b1 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 24 Jun 2026 11:46:41 +0800 Subject: [PATCH 35/49] Scope Monitor private link flattening Revert the parameter rename move and instead move the CSharp compatibility flattenProperty decorator into the combined Monitor client.tsp with an explicit CSharp scope. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../PrivateLinkScopesApi/PrivateLinkResource.tsp | 10 +++++----- .../Insights/PrivateLinkScopesApi/back-compatible.tsp | 4 +--- .../Microsoft.Insights/Insights/client.tsp | 10 +++++----- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/PrivateLinkResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/PrivateLinkResource.tsp index 32156f48d9a3..5761a2895d7a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/PrivateLinkResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/PrivateLinkResource.tsp @@ -22,8 +22,8 @@ interface PrivateLinkResources { /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. */ - #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "legacy private link operation" - #suppress "@azure-tools/typespec-azure-resource-manager/invalid-parameter-rename" "preserve existing wire parameter name" + #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + #suppress "@azure-tools/typespec-azure-resource-manager/invalid-parameter-rename" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @Azure.ResourceManager.Legacy.renamePathParameter( "privateLinkResourceName", "groupName" @@ -33,9 +33,9 @@ interface PrivateLinkResources { /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. */ - #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "legacy operation returns a single page" - #suppress "@azure-tools/typespec-azure-resource-manager/invalid-parameter-rename" "preserve existing wire parameter name" - #suppress "@azure-tools/typespec-azure-resource-manager/legacy-type-usage" "legacy operation returns a single page" + #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + #suppress "@azure-tools/typespec-azure-resource-manager/invalid-parameter-rename" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" + #suppress "@azure-tools/typespec-azure-resource-manager/legacy-type-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @Azure.ResourceManager.Legacy.renamePathParameter( "privateLinkResourceName", "groupName" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp index fb532c5d5539..60e9e14c4417 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/PrivateLinkScopesApi/back-compatible.tsp @@ -33,11 +33,9 @@ using PrivateLinkScopesApi; #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @@Legacy.flattenProperty(PrivateEndpointConnection.properties); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "restore flattened private link resource data shape for C# compatibility" -@@Legacy.flattenProperty(PrivateLinkResource.properties); - @@clientLocation(ScopedResources.get, "PrivateLinkScopedResources"); @@clientLocation(ScopedResources.createOrUpdate, "PrivateLinkScopedResources"); +@@clientName(ScopedResources.createOrUpdate::parameters.resource, "parameters"); @@clientLocation(ScopedResources.delete, "PrivateLinkScopedResources"); @@clientLocation( ScopedResources.listByPrivateLinkScope, diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index b5cea4877d21..d0025749633c 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -346,14 +346,14 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); @@usage(PrivateLinkScopesApi.PrivateLinkResource, Usage.input, "csharp"); -@@clientName( - PrivateLinkScopesApi.ScopedResource, - "MonitorPrivateLinkScopedResource", +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "restore flattened private link resource data shape for C# compatibility" +@@Azure.ClientGenerator.Core.Legacy.flattenProperty( + PrivateLinkScopesApi.PrivateLinkResource.properties, "csharp" ); @@clientName( - PrivateLinkScopesApi.ScopedResources.createOrUpdate::parameters.resource, - "parameters", + PrivateLinkScopesApi.ScopedResource, + "MonitorPrivateLinkScopedResource", "csharp" ); @@clientName( From f4dd26d718d165d3cfc1eb59e497a599c73f1087 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 24 Jun 2026 11:55:05 +0800 Subject: [PATCH 36/49] Fix Monitor TypeSpec validation Apply TypeSpec formatting and address warn-as-error diagnostics from the Monitor validation pipeline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...ectionRuleAssociationProxyOnlyResource.tsp | 1 - .../Microsoft.Insights/Insights/client.tsp | 31 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp index a59dc1498ea4..2571e5366d69 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp @@ -37,7 +37,6 @@ alias DataCollectionRuleAssociationProxyOnlyResourcesOps = Azure.ResourceManager @path(#{ allowReserved: true }) @minLength(1) resourceUri: string; - }, { ...Azure.ResourceManager.Legacy.Provider; diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index d0025749633c..580eb17185b9 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -140,12 +140,14 @@ namespace Microsoft.InsightsCombinedClient; "GetAllMetricAlertsStatusByName", "csharp" ); +#suppress "@azure-tools/typespec-client-generator-core/duplicate-client-name-warning" "preserve the shipped C# overload name for resource-scope metric retrieval" @@clientName( MetricsApi.MetricsOperationGroup.list, "GetMonitorMetrics", "csharp" ); @@clientName(MetricsApi.Response, "MonitorMetricsResult", "csharp"); +#suppress "@azure-tools/typespec-client-generator-core/duplicate-client-name-warning" "preserve the shipped C# overload name for subscription-scope metric retrieval" @@clientName( MetricsApi.MetricsOperationGroup.listAtSubscriptionScope, "GetMonitorMetrics", @@ -946,27 +948,56 @@ namespace Microsoft.InsightsCombinedClient; // LRO status polling endpoints are implementation details and should not generate public C# SDK methods. @@scope(PrivateLinkScopeOperationStatusOperationGroup.get, "!csharp"); +/** Days of the week accepted by Monitor recurring schedules. */ union MonitorDayOfWeek { string, + + /** Sunday. */ Sunday: "Sunday", + + /** Monday. */ Monday: "Monday", + + /** Tuesday. */ Tuesday: "Tuesday", + + /** Wednesday. */ Wednesday: "Wednesday", + + /** Thursday. */ Thursday: "Thursday", + + /** Friday. */ Friday: "Friday", + + /** Saturday. */ Saturday: "Saturday", } +/** Monitor autoscale operation type. */ union MonitorOperationType { string, + + /** Scale operation. */ Scale: "Scale", } +/** Monitor condition comparison operator. */ +#suppress "@azure-tools/typespec-azure-core/no-enum" "C# compatibility alternate type must generate the shipped MonitorConditionOperator extensible enum" enum MonitorConditionOperator { + /** Greater than. */ GreaterThan: "GreaterThan", + + /** Greater than or equal. */ GreaterThanOrEqual: "GreaterThanOrEqual", + + /** Less than. */ LessThan: "LessThan", + + /** Less than or equal. */ LessThanOrEqual: "LessThanOrEqual", + + /** Equals. */ EqualsValue: "Equals", } From 8be986904e382a9443b94483c51fef87f4c58c74 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 24 Jun 2026 12:04:22 +0800 Subject: [PATCH 37/49] Update Monitor data collection swagger Keep DataCollectionApi TypeSpec and generated swagger output in sync for TypeSpec validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../DataCollectionRuleAssociationProxyOnlyResource.tsp | 2 +- .../Insights/stable/2024-03-11/dataCollection.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp index 2571e5366d69..f70ad7d6373d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/DataCollectionApi/DataCollectionRuleAssociationProxyOnlyResource.tsp @@ -32,7 +32,7 @@ alias DataCollectionRuleAssociationProxyOnlyResourcesOps = Azure.ResourceManager ...ApiVersionParameter; /** - * The identifier of the resource. + * The fully qualified Azure Resource manager identifier of the resource. */ @path(#{ allowReserved: true }) @minLength(1) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2024-03-11/dataCollection.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2024-03-11/dataCollection.json index 8e832017a218..fb075456ffe4 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2024-03-11/dataCollection.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2024-03-11/dataCollection.json @@ -159,7 +159,7 @@ { "name": "resourceUri", "in": "path", - "description": "The identifier of the resource.", + "description": "The fully qualified Azure Resource manager identifier of the resource.", "required": true, "type": "string", "minLength": 1, From 774bcfe231ce87a461e9af6548305eaab8b83b57 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Wed, 24 Jun 2026 13:58:33 +0800 Subject: [PATCH 38/49] Allow Monitor compatibility spellings Add intentional Monitor CSharp compatibility names to the Monitor spellcheck word list. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- specification/monitor/cspell.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/monitor/cspell.yaml b/specification/monitor/cspell.yaml index 1280715cb7ff..381a967f5703 100644 --- a/specification/monitor/cspell.yaml +++ b/specification/monitor/cspell.yaml @@ -9,9 +9,11 @@ import: words: - adece - amcs + - ampm - azlogs - azmetrics - azns + - bcdr - byval - ciis - dcrmetadata @@ -46,4 +48,3 @@ overrides: - occurringlocation - routingid - tsgid - From 19858f754ada022172c67a56393dabbdc76be39b Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 25 Jun 2026 14:11:31 +0800 Subject: [PATCH 39/49] Refine Monitor CSharp generated names Add Monitor-specific CSharp client names for generic NSP, metrics, incident, and data collection generated surfaces requested in SDK review. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 111 +++++++++++++++++- 1 file changed, 109 insertions(+), 2 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 580eb17185b9..2bbf248cee9e 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -130,6 +130,11 @@ namespace Microsoft.InsightsCombinedClient; "GetEventCategories", "csharp" ); +@@clientName( + AlertRulesIncidentsApi.Incident, + "MonitorAlertRuleIncident", + "csharp" +); @@clientName( MetricAlertApi.MetricAlertResources.list, "GetAllMetricAlertsStatus", @@ -140,6 +145,11 @@ namespace Microsoft.InsightsCombinedClient; "GetAllMetricAlertsStatusByName", "csharp" ); +@@clientName( + MetricAlertApi.ResolveConfiguration.autoResolved, + "IsAutoResolved", + "csharp" +); #suppress "@azure-tools/typespec-client-generator-core/duplicate-client-name-warning" "preserve the shipped C# overload name for resource-scope metric retrieval" @@clientName( MetricsApi.MetricsOperationGroup.list, @@ -158,6 +168,16 @@ namespace Microsoft.InsightsCombinedClient; "GetMonitorMetricsWithPost", "csharp" ); +@@clientName( + MetricsApi.AggregationType, + "MonitorMetricAggregationType", + "csharp" +); +@@clientName( + MetricsApi.SubscriptionScopeMetricsRequestBodyParameters, + "SubscriptionScopeMetricsContent", + "csharp" +); @@clientName( MetricBaselinesApi.BaselinesOperationGroup.list, "GetMonitorMetricBaselines", @@ -509,6 +529,36 @@ namespace Microsoft.InsightsCombinedClient; "DataCollectionRuleStorageTableDestination", "csharp" ); +@@clientName( + DataCollectionApi.StorageBlob, + "DataCollectionRuleEnrichmentStorageBlob", + "csharp" +); +@@clientName( + DataCollectionApi.DataFlow.captureOverflow, + "ShouldCaptureOverflow", + "csharp" +); +@@clientName( + DataCollectionApi.OtelLogsDataSource.replaceResourceIdWithReference, + "ShouldReplaceResourceIdWithReference", + "csharp" +); +@@clientName( + DataCollectionApi.OtelLogsDirectDataSource.replaceResourceIdWithReference, + "ShouldReplaceResourceIdWithReference", + "csharp" +); +@@clientName( + DataCollectionApi.OtelTracesDataSource.replaceResourceIdWithReference, + "ShouldReplaceResourceIdWithReference", + "csharp" +); +@@clientName( + DataCollectionApi.OtelTracesDirectDataSource.replaceResourceIdWithReference, + "ShouldReplaceResourceIdWithReference", + "csharp" +); @@clientName( PrivateLinkScopesApi.AccessModeSettings, "MonitorPrivateLinkAccessModeSettings", @@ -934,6 +984,11 @@ namespace Microsoft.InsightsCombinedClient; "IsEnabled", "csharp" ); +@@clientName( + ScheduledQueryRuleApi.RuleResolveConfiguration.autoResolved, + "IsAutoResolved", + "csharp" +); @@clientName( Azure.ResourceManager.CommonTypes.PrivateEndpointConnectionProperties.privateLinkServiceConnectionState, "ConnectionState", @@ -948,6 +1003,53 @@ namespace Microsoft.InsightsCombinedClient; // LRO status polling endpoints are implementation details and should not generate public C# SDK methods. @@scope(PrivateLinkScopeOperationStatusOperationGroup.get, "!csharp"); +// Monitor C# names for Network Security Perimeter common types need package and feature context. +@@clientName( + Azure.ResourceManager.CommonTypes.AccessRule, + "MonitorNetworkSecurityPerimeterConfigurationAccessRule", + "csharp" +); +@@clientName( + Azure.ResourceManager.CommonTypes.AccessRuleDirection, + "MonitorNetworkSecurityPerimeterConfigurationAccessRuleDirection", + "csharp" +); +@@clientName( + Azure.ResourceManager.CommonTypes.AccessRuleProperties, + "MonitorNetworkSecurityPerimeterConfigurationAccessRuleProperties", + "csharp" +); +@@clientName( + Azure.ResourceManager.CommonTypes.IssueType, + "MonitorNetworkSecurityPerimeterConfigurationIssueType", + "csharp" +); +@@clientName( + Azure.ResourceManager.CommonTypes.ProvisioningIssue, + "MonitorNetworkSecurityPerimeterConfigurationProvisioningIssue", + "csharp" +); +@@clientName( + Azure.ResourceManager.CommonTypes.ProvisioningIssueProperties, + "MonitorNetworkSecurityPerimeterConfigurationProvisioningIssueProperties", + "csharp" +); +@@clientName( + Azure.ResourceManager.CommonTypes.ResourceAssociation, + "MonitorNetworkSecurityPerimeterConfigurationResourceAssociation", + "csharp" +); +@@clientName( + Azure.ResourceManager.CommonTypes.ResourceAssociationAccessMode, + "MonitorNetworkSecurityPerimeterConfigurationResourceAssociationAccessMode", + "csharp" +); +@@clientName( + Azure.ResourceManager.CommonTypes.Severity, + "MonitorNetworkSecurityPerimeterConfigurationIssueSeverity", + "csharp" +); + /** Days of the week accepted by Monitor recurring schedules. */ union MonitorDayOfWeek { string, @@ -1186,10 +1288,15 @@ model AccessRulePropertiesSubscriptionsItem { /** The fully qualified Azure resource ID of the subscription e.g. ('/subscriptions/00000000-0000-0000-0000-000000000000') */ id?: Azure.Core.armResourceIdentifier; } +@@clientName( + AccessRulePropertiesSubscriptionsItem, + "MonitorNetworkSecurityPerimeterConfigurationAccessRuleSubscription", + "csharp" +); @@alternateType( Azure.ResourceManager.CommonTypes.AccessRuleProperties.subscriptions, - AccessRulePropertiesSubscriptionsItem, - "go" + AccessRulePropertiesSubscriptionsItem[], + "csharp,go" ); @@clientName( Azure.ResourceManager.CommonTypes.ErrorDetail, From 83a6fda29287109b6ebb3cd78921bd296116f09b Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 25 Jun 2026 15:02:04 +0800 Subject: [PATCH 40/49] Use common identity types for Monitor Map remaining Monitor identity properties to common ManagedServiceIdentity for CSharp. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 2bbf248cee9e..c5a75974af8b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -692,6 +692,26 @@ namespace Microsoft.InsightsCombinedClient; Azure.ResourceManager.CommonTypes.ManagedServiceIdentity, "csharp" ); +@@alternateType( + MetricAlertApi.MetricAlertResource.identity, + Azure.ResourceManager.CommonTypes.ManagedServiceIdentity, + "csharp" +); +@@alternateType( + MetricAlertApi.MetricAlertResourcePatch.identity, + Azure.ResourceManager.CommonTypes.ManagedServiceIdentity, + "csharp" +); +@@alternateType( + ScheduledQueryRuleApi.ScheduledQueryRuleResource.identity, + Azure.ResourceManager.CommonTypes.ManagedServiceIdentity, + "csharp" +); +@@alternateType( + ScheduledQueryRuleApi.ScheduledQueryRuleResourcePatch.identity, + Azure.ResourceManager.CommonTypes.ManagedServiceIdentity, + "csharp" +); @@alternateType( DataCollectionApi.DataCollectionRule.dataCollectionEndpointId, Azure.Core.armResourceIdentifier, From f51375bbb10cc881b44b0f8792ccc774448e8967 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 25 Jun 2026 16:18:59 +0800 Subject: [PATCH 41/49] Restore Monitor incident name Rename generated alert rule incident model to the shipped MonitorIncident name for CSharp compatibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../resource-manager/Microsoft.Insights/Insights/client.tsp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index c5a75974af8b..e1bb4a64aa61 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -130,11 +130,7 @@ namespace Microsoft.InsightsCombinedClient; "GetEventCategories", "csharp" ); -@@clientName( - AlertRulesIncidentsApi.Incident, - "MonitorAlertRuleIncident", - "csharp" -); +@@clientName(AlertRulesIncidentsApi.Incident, "MonitorIncident", "csharp"); @@clientName( MetricAlertApi.MetricAlertResources.list, "GetAllMetricAlertsStatus", From 8bb7b495bd1343ae5671f87c63ad56888471229a Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 25 Jun 2026 17:02:02 +0800 Subject: [PATCH 42/49] Use SDK types for Monitor resource properties Map resource IDs, URIs, and Azure locations to SDK-friendly CSharp types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index e1bb4a64aa61..592a11ea5f7f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -328,6 +328,11 @@ namespace Microsoft.InsightsCombinedClient; "ServiceDiagnosticSetting", "csharp" ); +@@alternateType( + ServiceDiagnosticsSettingsApi.ServiceDiagnosticSettingsResource.location, + Azure.Core.azureLocation, + "csharp" +); @@alternateType( ServiceDiagnosticsSettingsApi.ServiceDiagnosticSettings.storageAccountId, Azure.Core.armResourceIdentifier, @@ -384,6 +389,11 @@ namespace Microsoft.InsightsCombinedClient; Azure.Core.armResourceIdentifier, "csharp" ); +@@alternateType( + PrivateLinkScopesApi.ScopedResourceProperties.subscriptionLocation, + Azure.Core.azureLocation, + "csharp" +); @@clientName( PrivateLinkScopesApi.ScopedResourceProperties.provisioningState, "ScopedResourceProvisioningState", @@ -723,6 +733,22 @@ namespace Microsoft.InsightsCombinedClient; Azure.Core.armResourceIdentifier, "csharp" ); +@@alternateType( + DataCollectionApi.Metadata.provisionedByResourceId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType( + DataCollectionApi.StorageBlob.resourceId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType( + DataCollectionApi.AdxDestination.resourceId, + Azure.Core.armResourceIdentifier, + "csharp" +); +@@alternateType(DataCollectionApi.AdxDestination.ingestionUri, url, "csharp"); @@clientName( DataCollectionApi.DataCollectionRuleAssociationProxyOnlyResource.etag, "ETag", @@ -1065,6 +1091,11 @@ namespace Microsoft.InsightsCombinedClient; "MonitorNetworkSecurityPerimeterConfigurationIssueSeverity", "csharp" ); +@@alternateType( + Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeter.location, + Azure.Core.azureLocation, + "csharp" +); /** Days of the week accepted by Monitor recurring schedules. */ union MonitorDayOfWeek { From 2479a74ef5c10013c1cd7fae9273b0f16ec071b5 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 25 Jun 2026 17:34:57 +0800 Subject: [PATCH 43/49] Refine remaining Monitor model names Add CSharp client names for remaining generic Monitor models and NSP parent types from SDK review. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 592a11ea5f7f..a4498d76392a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -368,6 +368,16 @@ namespace Microsoft.InsightsCombinedClient; "MonitorPrivateLinkResource", "csharp" ); +@@clientName( + PrivateLinkScopesApi.ScopedResourceKind, + "MonitorScopedResourceKind", + "csharp" +); +@@clientName( + PrivateLinkScopesApi.ScopedResourceProvisioningState, + "MonitorScopedResourceProvisioningState", + "csharp" +); @@usage(PrivateLinkScopesApi.PrivateLinkResource, Usage.input, "csharp"); #suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "restore flattened private link resource data shape for C# compatibility" @@Azure.ClientGenerator.Core.Legacy.flattenProperty( @@ -540,6 +550,11 @@ namespace Microsoft.InsightsCombinedClient; "DataCollectionRuleEnrichmentStorageBlob", "csharp" ); +@@clientName( + DataCollectionApi.ApplicationInsights, + "MonitorApplicationInsightsReference", + "csharp" +); @@clientName( DataCollectionApi.DataFlow.captureOverflow, "ShouldCaptureOverflow", @@ -855,6 +870,11 @@ namespace Microsoft.InsightsCombinedClient; "ScheduledQueryRuleTimeAggregationType", "csharp" ); +@@clientName( + Microsoft.Common.CriterionType, + "ScheduledQueryRuleCriterionType", + "csharp" +); @@clientName(ScheduledQueryRuleApi.Dimension, "MonitorDimension", "csharp"); @@clientName( ScheduledQueryRuleApi.DimensionOperator, @@ -1046,6 +1066,31 @@ namespace Microsoft.InsightsCombinedClient; @@scope(PrivateLinkScopeOperationStatusOperationGroup.get, "!csharp"); // Monitor C# names for Network Security Perimeter common types need package and feature context. +@@clientName( + Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeter, + "MonitorNetworkSecurityPerimeter", + "csharp" +); +@@clientName( + NetworkSecurityPerimeterApi.NetworkSecurityPerimeterConfiguration, + "MonitorNetworkSecurityPerimeterConfiguration", + "csharp" +); +@@clientName( + Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeterConfigurationProperties, + "MonitorNetworkSecurityPerimeterConfigurationProperties", + "csharp" +); +@@clientName( + Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeterConfigurationProvisioningState, + "MonitorNetworkSecurityPerimeterConfigurationProvisioningState", + "csharp" +); +@@clientName( + Azure.ResourceManager.CommonTypes.NetworkSecurityProfile, + "MonitorNetworkSecurityProfile", + "csharp" +); @@clientName( Azure.ResourceManager.CommonTypes.AccessRule, "MonitorNetworkSecurityPerimeterConfigurationAccessRule", From 2a814891314461aa0740a2d703dc35fd41c9b814 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 29 Jun 2026 10:54:53 +0800 Subject: [PATCH 44/49] Refine Monitor NSP and incident names Expand NSP operation names and add Monitor context to NSP data and incident receiver CSharp names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 64 ++++++++++++++++++- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index a4498d76392a..6fc213680751 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -427,6 +427,21 @@ namespace Microsoft.InsightsCombinedClient; "NspActionGroup", "csharp" ); +@@clientName( + NetworkSecurityPerimeterApi.NetworkSecurityPerimeterConfigurations.getNSP, + "GetNetworkSecurityPerimeterConfiguration", + "csharp" +); +@@clientName( + NetworkSecurityPerimeterApi.NetworkSecurityPerimeterConfigurations.listNSP, + "GetNetworkSecurityPerimeterConfigurations", + "csharp" +); +@@clientName( + NetworkSecurityPerimeterApi.NetworkSecurityPerimeterConfigurations.reconcileNSP, + "ReconcileNetworkSecurityPerimeterConfiguration", + "csharp" +); // Split DataCollectionEndpoint NSP operations from the main DataCollectionEndpoints client. // The main endpoint operations use 2024-03-11, while NSP operations use 2021-10-01. @@ -445,6 +460,21 @@ namespace Microsoft.InsightsCombinedClient; "NspDataCollectionEndpoint", "csharp" ); +@@clientName( + NetworkSecurityPerimeterApi.DataCollectionEndpoints.getNSP, + "GetNetworkSecurityPerimeterConfiguration", + "csharp" +); +@@clientName( + NetworkSecurityPerimeterApi.DataCollectionEndpoints.listNSP, + "GetNetworkSecurityPerimeterConfigurations", + "csharp" +); +@@clientName( + NetworkSecurityPerimeterApi.DataCollectionEndpoints.reconcileNSP, + "ReconcileNetworkSecurityPerimeterConfiguration", + "csharp" +); @@clientName( DataCollectionApi.KnownPerfCounterDataSourceStreams, "PerfCounterDataSourceStream", @@ -818,6 +848,21 @@ namespace Microsoft.InsightsCombinedClient; "MonitorEventHubReceiver", "csharp" ); +@@clientName( + ActionGroupsApi.IncidentReceiver, + "MonitorIncidentReceiver", + "csharp" +); +@@clientName( + ActionGroupsApi.IncidentServiceConnection, + "MonitorIncidentServiceConnection", + "csharp" +); +@@clientName( + ActionGroupsApi.IncidentManagementService, + "MonitorIncidentManagementService", + "csharp" +); @@clientName(ActionGroupsApi.ReceiverStatus, "MonitorReceiverStatus", "csharp"); @@clientName( DataCollectionApi.KnownDataCollectionEndpointResourceKind, @@ -1072,8 +1117,8 @@ namespace Microsoft.InsightsCombinedClient; "csharp" ); @@clientName( - NetworkSecurityPerimeterApi.NetworkSecurityPerimeterConfiguration, - "MonitorNetworkSecurityPerimeterConfiguration", + Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeterConfiguration, + "MonitorNetworkSecurityPerimeterConfigurationData", "csharp" ); @@clientName( @@ -1354,6 +1399,21 @@ model LogSettings { "NspScheduledQueryRule", "java" ); +@@clientName( + NetworkSecurityPerimeterApi.ScheduledQueryRule.getNSP, + "GetNetworkSecurityPerimeterConfiguration", + "csharp" +); +@@clientName( + NetworkSecurityPerimeterApi.ScheduledQueryRule.listNSP, + "GetNetworkSecurityPerimeterConfigurations", + "csharp" +); +@@clientName( + NetworkSecurityPerimeterApi.ScheduledQueryRule.reconcileNSP, + "ReconcileNetworkSecurityPerimeterConfiguration", + "csharp" +); @@alternateType(AutoscaleNotification.operation, "Scale", "java"); From 6e78dade221b6207a6bc592ec8a58b78b84ee441 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 29 Jun 2026 16:48:12 +0800 Subject: [PATCH 45/49] Apply remaining Monitor model renames Add CSharp client names for remaining review feedback on Monitor model naming. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 6fc213680751..7a58f0114dfd 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -146,6 +146,11 @@ namespace Microsoft.InsightsCombinedClient; "IsAutoResolved", "csharp" ); +@@clientName( + MetricAlertApi.ResolveConfiguration, + "MetricAlertResolveConfiguration", + "csharp" +); #suppress "@azure-tools/typespec-client-generator-core/duplicate-client-name-warning" "preserve the shipped C# overload name for resource-scope metric retrieval" @@clientName( MetricsApi.MetricsOperationGroup.list, @@ -368,6 +373,11 @@ namespace Microsoft.InsightsCombinedClient; "MonitorPrivateLinkResource", "csharp" ); +@@clientName( + PrivateLinkScopesApi.PrivateLinkScopeProvisioningState, + "MonitorPrivateLinkScopeProvisioningState", + "csharp" +); @@clientName( PrivateLinkScopesApi.ScopedResourceKind, "MonitorScopedResourceKind", @@ -575,6 +585,22 @@ namespace Microsoft.InsightsCombinedClient; "DataCollectionRuleStorageTableDestination", "csharp" ); +@@clientName( + DataCollectionApi.EndpointsSpec, + "DataCollectionEndpointsSpec", + "csharp" +); +@@clientName( + DataCollectionApi.ReferencesSpec, + "DataCollectionReferencesSpec", + "csharp" +); +@@clientName(DataCollectionApi.AgentSetting, "MonitorAgentSetting", "csharp"); +@@clientName( + DataCollectionApi.KnownAgentSettingName, + "KnownMonitorAgentSettingName", + "csharp" +); @@clientName( DataCollectionApi.StorageBlob, "DataCollectionRuleEnrichmentStorageBlob", @@ -585,6 +611,16 @@ namespace Microsoft.InsightsCombinedClient; "MonitorApplicationInsightsReference", "csharp" ); +@@clientName( + DataCollectionApi.PerformanceCountersOTelDataSource, + "PerformanceCountersOtelDataSource", + "csharp" +); +@@clientName( + DataCollectionApi.KnownPerformanceCountersOTelDataSourceStreams, + "KnownPerformanceCountersOtelDataSourceStreams", + "csharp" +); @@clientName( DataCollectionApi.DataFlow.captureOverflow, "ShouldCaptureOverflow", From 955212c184de422db6d2a4db9af9918ca7e61a80 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 29 Jun 2026 17:27:05 +0800 Subject: [PATCH 46/49] Restore Monitor metrics pageable methods Mark metrics list GET operations pageable for CSharp to match the shipped SDK surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Microsoft.Insights/Insights/client.tsp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 7a58f0114dfd..82f8862ccbc4 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -1312,6 +1312,16 @@ enum MonitorConditionOperator { MetricAlertApi.MetricAlertResources.listByName, "csharp,java" ); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "metrics list response has value items and should restore pageable SDK surface" +@@Azure.ClientGenerator.Core.Legacy.markAsPageable( + MetricsApi.MetricsOperationGroup.list, + "csharp" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "metrics list response has value items and should restore pageable SDK surface" +@@Azure.ClientGenerator.Core.Legacy.markAsPageable( + MetricsApi.MetricsOperationGroup.listAtSubscriptionScope, + "csharp" +); // ActivityLogAlerts - rename back to match fluent SDK expected names @@clientName( From a1d789582fb2794c8e909b2903a5e1f3c5ac59f7 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 29 Jun 2026 17:32:56 +0800 Subject: [PATCH 47/49] Revert "Restore Monitor metrics pageable methods" This reverts commit 955212c184de422db6d2a4db9af9918ca7e61a80. --- .../Microsoft.Insights/Insights/client.tsp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 82f8862ccbc4..7a58f0114dfd 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -1312,16 +1312,6 @@ enum MonitorConditionOperator { MetricAlertApi.MetricAlertResources.listByName, "csharp,java" ); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "metrics list response has value items and should restore pageable SDK surface" -@@Azure.ClientGenerator.Core.Legacy.markAsPageable( - MetricsApi.MetricsOperationGroup.list, - "csharp" -); -#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "metrics list response has value items and should restore pageable SDK surface" -@@Azure.ClientGenerator.Core.Legacy.markAsPageable( - MetricsApi.MetricsOperationGroup.listAtSubscriptionScope, - "csharp" -); // ActivityLogAlerts - rename back to match fluent SDK expected names @@clientName( From 02a52b10bf250bcf1040fa6a676a500f1f80bb3b Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 29 Jun 2026 21:15:10 +0800 Subject: [PATCH 48/49] Rename Monitor Spec-suffixed CSharp models --- .../Microsoft.Insights/Insights/client.tsp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 7a58f0114dfd..8d4a503f6779 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -587,12 +587,12 @@ namespace Microsoft.InsightsCombinedClient; ); @@clientName( DataCollectionApi.EndpointsSpec, - "DataCollectionEndpointsSpec", + "DataCollectionEndpointsInfo", "csharp" ); @@clientName( DataCollectionApi.ReferencesSpec, - "DataCollectionReferencesSpec", + "DataCollectionReferencesInfo", "csharp" ); @@clientName(DataCollectionApi.AgentSetting, "MonitorAgentSetting", "csharp"); @@ -611,6 +611,12 @@ namespace Microsoft.InsightsCombinedClient; "MonitorApplicationInsightsReference", "csharp" ); +@@clientName( + DataCollectionApi.DirectDataSourcesSpec, + "DataCollectionRuleDirectDataSourcesBase", + "csharp" +); +@@clientName(DataCollectionApi.LogsQuotaSpec, "LogsQuotaInfo", "csharp"); @@clientName( DataCollectionApi.PerformanceCountersOTelDataSource, "PerformanceCountersOtelDataSource", From 12ce35b26f7ffbef1e9736a5113e4c3a33d55e21 Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Mon, 29 Jun 2026 21:28:17 +0800 Subject: [PATCH 49/49] Rename Monitor subscription metric model for CSharp --- .../resource-manager/Microsoft.Insights/Insights/client.tsp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp index 8d4a503f6779..3dc39a557e51 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/client.tsp @@ -1075,6 +1075,11 @@ namespace Microsoft.InsightsCombinedClient; ); @@clientName(MetricsApi.MetadataValue, "MonitorMetadataValue", "csharp"); @@clientName(MetricsApi.MetricValue, "MonitorMetricValue", "csharp"); +@@clientName( + MetricsApi.SubscriptionScopeMetricDefinition, + "MonitorSubscriptionScopeMetric", + "csharp" +); @@clientName( AutoScaleApi.AutoscaleSettingResources.predictiveMetricGet, "GetPredictiveMetric",