From a08a7c3deaac9a2338bcefa8ffcdba6538ea8f87 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 27 Feb 2025 23:39:59 +0000 Subject: [PATCH] CodeGen from PR 32288 in Azure/azure-rest-api-specs Merge ef87de828c3c4365263e6f2177c13654bad9db97 into 57323ac6c745ba3af373dd1f62fa924e79fb828c --- .../standbypool/armstandbypool/CHANGELOG.md | 27 +++ .../standbypool/armstandbypool/README.md | 2 +- .../standbypool/armstandbypool/constants.go | 86 ++++++- .../armstandbypool/fake/internal.go | 5 + .../armstandbypool/fake/operations_server.go | 45 +++- ...bycontainergrouppoolruntimeviews_server.go | 49 +++- .../fake/standbycontainergrouppools_server.go | 71 ++++-- ...byvirtualmachinepoolruntimeviews_server.go | 49 +++- .../fake/standbyvirtualmachinepools_server.go | 71 ++++-- .../fake/standbyvirtualmachines_server.go | 49 +++- .../standbypool/armstandbypool/go.mod | 2 +- .../standbypool/armstandbypool/models.go | 116 +++++++-- .../armstandbypool/models_serde.go | 222 +++++++++++++++++- .../armstandbypool/operations_client.go | 4 +- .../operations_client_example_test.go | 4 +- ...bycontainergrouppoolruntimeviews_client.go | 8 +- ...ouppoolruntimeviews_client_example_test.go | 140 ++++++++++- .../standbycontainergrouppools_client.go | 28 +-- ...containergrouppools_client_example_test.go | 49 +++- ...byvirtualmachinepoolruntimeviews_client.go | 8 +- ...inepoolruntimeviews_client_example_test.go | 186 +++++++++++---- .../standbyvirtualmachinepools_client.go | 28 +-- ...virtualmachinepools_client_example_test.go | 15 +- .../standbyvirtualmachines_client.go | 8 +- ...ndbyvirtualmachines_client_example_test.go | 10 +- .../armstandbypool/tsp-location.yaml | 4 +- 26 files changed, 1045 insertions(+), 241 deletions(-) diff --git a/sdk/resourcemanager/standbypool/armstandbypool/CHANGELOG.md b/sdk/resourcemanager/standbypool/armstandbypool/CHANGELOG.md index 715d2f53ffc1..3febf4394855 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/CHANGELOG.md +++ b/sdk/resourcemanager/standbypool/armstandbypool/CHANGELOG.md @@ -1,5 +1,32 @@ # Release History +## 2.0.0 (2025-02-27) +### Breaking Changes + +- Type of `ContainerGroupInstanceCountSummary.InstanceCountsByState` has been changed from `[]*PoolResourceStateCount` to `[]*PoolContainerGroupStateCount` +- Type of `VirtualMachineInstanceCountSummary.InstanceCountsByState` has been changed from `[]*PoolResourceStateCount` to `[]*PoolVirtualMachineStateCount` +- Struct `PoolResourceStateCount` has been removed + +### Features Added + +- New value `VirtualMachineStateHibernated` added to enum type `VirtualMachineState` +- New enum type `HealthStateCode` with values `HealthStateCodeDegraded`, `HealthStateCodeHealthy` +- New enum type `PoolContainerGroupState` with values `PoolContainerGroupStateCreating`, `PoolContainerGroupStateDeleting`, `PoolContainerGroupStateRunning` +- New enum type `PoolVirtualMachineState` with values `PoolVirtualMachineStateCreating`, `PoolVirtualMachineStateDeallocated`, `PoolVirtualMachineStateDeallocating`, `PoolVirtualMachineStateDeleting`, `PoolVirtualMachineStateHibernated`, `PoolVirtualMachineStateHibernating`, `PoolVirtualMachineStateRunning`, `PoolVirtualMachineStateStarting` +- New struct `PoolContainerGroupStateCount` +- New struct `PoolStatus` +- New struct `PoolVirtualMachineStateCount` +- New struct `StandbyContainerGroupPoolForecastValues` +- New struct `StandbyContainerGroupPoolPrediction` +- New struct `StandbyVirtualMachinePoolForecastValues` +- New struct `StandbyVirtualMachinePoolPrediction` +- New field `Zone` in struct `ContainerGroupInstanceCountSummary` +- New field `Zones` in struct `StandbyContainerGroupPoolResourceProperties` +- New field `Zones` in struct `StandbyContainerGroupPoolResourceUpdateProperties` +- New field `Prediction`, `Status` in struct `StandbyContainerGroupPoolRuntimeViewResourceProperties` +- New field `Prediction`, `Status` in struct `StandbyVirtualMachinePoolRuntimeViewResourceProperties` + + ## 1.0.0 (2024-09-26) ### Breaking Changes diff --git a/sdk/resourcemanager/standbypool/armstandbypool/README.md b/sdk/resourcemanager/standbypool/armstandbypool/README.md index 2dc9a4926040..2ca7ffc25de6 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/README.md +++ b/sdk/resourcemanager/standbypool/armstandbypool/README.md @@ -18,7 +18,7 @@ This project uses [Go modules](https://github.com/golang/go/wiki/Modules) for ve Install the Azure Standbypool module: ```sh -go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool +go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2 ``` ## Authorization diff --git a/sdk/resourcemanager/standbypool/armstandbypool/constants.go b/sdk/resourcemanager/standbypool/armstandbypool/constants.go index 2eec7cc967ca..63b66e556bef 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/constants.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/constants.go @@ -6,7 +6,7 @@ package armstandbypool const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" - moduleVersion = "v1.0.0" + moduleVersion = "v2.0.0" ) // ActionType - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. @@ -48,6 +48,24 @@ func PossibleCreatedByTypeValues() []CreatedByType { } } +// HealthStateCode - StandbyPool health state. +type HealthStateCode string + +const ( + // HealthStateCodeDegraded - StandbyPool is in degraded state. + HealthStateCodeDegraded HealthStateCode = "HealthState/degraded" + // HealthStateCodeHealthy - StandbyPool is in healthy state. + HealthStateCodeHealthy HealthStateCode = "HealthState/healthy" +) + +// PossibleHealthStateCodeValues returns the possible values for the HealthStateCode const type. +func PossibleHealthStateCodeValues() []HealthStateCode { + return []HealthStateCode{ + HealthStateCodeDegraded, + HealthStateCodeHealthy, + } +} + // Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" type Origin string @@ -70,6 +88,67 @@ func PossibleOriginValues() []Origin { } } +// PoolContainerGroupState - The state of the pooled container groups. +type PoolContainerGroupState string + +const ( + // PoolContainerGroupStateCreating - The container group is creating. + PoolContainerGroupStateCreating PoolContainerGroupState = "Creating" + // PoolContainerGroupStateDeleting - The container group is deleting. + PoolContainerGroupStateDeleting PoolContainerGroupState = "Deleting" + // PoolContainerGroupStateRunning - The container group is up and running. + PoolContainerGroupStateRunning PoolContainerGroupState = "Running" +) + +// PossiblePoolContainerGroupStateValues returns the possible values for the PoolContainerGroupState const type. +func PossiblePoolContainerGroupStateValues() []PoolContainerGroupState { + return []PoolContainerGroupState{ + PoolContainerGroupStateCreating, + PoolContainerGroupStateDeleting, + PoolContainerGroupStateRunning, + } +} + +// PoolVirtualMachineState - The state of the pooled virtual machines. +type PoolVirtualMachineState string + +const ( + // PoolVirtualMachineStateCreating - The virtual machine is creating. + PoolVirtualMachineStateCreating PoolVirtualMachineState = "Creating" + // PoolVirtualMachineStateDeallocated - The virtual machine has released the lease on the underlying hardware and is powered + // off. + PoolVirtualMachineStateDeallocated PoolVirtualMachineState = "Deallocated" + // PoolVirtualMachineStateDeallocating - The virtual machine is releasing the lease on the underlying hardware and is powered + // off. + PoolVirtualMachineStateDeallocating PoolVirtualMachineState = "Deallocating" + // PoolVirtualMachineStateDeleting - The virtual machine is deleting. + PoolVirtualMachineStateDeleting PoolVirtualMachineState = "Deleting" + // PoolVirtualMachineStateHibernated - The virtual machine has released the lease on the underlying hardware and is powered + // off. Memory contents of the VM are stored in the OS disk. When started again, applications and processes that were previously + // running in your VM resume from the state prior to hibernation. + PoolVirtualMachineStateHibernated PoolVirtualMachineState = "Hibernated" + // PoolVirtualMachineStateHibernating - The virtual machine is hibernating. + PoolVirtualMachineStateHibernating PoolVirtualMachineState = "Hibernating" + // PoolVirtualMachineStateRunning - The virtual machine is up and running. + PoolVirtualMachineStateRunning PoolVirtualMachineState = "Running" + // PoolVirtualMachineStateStarting - The virtual machine is starting. + PoolVirtualMachineStateStarting PoolVirtualMachineState = "Starting" +) + +// PossiblePoolVirtualMachineStateValues returns the possible values for the PoolVirtualMachineState const type. +func PossiblePoolVirtualMachineStateValues() []PoolVirtualMachineState { + return []PoolVirtualMachineState{ + PoolVirtualMachineStateCreating, + PoolVirtualMachineStateDeallocated, + PoolVirtualMachineStateDeallocating, + PoolVirtualMachineStateDeleting, + PoolVirtualMachineStateHibernated, + PoolVirtualMachineStateHibernating, + PoolVirtualMachineStateRunning, + PoolVirtualMachineStateStarting, + } +} + // ProvisioningState - Provisioning state type ProvisioningState string @@ -115,6 +194,10 @@ type VirtualMachineState string const ( // VirtualMachineStateDeallocated - The virtual machine has released the lease on the underlying hardware and is powered off. VirtualMachineStateDeallocated VirtualMachineState = "Deallocated" + // VirtualMachineStateHibernated - The virtual machine has released the lease on the underlying hardware and is powered off. + // Memory contents of the VM are stored in the OS disk. When started again, applications and processes that were previously + // running in your VM resume from the state prior to hibernation. + VirtualMachineStateHibernated VirtualMachineState = "Hibernated" // VirtualMachineStateRunning - The virtual machine is up and running. VirtualMachineStateRunning VirtualMachineState = "Running" ) @@ -123,6 +206,7 @@ const ( func PossibleVirtualMachineStateValues() []VirtualMachineState { return []VirtualMachineState{ VirtualMachineStateDeallocated, + VirtualMachineStateHibernated, VirtualMachineStateRunning, } } diff --git a/sdk/resourcemanager/standbypool/armstandbypool/fake/internal.go b/sdk/resourcemanager/standbypool/armstandbypool/fake/internal.go index 56a8f624f5f3..7425b6a669e2 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/fake/internal.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/fake/internal.go @@ -10,6 +10,11 @@ import ( "sync" ) +type result struct { + resp *http.Response + err error +} + type nonRetriableError struct { error } diff --git a/sdk/resourcemanager/standbypool/armstandbypool/fake/operations_server.go b/sdk/resourcemanager/standbypool/armstandbypool/fake/operations_server.go index 9a882bb6131f..36a7183cb186 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/fake/operations_server.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/fake/operations_server.go @@ -11,7 +11,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "net/http" ) @@ -51,17 +51,36 @@ func (o *OperationsServerTransport) Do(req *http.Request) (*http.Response, error } func (o *OperationsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - var resp *http.Response - var err error + resultChan := make(chan result) + defer close(resultChan) - switch method { - case "OperationsClient.NewListPager": - resp, err = o.dispatchNewListPager(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } + go func() { + var intercepted bool + var res result + if operationsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = operationsServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "OperationsClient.NewListPager": + res.resp, res.err = o.dispatchNewListPager(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + select { + case resultChan <- res: + case <-req.Context().Done(): + } + }() - return resp, err + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } } func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { @@ -90,3 +109,9 @@ func (o *OperationsServerTransport) dispatchNewListPager(req *http.Request) (*ht } return resp, nil } + +// set this to conditionally intercept incoming requests to OperationsServerTransport +var operationsServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/sdk/resourcemanager/standbypool/armstandbypool/fake/standbycontainergrouppoolruntimeviews_server.go b/sdk/resourcemanager/standbypool/armstandbypool/fake/standbycontainergrouppoolruntimeviews_server.go index 70e38faf4686..58c672803b28 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/fake/standbycontainergrouppoolruntimeviews_server.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/fake/standbycontainergrouppoolruntimeviews_server.go @@ -12,7 +12,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "net/http" "net/url" "regexp" @@ -58,19 +58,38 @@ func (s *StandbyContainerGroupPoolRuntimeViewsServerTransport) Do(req *http.Requ } func (s *StandbyContainerGroupPoolRuntimeViewsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - var resp *http.Response - var err error + resultChan := make(chan result) + defer close(resultChan) - switch method { - case "StandbyContainerGroupPoolRuntimeViewsClient.Get": - resp, err = s.dispatchGet(req) - case "StandbyContainerGroupPoolRuntimeViewsClient.NewListByStandbyPoolPager": - resp, err = s.dispatchNewListByStandbyPoolPager(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } + go func() { + var intercepted bool + var res result + if standbyContainerGroupPoolRuntimeViewsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = standbyContainerGroupPoolRuntimeViewsServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "StandbyContainerGroupPoolRuntimeViewsClient.Get": + res.resp, res.err = s.dispatchGet(req) + case "StandbyContainerGroupPoolRuntimeViewsClient.NewListByStandbyPoolPager": + res.resp, res.err = s.dispatchNewListByStandbyPoolPager(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + select { + case resultChan <- res: + case <-req.Context().Done(): + } + }() - return resp, err + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } } func (s *StandbyContainerGroupPoolRuntimeViewsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { @@ -150,3 +169,9 @@ func (s *StandbyContainerGroupPoolRuntimeViewsServerTransport) dispatchNewListBy } return resp, nil } + +// set this to conditionally intercept incoming requests to StandbyContainerGroupPoolRuntimeViewsServerTransport +var standbyContainerGroupPoolRuntimeViewsServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/sdk/resourcemanager/standbypool/armstandbypool/fake/standbycontainergrouppools_server.go b/sdk/resourcemanager/standbypool/armstandbypool/fake/standbycontainergrouppools_server.go index 792826dc3f33..a56ffa37fb21 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/fake/standbycontainergrouppools_server.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/fake/standbycontainergrouppools_server.go @@ -12,7 +12,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "net/http" "net/url" "regexp" @@ -25,7 +25,7 @@ type StandbyContainerGroupPoolsServer struct { BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, standbyContainerGroupPoolName string, resource armstandbypool.StandbyContainerGroupPoolResource, options *armstandbypool.StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armstandbypool.StandbyContainerGroupPoolsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) // BeginDelete is the fake for method StandbyContainerGroupPoolsClient.BeginDelete - // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent BeginDelete func(ctx context.Context, resourceGroupName string, standbyContainerGroupPoolName string, options *armstandbypool.StandbyContainerGroupPoolsClientBeginDeleteOptions) (resp azfake.PollerResponder[armstandbypool.StandbyContainerGroupPoolsClientDeleteResponse], errResp azfake.ErrorResponder) // Get is the fake for method StandbyContainerGroupPoolsClient.Get @@ -80,27 +80,46 @@ func (s *StandbyContainerGroupPoolsServerTransport) Do(req *http.Request) (*http } func (s *StandbyContainerGroupPoolsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - var resp *http.Response - var err error + resultChan := make(chan result) + defer close(resultChan) - switch method { - case "StandbyContainerGroupPoolsClient.BeginCreateOrUpdate": - resp, err = s.dispatchBeginCreateOrUpdate(req) - case "StandbyContainerGroupPoolsClient.BeginDelete": - resp, err = s.dispatchBeginDelete(req) - case "StandbyContainerGroupPoolsClient.Get": - resp, err = s.dispatchGet(req) - case "StandbyContainerGroupPoolsClient.NewListByResourceGroupPager": - resp, err = s.dispatchNewListByResourceGroupPager(req) - case "StandbyContainerGroupPoolsClient.NewListBySubscriptionPager": - resp, err = s.dispatchNewListBySubscriptionPager(req) - case "StandbyContainerGroupPoolsClient.Update": - resp, err = s.dispatchUpdate(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } + go func() { + var intercepted bool + var res result + if standbyContainerGroupPoolsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = standbyContainerGroupPoolsServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "StandbyContainerGroupPoolsClient.BeginCreateOrUpdate": + res.resp, res.err = s.dispatchBeginCreateOrUpdate(req) + case "StandbyContainerGroupPoolsClient.BeginDelete": + res.resp, res.err = s.dispatchBeginDelete(req) + case "StandbyContainerGroupPoolsClient.Get": + res.resp, res.err = s.dispatchGet(req) + case "StandbyContainerGroupPoolsClient.NewListByResourceGroupPager": + res.resp, res.err = s.dispatchNewListByResourceGroupPager(req) + case "StandbyContainerGroupPoolsClient.NewListBySubscriptionPager": + res.resp, res.err = s.dispatchNewListBySubscriptionPager(req) + case "StandbyContainerGroupPoolsClient.Update": + res.resp, res.err = s.dispatchUpdate(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + select { + case resultChan <- res: + case <-req.Context().Done(): + } + }() - return resp, err + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } } func (s *StandbyContainerGroupPoolsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { @@ -184,9 +203,9 @@ func (s *StandbyContainerGroupPoolsServerTransport) dispatchBeginDelete(req *htt return nil, err } - if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { s.beginDelete.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } if !server.PollerResponderMore(beginDelete) { s.beginDelete.remove(req) @@ -334,3 +353,9 @@ func (s *StandbyContainerGroupPoolsServerTransport) dispatchUpdate(req *http.Req } return resp, nil } + +// set this to conditionally intercept incoming requests to StandbyContainerGroupPoolsServerTransport +var standbyContainerGroupPoolsServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachinepoolruntimeviews_server.go b/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachinepoolruntimeviews_server.go index 835b9bade3b5..812235d2ac01 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachinepoolruntimeviews_server.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachinepoolruntimeviews_server.go @@ -12,7 +12,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "net/http" "net/url" "regexp" @@ -58,19 +58,38 @@ func (s *StandbyVirtualMachinePoolRuntimeViewsServerTransport) Do(req *http.Requ } func (s *StandbyVirtualMachinePoolRuntimeViewsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - var resp *http.Response - var err error + resultChan := make(chan result) + defer close(resultChan) - switch method { - case "StandbyVirtualMachinePoolRuntimeViewsClient.Get": - resp, err = s.dispatchGet(req) - case "StandbyVirtualMachinePoolRuntimeViewsClient.NewListByStandbyPoolPager": - resp, err = s.dispatchNewListByStandbyPoolPager(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } + go func() { + var intercepted bool + var res result + if standbyVirtualMachinePoolRuntimeViewsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = standbyVirtualMachinePoolRuntimeViewsServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "StandbyVirtualMachinePoolRuntimeViewsClient.Get": + res.resp, res.err = s.dispatchGet(req) + case "StandbyVirtualMachinePoolRuntimeViewsClient.NewListByStandbyPoolPager": + res.resp, res.err = s.dispatchNewListByStandbyPoolPager(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + select { + case resultChan <- res: + case <-req.Context().Done(): + } + }() - return resp, err + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } } func (s *StandbyVirtualMachinePoolRuntimeViewsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { @@ -150,3 +169,9 @@ func (s *StandbyVirtualMachinePoolRuntimeViewsServerTransport) dispatchNewListBy } return resp, nil } + +// set this to conditionally intercept incoming requests to StandbyVirtualMachinePoolRuntimeViewsServerTransport +var standbyVirtualMachinePoolRuntimeViewsServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachinepools_server.go b/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachinepools_server.go index 49b3ac00dcf8..e93a633c47b4 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachinepools_server.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachinepools_server.go @@ -12,7 +12,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "net/http" "net/url" "regexp" @@ -25,7 +25,7 @@ type StandbyVirtualMachinePoolsServer struct { BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, standbyVirtualMachinePoolName string, resource armstandbypool.StandbyVirtualMachinePoolResource, options *armstandbypool.StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armstandbypool.StandbyVirtualMachinePoolsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) // BeginDelete is the fake for method StandbyVirtualMachinePoolsClient.BeginDelete - // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent + // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent BeginDelete func(ctx context.Context, resourceGroupName string, standbyVirtualMachinePoolName string, options *armstandbypool.StandbyVirtualMachinePoolsClientBeginDeleteOptions) (resp azfake.PollerResponder[armstandbypool.StandbyVirtualMachinePoolsClientDeleteResponse], errResp azfake.ErrorResponder) // Get is the fake for method StandbyVirtualMachinePoolsClient.Get @@ -80,27 +80,46 @@ func (s *StandbyVirtualMachinePoolsServerTransport) Do(req *http.Request) (*http } func (s *StandbyVirtualMachinePoolsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - var resp *http.Response - var err error + resultChan := make(chan result) + defer close(resultChan) - switch method { - case "StandbyVirtualMachinePoolsClient.BeginCreateOrUpdate": - resp, err = s.dispatchBeginCreateOrUpdate(req) - case "StandbyVirtualMachinePoolsClient.BeginDelete": - resp, err = s.dispatchBeginDelete(req) - case "StandbyVirtualMachinePoolsClient.Get": - resp, err = s.dispatchGet(req) - case "StandbyVirtualMachinePoolsClient.NewListByResourceGroupPager": - resp, err = s.dispatchNewListByResourceGroupPager(req) - case "StandbyVirtualMachinePoolsClient.NewListBySubscriptionPager": - resp, err = s.dispatchNewListBySubscriptionPager(req) - case "StandbyVirtualMachinePoolsClient.Update": - resp, err = s.dispatchUpdate(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } + go func() { + var intercepted bool + var res result + if standbyVirtualMachinePoolsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = standbyVirtualMachinePoolsServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "StandbyVirtualMachinePoolsClient.BeginCreateOrUpdate": + res.resp, res.err = s.dispatchBeginCreateOrUpdate(req) + case "StandbyVirtualMachinePoolsClient.BeginDelete": + res.resp, res.err = s.dispatchBeginDelete(req) + case "StandbyVirtualMachinePoolsClient.Get": + res.resp, res.err = s.dispatchGet(req) + case "StandbyVirtualMachinePoolsClient.NewListByResourceGroupPager": + res.resp, res.err = s.dispatchNewListByResourceGroupPager(req) + case "StandbyVirtualMachinePoolsClient.NewListBySubscriptionPager": + res.resp, res.err = s.dispatchNewListBySubscriptionPager(req) + case "StandbyVirtualMachinePoolsClient.Update": + res.resp, res.err = s.dispatchUpdate(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + select { + case resultChan <- res: + case <-req.Context().Done(): + } + }() - return resp, err + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } } func (s *StandbyVirtualMachinePoolsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { @@ -184,9 +203,9 @@ func (s *StandbyVirtualMachinePoolsServerTransport) dispatchBeginDelete(req *htt return nil, err } - if !contains([]int{http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { + if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { s.beginDelete.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} } if !server.PollerResponderMore(beginDelete) { s.beginDelete.remove(req) @@ -334,3 +353,9 @@ func (s *StandbyVirtualMachinePoolsServerTransport) dispatchUpdate(req *http.Req } return resp, nil } + +// set this to conditionally intercept incoming requests to StandbyVirtualMachinePoolsServerTransport +var standbyVirtualMachinePoolsServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachines_server.go b/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachines_server.go index e6d922df6faa..6245c1b0a2e4 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachines_server.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/fake/standbyvirtualmachines_server.go @@ -12,7 +12,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "net/http" "net/url" "regexp" @@ -58,19 +58,38 @@ func (s *StandbyVirtualMachinesServerTransport) Do(req *http.Request) (*http.Res } func (s *StandbyVirtualMachinesServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - var resp *http.Response - var err error + resultChan := make(chan result) + defer close(resultChan) - switch method { - case "StandbyVirtualMachinesClient.Get": - resp, err = s.dispatchGet(req) - case "StandbyVirtualMachinesClient.NewListByStandbyVirtualMachinePoolResourcePager": - resp, err = s.dispatchNewListByStandbyVirtualMachinePoolResourcePager(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } + go func() { + var intercepted bool + var res result + if standbyVirtualMachinesServerTransportInterceptor != nil { + res.resp, res.err, intercepted = standbyVirtualMachinesServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "StandbyVirtualMachinesClient.Get": + res.resp, res.err = s.dispatchGet(req) + case "StandbyVirtualMachinesClient.NewListByStandbyVirtualMachinePoolResourcePager": + res.resp, res.err = s.dispatchNewListByStandbyVirtualMachinePoolResourcePager(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + select { + case resultChan <- res: + case <-req.Context().Done(): + } + }() - return resp, err + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } } func (s *StandbyVirtualMachinesServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { @@ -150,3 +169,9 @@ func (s *StandbyVirtualMachinesServerTransport) dispatchNewListByStandbyVirtualM } return resp, nil } + +// set this to conditionally intercept incoming requests to StandbyVirtualMachinesServerTransport +var standbyVirtualMachinesServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/sdk/resourcemanager/standbypool/armstandbypool/go.mod b/sdk/resourcemanager/standbypool/armstandbypool/go.mod index ef7fa8df3cdb..4d5c7cf2224f 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/go.mod +++ b/sdk/resourcemanager/standbypool/armstandbypool/go.mod @@ -1,4 +1,4 @@ -module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool +module github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2 go 1.18 diff --git a/sdk/resourcemanager/standbypool/armstandbypool/models.go b/sdk/resourcemanager/standbypool/armstandbypool/models.go index aaf9ef0d79b8..19472a198fd2 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/models.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/models.go @@ -9,8 +9,11 @@ import "time" // ContainerGroupInstanceCountSummary - Displays the counts of container groups in each state, as known by the StandbyPool // resource provider. type ContainerGroupInstanceCountSummary struct { - // REQUIRED; The count of pooled resources in each state. - InstanceCountsByState []*PoolResourceStateCount + // REQUIRED; The count of pooled container groups in each state for the given zone. + InstanceCountsByState []*PoolContainerGroupStateCount + + // The zone that the provided counts are in. It will not have a value if zones are not enabled. + Zone *int64 } // ContainerGroupProfile - Details of the ContainerGroupProfile. @@ -33,12 +36,12 @@ type ContainerGroupProperties struct { // Operation - Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { - // Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. - ActionType *ActionType - - // READ-ONLY; Localized display information for this particular operation. + // Localized display information for this particular operation. Display *OperationDisplay + // READ-ONLY; Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + ActionType *ActionType + // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure // Resource Manager/control-plane operations. IsDataAction *bool @@ -80,13 +83,33 @@ type OperationListResult struct { NextLink *string } -// PoolResourceStateCount - Displays the counts of pooled resources in each state, as known by the StandbyPool resource provider. -type PoolResourceStateCount struct { - // REQUIRED; The count of pooled resources in the given state. +// PoolContainerGroupStateCount - Displays the counts of pooled container groups in each state, as known by the StandbyPool +// resource provider. +type PoolContainerGroupStateCount struct { + // REQUIRED; The count of pooled container groups in the given state. Count *int64 - // REQUIRED; The state that the pooled resources count is for. - State *string + // REQUIRED; The state that the pooled container groups count is for. + State *PoolContainerGroupState +} + +// PoolStatus - Displays StandbyPool status. +type PoolStatus struct { + // READ-ONLY; Displays the healthy state of the StandbyPool. + Code *HealthStateCode + + // READ-ONLY; Displays the StandbyPool health state details. + Message *string +} + +// PoolVirtualMachineStateCount - Displays the counts of pooled virtual machines in each state, as known by the StandbyPool +// resource provider. +type PoolVirtualMachineStateCount struct { + // REQUIRED; The count of pooled virtual machines in the given state. + Count *int64 + + // REQUIRED; The state that the pooled virtual machines count is for. + State *PoolVirtualMachineState } // StandbyContainerGroupPoolElasticityProfile - Specifies the elasticity profile of the standby container group pools. @@ -98,6 +121,24 @@ type StandbyContainerGroupPoolElasticityProfile struct { RefillPolicy *RefillPolicy } +// StandbyContainerGroupPoolForecastValues - Displays the forecast information of the standby pool. +type StandbyContainerGroupPoolForecastValues struct { + // READ-ONLY; Displays the predicted count of instances to be requested from the standby pool. + InstancesRequestedCount []*int64 +} + +// StandbyContainerGroupPoolPrediction - Displays prediction information of the standby pool. +type StandbyContainerGroupPoolPrediction struct { + // READ-ONLY; Displays additional information for the prediction of the standby pool. + ForecastInfo *string + + // READ-ONLY; Displays the UTC timestamp of when the prediction was retrieved for the standby pool. + ForecastStartTime *time.Time + + // READ-ONLY; Displays the forecast information of the standby pool. + ForecastValues *StandbyContainerGroupPoolForecastValues +} + // StandbyContainerGroupPoolResource - A StandbyContainerGroupPoolResource. type StandbyContainerGroupPoolResource struct { // REQUIRED; The geo-location where the resource lives @@ -139,6 +180,9 @@ type StandbyContainerGroupPoolResourceProperties struct { // REQUIRED; Specifies elasticity profile of standby container group pools. ElasticityProfile *StandbyContainerGroupPoolElasticityProfile + // Specifies zones of standby container group pools. + Zones []*string + // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState } @@ -159,6 +203,9 @@ type StandbyContainerGroupPoolResourceUpdateProperties struct { // Specifies elasticity profile of standby container group pools. ElasticityProfile *StandbyContainerGroupPoolElasticityProfile + + // Specifies zones of standby container group pools. + Zones []*string } // StandbyContainerGroupPoolRuntimeViewResource - Contains information about a standby container group pool as last known @@ -198,8 +245,14 @@ type StandbyContainerGroupPoolRuntimeViewResourceProperties struct { // provider. InstanceCountSummary []*ContainerGroupInstanceCountSummary + // READ-ONLY; Displays prediction information of the standby pool + Prediction *StandbyContainerGroupPoolPrediction + // READ-ONLY; Displays the provisioning state of the standby pool ProvisioningState *ProvisioningState + + // READ-ONLY; Display status of the standby pool + Status *PoolStatus } // StandbyVirtualMachinePoolElasticityProfile - Details of the elasticity profile. @@ -212,6 +265,24 @@ type StandbyVirtualMachinePoolElasticityProfile struct { MinReadyCapacity *int64 } +// StandbyVirtualMachinePoolForecastValues - Displays the forecast information of the standby pool. +type StandbyVirtualMachinePoolForecastValues struct { + // READ-ONLY; Displays the predicted count of instances to be requested from the standby pool. + InstancesRequestedCount []*int64 +} + +// StandbyVirtualMachinePoolPrediction - Displays prediction information of the standby pool. +type StandbyVirtualMachinePoolPrediction struct { + // READ-ONLY; Displays additional information for the prediction of the standby pool. + ForecastInfo *string + + // READ-ONLY; Displays the UTC timestamp of when the prediction was retrieved for the standby pool. + ForecastStartTime *time.Time + + // READ-ONLY; Displays the forecast information of the standby pool. + ForecastValues *StandbyVirtualMachinePoolForecastValues +} + // StandbyVirtualMachinePoolResource - A StandbyVirtualMachinePoolResource. type StandbyVirtualMachinePoolResource struct { // REQUIRED; The geo-location where the resource lives @@ -315,14 +386,18 @@ type StandbyVirtualMachinePoolRuntimeViewResourceListResult struct { // StandbyPool resource provider. type StandbyVirtualMachinePoolRuntimeViewResourceProperties struct { // READ-ONLY; A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known - // by the StandbyPool resource provider. - // If zones are not enabled on the attached VMSS, the list will contain a single entry with null zone values. - // Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. - // Note: any resources in the Running state may still be installing extensions / not fully provisioned. + // by the StandbyPool resource provider. If zones are not enabled on the attached VMSS, the list will contain a single entry + // without zone values. Note: any resources in the Running state may still be installing extensions / not fully provisioned. InstanceCountSummary []*VirtualMachineInstanceCountSummary + // READ-ONLY; Displays prediction information of the standby pool + Prediction *StandbyVirtualMachinePoolPrediction + // READ-ONLY; Displays the provisioning state of the standby pool ProvisioningState *ProvisioningState + + // READ-ONLY; Display status of the standby pool + Status *PoolStatus } // StandbyVirtualMachineResource - Concrete proxy resource types can be created by aliasing this type using a specific property @@ -390,13 +465,12 @@ type SystemData struct { } // VirtualMachineInstanceCountSummary - Contains the counts of VMs in each power state in a given zone, fault domain, as known -// by the StandbyPool resource provider. -// Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) are not reflected here. -// Note: any resources in the Running state may still be installing extensions / not fully provisioned. +// by the StandbyPool resource provider. Note: any resources in the Running state may still be installing extensions / not +// fully provisioned. type VirtualMachineInstanceCountSummary struct { - // REQUIRED; The count of pooled resources in each state for the given zone. - InstanceCountsByState []*PoolResourceStateCount + // REQUIRED; The count of pooled virtual machines in each state for the given zone. + InstanceCountsByState []*PoolVirtualMachineStateCount - // The zone that the provided counts are in. This is null if zones are not enabled on the attached VMSS. + // The zone that the provided counts are in. It will not have a value if zones are not enabled on the attached VMSS. Zone *int64 } diff --git a/sdk/resourcemanager/standbypool/armstandbypool/models_serde.go b/sdk/resourcemanager/standbypool/armstandbypool/models_serde.go index 68608bfe94b4..939f025438db 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/models_serde.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/models_serde.go @@ -15,6 +15,7 @@ import ( func (c ContainerGroupInstanceCountSummary) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "instanceCountsByState", c.InstanceCountsByState) + populate(objectMap, "zone", c.Zone) return json.Marshal(objectMap) } @@ -30,6 +31,9 @@ func (c *ContainerGroupInstanceCountSummary) UnmarshalJSON(data []byte) error { case "instanceCountsByState": err = unpopulate(val, "InstanceCountsByState", &c.InstanceCountsByState) delete(rawMsg, key) + case "zone": + err = unpopulate(val, "Zone", &c.Zone) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", c, err) @@ -213,16 +217,78 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type PoolResourceStateCount. -func (p PoolResourceStateCount) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type PoolContainerGroupStateCount. +func (p PoolContainerGroupStateCount) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", p.Count) + populate(objectMap, "state", p.State) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PoolContainerGroupStateCount. +func (p *PoolContainerGroupStateCount) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &p.Count) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &p.State) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PoolStatus. +func (p PoolStatus) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", p.Code) + populate(objectMap, "message", p.Message) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PoolStatus. +func (p *PoolStatus) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &p.Code) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &p.Message) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type PoolVirtualMachineStateCount. +func (p PoolVirtualMachineStateCount) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "count", p.Count) populate(objectMap, "state", p.State) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type PoolResourceStateCount. -func (p *PoolResourceStateCount) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type PoolVirtualMachineStateCount. +func (p *PoolVirtualMachineStateCount) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", p, err) @@ -275,6 +341,68 @@ func (s *StandbyContainerGroupPoolElasticityProfile) UnmarshalJSON(data []byte) return nil } +// MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolForecastValues. +func (s StandbyContainerGroupPoolForecastValues) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instancesRequestedCount", s.InstancesRequestedCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolForecastValues. +func (s *StandbyContainerGroupPoolForecastValues) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instancesRequestedCount": + err = unpopulate(val, "InstancesRequestedCount", &s.InstancesRequestedCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolPrediction. +func (s StandbyContainerGroupPoolPrediction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "forecastInfo", s.ForecastInfo) + populateDateTimeRFC3339(objectMap, "forecastStartTime", s.ForecastStartTime) + populate(objectMap, "forecastValues", s.ForecastValues) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolPrediction. +func (s *StandbyContainerGroupPoolPrediction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "forecastInfo": + err = unpopulate(val, "ForecastInfo", &s.ForecastInfo) + delete(rawMsg, key) + case "forecastStartTime": + err = unpopulateDateTimeRFC3339(val, "ForecastStartTime", &s.ForecastStartTime) + delete(rawMsg, key) + case "forecastValues": + err = unpopulate(val, "ForecastValues", &s.ForecastValues) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolResource. func (s StandbyContainerGroupPoolResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -363,6 +491,7 @@ func (s StandbyContainerGroupPoolResourceProperties) MarshalJSON() ([]byte, erro populate(objectMap, "containerGroupProperties", s.ContainerGroupProperties) populate(objectMap, "elasticityProfile", s.ElasticityProfile) populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "zones", s.Zones) return json.Marshal(objectMap) } @@ -384,6 +513,9 @@ func (s *StandbyContainerGroupPoolResourceProperties) UnmarshalJSON(data []byte) case "provisioningState": err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &s.Zones) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -428,6 +560,7 @@ func (s StandbyContainerGroupPoolResourceUpdateProperties) MarshalJSON() ([]byte objectMap := make(map[string]any) populate(objectMap, "containerGroupProperties", s.ContainerGroupProperties) populate(objectMap, "elasticityProfile", s.ElasticityProfile) + populate(objectMap, "zones", s.Zones) return json.Marshal(objectMap) } @@ -446,6 +579,9 @@ func (s *StandbyContainerGroupPoolResourceUpdateProperties) UnmarshalJSON(data [ case "elasticityProfile": err = unpopulate(val, "ElasticityProfile", &s.ElasticityProfile) delete(rawMsg, key) + case "zones": + err = unpopulate(val, "Zones", &s.Zones) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -532,7 +668,9 @@ func (s *StandbyContainerGroupPoolRuntimeViewResourceListResult) UnmarshalJSON(d func (s StandbyContainerGroupPoolRuntimeViewResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "instanceCountSummary", s.InstanceCountSummary) + populate(objectMap, "prediction", s.Prediction) populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "status", s.Status) return json.Marshal(objectMap) } @@ -548,9 +686,15 @@ func (s *StandbyContainerGroupPoolRuntimeViewResourceProperties) UnmarshalJSON(d case "instanceCountSummary": err = unpopulate(val, "InstanceCountSummary", &s.InstanceCountSummary) delete(rawMsg, key) + case "prediction": + err = unpopulate(val, "Prediction", &s.Prediction) + delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) @@ -590,6 +734,68 @@ func (s *StandbyVirtualMachinePoolElasticityProfile) UnmarshalJSON(data []byte) return nil } +// MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolForecastValues. +func (s StandbyVirtualMachinePoolForecastValues) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "instancesRequestedCount", s.InstancesRequestedCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolForecastValues. +func (s *StandbyVirtualMachinePoolForecastValues) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "instancesRequestedCount": + err = unpopulate(val, "InstancesRequestedCount", &s.InstancesRequestedCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolPrediction. +func (s StandbyVirtualMachinePoolPrediction) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "forecastInfo", s.ForecastInfo) + populateDateTimeRFC3339(objectMap, "forecastStartTime", s.ForecastStartTime) + populate(objectMap, "forecastValues", s.ForecastValues) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolPrediction. +func (s *StandbyVirtualMachinePoolPrediction) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "forecastInfo": + err = unpopulate(val, "ForecastInfo", &s.ForecastInfo) + delete(rawMsg, key) + case "forecastStartTime": + err = unpopulateDateTimeRFC3339(val, "ForecastStartTime", &s.ForecastStartTime) + delete(rawMsg, key) + case "forecastValues": + err = unpopulate(val, "ForecastValues", &s.ForecastValues) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolResource. func (s StandbyVirtualMachinePoolResource) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -855,7 +1061,9 @@ func (s *StandbyVirtualMachinePoolRuntimeViewResourceListResult) UnmarshalJSON(d func (s StandbyVirtualMachinePoolRuntimeViewResourceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "instanceCountSummary", s.InstanceCountSummary) + populate(objectMap, "prediction", s.Prediction) populate(objectMap, "provisioningState", s.ProvisioningState) + populate(objectMap, "status", s.Status) return json.Marshal(objectMap) } @@ -871,9 +1079,15 @@ func (s *StandbyVirtualMachinePoolRuntimeViewResourceProperties) UnmarshalJSON(d case "instanceCountSummary": err = unpopulate(val, "InstanceCountSummary", &s.InstanceCountSummary) delete(rawMsg, key) + case "prediction": + err = unpopulate(val, "Prediction", &s.Prediction) + delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &s.Status) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", s, err) diff --git a/sdk/resourcemanager/standbypool/armstandbypool/operations_client.go b/sdk/resourcemanager/standbypool/armstandbypool/operations_client.go index c1f9becb7960..5df99b8bfbe9 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/operations_client.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/operations_client.go @@ -35,7 +35,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - List the operations for the provider // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -68,7 +68,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *Operat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/standbypool/armstandbypool/operations_client_example_test.go b/sdk/resourcemanager/standbypool/armstandbypool/operations_client_example_test.go index 1e4f38ef6dca..c82388558324 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/operations_client_example_test.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/operations_client_example_test.go @@ -7,11 +7,11 @@ package armstandbypool_test import ( "context" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "log" ) -// Generated from example definition: 2024-03-01/Operations_List.json +// Generated from example definition: 2025-03-01/Operations_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppoolruntimeviews_client.go b/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppoolruntimeviews_client.go index b7db3da18b5f..080e56cd4121 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppoolruntimeviews_client.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppoolruntimeviews_client.go @@ -42,7 +42,7 @@ func NewStandbyContainerGroupPoolRuntimeViewsClient(subscriptionID string, crede // Get - Get a StandbyContainerGroupPoolRuntimeViewResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyContainerGroupPoolName - Name of the standby container group pool // - runtimeView - The unique identifier for the runtime view. The input string should be the word 'latest', which will get @@ -95,7 +95,7 @@ func (client *StandbyContainerGroupPoolRuntimeViewsClient) getCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -112,7 +112,7 @@ func (client *StandbyContainerGroupPoolRuntimeViewsClient) getHandleResponse(res // NewListByStandbyPoolPager - List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyContainerGroupPoolName - Name of the standby container group pool // - options - StandbyContainerGroupPoolRuntimeViewsClientListByStandbyPoolOptions contains the optional parameters for the @@ -160,7 +160,7 @@ func (client *StandbyContainerGroupPoolRuntimeViewsClient) listByStandbyPoolCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppoolruntimeviews_client_example_test.go b/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppoolruntimeviews_client_example_test.go index 4f86c5ef010c..c610bf0d8926 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppoolruntimeviews_client_example_test.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppoolruntimeviews_client_example_test.go @@ -7,11 +7,11 @@ package armstandbypool_test import ( "context" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "log" ) -// Generated from example definition: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json +// Generated from example definition: 2025-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json func ExampleStandbyContainerGroupPoolRuntimeViewsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -34,23 +34,82 @@ func ExampleStandbyContainerGroupPoolRuntimeViewsClient_Get() { // Properties: &armstandbypool.StandbyContainerGroupPoolRuntimeViewResourceProperties{ // InstanceCountSummary: []*armstandbypool.ContainerGroupInstanceCountSummary{ // { - // InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{ + // Zone: to.Ptr[int64](1), + // InstanceCountsByState: []*armstandbypool.PoolContainerGroupStateCount{ // { - // State: to.Ptr("creating"), + // State: to.Ptr(armstandbypool.PoolContainerGroupStateCreating), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("running"), + // State: to.Ptr(armstandbypool.PoolContainerGroupStateRunning), + // Count: to.Ptr[int64](20), + // }, + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateDeleting), + // Count: to.Ptr[int64](21), + // }, + // }, + // }, + // { + // Zone: to.Ptr[int64](2), + // InstanceCountsByState: []*armstandbypool.PoolContainerGroupStateCount{ + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateCreating), + // Count: to.Ptr[int64](100), + // }, + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateRunning), // Count: to.Ptr[int64](500), // }, // { - // State: to.Ptr("deleting"), + // State: to.Ptr(armstandbypool.PoolContainerGroupStateDeleting), + // Count: to.Ptr[int64](20), + // }, + // }, + // }, + // { + // Zone: to.Ptr[int64](3), + // InstanceCountsByState: []*armstandbypool.PoolContainerGroupStateCount{ + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateCreating), + // Count: to.Ptr[int64](100), + // }, + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateRunning), // Count: to.Ptr[int64](20), // }, + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateDeleting), + // Count: to.Ptr[int64](7), + // }, // }, // }, // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), + // Status: &armstandbypool.PoolStatus{ + // Code: to.Ptr(armstandbypool.HealthStateCodeHealthy), + // Message: to.Ptr("The pool is healthy."), + // }, + // Prediction: &armstandbypool.StandbyContainerGroupPoolPrediction{ + // ForecastValues: &armstandbypool.StandbyContainerGroupPoolForecastValues{ + // InstancesRequestedCount: []*int64{ + // to.Ptr[int64](24), + // to.Ptr[int64](10), + // to.Ptr[int64](200), + // to.Ptr[int64](12), + // to.Ptr[int64](5), + // to.Ptr[int64](10), + // to.Ptr[int64](15), + // to.Ptr[int64](23), + // to.Ptr[int64](56), + // to.Ptr[int64](38), + // to.Ptr[int64](12), + // to.Ptr[int64](19), + // }, + // }, + // ForecastStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-14T01:34:59.228Z"); return t}()), + // ForecastInfo: to.Ptr("{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}"), + // }, // }, // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool/runtimeViews/latest"), // Name: to.Ptr("pool"), @@ -67,7 +126,7 @@ func ExampleStandbyContainerGroupPoolRuntimeViewsClient_Get() { // } } -// Generated from example definition: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json +// Generated from example definition: 2025-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json func ExampleStandbyContainerGroupPoolRuntimeViewsClient_NewListByStandbyPoolPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -96,23 +155,82 @@ func ExampleStandbyContainerGroupPoolRuntimeViewsClient_NewListByStandbyPoolPage // Properties: &armstandbypool.StandbyContainerGroupPoolRuntimeViewResourceProperties{ // InstanceCountSummary: []*armstandbypool.ContainerGroupInstanceCountSummary{ // { - // InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{ + // Zone: to.Ptr[int64](1), + // InstanceCountsByState: []*armstandbypool.PoolContainerGroupStateCount{ // { - // State: to.Ptr("creating"), + // State: to.Ptr(armstandbypool.PoolContainerGroupStateCreating), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("running"), + // State: to.Ptr(armstandbypool.PoolContainerGroupStateRunning), + // Count: to.Ptr[int64](20), + // }, + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateDeleting), + // Count: to.Ptr[int64](21), + // }, + // }, + // }, + // { + // Zone: to.Ptr[int64](2), + // InstanceCountsByState: []*armstandbypool.PoolContainerGroupStateCount{ + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateCreating), + // Count: to.Ptr[int64](100), + // }, + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateRunning), // Count: to.Ptr[int64](500), // }, // { - // State: to.Ptr("deleting"), + // State: to.Ptr(armstandbypool.PoolContainerGroupStateDeleting), + // Count: to.Ptr[int64](20), + // }, + // }, + // }, + // { + // Zone: to.Ptr[int64](3), + // InstanceCountsByState: []*armstandbypool.PoolContainerGroupStateCount{ + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateCreating), + // Count: to.Ptr[int64](100), + // }, + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateRunning), // Count: to.Ptr[int64](20), // }, + // { + // State: to.Ptr(armstandbypool.PoolContainerGroupStateDeleting), + // Count: to.Ptr[int64](7), + // }, // }, // }, // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), + // Status: &armstandbypool.PoolStatus{ + // Code: to.Ptr(armstandbypool.HealthStateCodeHealthy), + // Message: to.Ptr("The pool is healthy."), + // }, + // Prediction: &armstandbypool.StandbyContainerGroupPoolPrediction{ + // ForecastValues: &armstandbypool.StandbyContainerGroupPoolForecastValues{ + // InstancesRequestedCount: []*int64{ + // to.Ptr[int64](24), + // to.Ptr[int64](10), + // to.Ptr[int64](200), + // to.Ptr[int64](12), + // to.Ptr[int64](5), + // to.Ptr[int64](10), + // to.Ptr[int64](15), + // to.Ptr[int64](23), + // to.Ptr[int64](56), + // to.Ptr[int64](38), + // to.Ptr[int64](12), + // to.Ptr[int64](19), + // }, + // }, + // ForecastStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-14T01:34:59.228Z"); return t}()), + // ForecastInfo: to.Ptr("{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}"), + // }, // }, // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool/runtimeViews/latest"), // Name: to.Ptr("pool"), diff --git a/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppools_client.go b/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppools_client.go index 9d3abf61f731..27ea6f2e802c 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppools_client.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppools_client.go @@ -42,7 +42,7 @@ func NewStandbyContainerGroupPoolsClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Create a StandbyContainerGroupPoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyContainerGroupPoolName - Name of the standby container group pool // - resource - Resource create parameters. @@ -69,7 +69,7 @@ func (client *StandbyContainerGroupPoolsClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Create a StandbyContainerGroupPoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 func (client *StandbyContainerGroupPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, standbyContainerGroupPoolName string, resource StandbyContainerGroupPoolResource, options *StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "StandbyContainerGroupPoolsClient.BeginCreateOrUpdate" @@ -111,7 +111,7 @@ func (client *StandbyContainerGroupPoolsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -124,7 +124,7 @@ func (client *StandbyContainerGroupPoolsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Delete a StandbyContainerGroupPoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyContainerGroupPoolName - Name of the standby container group pool // - options - StandbyContainerGroupPoolsClientBeginDeleteOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.BeginDelete @@ -149,7 +149,7 @@ func (client *StandbyContainerGroupPoolsClient) BeginDelete(ctx context.Context, // Delete - Delete a StandbyContainerGroupPoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 func (client *StandbyContainerGroupPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, standbyContainerGroupPoolName string, options *StandbyContainerGroupPoolsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "StandbyContainerGroupPoolsClient.BeginDelete" @@ -191,7 +191,7 @@ func (client *StandbyContainerGroupPoolsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -200,7 +200,7 @@ func (client *StandbyContainerGroupPoolsClient) deleteCreateRequest(ctx context. // Get - Get a StandbyContainerGroupPoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyContainerGroupPoolName - Name of the standby container group pool // - options - StandbyContainerGroupPoolsClientGetOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.Get @@ -247,7 +247,7 @@ func (client *StandbyContainerGroupPoolsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,7 +264,7 @@ func (client *StandbyContainerGroupPoolsClient) getHandleResponse(resp *http.Res // NewListByResourceGroupPager - List StandbyContainerGroupPoolResource resources by resource group // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - StandbyContainerGroupPoolsClientListByResourceGroupOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.NewListByResourceGroupPager // method. @@ -307,7 +307,7 @@ func (client *StandbyContainerGroupPoolsClient) listByResourceGroupCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -324,7 +324,7 @@ func (client *StandbyContainerGroupPoolsClient) listByResourceGroupHandleRespons // NewListBySubscriptionPager - List StandbyContainerGroupPoolResource resources by subscription ID // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - options - StandbyContainerGroupPoolsClientListBySubscriptionOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.NewListBySubscriptionPager // method. func (client *StandbyContainerGroupPoolsClient) NewListBySubscriptionPager(options *StandbyContainerGroupPoolsClientListBySubscriptionOptions) *runtime.Pager[StandbyContainerGroupPoolsClientListBySubscriptionResponse] { @@ -362,7 +362,7 @@ func (client *StandbyContainerGroupPoolsClient) listBySubscriptionCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -380,7 +380,7 @@ func (client *StandbyContainerGroupPoolsClient) listBySubscriptionHandleResponse // Update - Update a StandbyContainerGroupPoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyContainerGroupPoolName - Name of the standby container group pool // - properties - The resource properties to be updated. @@ -428,7 +428,7 @@ func (client *StandbyContainerGroupPoolsClient) updateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppools_client_example_test.go b/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppools_client_example_test.go index a1e2771f95c6..91828da669fe 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppools_client_example_test.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/standbycontainergrouppools_client_example_test.go @@ -8,11 +8,11 @@ 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/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "log" ) -// Generated from example definition: 2024-03-01/StandbyContainerGroupPools_CreateOrUpdate.json +// Generated from example definition: 2025-03-01/StandbyContainerGroupPools_CreateOrUpdate.json func ExampleStandbyContainerGroupPoolsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -40,6 +40,11 @@ func ExampleStandbyContainerGroupPoolsClient_BeginCreateOrUpdate() { }, }, }, + Zones: []*string{ + to.Ptr("1"), + to.Ptr("2"), + to.Ptr("3"), + }, }, Tags: map[string]*string{}, Location: to.Ptr("West US"), @@ -73,6 +78,11 @@ func ExampleStandbyContainerGroupPoolsClient_BeginCreateOrUpdate() { // }, // }, // }, + // Zones: []*string{ + // to.Ptr("1"), + // to.Ptr("2"), + // to.Ptr("3"), + // }, // }, // Tags: map[string]*string{ // }, @@ -92,7 +102,7 @@ func ExampleStandbyContainerGroupPoolsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: 2024-03-01/StandbyContainerGroupPools_Delete.json +// Generated from example definition: 2025-03-01/StandbyContainerGroupPools_Delete.json func ExampleStandbyContainerGroupPoolsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -113,7 +123,7 @@ func ExampleStandbyContainerGroupPoolsClient_BeginDelete() { } } -// Generated from example definition: 2024-03-01/StandbyContainerGroupPools_Get.json +// Generated from example definition: 2025-03-01/StandbyContainerGroupPools_Get.json func ExampleStandbyContainerGroupPoolsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -150,6 +160,11 @@ func ExampleStandbyContainerGroupPoolsClient_Get() { // }, // }, // }, + // Zones: []*string{ + // to.Ptr("1"), + // to.Ptr("2"), + // to.Ptr("3"), + // }, // }, // Tags: map[string]*string{ // }, @@ -169,7 +184,7 @@ func ExampleStandbyContainerGroupPoolsClient_Get() { // } } -// Generated from example definition: 2024-03-01/StandbyContainerGroupPools_ListByResourceGroup.json +// Generated from example definition: 2025-03-01/StandbyContainerGroupPools_ListByResourceGroup.json func ExampleStandbyContainerGroupPoolsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -212,6 +227,11 @@ func ExampleStandbyContainerGroupPoolsClient_NewListByResourceGroupPager() { // }, // }, // }, + // Zones: []*string{ + // to.Ptr("1"), + // to.Ptr("2"), + // to.Ptr("3"), + // }, // }, // Tags: map[string]*string{ // }, @@ -235,7 +255,7 @@ func ExampleStandbyContainerGroupPoolsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: 2024-03-01/StandbyContainerGroupPools_ListBySubscription.json +// Generated from example definition: 2025-03-01/StandbyContainerGroupPools_ListBySubscription.json func ExampleStandbyContainerGroupPoolsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -278,6 +298,11 @@ func ExampleStandbyContainerGroupPoolsClient_NewListBySubscriptionPager() { // }, // }, // }, + // Zones: []*string{ + // to.Ptr("1"), + // to.Ptr("2"), + // to.Ptr("3"), + // }, // }, // Tags: map[string]*string{ // }, @@ -301,7 +326,7 @@ func ExampleStandbyContainerGroupPoolsClient_NewListBySubscriptionPager() { } } -// Generated from example definition: 2024-03-01/StandbyContainerGroupPools_Update.json +// Generated from example definition: 2025-03-01/StandbyContainerGroupPools_Update.json func ExampleStandbyContainerGroupPoolsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -330,6 +355,11 @@ func ExampleStandbyContainerGroupPoolsClient_Update() { }, }, }, + Zones: []*string{ + to.Ptr("1"), + to.Ptr("2"), + to.Ptr("3"), + }, }, }, nil) if err != nil { @@ -357,6 +387,11 @@ func ExampleStandbyContainerGroupPoolsClient_Update() { // }, // }, // }, + // Zones: []*string{ + // to.Ptr("1"), + // to.Ptr("2"), + // to.Ptr("3"), + // }, // }, // Tags: map[string]*string{ // }, diff --git a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepoolruntimeviews_client.go b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepoolruntimeviews_client.go index ccd46ce74d86..1daf29e8732e 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepoolruntimeviews_client.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepoolruntimeviews_client.go @@ -42,7 +42,7 @@ func NewStandbyVirtualMachinePoolRuntimeViewsClient(subscriptionID string, crede // Get - Get a StandbyVirtualMachinePoolRuntimeViewResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyVirtualMachinePoolName - Name of the standby virtual machine pool // - runtimeView - The unique identifier for the runtime view. The input string should be the word 'latest', which will get @@ -95,7 +95,7 @@ func (client *StandbyVirtualMachinePoolRuntimeViewsClient) getCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -112,7 +112,7 @@ func (client *StandbyVirtualMachinePoolRuntimeViewsClient) getHandleResponse(res // NewListByStandbyPoolPager - List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyVirtualMachinePoolName - Name of the standby virtual machine pool // - options - StandbyVirtualMachinePoolRuntimeViewsClientListByStandbyPoolOptions contains the optional parameters for the @@ -160,7 +160,7 @@ func (client *StandbyVirtualMachinePoolRuntimeViewsClient) listByStandbyPoolCrea return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepoolruntimeviews_client_example_test.go b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepoolruntimeviews_client_example_test.go index a69bc1efb231..cca2246f721d 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepoolruntimeviews_client_example_test.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepoolruntimeviews_client_example_test.go @@ -7,11 +7,11 @@ package armstandbypool_test import ( "context" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "log" ) -// Generated from example definition: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json +// Generated from example definition: 2025-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json func ExampleStandbyVirtualMachinePoolRuntimeViewsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -35,93 +35,141 @@ func ExampleStandbyVirtualMachinePoolRuntimeViewsClient_Get() { // InstanceCountSummary: []*armstandbypool.VirtualMachineInstanceCountSummary{ // { // Zone: to.Ptr[int64](1), - // InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{ + // InstanceCountsByState: []*armstandbypool.PoolVirtualMachineStateCount{ // { - // State: to.Ptr("creating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateCreating), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("running"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateRunning), // Count: to.Ptr[int64](20), // }, // { - // State: to.Ptr("deallocating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocating), // Count: to.Ptr[int64](10), // }, // { - // State: to.Ptr("deallocated"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocated), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("starting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateStarting), // Count: to.Ptr[int64](0), // }, // { - // State: to.Ptr("deleting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeleting), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernating), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernated), // Count: to.Ptr[int64](0), // }, // }, // }, // { // Zone: to.Ptr[int64](2), - // InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{ + // InstanceCountsByState: []*armstandbypool.PoolVirtualMachineStateCount{ // { - // State: to.Ptr("creating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateCreating), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("running"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateRunning), // Count: to.Ptr[int64](20), // }, // { - // State: to.Ptr("deallocating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocating), // Count: to.Ptr[int64](10), // }, // { - // State: to.Ptr("deallocated"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocated), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("starting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateStarting), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeleting), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernating), // Count: to.Ptr[int64](0), // }, // { - // State: to.Ptr("deleting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernated), // Count: to.Ptr[int64](0), // }, // }, // }, // { // Zone: to.Ptr[int64](3), - // InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{ + // InstanceCountsByState: []*armstandbypool.PoolVirtualMachineStateCount{ // { - // State: to.Ptr("creating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateCreating), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("running"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateRunning), // Count: to.Ptr[int64](20), // }, // { - // State: to.Ptr("deallocating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocating), // Count: to.Ptr[int64](10), // }, // { - // State: to.Ptr("deallocated"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocated), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("starting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateStarting), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeleting), // Count: to.Ptr[int64](0), // }, // { - // State: to.Ptr("deleting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernating), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernated), // Count: to.Ptr[int64](0), // }, // }, // }, // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), + // Status: &armstandbypool.PoolStatus{ + // Code: to.Ptr(armstandbypool.HealthStateCodeHealthy), + // Message: to.Ptr("The pool is healthy."), + // }, + // Prediction: &armstandbypool.StandbyVirtualMachinePoolPrediction{ + // ForecastValues: &armstandbypool.StandbyVirtualMachinePoolForecastValues{ + // InstancesRequestedCount: []*int64{ + // to.Ptr[int64](24), + // to.Ptr[int64](10), + // to.Ptr[int64](200), + // to.Ptr[int64](12), + // to.Ptr[int64](5), + // to.Ptr[int64](10), + // to.Ptr[int64](15), + // to.Ptr[int64](23), + // to.Ptr[int64](56), + // to.Ptr[int64](38), + // to.Ptr[int64](12), + // to.Ptr[int64](19), + // }, + // }, + // ForecastStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-14T01:34:59.228Z"); return t}()), + // ForecastInfo: to.Ptr("{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}"), + // }, // }, // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/runtimeViews/latest"), // Name: to.Ptr("pool"), @@ -138,7 +186,7 @@ func ExampleStandbyVirtualMachinePoolRuntimeViewsClient_Get() { // } } -// Generated from example definition: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json +// Generated from example definition: 2025-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json func ExampleStandbyVirtualMachinePoolRuntimeViewsClient_NewListByStandbyPoolPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -168,93 +216,141 @@ func ExampleStandbyVirtualMachinePoolRuntimeViewsClient_NewListByStandbyPoolPage // InstanceCountSummary: []*armstandbypool.VirtualMachineInstanceCountSummary{ // { // Zone: to.Ptr[int64](1), - // InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{ + // InstanceCountsByState: []*armstandbypool.PoolVirtualMachineStateCount{ // { - // State: to.Ptr("creating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateCreating), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("running"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateRunning), // Count: to.Ptr[int64](20), // }, // { - // State: to.Ptr("deallocating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocating), // Count: to.Ptr[int64](10), // }, // { - // State: to.Ptr("deallocated"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocated), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("starting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateStarting), // Count: to.Ptr[int64](0), // }, // { - // State: to.Ptr("deleting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeleting), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernating), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernated), // Count: to.Ptr[int64](0), // }, // }, // }, // { // Zone: to.Ptr[int64](2), - // InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{ + // InstanceCountsByState: []*armstandbypool.PoolVirtualMachineStateCount{ // { - // State: to.Ptr("creating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateCreating), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("running"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateRunning), // Count: to.Ptr[int64](20), // }, // { - // State: to.Ptr("deallocating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocating), // Count: to.Ptr[int64](10), // }, // { - // State: to.Ptr("deallocated"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocated), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("starting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateStarting), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeleting), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernating), // Count: to.Ptr[int64](0), // }, // { - // State: to.Ptr("deleting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernated), // Count: to.Ptr[int64](0), // }, // }, // }, // { // Zone: to.Ptr[int64](3), - // InstanceCountsByState: []*armstandbypool.PoolResourceStateCount{ + // InstanceCountsByState: []*armstandbypool.PoolVirtualMachineStateCount{ // { - // State: to.Ptr("creating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateCreating), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("running"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateRunning), // Count: to.Ptr[int64](20), // }, // { - // State: to.Ptr("deallocating"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocating), // Count: to.Ptr[int64](10), // }, // { - // State: to.Ptr("deallocated"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeallocated), // Count: to.Ptr[int64](100), // }, // { - // State: to.Ptr("starting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateStarting), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateDeleting), // Count: to.Ptr[int64](0), // }, // { - // State: to.Ptr("deleting"), + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernating), + // Count: to.Ptr[int64](0), + // }, + // { + // State: to.Ptr(armstandbypool.PoolVirtualMachineStateHibernated), // Count: to.Ptr[int64](0), // }, // }, // }, // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), + // Status: &armstandbypool.PoolStatus{ + // Code: to.Ptr(armstandbypool.HealthStateCodeHealthy), + // Message: to.Ptr("The pool is healthy."), + // }, + // Prediction: &armstandbypool.StandbyVirtualMachinePoolPrediction{ + // ForecastValues: &armstandbypool.StandbyVirtualMachinePoolForecastValues{ + // InstancesRequestedCount: []*int64{ + // to.Ptr[int64](24), + // to.Ptr[int64](10), + // to.Ptr[int64](200), + // to.Ptr[int64](12), + // to.Ptr[int64](5), + // to.Ptr[int64](10), + // to.Ptr[int64](15), + // to.Ptr[int64](23), + // to.Ptr[int64](56), + // to.Ptr[int64](38), + // to.Ptr[int64](12), + // to.Ptr[int64](19), + // }, + // }, + // ForecastStartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-02-14T01:34:59.228Z"); return t}()), + // ForecastInfo: to.Ptr("{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}"), + // }, // }, // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/runtimeViews/latest"), // Name: to.Ptr("pool"), diff --git a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepools_client.go b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepools_client.go index 7a0bc58ae523..f1d6516be1bb 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepools_client.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepools_client.go @@ -42,7 +42,7 @@ func NewStandbyVirtualMachinePoolsClient(subscriptionID string, credential azcor // BeginCreateOrUpdate - Create a StandbyVirtualMachinePoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyVirtualMachinePoolName - Name of the standby virtual machine pool // - resource - Resource create parameters. @@ -69,7 +69,7 @@ func (client *StandbyVirtualMachinePoolsClient) BeginCreateOrUpdate(ctx context. // CreateOrUpdate - Create a StandbyVirtualMachinePoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 func (client *StandbyVirtualMachinePoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, standbyVirtualMachinePoolName string, resource StandbyVirtualMachinePoolResource, options *StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "StandbyVirtualMachinePoolsClient.BeginCreateOrUpdate" @@ -111,7 +111,7 @@ func (client *StandbyVirtualMachinePoolsClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -124,7 +124,7 @@ func (client *StandbyVirtualMachinePoolsClient) createOrUpdateCreateRequest(ctx // BeginDelete - Delete a StandbyVirtualMachinePoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyVirtualMachinePoolName - Name of the standby virtual machine pool // - options - StandbyVirtualMachinePoolsClientBeginDeleteOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.BeginDelete @@ -149,7 +149,7 @@ func (client *StandbyVirtualMachinePoolsClient) BeginDelete(ctx context.Context, // Delete - Delete a StandbyVirtualMachinePoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 func (client *StandbyVirtualMachinePoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, standbyVirtualMachinePoolName string, options *StandbyVirtualMachinePoolsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "StandbyVirtualMachinePoolsClient.BeginDelete" @@ -191,7 +191,7 @@ func (client *StandbyVirtualMachinePoolsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -200,7 +200,7 @@ func (client *StandbyVirtualMachinePoolsClient) deleteCreateRequest(ctx context. // Get - Get a StandbyVirtualMachinePoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyVirtualMachinePoolName - Name of the standby virtual machine pool // - options - StandbyVirtualMachinePoolsClientGetOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.Get @@ -247,7 +247,7 @@ func (client *StandbyVirtualMachinePoolsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -264,7 +264,7 @@ func (client *StandbyVirtualMachinePoolsClient) getHandleResponse(resp *http.Res // NewListByResourceGroupPager - List StandbyVirtualMachinePoolResource resources by resource group // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - StandbyVirtualMachinePoolsClientListByResourceGroupOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.NewListByResourceGroupPager // method. @@ -307,7 +307,7 @@ func (client *StandbyVirtualMachinePoolsClient) listByResourceGroupCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -324,7 +324,7 @@ func (client *StandbyVirtualMachinePoolsClient) listByResourceGroupHandleRespons // NewListBySubscriptionPager - List StandbyVirtualMachinePoolResource resources by subscription ID // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - options - StandbyVirtualMachinePoolsClientListBySubscriptionOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.NewListBySubscriptionPager // method. func (client *StandbyVirtualMachinePoolsClient) NewListBySubscriptionPager(options *StandbyVirtualMachinePoolsClientListBySubscriptionOptions) *runtime.Pager[StandbyVirtualMachinePoolsClientListBySubscriptionResponse] { @@ -362,7 +362,7 @@ func (client *StandbyVirtualMachinePoolsClient) listBySubscriptionCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -380,7 +380,7 @@ func (client *StandbyVirtualMachinePoolsClient) listBySubscriptionHandleResponse // Update - Update a StandbyVirtualMachinePoolResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyVirtualMachinePoolName - Name of the standby virtual machine pool // - properties - The resource properties to be updated. @@ -428,7 +428,7 @@ func (client *StandbyVirtualMachinePoolsClient) updateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepools_client_example_test.go b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepools_client_example_test.go index 8630519ab777..9a56ae6d57a3 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepools_client_example_test.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachinepools_client_example_test.go @@ -8,11 +8,11 @@ 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/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "log" ) -// Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json +// Generated from example definition: 2025-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json func ExampleStandbyVirtualMachinePoolsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -74,7 +74,7 @@ func ExampleStandbyVirtualMachinePoolsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_Delete.json +// Generated from example definition: 2025-03-01/StandbyVirtualMachinePools_Delete.json func ExampleStandbyVirtualMachinePoolsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -95,7 +95,7 @@ func ExampleStandbyVirtualMachinePoolsClient_BeginDelete() { } } -// Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_Get.json +// Generated from example definition: 2025-03-01/StandbyVirtualMachinePools_Get.json func ExampleStandbyVirtualMachinePoolsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -142,7 +142,7 @@ func ExampleStandbyVirtualMachinePoolsClient_Get() { // } } -// Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json +// Generated from example definition: 2025-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json func ExampleStandbyVirtualMachinePoolsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -171,6 +171,7 @@ func ExampleStandbyVirtualMachinePoolsClient_NewListByResourceGroupPager() { // Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{ // ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{ // MaxReadyCapacity: to.Ptr[int64](304), + // MinReadyCapacity: to.Ptr[int64](300), // }, // VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning), // AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"), @@ -198,7 +199,7 @@ func ExampleStandbyVirtualMachinePoolsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_ListBySubscription.json +// Generated from example definition: 2025-03-01/StandbyVirtualMachinePools_ListBySubscription.json func ExampleStandbyVirtualMachinePoolsClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -255,7 +256,7 @@ func ExampleStandbyVirtualMachinePoolsClient_NewListBySubscriptionPager() { } } -// Generated from example definition: 2024-03-01/StandbyVirtualMachinePools_Update.json +// Generated from example definition: 2025-03-01/StandbyVirtualMachinePools_Update.json func ExampleStandbyVirtualMachinePoolsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachines_client.go b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachines_client.go index a02b769c2274..a2eb83575c51 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachines_client.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachines_client.go @@ -42,7 +42,7 @@ func NewStandbyVirtualMachinesClient(subscriptionID string, credential azcore.To // Get - Get a StandbyVirtualMachineResource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyVirtualMachinePoolName - Name of the standby virtual machine pool // - standbyVirtualMachineName - Name of the standby virtual machine @@ -94,7 +94,7 @@ func (client *StandbyVirtualMachinesClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -111,7 +111,7 @@ func (client *StandbyVirtualMachinesClient) getHandleResponse(resp *http.Respons // NewListByStandbyVirtualMachinePoolResourcePager - List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource // -// Generated from API version 2024-03-01 +// Generated from API version 2025-03-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - standbyVirtualMachinePoolName - Name of the standby virtual machine pool // - options - StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceOptions contains the optional parameters for @@ -159,7 +159,7 @@ func (client *StandbyVirtualMachinesClient) listByStandbyVirtualMachinePoolResou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2024-03-01") + reqQP.Set("api-version", "2025-03-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachines_client_example_test.go b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachines_client_example_test.go index 54a13581096c..00a85de30b5f 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachines_client_example_test.go +++ b/sdk/resourcemanager/standbypool/armstandbypool/standbyvirtualmachines_client_example_test.go @@ -7,11 +7,11 @@ package armstandbypool_test import ( "context" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool/v2" "log" ) -// Generated from example definition: 2024-03-01/StandbyVirtualMachines_Get.json +// Generated from example definition: 2025-03-01/StandbyVirtualMachines_Get.json func ExampleStandbyVirtualMachinesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -32,7 +32,7 @@ func ExampleStandbyVirtualMachinesClient_Get() { // res = armstandbypool.StandbyVirtualMachinesClientGetResponse{ // StandbyVirtualMachineResource: &armstandbypool.StandbyVirtualMachineResource{ // Properties: &armstandbypool.StandbyVirtualMachineResourceProperties{ - // VirtualMachineResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/provider/Microsoft.Compute/virtualMachines/virtualMachine"), + // VirtualMachineResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachines/virtualMachine"), // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // }, // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine"), @@ -50,7 +50,7 @@ func ExampleStandbyVirtualMachinesClient_Get() { // } } -// Generated from example definition: 2024-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json +// Generated from example definition: 2025-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json func ExampleStandbyVirtualMachinesClient_NewListByStandbyVirtualMachinePoolResourcePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -77,7 +77,7 @@ func ExampleStandbyVirtualMachinesClient_NewListByStandbyVirtualMachinePoolResou // Value: []*armstandbypool.StandbyVirtualMachineResource{ // { // Properties: &armstandbypool.StandbyVirtualMachineResourceProperties{ - // VirtualMachineResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/provider/Microsoft.Compute/virtualMachines/virtualMachine"), + // VirtualMachineResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachines/virtualMachine"), // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // }, // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine"), diff --git a/sdk/resourcemanager/standbypool/armstandbypool/tsp-location.yaml b/sdk/resourcemanager/standbypool/armstandbypool/tsp-location.yaml index 10840906cfb3..01520bebd179 100644 --- a/sdk/resourcemanager/standbypool/armstandbypool/tsp-location.yaml +++ b/sdk/resourcemanager/standbypool/armstandbypool/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/standbypool/StandbyPool.Management -commit: 3ca7edabc2edf1117b7d912ba34f2694721e3ff3 +commit: 48509375b6a6d4f2dc4f4e2dff76a5af0f77be2e repo: Azure/azure-rest-api-specs -additionalDirectories: +additionalDirectories: \ No newline at end of file