[AutoPR sdk-resourcemanager/recoveryservices/armrecoveryservicesbackup]-generated-from-SDK Generation - Go-5854324#26000
Conversation
…r/Microsoft.RecoveryServices/RecoveryServicesBackup/tspconfig.yaml', API Version: 2026-01-01-preview, SDK Release Type: beta, and CommitSHA: '49bbe29703b0e2eb3c2b5dde117572dfd81f8c7f' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5854324 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
API Change CheckAPIView identified API level changes in this PR and created the following API reviews sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup |
There was a problem hiding this comment.
Pull request overview
This PR regenerates the armrecoveryservicesbackup Resource Manager SDK using the newer Go Code Generator for API version 2026-01-01-preview, rolling the module forward to a new major version (v5) and updating the generated client surface area, examples, and fakes accordingly.
Changes:
- Bump module to
github.com/.../armrecoveryservicesbackup/v5and update dependency versions (e.g.,azcore). - Regenerate clients/models/options/responses for
2026-01-01-preview, including updated polymorphic mappings and new response/option types. - Replace AutoRest-era artifacts with TypeSpec generation metadata (
tsp-location.yaml,testdata/_metadata.json) and update examples/fake servers.
Reviewed changes
Copilot reviewed 178 out of 182 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/version.go | Introduces module name/version constants for v5 beta. |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/go.mod | Bumps module path to /v5 and updates dependency versions. |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/README.md | Updates go get install path to /v5. |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/tsp-location.yaml | Adds TypeSpec/spec repo provenance metadata for regeneration. |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/testdata/_metadata.json | Adds generation metadata (apiVersion/emitterVersion). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobs_client.go | Regenerated JobsClient for new API version (noted request header issue). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/joboperationresults_client.go | Regenerated JobOperationResultsClient (noted request header issue). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/jobcancellations_client.go | Regenerated JobCancellationsClient (noted request header issue). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/protectioncontainerrefreshoperationresults_client.go | Regenerated refresh operation results client (noted request header issue). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/featuresupport_client.go | Regenerated feature support client (doc comment duplication noted). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/backupstatus_client.go | Regenerated backup status client (doc comment duplication noted). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/bmspreparedatamoveoperationresult_client.go | Regenerated data-move operation result client (doc wording mismatch noted). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/options.go | Regenerates option types; adds Begin-resume token option type for LROs. |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/responses.go | Updates response wrappers; adds new response type(s) for newer API surface. |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/polymorphic_helpers.go | Updates discriminator handling to include newly introduced model variants. |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/time_rfc3339.go | Removes AutoRest-era custom RFC3339 time helper. |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/build.go | Removes AutoRest-era go generate build script hook file. |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/autorest.md | Removes AutoRest configuration in favor of TypeSpec workflow. |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/gettieringcostoperationresult_client_example_test.go | Updates example to v5 import and preview API version (formatting + subscription placeholder noted). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpoint_client_example_test.go | Updates example to v5 import and preview API version (subscription placeholder noted). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/privateendpointconnection_client_example_test.go | Updates example to v5 import and preview API version (subscription placeholder noted). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/tieringcostoperationstatus_client_example_test.go | Updates example to v5 import and preview API version (subscription placeholder noted). |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/fake/* | Regenerates fake server transports to align with updated routes/types and v5 imports. |
| sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/fake/time_rfc3339.go | Removes AutoRest-era custom RFC3339 time helper from fakes. |
| import ( | ||
| "context" | ||
| "log" | ||
|
|
||
| "github.com/Azure/azure-sdk-for-go/sdk/azidentity" | ||
| "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4" | ||
| "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v5" | ||
| "log" | ||
| ) |
There was a problem hiding this comment.
This import block isn't gofmt/goimports formatted: standard library imports (e.g. "log") are mixed with third-party imports without grouping. Running gofmt/goimports on the module will fix ordering/grouping and helps avoid CI formatting failures.
| clientFactory, err := armrecoveryservicesbackup.NewClientFactory("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) | ||
| if err != nil { |
There was a problem hiding this comment.
Examples in this repo typically use the all-zero subscription ID placeholder ("00000000-0000-0000-0000-000000000000"). Using a seemingly real subscription ID here can be confusing and may be treated as sensitive; please switch back to the placeholder.
| clientFactory, err := armrecoveryservicesbackup.NewClientFactory("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) | ||
| if err != nil { |
There was a problem hiding this comment.
Examples in this repo typically use the all-zero subscription ID placeholder ("00000000-0000-0000-0000-000000000000"). Please replace this subscription ID with the placeholder, and keep any embedded resource IDs in the sample output consistent as well.
| clientFactory, err := armrecoveryservicesbackup.NewClientFactory("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) | ||
| if err != nil { |
There was a problem hiding this comment.
This example uses a non-placeholder subscription ID. Please replace it with the standard all-zero subscription ID placeholder ("00000000-0000-0000-0000-000000000000") for consistency across examples.
| clientFactory, err := armrecoveryservicesbackup.NewClientFactory("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) | ||
| if err != nil { |
There was a problem hiding this comment.
This example uses a non-placeholder subscription ID. Please replace it with the standard all-zero subscription ID placeholder ("00000000-0000-0000-0000-000000000000") for consistency across examples.
| clientFactory, err := armrecoveryservicesbackup.NewClientFactory("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) | ||
| if err != nil { |
There was a problem hiding this comment.
Examples in this repo typically use the all-zero subscription ID placeholder ("00000000-0000-0000-0000-000000000000"). Please replace this subscription ID with the placeholder for consistency and to avoid implying a real subscription.
| clientFactory, err := armrecoveryservicesbackup.NewClientFactory("04cf684a-d41f-4550-9f70-7708a3a2283b", cred, nil) | ||
| if err != nil { |
There was a problem hiding this comment.
Examples in this repo typically use the all-zero subscription ID placeholder ("00000000-0000-0000-0000-000000000000"). Please replace this subscription ID with the placeholder for consistency and to avoid implying a real subscription.
| reqQP.Set("api-version", "2026-01-01-preview") | ||
| req.Raw().URL.RawQuery = reqQP.Encode() | ||
| req.Raw().Header["Accept"] = []string{"application/json"} | ||
| return req, nil |
There was a problem hiding this comment.
Requests created here don't set an "Accept: application/json" header (unlike most other clients in this module). This can cause inconsistent content negotiation and is likely to fail for services that require an explicit Accept header. Consider adding the Accept header as in other generated request creators.
| reqQP := req.Raw().URL.Query() | ||
| reqQP.Set("api-version", "2025-02-01") | ||
| reqQP.Set("api-version", "2026-01-01-preview") | ||
| req.Raw().URL.RawQuery = reqQP.Encode() | ||
| req.Raw().Header["Accept"] = []string{"application/json"} | ||
| return req, nil |
There was a problem hiding this comment.
This POST request doesn't include an "Accept: application/json" header, which is inconsistent with other clients in this module and can lead to content negotiation issues. Please set the Accept header as done elsewhere.
| reqQP := req.Raw().URL.Query() | ||
| reqQP.Set("api-version", "2025-02-01") | ||
| reqQP.Set("api-version", "2026-01-01-preview") | ||
| req.Raw().URL.RawQuery = reqQP.Encode() | ||
| req.Raw().Header["Accept"] = []string{"application/json"} | ||
| return req, nil |
There was a problem hiding this comment.
This request builder is missing the "Accept: application/json" header. Other generated clients in this module set it for JSON responses; omitting it may cause content negotiation issues. Consider adding the Accept header here too.
| - Enum `JobStatus` has been removed | ||
| - Enum `RestorePointQueryType` has been removed | ||
| - Enum `Type` has been removed | ||
| - Operation `*ProtectedItemsClient.CreateOrUpdate` has been changed to LRO, use `*ProtectedItemsClient.BeginCreateOrUpdate` instead. |
Configurations: 'specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/RecoveryServicesBackup/tspconfig.yaml', API Version: 2026-01-01-preview, SDK Release Type: beta, and CommitSHA: '49bbe29703b0e2eb3c2b5dde117572dfd81f8c7f' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5854324 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. Release plan link: https://web.powerapps.com/apps/821ab569-ae60-420d-8264-d7b5d5ef734c?release-plan-id=b998b806-19f5-f011-8406-000d3a3ac981 Submitted by: Chandrika.Gonuguntla@microsoft.com
Release Plan Details
Spec pull request: Changes for SQL Instance Snapshot backup azure-rest-api-specs#39401
Spec API version: 2026-01-01-preview