Skip to content

[Migrate-Check-Typespec-Mitigate] sdk/resourcemanager/securityinsights/armsecurityinsight#26199

Open
jliusan wants to merge 1 commit intomainfrom
mitigate-securityinsights9
Open

[Migrate-Check-Typespec-Mitigate] sdk/resourcemanager/securityinsights/armsecurityinsight#26199
jliusan wants to merge 1 commit intomainfrom
mitigate-securityinsights9

Conversation

@jliusan
Copy link
Member

@jliusan jliusan commented Mar 10, 2026

based ON BRANCH:migration/securityinsights

@jliusan jliusan requested a review from lirenhe as a code owner March 10, 2026 08:37
Copilot AI review requested due to automatic review settings March 10, 2026 08:37
@github-actions github-actions bot added the Mgmt This issue is related to a management-plane library. label Mar 10, 2026
- Field `BingSafetyPhishingURL` of struct `MSTIDataConnectorDataTypes` has been removed
- Field `PathMapping` of struct `Repository` has been removed
- Field `SentinelOnboardingStateParameter` of struct `SentinelOnboardingStatesClientCreateOptions` has been removed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New Breaking Changes:

  • Function *AutomationRulesClient.CreateOrUpdate parameter(s) have been changed from (ctx context.Context, resourceGroupName string, workspaceName string, automationRuleID string, options *AutomationRulesClientCreateOrUpdateOptions) to (ctx context.Context, resourceGroupName string, workspaceName string, automationRuleID string, automationRuleToUpsert AutomationRule, options *AutomationRulesClientCreateOrUpdateOptions)
  • Function *SentinelOnboardingStatesClient.Create parameter(s) have been changed from (ctx context.Context, resourceGroupName string, workspaceName string, sentinelOnboardingStateName string, options *SentinelOnboardingStatesClientCreateOptions) to (ctx context.Context, resourceGroupName string, workspaceName string, sentinelOnboardingStateName string, sentinelOnboardingStateParameter SentinelOnboardingState, options *SentinelOnboardingStatesClientCreateOptions)
  • Field AutomationRuleToUpsert of struct AutomationRulesClientCreateOrUpdateOptions has been removed(Added as function parameter)
  • Field SentinelOnboardingStateParameter of struct SentinelOnboardingStatesClientCreateOptions has been removed(Added as function parameter)

- Field `SentinelOnboardingStateParameter` of struct `SentinelOnboardingStatesClientCreateOptions` has been removed

### Features Added

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New Features Added:

  • New field NextLink in struct GetQueriesResponse

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates sdk/resourcemanager/securityinsights/armsecurityinsights from the older AutoRest-generated surface to the TypeSpec-based Go code generator output, updating the API version to 2025-07-01-preview and regenerating clients, examples, and fakes accordingly.

Changes:

  • Adds new generated clients (e.g., recommendations and triggered analytics rule runs) and corresponding example tests for API version 2025-07-01-preview.
  • Updates existing clients/fake transports to the new generator patterns and removes AutoRest-era helper files (date/time helpers, build.go, autorest.md).
  • Updates module metadata/config (tsp-location.yaml, _metadata.json) and bumps dependency versions (e.g., azcore).

Reviewed changes

Copilot reviewed 111 out of 207 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sdk/resourcemanager/securityinsights/armsecurityinsights/version.go Adds generator module name/version constants used by ARM client construction.
sdk/resourcemanager/securityinsights/armsecurityinsights/tsp-location.yaml Adds TypeSpec source location for regeneration.
sdk/resourcemanager/securityinsights/armsecurityinsights/testdata/_metadata.json Adds TypeSpec emitter metadata for testdata generation.
sdk/resourcemanager/securityinsights/armsecurityinsights/go.mod Updates direct/indirect dependencies for regenerated code.
sdk/resourcemanager/securityinsights/armsecurityinsights/go.sum Records updated dependency checksums.
sdk/resourcemanager/securityinsights/armsecurityinsights/update_client.go New generated Update client for recommendations patch.
sdk/resourcemanager/securityinsights/armsecurityinsights/update_client_example_test.go New example for UpdateClient.Recommendation.
sdk/resourcemanager/securityinsights/armsecurityinsights/reevaluate_client.go New generated Reevaluate client for recommendations trigger evaluation.
sdk/resourcemanager/securityinsights/armsecurityinsights/reevaluate_client_example_test.go New example for ReevaluateClient.Recommendation.
sdk/resourcemanager/securityinsights/armsecurityinsights/get_client.go New generated Get client for single recommendation retrieval.
sdk/resourcemanager/securityinsights/armsecurityinsights/get_client_example_test.go New example for GetClient.SingleRecommendation.
sdk/resourcemanager/securityinsights/armsecurityinsights/getrecommendations_client.go New generated list client for recommendations.
sdk/resourcemanager/securityinsights/armsecurityinsights/getrecommendations_client_example_test.go New example for listing recommendations.
sdk/resourcemanager/securityinsights/armsecurityinsights/triggeredanalyticsrulerun_client.go New generated client for triggered analytics rule run get.
sdk/resourcemanager/securityinsights/armsecurityinsights/triggeredanalyticsrulerun_client_example_test.go New example for TriggeredAnalyticsRuleRunClient.Get.
sdk/resourcemanager/securityinsights/armsecurityinsights/gettriggeredanalyticsruleruns_client.go New generated client for listing triggered analytics rule runs.
sdk/resourcemanager/securityinsights/armsecurityinsights/gettriggeredanalyticsruleruns_client_example_test.go New example for listing triggered analytics rule runs.
sdk/resourcemanager/securityinsights/armsecurityinsights/producttemplate_client.go New generated client for fetching a product template by ID.
sdk/resourcemanager/securityinsights/armsecurityinsights/producttemplate_client_example_test.go New example for ProductTemplateClient.Get.
sdk/resourcemanager/securityinsights/armsecurityinsights/producttemplates_client.go New generated pager client for listing product templates.
sdk/resourcemanager/securityinsights/armsecurityinsights/producttemplates_client_example_test.go New example for ProductTemplatesClient.NewListPager.
sdk/resourcemanager/securityinsights/armsecurityinsights/productpackage_client.go New generated client for fetching a product package by ID.
sdk/resourcemanager/securityinsights/armsecurityinsights/productpackage_client_example_test.go New example for ProductPackageClient.Get.
sdk/resourcemanager/securityinsights/armsecurityinsights/productpackages_client.go New generated pager client for listing product packages.
sdk/resourcemanager/securityinsights/armsecurityinsights/contenttemplates_client_example_test.go Adds/updates example for listing content templates under new API version.
sdk/resourcemanager/securityinsights/armsecurityinsights/billingstatistics_client_example_test.go Adds new billing statistics examples for new API version.
sdk/resourcemanager/securityinsights/armsecurityinsights/alertrule_client_example_test.go Adds example for triggering an analytics rule run (LRO).
sdk/resourcemanager/securityinsights/armsecurityinsights/interfaces.go Updates/extends polymorphic interfaces to match new API shapes.
sdk/resourcemanager/securityinsights/armsecurityinsights/bookmark_client.go Updates generated code header/patterns and API version; adjusts request headers.
sdk/resourcemanager/securityinsights/armsecurityinsights/bookmark_client_example_test.go Updates bookmark expand example for new API version and shapes.
sdk/resourcemanager/securityinsights/armsecurityinsights/alertruletemplates_client.go Updates generator header/patterns and API version/comments.
sdk/resourcemanager/securityinsights/armsecurityinsights/entityrelations_client.go Updates generator header/patterns and API version.
sdk/resourcemanager/securityinsights/armsecurityinsights/entityrelations_client_example_test.go Updates entity relation example for new API version/shapes.
sdk/resourcemanager/securityinsights/armsecurityinsights/entitiesrelations_client.go Updates generator header/patterns and API version.
sdk/resourcemanager/securityinsights/armsecurityinsights/entitiesrelations_client_example_test.go Updates entity relations list example for new API version/shapes.
sdk/resourcemanager/securityinsights/armsecurityinsights/entitiesgettimeline_client.go Updates generator header/patterns and API version; adjusts request headers.
sdk/resourcemanager/securityinsights/armsecurityinsights/entityquerytemplates_client.go Updates generator header/patterns and API version.
sdk/resourcemanager/securityinsights/armsecurityinsights/dataconnectorscheckrequirements_client.go Updates generator header/patterns and API version; adjusts request headers.
sdk/resourcemanager/securityinsights/armsecurityinsights/operations_client.go Updates generator header/patterns and API version.
sdk/resourcemanager/securityinsights/armsecurityinsights/officeconsents_client.go Updates generator header/patterns and API version; updates request building.
sdk/resourcemanager/securityinsights/armsecurityinsights/sourcecontrol_client.go Updates API surface for listRepositories request body and API version.
sdk/resourcemanager/securityinsights/armsecurityinsights/sourcecontrol_client_example_test.go Updates example to match new request body type for listRepositories.
sdk/resourcemanager/securityinsights/armsecurityinsights/threatintelligenceindicators_client.go Updates API version and parameter docs.
sdk/resourcemanager/securityinsights/armsecurityinsights/threatintelligenceindicatormetrics_client.go Updates API version and request-building pattern.
sdk/resourcemanager/securityinsights/armsecurityinsights/threatintelligenceindicatormetrics_client_example_test.go Updates example to new response wrapper shape.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/internal.go Adds shared fake transport helpers (result, initServer) used by generated fakes.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/update_server.go Adds fake server transport for UpdateClient.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/reevaluate_server.go Adds fake server transport for ReevaluateClient.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/get_server.go Adds fake server transport for GetClient.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/producttemplate_server.go Adds fake server transport for ProductTemplateClient.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/productpackage_server.go Adds fake server transport for ProductPackageClient.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/threatintelligenceindicators_server.go Updates fake transport dispatch/interceptor pattern and option parsing.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/threatintelligenceindicatormetrics_server.go Updates fake transport dispatch/interceptor pattern and path parsing.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/sourcecontrol_server.go Updates fake to accept new request body type for listRepositories.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/operations_server.go Updates fake transport dispatch/interceptor pattern.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/officeconsents_server.go Updates fake transport dispatch/interceptor pattern and path parsing.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/entityrelations_server.go Updates fake transport dispatch/interceptor pattern and path parsing.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/entityquerytemplates_server.go Updates fake transport dispatch/interceptor pattern and option parsing types.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/entitiesrelations_server.go Updates fake transport dispatch/interceptor pattern and path parsing.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/entitiesgettimeline_server.go Updates fake transport dispatch/interceptor pattern and path parsing.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/dataconnectorscheckrequirements_server.go Updates fake transport dispatch/interceptor pattern and path parsing.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/bookmark_server.go Updates fake transport dispatch/interceptor pattern and path parsing.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/alertruletemplates_server.go Updates fake transport dispatch/interceptor pattern and path parsing.
sdk/resourcemanager/securityinsights/armsecurityinsights/time_rfc3339.go Removes AutoRest-era time parsing helper (no longer used with TypeSpec output).
sdk/resourcemanager/securityinsights/armsecurityinsights/date_type.go Removes AutoRest-era date helper (no longer used with TypeSpec output).
sdk/resourcemanager/securityinsights/armsecurityinsights/ipgeodata_client.go Removes old client (not present in the new generated surface).
sdk/resourcemanager/securityinsights/armsecurityinsights/domainwhois_client.go Removes old client (not present in the new generated surface).
sdk/resourcemanager/securityinsights/armsecurityinsights/build.go Removes AutoRest regeneration entrypoint.
sdk/resourcemanager/securityinsights/armsecurityinsights/autorest.md Removes AutoRest configuration file.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/time_rfc3339.go Removes AutoRest-era fake time helper.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/date_type.go Removes AutoRest-era fake date helper.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/ipgeodata_server.go Removes old fake server for removed client.
sdk/resourcemanager/securityinsights/armsecurityinsights/fake/domainwhois_server.go Removes old fake server for removed client.

Comment on lines +7 to +9
const (
moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights"
moduleVersion = "v2.0.0-beta.5"
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moduleName should match the Go module import path (including the /v2 suffix). Right now it’s missing /v2, which can lead to incorrect user-agent/telemetry metadata for this module. Please update moduleName to github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +3
directory: specification/securityinsights/resource-manager/Microsoft.SecurityInsights/SecurityInsights
commit: 655c3496e5039d370056027f1e28a8491257fe14
repo: i-specs
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tsp-location.yaml uses repo: i-specs, but other TypeSpec ARM SDK modules in this repo use repo: Azure/azure-rest-api-specs. Unless i-specs is a defined alias in your tooling, this will break tsp-client update/regeneration and makes the config inconsistent. Please change repo to Azure/azure-rest-api-specs.

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +13
import (
"context"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/securityinsights/armsecurityinsights/v2"
"log"
)
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import grouping/order isn’t gofmt-compliant (stdlib imports like context/log should be grouped separately from github.com/...). Please run gofmt on this file (and ideally the whole module) to avoid formatting/lint failures in CI.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

API Change Check

APIView identified API level changes in this PR and created the following API reviews

sdk/resourcemanager/securityinsights/armsecurityinsights

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management-plane library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants