diff --git a/sdk/resourcemanager/resources/armsubscriptions/CHANGELOG.md b/sdk/resourcemanager/resources/armsubscriptions/CHANGELOG.md index f72035ffbc83..f46d35239429 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/CHANGELOG.md +++ b/sdk/resourcemanager/resources/armsubscriptions/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.3.0-beta.2 (2023-07-19) + +### Bug Fixes + +- Fixed a potential panic in faked paged and long-running operations. + ## 1.3.0-beta.1 (2023-06-12) ### Features Added diff --git a/sdk/resourcemanager/resources/armsubscriptions/autorest.md b/sdk/resourcemanager/resources/armsubscriptions/autorest.md index e4cef853697a..92499046a58f 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/autorest.md +++ b/sdk/resourcemanager/resources/armsubscriptions/autorest.md @@ -9,10 +9,10 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/4f4073bdb028bc84bc3e6405c1cbaf8e89b83caf/specification/resources/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION module: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions -module-version: 1.3.0-beta.1 +module-version: 1.3.0-beta.2 package-subscriptions: true tag: package-subscriptions-2022-12 -azcore-version: 1.7.0-beta.2 +azcore-version: 1.8.0-beta.1 generate-fakes: true inject-spans: true ``` diff --git a/sdk/resourcemanager/resources/armsubscriptions/build.go b/sdk/resourcemanager/resources/armsubscriptions/build.go index 36a2017696fa..5a187a57e735 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/build.go +++ b/sdk/resourcemanager/resources/armsubscriptions/build.go @@ -2,6 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. // This file enables 'go generate' to regenerate this specific SDK -//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.51" -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/resources/armsubscriptions +//go:generate pwsh ../../../../eng/scripts/build.ps1 -goExtension "@autorest/go@4.0.0-preview.53" -skipBuild -cleanGenerated -format -tidy -generate resourcemanager/resources/armsubscriptions package armsubscriptions diff --git a/sdk/resourcemanager/resources/armsubscriptions/client_factory.go b/sdk/resourcemanager/resources/armsubscriptions/client_factory.go index 102023da0e99..a4d1cb194e3b 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/client_factory.go +++ b/sdk/resourcemanager/resources/armsubscriptions/client_factory.go @@ -35,18 +35,13 @@ func NewClientFactory(credential azcore.TokenCredential, options *arm.ClientOpti }, nil } -func (c *ClientFactory) NewOperationsClient() *OperationsClient { - subClient, _ := NewOperationsClient(c.credential, c.options) - return subClient -} - func (c *ClientFactory) NewClient() *Client { subClient, _ := NewClient(c.credential, c.options) return subClient } -func (c *ClientFactory) NewTenantsClient() *TenantsClient { - subClient, _ := NewTenantsClient(c.credential, c.options) +func (c *ClientFactory) NewOperationsClient() *OperationsClient { + subClient, _ := NewOperationsClient(c.credential, c.options) return subClient } @@ -54,3 +49,8 @@ func (c *ClientFactory) NewSubscriptionClient() *SubscriptionClient { subClient, _ := NewSubscriptionClient(c.credential, c.options) return subClient } + +func (c *ClientFactory) NewTenantsClient() *TenantsClient { + subClient, _ := NewTenantsClient(c.credential, c.options) + return subClient +} diff --git a/sdk/resourcemanager/resources/armsubscriptions/constants.go b/sdk/resourcemanager/resources/armsubscriptions/constants.go index 54b8cbcb198f..7c55d5419720 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/constants.go +++ b/sdk/resourcemanager/resources/armsubscriptions/constants.go @@ -10,7 +10,7 @@ package armsubscriptions const ( moduleName = "armsubscriptions" - moduleVersion = "v1.3.0-beta.1" + moduleVersion = "v1.3.0-beta.2" ) // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. diff --git a/sdk/resourcemanager/resources/armsubscriptions/fake/internal.go b/sdk/resourcemanager/resources/armsubscriptions/fake/internal.go index e9c8222f2199..03b635903572 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/fake/internal.go +++ b/sdk/resourcemanager/resources/armsubscriptions/fake/internal.go @@ -12,6 +12,9 @@ import ( "io" "net/http" "reflect" + "regexp" + "strings" + "sync" ) type nonRetriableError struct { @@ -76,3 +79,45 @@ func contains[T comparable](s []T, v T) bool { } return false } + +func newTracker[T any]() *tracker[T] { + return &tracker[T]{ + items: map[string]*T{}, + } +} + +type tracker[T any] struct { + items map[string]*T + mu sync.Mutex +} + +func (p *tracker[T]) key(req *http.Request) string { + path := req.URL.Path + if match, _ := regexp.Match(`/page_\d+$`, []byte(path)); match { + path = path[:strings.LastIndex(path, "/")] + } else if strings.HasSuffix(path, "/get/fake/status") { + path = path[:len(path)-16] + } + return path +} + +func (p *tracker[T]) get(req *http.Request) *T { + p.mu.Lock() + defer p.mu.Unlock() + if item, ok := p.items[p.key(req)]; ok { + return item + } + return nil +} + +func (p *tracker[T]) add(req *http.Request, item *T) { + p.mu.Lock() + defer p.mu.Unlock() + p.items[p.key(req)] = item +} + +func (p *tracker[T]) remove(req *http.Request) { + p.mu.Lock() + defer p.mu.Unlock() + delete(p.items, p.key(req)) +} diff --git a/sdk/resourcemanager/resources/armsubscriptions/fake/operations_server.go b/sdk/resourcemanager/resources/armsubscriptions/fake/operations_server.go index f89f19124572..f3837de2418b 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/fake/operations_server.go +++ b/sdk/resourcemanager/resources/armsubscriptions/fake/operations_server.go @@ -27,17 +27,20 @@ type OperationsServer struct { } // NewOperationsServerTransport creates a new instance of OperationsServerTransport with the provided implementation. -// The returned OperationsServerTransport instance is connected to an instance of armsubscriptions.OperationsClient by way of the -// undefined.Transporter field. +// The returned OperationsServerTransport instance is connected to an instance of armsubscriptions.OperationsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewOperationsServerTransport(srv *OperationsServer) *OperationsServerTransport { - return &OperationsServerTransport{srv: srv} + return &OperationsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armsubscriptions.OperationsClientListResponse]](), + } } // OperationsServerTransport connects instances of armsubscriptions.OperationsClient to instances of OperationsServer. // Don't use this type directly, use NewOperationsServerTransport instead. type OperationsServerTransport struct { srv *OperationsServer - newListPager *azfake.PagerResponder[armsubscriptions.OperationsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armsubscriptions.OperationsClientListResponse]] } // Do implements the policy.Transporter interface for OperationsServerTransport. @@ -69,22 +72,25 @@ func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*ht if o.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if o.newListPager == nil { + newListPager := o.newListPager.get(req) + if newListPager == nil { resp := o.srv.NewListPager(nil) - o.newListPager = &resp - server.PagerResponderInjectNextLinks(o.newListPager, req, func(page *armsubscriptions.OperationsClientListResponse, createLink func() string) { + newListPager = &resp + o.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armsubscriptions.OperationsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(o.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + o.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(o.newListPager) { - o.newListPager = nil + if !server.PagerResponderMore(newListPager) { + o.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/resources/armsubscriptions/fake/server.go b/sdk/resourcemanager/resources/armsubscriptions/fake/server.go index d4155506e949..155d983374b4 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/fake/server.go +++ b/sdk/resourcemanager/resources/armsubscriptions/fake/server.go @@ -43,18 +43,22 @@ type Server struct { } // NewServerTransport creates a new instance of ServerTransport with the provided implementation. -// The returned ServerTransport instance is connected to an instance of armsubscriptions.Client by way of the -// undefined.Transporter field. +// The returned ServerTransport instance is connected to an instance of armsubscriptions.Client via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewServerTransport(srv *Server) *ServerTransport { - return &ServerTransport{srv: srv} + return &ServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armsubscriptions.ClientListResponse]](), + newListLocationsPager: newTracker[azfake.PagerResponder[armsubscriptions.ClientListLocationsResponse]](), + } } // ServerTransport connects instances of armsubscriptions.Client to instances of Server. // Don't use this type directly, use NewServerTransport instead. type ServerTransport struct { srv *Server - newListPager *azfake.PagerResponder[armsubscriptions.ClientListResponse] - newListLocationsPager *azfake.PagerResponder[armsubscriptions.ClientListLocationsResponse] + newListPager *tracker[azfake.PagerResponder[armsubscriptions.ClientListResponse]] + newListLocationsPager *tracker[azfake.PagerResponder[armsubscriptions.ClientListLocationsResponse]] } // Do implements the policy.Transporter interface for ServerTransport. @@ -154,22 +158,25 @@ func (s *ServerTransport) dispatchNewListPager(req *http.Request) (*http.Respons if s.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if s.newListPager == nil { + newListPager := s.newListPager.get(req) + if newListPager == nil { resp := s.srv.NewListPager(nil) - s.newListPager = &resp - server.PagerResponderInjectNextLinks(s.newListPager, req, func(page *armsubscriptions.ClientListResponse, createLink func() string) { + newListPager = &resp + s.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armsubscriptions.ClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(s.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListPager) { - s.newListPager = nil + if !server.PagerResponderMore(newListPager) { + s.newListPager.remove(req) } return resp, nil } @@ -178,7 +185,8 @@ func (s *ServerTransport) dispatchNewListLocationsPager(req *http.Request) (*htt if s.srv.NewListLocationsPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListLocationsPager not implemented")} } - if s.newListLocationsPager == nil { + newListLocationsPager := s.newListLocationsPager.get(req) + if newListLocationsPager == nil { const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/locations` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) @@ -205,17 +213,19 @@ func (s *ServerTransport) dispatchNewListLocationsPager(req *http.Request) (*htt } } resp := s.srv.NewListLocationsPager(subscriptionIDUnescaped, options) - s.newListLocationsPager = &resp + newListLocationsPager = &resp + s.newListLocationsPager.add(req, newListLocationsPager) } - resp, err := server.PagerResponderNext(s.newListLocationsPager, req) + resp, err := server.PagerResponderNext(newListLocationsPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + s.newListLocationsPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(s.newListLocationsPager) { - s.newListLocationsPager = nil + if !server.PagerResponderMore(newListLocationsPager) { + s.newListLocationsPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/resources/armsubscriptions/fake/subscription_server.go b/sdk/resourcemanager/resources/armsubscriptions/fake/subscription_server.go index 211c9aa9b502..a25772c365bf 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/fake/subscription_server.go +++ b/sdk/resourcemanager/resources/armsubscriptions/fake/subscription_server.go @@ -28,8 +28,8 @@ type SubscriptionServer struct { } // NewSubscriptionServerTransport creates a new instance of SubscriptionServerTransport with the provided implementation. -// The returned SubscriptionServerTransport instance is connected to an instance of armsubscriptions.SubscriptionClient by way of the -// undefined.Transporter field. +// The returned SubscriptionServerTransport instance is connected to an instance of armsubscriptions.SubscriptionClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewSubscriptionServerTransport(srv *SubscriptionServer) *SubscriptionServerTransport { return &SubscriptionServerTransport{srv: srv} } diff --git a/sdk/resourcemanager/resources/armsubscriptions/fake/tenants_server.go b/sdk/resourcemanager/resources/armsubscriptions/fake/tenants_server.go index e8a8a30a39ec..82341b747b3a 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/fake/tenants_server.go +++ b/sdk/resourcemanager/resources/armsubscriptions/fake/tenants_server.go @@ -27,17 +27,20 @@ type TenantsServer struct { } // NewTenantsServerTransport creates a new instance of TenantsServerTransport with the provided implementation. -// The returned TenantsServerTransport instance is connected to an instance of armsubscriptions.TenantsClient by way of the -// undefined.Transporter field. +// The returned TenantsServerTransport instance is connected to an instance of armsubscriptions.TenantsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewTenantsServerTransport(srv *TenantsServer) *TenantsServerTransport { - return &TenantsServerTransport{srv: srv} + return &TenantsServerTransport{ + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armsubscriptions.TenantsClientListResponse]](), + } } // TenantsServerTransport connects instances of armsubscriptions.TenantsClient to instances of TenantsServer. // Don't use this type directly, use NewTenantsServerTransport instead. type TenantsServerTransport struct { srv *TenantsServer - newListPager *azfake.PagerResponder[armsubscriptions.TenantsClientListResponse] + newListPager *tracker[azfake.PagerResponder[armsubscriptions.TenantsClientListResponse]] } // Do implements the policy.Transporter interface for TenantsServerTransport. @@ -69,22 +72,25 @@ func (t *TenantsServerTransport) dispatchNewListPager(req *http.Request) (*http. if t.srv.NewListPager == nil { return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} } - if t.newListPager == nil { + newListPager := t.newListPager.get(req) + if newListPager == nil { resp := t.srv.NewListPager(nil) - t.newListPager = &resp - server.PagerResponderInjectNextLinks(t.newListPager, req, func(page *armsubscriptions.TenantsClientListResponse, createLink func() string) { + newListPager = &resp + t.newListPager.add(req, newListPager) + server.PagerResponderInjectNextLinks(newListPager, req, func(page *armsubscriptions.TenantsClientListResponse, createLink func() string) { page.NextLink = to.Ptr(createLink()) }) } - resp, err := server.PagerResponderNext(t.newListPager, req) + resp, err := server.PagerResponderNext(newListPager, req) if err != nil { return nil, err } if !contains([]int{http.StatusOK}, resp.StatusCode) { + t.newListPager.remove(req) return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PagerResponderMore(t.newListPager) { - t.newListPager = nil + if !server.PagerResponderMore(newListPager) { + t.newListPager.remove(req) } return resp, nil } diff --git a/sdk/resourcemanager/resources/armsubscriptions/go.mod b/sdk/resourcemanager/resources/armsubscriptions/go.mod index 68130ef82897..79455833da70 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/go.mod +++ b/sdk/resourcemanager/resources/armsubscriptions/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscr go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0-beta.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/stretchr/testify v1.7.0 diff --git a/sdk/resourcemanager/resources/armsubscriptions/go.sum b/sdk/resourcemanager/resources/armsubscriptions/go.sum index 6be2bd8aa93e..4b7f5c090f22 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/go.sum +++ b/sdk/resourcemanager/resources/armsubscriptions/go.sum @@ -1,5 +1,5 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0-beta.2 h1:C3zKsGguxcLd8a2uEytB8+TFtBGd75bXRxEs0QBwsv0= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0-beta.2/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1 h1:8t6ZZtkOCl+rx7uBn40Nj62ABVGkXK69U/En44wJIlE= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0 h1:t/W5MYAuQy81cvM8VUNfRLzhtKpXhVUAN7Cd7KVbTyc= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0/go.mod h1:NBanQUfSWiWn3QEpWDTCU0IjBECKOYvl2R8xdRtMtiM= github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= diff --git a/sdk/resourcemanager/resources/armsubscriptions/models.go b/sdk/resourcemanager/resources/armsubscriptions/models.go index fdea44093737..76ddb14d0a90 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/models.go +++ b/sdk/resourcemanager/resources/armsubscriptions/models.go @@ -60,27 +60,6 @@ type CheckZonePeersResult struct { SubscriptionID *string } -// ClientCheckZonePeersOptions contains the optional parameters for the Client.CheckZonePeers method. -type ClientCheckZonePeersOptions struct { - // placeholder for future optional parameters -} - -// ClientGetOptions contains the optional parameters for the Client.Get method. -type ClientGetOptions struct { - // placeholder for future optional parameters -} - -// ClientListLocationsOptions contains the optional parameters for the Client.NewListLocationsPager method. -type ClientListLocationsOptions struct { - // Whether to include extended locations. - IncludeExtendedLocations *bool -} - -// ClientListOptions contains the optional parameters for the Client.NewListPager method. -type ClientListOptions struct { - // placeholder for future optional parameters -} - // ErrorAdditionalInfo - The resource management error additional info. type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. @@ -297,11 +276,6 @@ type OperationListResultAutoGenerated struct { Value []*OperationAutoGenerated } -// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. -type OperationsClientListOptions struct { - // placeholder for future optional parameters -} - // PairedRegion - Information regarding paired region. type PairedRegion struct { // READ-ONLY; The fully qualified ID of the location. For example, /subscriptions/8d65815f-a5b6-402f-9298-045155da7d74/locations/westus. @@ -363,13 +337,6 @@ type Subscription struct { TenantID *string } -// SubscriptionClientCheckResourceNameOptions contains the optional parameters for the SubscriptionClient.CheckResourceName -// method. -type SubscriptionClientCheckResourceNameOptions struct { - // Resource object with values for resource name and resource type - ResourceNameDefinition *ResourceName -} - // SubscriptionListResult - Subscription list operation response. type SubscriptionListResult struct { // REQUIRED; The URL to get the next set of results. @@ -434,8 +401,3 @@ type TenantListResult struct { // An array of tenants. Value []*TenantIDDescription } - -// TenantsClientListOptions contains the optional parameters for the TenantsClient.NewListPager method. -type TenantsClientListOptions struct { - // placeholder for future optional parameters -} diff --git a/sdk/resourcemanager/resources/armsubscriptions/options.go b/sdk/resourcemanager/resources/armsubscriptions/options.go new file mode 100644 index 000000000000..fee9ef953de4 --- /dev/null +++ b/sdk/resourcemanager/resources/armsubscriptions/options.go @@ -0,0 +1,47 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armsubscriptions + +// ClientCheckZonePeersOptions contains the optional parameters for the Client.CheckZonePeers method. +type ClientCheckZonePeersOptions struct { + // placeholder for future optional parameters +} + +// ClientGetOptions contains the optional parameters for the Client.Get method. +type ClientGetOptions struct { + // placeholder for future optional parameters +} + +// ClientListLocationsOptions contains the optional parameters for the Client.NewListLocationsPager method. +type ClientListLocationsOptions struct { + // Whether to include extended locations. + IncludeExtendedLocations *bool +} + +// ClientListOptions contains the optional parameters for the Client.NewListPager method. +type ClientListOptions struct { + // placeholder for future optional parameters +} + +// OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +type OperationsClientListOptions struct { + // placeholder for future optional parameters +} + +// SubscriptionClientCheckResourceNameOptions contains the optional parameters for the SubscriptionClient.CheckResourceName +// method. +type SubscriptionClientCheckResourceNameOptions struct { + // Resource object with values for resource name and resource type + ResourceNameDefinition *ResourceName +} + +// TenantsClientListOptions contains the optional parameters for the TenantsClient.NewListPager method. +type TenantsClientListOptions struct { + // placeholder for future optional parameters +} diff --git a/sdk/resourcemanager/resources/armsubscriptions/response_types.go b/sdk/resourcemanager/resources/armsubscriptions/response_types.go index 9f36ad999a39..9d684b4761be 100644 --- a/sdk/resourcemanager/resources/armsubscriptions/response_types.go +++ b/sdk/resourcemanager/resources/armsubscriptions/response_types.go @@ -10,35 +10,42 @@ package armsubscriptions // ClientCheckZonePeersResponse contains the response from method Client.CheckZonePeers. type ClientCheckZonePeersResponse struct { + // Result of the Check zone peers operation. CheckZonePeersResult } // ClientGetResponse contains the response from method Client.Get. type ClientGetResponse struct { + // Subscription information. Subscription } // ClientListLocationsResponse contains the response from method Client.NewListLocationsPager. type ClientListLocationsResponse struct { + // Location list operation response. LocationListResult } // ClientListResponse contains the response from method Client.NewListPager. type ClientListResponse struct { + // Subscription list operation response. SubscriptionListResult } // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { + // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult } // SubscriptionClientCheckResourceNameResponse contains the response from method SubscriptionClient.CheckResourceName. type SubscriptionClientCheckResourceNameResponse struct { + // Resource Name valid if not a reserved word, does not contain a reserved word and does not start with a reserved word CheckResourceNameResult } // TenantsClientListResponse contains the response from method TenantsClient.NewListPager. type TenantsClientListResponse struct { + // Tenant Ids information. TenantListResult }