diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/CHANGELOG.md b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/CHANGELOG.md index 881026554521..0ec72c51ff7c 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/CHANGELOG.md +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/CHANGELOG.md @@ -1,5 +1,66 @@ # Release History +## 1.0.0 (2024-01-26) +### Breaking Changes + +- Function `*ProvisionedClusterInstancesClient.BeginCreateOrUpdate` parameter(s) have been changed from `(context.Context, string, ProvisionedClusters, *ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions)` to `(context.Context, string, ProvisionedCluster, *ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions)` +- Type of `ControlPlaneProfile.ControlPlaneEndpoint` has been changed from `*ControlPlaneEndpointProfileControlPlaneEndpoint` to `*ControlPlaneProfileControlPlaneEndpoint` +- Type of `VirtualNetworkExtendedLocation.Type` has been changed from `*string` to `*ExtendedLocationTypes` +- `NetworkPolicyFlannel` from enum `NetworkPolicy` has been removed +- `ProvisioningStateCreated`, `ProvisioningStateInProgress` from enum `ProvisioningState` has been removed +- `ResourceProvisioningStateCreated`, `ResourceProvisioningStateInProgress` from enum `ResourceProvisioningState` has been removed +- Function `*AgentPoolClient.BeginUpdate` has been removed +- Operation `*AgentPoolClient.ListByProvisionedCluster` has supported pagination, use `*AgentPoolClient.NewListByProvisionedClusterPager` instead. +- Struct `AgentPoolPatch` has been removed +- Struct `AgentPoolProvisioningStatusOperationStatus` has been removed +- Struct `AgentPoolProvisioningStatusOperationStatusError` has been removed +- Struct `ControlPlaneEndpointProfileControlPlaneEndpoint` has been removed +- Struct `KubernetesVersionCapabilities` has been removed +- Struct `ProvisionedClusterPropertiesStatusOperationStatus` has been removed +- Struct `ProvisionedClusterPropertiesStatusOperationStatusError` has been removed +- Struct `ProvisionedClusters` has been removed +- Struct `ProvisionedClustersListResult` has been removed +- Struct `VirtualNetworkPropertiesInfraVnetProfileVmware` has been removed +- Field `Location` of struct `AgentPool` has been removed +- Field `AvailabilityZones`, `NodeImageVersion` of struct `AgentPoolProperties` has been removed +- Field `OperationStatus` of struct `AgentPoolProvisioningStatusStatus` has been removed +- Field `AvailabilityZones`, `LinuxProfile`, `Name`, `NodeImageVersion`, `OSSKU`, `OSType` of struct `ControlPlaneProfile` has been removed +- Field `Capabilities` of struct `KubernetesVersionProperties` has been removed +- Field `AvailabilityZones`, `NodeImageVersion` of struct `NamedAgentPoolProfile` has been removed +- Field `ProvisionedClusters` of struct `ProvisionedClusterInstancesClientCreateOrUpdateResponse` has been removed +- Field `ProvisionedClusters` of struct `ProvisionedClusterInstancesClientGetResponse` has been removed +- Field `ProvisionedClustersListResult` of struct `ProvisionedClusterInstancesClientListResponse` has been removed +- Field `Name` of struct `ProvisionedClusterPoolUpgradeProfile` has been removed +- Field `OperationStatus` of struct `ProvisionedClusterPropertiesStatus` has been removed +- Field `AgentPoolProfiles` of struct `ProvisionedClusterUpgradeProfileProperties` has been removed +- Field `DhcpServers` of struct `VirtualNetworkProperties` has been removed +- Field `Vmware` of struct `VirtualNetworkPropertiesInfraVnetProfile` has been removed +- Field `Phase` of struct `VirtualNetworkPropertiesStatusOperationStatus` has been removed + +### Features Added + +- New value `ProvisioningStateCreating`, `ProvisioningStatePending` added to enum type `ProvisioningState` +- New value `ResourceProvisioningStatePending` added to enum type `ResourceProvisioningState` +- New enum type `Expander` with values `ExpanderLeastWaste`, `ExpanderMostPods`, `ExpanderPriority`, `ExpanderRandom` +- New struct `ClusterVMAccessProfile` +- New struct `ControlPlaneProfileControlPlaneEndpoint` +- New struct `ProvisionedCluster` +- New struct `ProvisionedClusterListResult` +- New struct `ProvisionedClusterPropertiesAutoScalerProfile` +- New struct `StorageProfile` +- New struct `StorageProfileNfsCSIDriver` +- New struct `StorageProfileSmbCSIDriver` +- New field `EnableAutoScaling`, `KubernetesVersion`, `MaxCount`, `MaxPods`, `MinCount`, `NodeLabels`, `NodeTaints` in struct `AgentPoolProperties` +- New field `CurrentState` in struct `AgentPoolProvisioningStatusStatus` +- New field `KubernetesVersion` in struct `AgentPoolUpdateProfile` +- New field `EnableAutoScaling`, `KubernetesVersion`, `MaxCount`, `MaxPods`, `MinCount`, `NodeLabels`, `NodeTaints` in struct `NamedAgentPoolProfile` +- New anonymous field `ProvisionedCluster` in struct `ProvisionedClusterInstancesClientCreateOrUpdateResponse` +- New anonymous field `ProvisionedCluster` in struct `ProvisionedClusterInstancesClientGetResponse` +- New anonymous field `ProvisionedClusterListResult` in struct `ProvisionedClusterInstancesClientListResponse` +- New field `AutoScalerProfile`, `ClusterVMAccessProfile`, `StorageProfile` in struct `ProvisionedClusterProperties` +- New field `CurrentState` in struct `ProvisionedClusterPropertiesStatus` + + ## 0.3.0 (2023-11-24) ### Breaking Changes diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/README.md b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/README.md index e0de41aeab8f..8970a2c02749 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/README.md +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/README.md @@ -57,7 +57,7 @@ clientFactory, err := armhybridcontainerservice.NewClientFactory( 0 + }, + Fetcher: func(ctx context.Context, page *AgentPoolClientListByProvisionedClusterResponse) (AgentPoolClientListByProvisionedClusterResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "AgentPoolClient.NewListByProvisionedClusterPager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + resp, err := runtime.FetcherForNextLink(ctx, client.internal.Pipeline(), nextLink, func(ctx context.Context) (*policy.Request, error) { + return client.listByProvisionedClusterCreateRequest(ctx, connectedClusterResourceURI, options) + }, nil) + if err != nil { + return AgentPoolClientListByProvisionedClusterResponse{}, err + } + return client.listByProvisionedClusterHandleResponse(resp) + }, + Tracer: client.internal.Tracer(), + }) } // listByProvisionedClusterCreateRequest creates the ListByProvisionedCluster request. @@ -277,7 +278,7 @@ func (client *AgentPoolClient) listByProvisionedClusterCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -291,75 +292,3 @@ func (client *AgentPoolClient) listByProvisionedClusterHandleResponse(resp *http } return result, nil } - -// BeginUpdate - Updates the agent pool in the Hybrid AKS provisioned cluster instance -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. -// - agentPoolName - Parameter for the name of the agent pool in the provisioned cluster -// - options - AgentPoolClientBeginUpdateOptions contains the optional parameters for the AgentPoolClient.BeginUpdate method. -func (client *AgentPoolClient) BeginUpdate(ctx context.Context, connectedClusterResourceURI string, agentPoolName string, agentPool AgentPoolPatch, options *AgentPoolClientBeginUpdateOptions) (*runtime.Poller[AgentPoolClientUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.update(ctx, connectedClusterResourceURI, agentPoolName, agentPool, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AgentPoolClientUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaAzureAsyncOp, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AgentPoolClientUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Update - Updates the agent pool in the Hybrid AKS provisioned cluster instance -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-15-preview -func (client *AgentPoolClient) update(ctx context.Context, connectedClusterResourceURI string, agentPoolName string, agentPool AgentPoolPatch, options *AgentPoolClientBeginUpdateOptions) (*http.Response, error) { - var err error - const operationName = "AgentPoolClient.BeginUpdate" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.updateCreateRequest(ctx, connectedClusterResourceURI, agentPoolName, agentPool, options) - if err != nil { - return nil, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return nil, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusAccepted) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// updateCreateRequest creates the Update request. -func (client *AgentPoolClient) updateCreateRequest(ctx context.Context, connectedClusterResourceURI string, agentPoolName string, agentPool AgentPoolPatch, options *AgentPoolClientBeginUpdateOptions) (*policy.Request, error) { - urlPath := "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/{agentPoolName}" - urlPath = strings.ReplaceAll(urlPath, "{connectedClusterResourceUri}", connectedClusterResourceURI) - if agentPoolName == "" { - return nil, errors.New("parameter agentPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) - req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, agentPool); err != nil { - return nil, err - } - return req, nil -} diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/agentpool_client_example_test.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/agentpool_client_example_test.go index 4203918681f0..fe30de6f9ff2 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/agentpool_client_example_test.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/agentpool_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/GetAgentPool.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/GetAgentPool.json func ExampleAgentPoolClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -29,7 +29,7 @@ func ExampleAgentPoolClient_Get() { if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := clientFactory.NewAgentPoolClient().Get(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", "test-hybridaksnodepool", nil) + res, err := clientFactory.NewAgentPoolClient().Get(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", "testnodepool", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -37,10 +37,9 @@ func ExampleAgentPoolClient_Get() { _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AgentPool = armhybridcontainerservice.AgentPool{ - // Name: to.Ptr("test-hybridaksnodepool"), + // Name: to.Ptr("testnodepool"), // Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/agentpools"), - // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/test-hybridaksnodepool"), - // Location: to.Ptr("westus"), + // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/testnodepool"), // Properties: &armhybridcontainerservice.AgentPoolProperties{ // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), // ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded), @@ -50,7 +49,7 @@ func ExampleAgentPoolClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/PutAgentPool.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/PutAgentPool.json func ExampleAgentPoolClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -61,9 +60,15 @@ func ExampleAgentPoolClient_BeginCreateOrUpdate() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewAgentPoolClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", "test-hybridaksnodepool", armhybridcontainerservice.AgentPool{ - Location: to.Ptr("westus"), + poller, err := clientFactory.NewAgentPoolClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", "testnodepool", armhybridcontainerservice.AgentPool{ Properties: &armhybridcontainerservice.AgentPoolProperties{ + NodeLabels: map[string]*string{ + "env": to.Ptr("dev"), + "goal": to.Ptr("test"), + }, + NodeTaints: []*string{ + to.Ptr("env=prod:NoSchedule"), + to.Ptr("sku=gpu:NoSchedule")}, OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), Count: to.Ptr[int32](1), VMSize: to.Ptr("Standard_A4_v2"), @@ -80,20 +85,26 @@ func ExampleAgentPoolClient_BeginCreateOrUpdate() { _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.AgentPool = armhybridcontainerservice.AgentPool{ - // Name: to.Ptr("test-hybridaksnodepool"), + // Name: to.Ptr("testnodepool"), // Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/agentpools"), - // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/test-hybridaksnodepool"), - // Location: to.Ptr("westus"), + // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/testnodepool"), // Properties: &armhybridcontainerservice.AgentPoolProperties{ - // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), - // ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded), - // Count: to.Ptr[int32](1), - // VMSize: to.Ptr("Standard_A4_v2"), - // }, - // } + // NodeLabels: map[string]*string{ + // "env": to.Ptr("dev"), + // "goal": to.Ptr("test"), + // }, + // NodeTaints: []*string{ + // to.Ptr("env=prod:NoSchedule"), + // to.Ptr("sku=gpu:NoSchedule")}, + // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), + // ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded), + // Count: to.Ptr[int32](1), + // VMSize: to.Ptr("Standard_A4_v2"), + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/DeleteAgentPool.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/DeleteAgentPool.json func ExampleAgentPoolClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -104,7 +115,7 @@ func ExampleAgentPoolClient_BeginDelete() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewAgentPoolClient().BeginDelete(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", "test-hybridaksnodepool", nil) + poller, err := clientFactory.NewAgentPoolClient().BeginDelete(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", "testnodepool", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -114,51 +125,8 @@ func ExampleAgentPoolClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/UpdateAgentPool.json -func ExampleAgentPoolClient_BeginUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armhybridcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAgentPoolClient().BeginUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", "test-hybridaksnodepool", armhybridcontainerservice.AgentPoolPatch{ - Tags: map[string]*string{ - "additionalProperties": to.Ptr("sample"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - res, err := poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AgentPool = armhybridcontainerservice.AgentPool{ - // Name: to.Ptr("test-hybridaksnodepool"), - // Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/agentpools"), - // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/test-hybridaksnodepool"), - // Location: to.Ptr("westus"), - // Properties: &armhybridcontainerservice.AgentPoolProperties{ - // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), - // ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded), - // Count: to.Ptr[int32](3), - // VMSize: to.Ptr("Standard_A4_v2"), - // }, - // Tags: map[string]*string{ - // "additionalProperties": to.Ptr("sample"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/ListAgentPoolByProvisionedClusterInstance.json -func ExampleAgentPoolClient_ListByProvisionedCluster() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListAgentPoolByProvisionedClusterInstance.json +func ExampleAgentPoolClient_NewListByProvisionedClusterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -168,26 +136,30 @@ func ExampleAgentPoolClient_ListByProvisionedCluster() { if err != nil { log.Fatalf("failed to create client: %v", err) } - res, err := clientFactory.NewAgentPoolClient().ListByProvisionedCluster(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) + pager := clientFactory.NewAgentPoolClient().NewListByProvisionedClusterPager("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.AgentPoolListResult = armhybridcontainerservice.AgentPoolListResult{ + // Value: []*armhybridcontainerservice.AgentPool{ + // { + // Name: to.Ptr("testnodepool"), + // Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/agentpools"), + // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/testnodepool"), + // Properties: &armhybridcontainerservice.AgentPoolProperties{ + // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), + // ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded), + // Count: to.Ptr[int32](1), + // VMSize: to.Ptr("Standard_A4_v2"), + // }, + // }}, + // } } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AgentPoolListResult = armhybridcontainerservice.AgentPoolListResult{ - // Value: []*armhybridcontainerservice.AgentPool{ - // { - // Name: to.Ptr("test-hybridaksnodepool"), - // Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/agentpools"), - // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/agentPools/test-hybridaksnodepool"), - // Location: to.Ptr("westus"), - // Properties: &armhybridcontainerservice.AgentPoolProperties{ - // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), - // ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded), - // Count: to.Ptr[int32](1), - // VMSize: to.Ptr("Standard_A4_v2"), - // }, - // }}, - // } } diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/autorest.md b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/autorest.md index a8ccb1a579ea..74ff67e93247 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/autorest.md +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 0.3.0 -tag: package-preview-2023-11 +module-version: 1.0.0 +tag: package-2024-01 ``` \ No newline at end of file diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/client.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/client.go index 3402e233ffed..d8fd8ad51272 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/client.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/client.go @@ -38,11 +38,11 @@ func NewClient(credential azcore.TokenCredential, options *arm.ClientOptions) (* return client, nil } -// BeginDeleteKubernetesVersions - Delete the kubernetes versions resource type +// BeginDeleteKubernetesVersions - Delete the default kubernetes versions resource type // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - customLocationResourceURI - The fully qualified Azure Resource manager identifier of the custom location resource. +// Generated from API version 2024-01-01 +// - customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource. // - options - ClientBeginDeleteKubernetesVersionsOptions contains the optional parameters for the Client.BeginDeleteKubernetesVersions // method. func (client *Client) BeginDeleteKubernetesVersions(ctx context.Context, customLocationResourceURI string, options *ClientBeginDeleteKubernetesVersionsOptions) (*runtime.Poller[ClientDeleteKubernetesVersionsResponse], error) { @@ -63,10 +63,10 @@ func (client *Client) BeginDeleteKubernetesVersions(ctx context.Context, customL } } -// DeleteKubernetesVersions - Delete the kubernetes versions resource type +// DeleteKubernetesVersions - Delete the default kubernetes versions resource type // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 func (client *Client) deleteKubernetesVersions(ctx context.Context, customLocationResourceURI string, options *ClientBeginDeleteKubernetesVersionsOptions) (*http.Response, error) { var err error const operationName = "Client.BeginDeleteKubernetesVersions" @@ -97,17 +97,17 @@ func (client *Client) deleteKubernetesVersionsCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDeleteVMSKUs - Deletes the Vm Sku resource type +// BeginDeleteVMSKUs - Deletes the default VM skus resource type // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - customLocationResourceURI - The fully qualified Azure Resource manager identifier of the custom location resource. +// Generated from API version 2024-01-01 +// - customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource. // - options - ClientBeginDeleteVMSKUsOptions contains the optional parameters for the Client.BeginDeleteVMSKUs method. func (client *Client) BeginDeleteVMSKUs(ctx context.Context, customLocationResourceURI string, options *ClientBeginDeleteVMSKUsOptions) (*runtime.Poller[ClientDeleteVMSKUsResponse], error) { if options == nil || options.ResumeToken == "" { @@ -127,10 +127,10 @@ func (client *Client) BeginDeleteVMSKUs(ctx context.Context, customLocationResou } } -// DeleteVMSKUs - Deletes the Vm Sku resource type +// DeleteVMSKUs - Deletes the default VM skus resource type // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 func (client *Client) deleteVMSKUs(ctx context.Context, customLocationResourceURI string, options *ClientBeginDeleteVMSKUsOptions) (*http.Response, error) { var err error const operationName = "Client.BeginDeleteVMSKUs" @@ -161,17 +161,17 @@ func (client *Client) deleteVMSKUsCreateRequest(ctx context.Context, customLocat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// GetKubernetesVersions - Gets the supported kubernetes versions from the underlying custom location +// GetKubernetesVersions - Lists the supported kubernetes versions for the specified custom location // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - customLocationResourceURI - The fully qualified Azure Resource manager identifier of the custom location resource. +// Generated from API version 2024-01-01 +// - customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource. // - options - ClientGetKubernetesVersionsOptions contains the optional parameters for the Client.GetKubernetesVersions method. func (client *Client) GetKubernetesVersions(ctx context.Context, customLocationResourceURI string, options *ClientGetKubernetesVersionsOptions) (ClientGetKubernetesVersionsResponse, error) { var err error @@ -204,7 +204,7 @@ func (client *Client) getKubernetesVersionsCreateRequest(ctx context.Context, cu return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -219,11 +219,11 @@ func (client *Client) getKubernetesVersionsHandleResponse(resp *http.Response) ( return result, nil } -// GetVMSKUs - Gets the supported VM skus from the underlying custom location +// GetVMSKUs - Lists the supported VM skus for the specified custom location // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - customLocationResourceURI - The fully qualified Azure Resource manager identifier of the custom location resource. +// Generated from API version 2024-01-01 +// - customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource. // - options - ClientGetVMSKUsOptions contains the optional parameters for the Client.GetVMSKUs method. func (client *Client) GetVMSKUs(ctx context.Context, customLocationResourceURI string, options *ClientGetVMSKUsOptions) (ClientGetVMSKUsResponse, error) { var err error @@ -256,7 +256,7 @@ func (client *Client) getVMSKUsCreateRequest(ctx context.Context, customLocation return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -271,11 +271,12 @@ func (client *Client) getVMSKUsHandleResponse(resp *http.Response) (ClientGetVMS return result, nil } -// BeginPutKubernetesVersions - Puts the kubernetes version resource type +// BeginPutKubernetesVersions - Puts the default kubernetes version resource type (one time operation, before listing the +// kubernetes versions) // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - customLocationResourceURI - The fully qualified Azure Resource manager identifier of the custom location resource. +// Generated from API version 2024-01-01 +// - customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource. // - kubernetesVersions - Kubernetes Versions resource definition // - options - ClientBeginPutKubernetesVersionsOptions contains the optional parameters for the Client.BeginPutKubernetesVersions // method. @@ -297,10 +298,11 @@ func (client *Client) BeginPutKubernetesVersions(ctx context.Context, customLoca } } -// PutKubernetesVersions - Puts the kubernetes version resource type +// PutKubernetesVersions - Puts the default kubernetes version resource type (one time operation, before listing the kubernetes +// versions) // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 func (client *Client) putKubernetesVersions(ctx context.Context, customLocationResourceURI string, kubernetesVersions KubernetesVersionProfile, options *ClientBeginPutKubernetesVersionsOptions) (*http.Response, error) { var err error const operationName = "Client.BeginPutKubernetesVersions" @@ -331,7 +333,7 @@ func (client *Client) putKubernetesVersionsCreateRequest(ctx context.Context, cu return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, kubernetesVersions); err != nil { @@ -340,11 +342,11 @@ func (client *Client) putKubernetesVersionsCreateRequest(ctx context.Context, cu return req, nil } -// BeginPutVMSKUs - Puts the VM SKUs resource type +// BeginPutVMSKUs - Puts the default VM skus resource type (one time operation, before listing the VM skus) // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - customLocationResourceURI - The fully qualified Azure Resource manager identifier of the custom location resource. +// Generated from API version 2024-01-01 +// - customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource. // - skus - VM SKUs resource definition // - options - ClientBeginPutVMSKUsOptions contains the optional parameters for the Client.BeginPutVMSKUs method. func (client *Client) BeginPutVMSKUs(ctx context.Context, customLocationResourceURI string, skus VMSKUProfile, options *ClientBeginPutVMSKUsOptions) (*runtime.Poller[ClientPutVMSKUsResponse], error) { @@ -365,10 +367,10 @@ func (client *Client) BeginPutVMSKUs(ctx context.Context, customLocationResource } } -// PutVMSKUs - Puts the VM SKUs resource type +// PutVMSKUs - Puts the default VM skus resource type (one time operation, before listing the VM skus) // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 func (client *Client) putVMSKUs(ctx context.Context, customLocationResourceURI string, skus VMSKUProfile, options *ClientBeginPutVMSKUsOptions) (*http.Response, error) { var err error const operationName = "Client.BeginPutVMSKUs" @@ -399,7 +401,7 @@ func (client *Client) putVMSKUsCreateRequest(ctx context.Context, customLocation return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, skus); err != nil { diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/client_example_test.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/client_example_test.go index 2c0995d78fc6..6e895501d9d9 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/client_example_test.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/GetKubernetesVersions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/GetKubernetesVersions.json func ExampleClient_GetKubernetesVersions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -48,13 +48,30 @@ func ExampleClient_GetKubernetesVersions() { // ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded), // Values: []*armhybridcontainerservice.KubernetesVersionProperties{ // { - // Capabilities: &armhybridcontainerservice.KubernetesVersionCapabilities{ - // SupportPlan: []*string{ - // to.Ptr("KubernetesOfficial")}, - // }, - // IsPreview: to.Ptr(false), - // PatchVersions: map[string]*armhybridcontainerservice.KubernetesPatchVersions{ - // "1.23.12": &armhybridcontainerservice.KubernetesPatchVersions{ + // IsPreview: to.Ptr(false), + // PatchVersions: map[string]*armhybridcontainerservice.KubernetesPatchVersions{ + // "1.23.12": &armhybridcontainerservice.KubernetesPatchVersions{ + // Readiness: []*armhybridcontainerservice.KubernetesVersionReadiness{ + // { + // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUCBLMariner), + // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), + // Ready: to.Ptr(true), + // }, + // { + // OSSKU: to.Ptr(armhybridcontainerservice.OSSKU("Windows")), + // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), + // Ready: to.Ptr(true), + // }, + // { + // ErrorMessage: to.Ptr("Not Ready. Reasons: Failed to find proudct stream windoes2022 in release aks-hybrid-catalog-stable-int"), + // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2022), + // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), + // Ready: to.Ptr(false), + // }}, + // Upgrades: []*string{ + // to.Ptr("1.23.13")}, + // }, + // "1.23.13": &armhybridcontainerservice.KubernetesPatchVersions{ // Readiness: []*armhybridcontainerservice.KubernetesVersionReadiness{ // { // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUCBLMariner), @@ -62,47 +79,26 @@ func ExampleClient_GetKubernetesVersions() { // Ready: to.Ptr(true), // }, // { - // OSSKU: to.Ptr(armhybridcontainerservice.OSSKU("Windows")), + // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2019), // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), // Ready: to.Ptr(true), // }, // { - // ErrorMessage: to.Ptr("Not Ready. Reasons: Failed to find proudct stream windoes2022 in release aks-hybrid-catalog-stable-int"), // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2022), // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), - // Ready: to.Ptr(false), + // Ready: to.Ptr(true), // }}, // Upgrades: []*string{ - // to.Ptr("1.23.13")}, - // }, - // "1.23.13": &armhybridcontainerservice.KubernetesPatchVersions{ - // Readiness: []*armhybridcontainerservice.KubernetesVersionReadiness{ - // { - // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUCBLMariner), - // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), - // Ready: to.Ptr(true), - // }, - // { - // OSSKU: to.Ptr(armhybridcontainerservice.OSSKU("Windows")), - // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), - // Ready: to.Ptr(true), - // }, - // { - // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2022), - // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), - // Ready: to.Ptr(true), - // }}, - // Upgrades: []*string{ - // }, // }, // }, - // Version: to.Ptr("1.23"), - // }}, - // }, - // } + // }, + // Version: to.Ptr("1.23"), + // }}, + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/PutKubernetesVersions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/PutKubernetesVersions.json func ExampleClient_BeginPutKubernetesVersions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -139,7 +135,7 @@ func ExampleClient_BeginPutKubernetesVersions() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/DeleteKubernetesVersions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/DeleteKubernetesVersions.json func ExampleClient_BeginDeleteKubernetesVersions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -160,7 +156,7 @@ func ExampleClient_BeginDeleteKubernetesVersions() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/GetVmSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/GetVmSkus.json func ExampleClient_GetVMSKUs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -228,7 +224,7 @@ func ExampleClient_GetVMSKUs() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/PutVmSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/PutVmSkus.json func ExampleClient_BeginPutVMSKUs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -265,7 +261,7 @@ func ExampleClient_BeginPutVMSKUs() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/DeleteVmSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/DeleteVmSkus.json func ExampleClient_BeginDeleteVMSKUs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/constants.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/constants.go index fe4cb9a02565..6ea5fdf4763f 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/constants.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/constants.go @@ -10,7 +10,7 @@ package armhybridcontainerservice const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice" - moduleVersion = "v0.3.0" + moduleVersion = "v1.0.0" ) // ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. @@ -27,9 +27,9 @@ func PossibleActionTypeValues() []ActionType { } } -// AddonPhase - Observed phase of the addon on the target cluster. Possible values include: 'pending', 'provisioning', 'provisioning -// {HelmChartInstalled}', 'provisioning {MSICertificateDownloaded}', 'provisioned', -// 'deleting', 'failed', 'upgrading' +// AddonPhase - Observed phase of the addon or component on the provisioned cluster. Possible values include: 'pending', 'provisioning', +// 'provisioning {HelmChartInstalled}', 'provisioning {MSICertificateDownloaded}', +// 'provisioned', 'deleting', 'failed', 'upgrading' type AddonPhase string const ( @@ -57,7 +57,7 @@ func PossibleAddonPhaseValues() []AddonPhase { } } -// AzureHybridBenefit - Indicates whether Azure Hybrid Benefit is opted in +// AzureHybridBenefit - Indicates whether Azure Hybrid Benefit is opted in. Default value is false type AzureHybridBenefit string const ( @@ -95,7 +95,37 @@ func PossibleCreatedByTypeValues() []CreatedByType { } } -// ExtendedLocationTypes - The extended location type. +// Expander - If not specified, the default is 'random'. See expanders [https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders] +// for more information. +type Expander string + +const ( + // ExpanderLeastWaste - Selects the node group that will have the least idle CPU (if tied, unused memory) after scale-up. + // This is useful when you have different classes of nodes, for example, high CPU or high memory nodes, and only want to expand + // those when there are pending pods that need a lot of those resources. + ExpanderLeastWaste Expander = "least-waste" + // ExpanderMostPods - Selects the node group that would be able to schedule the most pods when scaling up. This is useful + // when you are using nodeSelector to make sure certain pods land on certain nodes. Note that this won't cause the autoscaler + // to select bigger nodes vs. smaller, as it can add multiple smaller nodes at once. + ExpanderMostPods Expander = "most-pods" + // ExpanderPriority - Selects the node group that has the highest priority assigned by the user. It's configuration is described + // in more details [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md). + ExpanderPriority Expander = "priority" + // ExpanderRandom - Used when you don't have a particular need for the node groups to scale differently. + ExpanderRandom Expander = "random" +) + +// PossibleExpanderValues returns the possible values for the Expander const type. +func PossibleExpanderValues() []Expander { + return []Expander{ + ExpanderLeastWaste, + ExpanderMostPods, + ExpanderPriority, + ExpanderRandom, + } +} + +// ExtendedLocationTypes - The extended location type. Allowed value: 'CustomLocation' type ExtendedLocationTypes string const ( @@ -109,20 +139,17 @@ func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes { } } -// NetworkPolicy - NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'calico', -// 'flannel'. Default is 'calico' +// NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'calico'. type NetworkPolicy string const ( - NetworkPolicyCalico NetworkPolicy = "calico" - NetworkPolicyFlannel NetworkPolicy = "flannel" + NetworkPolicyCalico NetworkPolicy = "calico" ) // PossibleNetworkPolicyValues returns the possible values for the NetworkPolicy const type. func PossibleNetworkPolicyValues() []NetworkPolicy { return []NetworkPolicy{ NetworkPolicyCalico, - NetworkPolicyFlannel, } } @@ -167,7 +194,7 @@ func PossibleOriginValues() []Origin { } } -// OsType - The particular KubernetesVersion's Image's OS Type (Linux, Windows) +// OsType - The particular KubernetesVersion Image OS Type (Linux, Windows) type OsType string const ( @@ -186,14 +213,14 @@ func PossibleOsTypeValues() []OsType { type ProvisioningState string const ( - ProvisioningStateAccepted ProvisioningState = "Accepted" - ProvisioningStateCanceled ProvisioningState = "Canceled" - ProvisioningStateCreated ProvisioningState = "Created" - ProvisioningStateDeleting ProvisioningState = "Deleting" - ProvisioningStateFailed ProvisioningState = "Failed" - ProvisioningStateInProgress ProvisioningState = "InProgress" - ProvisioningStateSucceeded ProvisioningState = "Succeeded" - ProvisioningStateUpdating ProvisioningState = "Updating" + ProvisioningStateAccepted ProvisioningState = "Accepted" + ProvisioningStateCanceled ProvisioningState = "Canceled" + ProvisioningStateCreating ProvisioningState = "Creating" + ProvisioningStateDeleting ProvisioningState = "Deleting" + ProvisioningStateFailed ProvisioningState = "Failed" + ProvisioningStatePending ProvisioningState = "Pending" + ProvisioningStateSucceeded ProvisioningState = "Succeeded" + ProvisioningStateUpdating ProvisioningState = "Updating" ) // PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type. @@ -201,10 +228,10 @@ func PossibleProvisioningStateValues() []ProvisioningState { return []ProvisioningState{ ProvisioningStateAccepted, ProvisioningStateCanceled, - ProvisioningStateCreated, + ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateFailed, - ProvisioningStateInProgress, + ProvisioningStatePending, ProvisioningStateSucceeded, ProvisioningStateUpdating, } @@ -214,16 +241,15 @@ func PossibleProvisioningStateValues() []ProvisioningState { type ResourceProvisioningState string const ( - ResourceProvisioningStateAccepted ResourceProvisioningState = "Accepted" - ResourceProvisioningStateCanceled ResourceProvisioningState = "Canceled" - ResourceProvisioningStateCreated ResourceProvisioningState = "Created" - ResourceProvisioningStateCreating ResourceProvisioningState = "Creating" - ResourceProvisioningStateDeleting ResourceProvisioningState = "Deleting" - ResourceProvisioningStateFailed ResourceProvisioningState = "Failed" - ResourceProvisioningStateInProgress ResourceProvisioningState = "InProgress" - ResourceProvisioningStateSucceeded ResourceProvisioningState = "Succeeded" - ResourceProvisioningStateUpdating ResourceProvisioningState = "Updating" - ResourceProvisioningStateUpgrading ResourceProvisioningState = "Upgrading" + ResourceProvisioningStateAccepted ResourceProvisioningState = "Accepted" + ResourceProvisioningStateCanceled ResourceProvisioningState = "Canceled" + ResourceProvisioningStateCreating ResourceProvisioningState = "Creating" + ResourceProvisioningStateDeleting ResourceProvisioningState = "Deleting" + ResourceProvisioningStateFailed ResourceProvisioningState = "Failed" + ResourceProvisioningStatePending ResourceProvisioningState = "Pending" + ResourceProvisioningStateSucceeded ResourceProvisioningState = "Succeeded" + ResourceProvisioningStateUpdating ResourceProvisioningState = "Updating" + ResourceProvisioningStateUpgrading ResourceProvisioningState = "Upgrading" ) // PossibleResourceProvisioningStateValues returns the possible values for the ResourceProvisioningState const type. @@ -231,11 +257,10 @@ func PossibleResourceProvisioningStateValues() []ResourceProvisioningState { return []ResourceProvisioningState{ ResourceProvisioningStateAccepted, ResourceProvisioningStateCanceled, - ResourceProvisioningStateCreated, ResourceProvisioningStateCreating, ResourceProvisioningStateDeleting, ResourceProvisioningStateFailed, - ResourceProvisioningStateInProgress, + ResourceProvisioningStatePending, ResourceProvisioningStateSucceeded, ResourceProvisioningStateUpdating, ResourceProvisioningStateUpgrading, diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/fake/agentpool_server.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/fake/agentpool_server.go index 5b098d5c3db7..32b2b18174a0 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/fake/agentpool_server.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/fake/agentpool_server.go @@ -15,6 +15,7 @@ import ( azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" "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/hybridcontainerservice/armhybridcontainerservice" "net/http" "net/url" @@ -35,13 +36,9 @@ type AgentPoolServer struct { // HTTP status codes to indicate success: http.StatusOK Get func(ctx context.Context, connectedClusterResourceURI string, agentPoolName string, options *armhybridcontainerservice.AgentPoolClientGetOptions) (resp azfake.Responder[armhybridcontainerservice.AgentPoolClientGetResponse], errResp azfake.ErrorResponder) - // ListByProvisionedCluster is the fake for method AgentPoolClient.ListByProvisionedCluster + // NewListByProvisionedClusterPager is the fake for method AgentPoolClient.NewListByProvisionedClusterPager // HTTP status codes to indicate success: http.StatusOK - ListByProvisionedCluster func(ctx context.Context, connectedClusterResourceURI string, options *armhybridcontainerservice.AgentPoolClientListByProvisionedClusterOptions) (resp azfake.Responder[armhybridcontainerservice.AgentPoolClientListByProvisionedClusterResponse], errResp azfake.ErrorResponder) - - // BeginUpdate is the fake for method AgentPoolClient.BeginUpdate - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted - BeginUpdate func(ctx context.Context, connectedClusterResourceURI string, agentPoolName string, agentPool armhybridcontainerservice.AgentPoolPatch, options *armhybridcontainerservice.AgentPoolClientBeginUpdateOptions) (resp azfake.PollerResponder[armhybridcontainerservice.AgentPoolClientUpdateResponse], errResp azfake.ErrorResponder) + NewListByProvisionedClusterPager func(connectedClusterResourceURI string, options *armhybridcontainerservice.AgentPoolClientListByProvisionedClusterOptions) (resp azfake.PagerResponder[armhybridcontainerservice.AgentPoolClientListByProvisionedClusterResponse]) } // NewAgentPoolServerTransport creates a new instance of AgentPoolServerTransport with the provided implementation. @@ -49,20 +46,20 @@ type AgentPoolServer struct { // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewAgentPoolServerTransport(srv *AgentPoolServer) *AgentPoolServerTransport { return &AgentPoolServerTransport{ - srv: srv, - beginCreateOrUpdate: newTracker[azfake.PollerResponder[armhybridcontainerservice.AgentPoolClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[armhybridcontainerservice.AgentPoolClientDeleteResponse]](), - beginUpdate: newTracker[azfake.PollerResponder[armhybridcontainerservice.AgentPoolClientUpdateResponse]](), + srv: srv, + beginCreateOrUpdate: newTracker[azfake.PollerResponder[armhybridcontainerservice.AgentPoolClientCreateOrUpdateResponse]](), + beginDelete: newTracker[azfake.PollerResponder[armhybridcontainerservice.AgentPoolClientDeleteResponse]](), + newListByProvisionedClusterPager: newTracker[azfake.PagerResponder[armhybridcontainerservice.AgentPoolClientListByProvisionedClusterResponse]](), } } // AgentPoolServerTransport connects instances of armhybridcontainerservice.AgentPoolClient to instances of AgentPoolServer. // Don't use this type directly, use NewAgentPoolServerTransport instead. type AgentPoolServerTransport struct { - srv *AgentPoolServer - beginCreateOrUpdate *tracker[azfake.PollerResponder[armhybridcontainerservice.AgentPoolClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[armhybridcontainerservice.AgentPoolClientDeleteResponse]] - beginUpdate *tracker[azfake.PollerResponder[armhybridcontainerservice.AgentPoolClientUpdateResponse]] + srv *AgentPoolServer + beginCreateOrUpdate *tracker[azfake.PollerResponder[armhybridcontainerservice.AgentPoolClientCreateOrUpdateResponse]] + beginDelete *tracker[azfake.PollerResponder[armhybridcontainerservice.AgentPoolClientDeleteResponse]] + newListByProvisionedClusterPager *tracker[azfake.PagerResponder[armhybridcontainerservice.AgentPoolClientListByProvisionedClusterResponse]] } // Do implements the policy.Transporter interface for AgentPoolServerTransport. @@ -83,10 +80,8 @@ func (a *AgentPoolServerTransport) Do(req *http.Request) (*http.Response, error) resp, err = a.dispatchBeginDelete(req) case "AgentPoolClient.Get": resp, err = a.dispatchGet(req) - case "AgentPoolClient.ListByProvisionedCluster": - resp, err = a.dispatchListByProvisionedCluster(req) - case "AgentPoolClient.BeginUpdate": - resp, err = a.dispatchBeginUpdate(req) + case "AgentPoolClient.NewListByProvisionedClusterPager": + resp, err = a.dispatchNewListByProvisionedClusterPager(req) default: err = fmt.Errorf("unhandled API %s", method) } @@ -223,79 +218,39 @@ func (a *AgentPoolServerTransport) dispatchGet(req *http.Request) (*http.Respons return resp, nil } -func (a *AgentPoolServerTransport) dispatchListByProvisionedCluster(req *http.Request) (*http.Response, error) { - if a.srv.ListByProvisionedCluster == nil { - return nil, &nonRetriableError{errors.New("fake for method ListByProvisionedCluster not implemented")} - } - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.HybridContainerService/provisionedClusterInstances/default/agentPools` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 1 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - connectedClusterResourceURIParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectedClusterResourceUri")]) - if err != nil { - return nil, err - } - respr, errRespr := a.srv.ListByProvisionedCluster(req.Context(), connectedClusterResourceURIParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - respContent := server.GetResponseContent(respr) - if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} +func (a *AgentPoolServerTransport) dispatchNewListByProvisionedClusterPager(req *http.Request) (*http.Response, error) { + if a.srv.NewListByProvisionedClusterPager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByProvisionedClusterPager not implemented")} } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).AgentPoolListResult, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (a *AgentPoolServerTransport) dispatchBeginUpdate(req *http.Request) (*http.Response, error) { - if a.srv.BeginUpdate == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginUpdate not implemented")} - } - beginUpdate := a.beginUpdate.get(req) - if beginUpdate == nil { - const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.HybridContainerService/provisionedClusterInstances/default/agentPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` + newListByProvisionedClusterPager := a.newListByProvisionedClusterPager.get(req) + if newListByProvisionedClusterPager == nil { + const regexStr = `/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.HybridContainerService/provisionedClusterInstances/default/agentPools` regex := regexp.MustCompile(regexStr) matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 2 { + if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - body, err := server.UnmarshalRequestAsJSON[armhybridcontainerservice.AgentPoolPatch](req) - if err != nil { - return nil, err - } connectedClusterResourceURIParam, err := url.PathUnescape(matches[regex.SubexpIndex("connectedClusterResourceUri")]) if err != nil { return nil, err } - agentPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("agentPoolName")]) - if err != nil { - return nil, err - } - respr, errRespr := a.srv.BeginUpdate(req.Context(), connectedClusterResourceURIParam, agentPoolNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginUpdate = &respr - a.beginUpdate.add(req, beginUpdate) - } - - resp, err := server.PollerResponderNext(beginUpdate, req) + resp := a.srv.NewListByProvisionedClusterPager(connectedClusterResourceURIParam, nil) + newListByProvisionedClusterPager = &resp + a.newListByProvisionedClusterPager.add(req, newListByProvisionedClusterPager) + server.PagerResponderInjectNextLinks(newListByProvisionedClusterPager, req, func(page *armhybridcontainerservice.AgentPoolClientListByProvisionedClusterResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByProvisionedClusterPager, req) if err != nil { return nil, err } - - if !contains([]int{http.StatusOK, http.StatusAccepted}, resp.StatusCode) { - a.beginUpdate.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted", resp.StatusCode)} + if !contains([]int{http.StatusOK}, resp.StatusCode) { + a.newListByProvisionedClusterPager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} } - if !server.PollerResponderMore(beginUpdate) { - a.beginUpdate.remove(req) + if !server.PagerResponderMore(newListByProvisionedClusterPager) { + a.newListByProvisionedClusterPager.remove(req) } - return resp, nil } diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/fake/provisionedclusterinstances_server.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/fake/provisionedclusterinstances_server.go index fcecc79e6805..9fe4b53be085 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/fake/provisionedclusterinstances_server.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/fake/provisionedclusterinstances_server.go @@ -26,7 +26,7 @@ import ( type ProvisionedClusterInstancesServer struct { // BeginCreateOrUpdate is the fake for method ProvisionedClusterInstancesClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated - BeginCreateOrUpdate func(ctx context.Context, connectedClusterResourceURI string, provisionedClusterInstance armhybridcontainerservice.ProvisionedClusters, options *armhybridcontainerservice.ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armhybridcontainerservice.ProvisionedClusterInstancesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) + BeginCreateOrUpdate func(ctx context.Context, connectedClusterResourceURI string, provisionedClusterInstance armhybridcontainerservice.ProvisionedCluster, options *armhybridcontainerservice.ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armhybridcontainerservice.ProvisionedClusterInstancesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) // BeginDelete is the fake for method ProvisionedClusterInstancesClient.BeginDelete // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent @@ -127,7 +127,7 @@ func (p *ProvisionedClusterInstancesServerTransport) dispatchBeginCreateOrUpdate if matches == nil || len(matches) < 1 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - body, err := server.UnmarshalRequestAsJSON[armhybridcontainerservice.ProvisionedClusters](req) + body, err := server.UnmarshalRequestAsJSON[armhybridcontainerservice.ProvisionedCluster](req) if err != nil { return nil, err } @@ -221,7 +221,7 @@ func (p *ProvisionedClusterInstancesServerTransport) dispatchGet(req *http.Reque if !contains([]int{http.StatusOK}, respContent.HTTPStatus) { return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", respContent.HTTPStatus)} } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ProvisionedClusters, req) + resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ProvisionedCluster, req) if err != nil { return nil, err } diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/hybrididentitymetadata_client.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/hybrididentitymetadata_client.go index 5dfa73e63322..8650c5c9c02b 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/hybrididentitymetadata_client.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/hybrididentitymetadata_client.go @@ -41,8 +41,8 @@ func NewHybridIdentityMetadataClient(credential azcore.TokenCredential, options // BeginDelete - Deletes the hybrid identity metadata proxy resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. +// Generated from API version 2024-01-01 +// - connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource. // - options - HybridIdentityMetadataClientBeginDeleteOptions contains the optional parameters for the HybridIdentityMetadataClient.BeginDelete // method. func (client *HybridIdentityMetadataClient) BeginDelete(ctx context.Context, connectedClusterResourceURI string, options *HybridIdentityMetadataClientBeginDeleteOptions) (*runtime.Poller[HybridIdentityMetadataClientDeleteResponse], error) { @@ -66,7 +66,7 @@ func (client *HybridIdentityMetadataClient) BeginDelete(ctx context.Context, con // Delete - Deletes the hybrid identity metadata proxy resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 func (client *HybridIdentityMetadataClient) deleteOperation(ctx context.Context, connectedClusterResourceURI string, options *HybridIdentityMetadataClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "HybridIdentityMetadataClient.BeginDelete" @@ -97,7 +97,7 @@ func (client *HybridIdentityMetadataClient) deleteCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -106,8 +106,8 @@ func (client *HybridIdentityMetadataClient) deleteCreateRequest(ctx context.Cont // Get - Get the hybrid identity metadata proxy resource. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. +// Generated from API version 2024-01-01 +// - connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource. // - options - HybridIdentityMetadataClientGetOptions contains the optional parameters for the HybridIdentityMetadataClient.Get // method. func (client *HybridIdentityMetadataClient) Get(ctx context.Context, connectedClusterResourceURI string, options *HybridIdentityMetadataClientGetOptions) (HybridIdentityMetadataClientGetResponse, error) { @@ -141,7 +141,7 @@ func (client *HybridIdentityMetadataClient) getCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -158,8 +158,8 @@ func (client *HybridIdentityMetadataClient) getHandleResponse(resp *http.Respons // NewListByClusterPager - Lists the hybrid identity metadata proxy resource in a provisioned cluster instance. // -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. +// Generated from API version 2024-01-01 +// - connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource. // - options - HybridIdentityMetadataClientListByClusterOptions contains the optional parameters for the HybridIdentityMetadataClient.NewListByClusterPager // method. func (client *HybridIdentityMetadataClient) NewListByClusterPager(connectedClusterResourceURI string, options *HybridIdentityMetadataClientListByClusterOptions) *runtime.Pager[HybridIdentityMetadataClientListByClusterResponse] { @@ -194,7 +194,7 @@ func (client *HybridIdentityMetadataClient) listByClusterCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,8 +212,9 @@ func (client *HybridIdentityMetadataClient) listByClusterHandleResponse(resp *ht // Put - Creates the hybrid identity metadata proxy resource that facilitates the managed identity provisioning. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. +// Generated from API version 2024-01-01 +// - connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource. +// - body - Hybrid Identity Metadata resource definition // - options - HybridIdentityMetadataClientPutOptions contains the optional parameters for the HybridIdentityMetadataClient.Put // method. func (client *HybridIdentityMetadataClient) Put(ctx context.Context, connectedClusterResourceURI string, body HybridIdentityMetadata, options *HybridIdentityMetadataClientPutOptions) (HybridIdentityMetadataClientPutResponse, error) { @@ -247,7 +248,7 @@ func (client *HybridIdentityMetadataClient) putCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, body); err != nil { diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/hybrididentitymetadata_client_example_test.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/hybrididentitymetadata_client_example_test.go index 965bb6398035..fd811dc11934 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/hybrididentitymetadata_client_example_test.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/hybrididentitymetadata_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/CreateHybridIdentityMetadata.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/CreateHybridIdentityMetadata.json func ExampleHybridIdentityMetadataClient_Put() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -52,7 +52,7 @@ func ExampleHybridIdentityMetadataClient_Put() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/GetHybridIdentityMetadata.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/GetHybridIdentityMetadata.json func ExampleHybridIdentityMetadataClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleHybridIdentityMetadataClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/DeleteHybridIdentityMetadata.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/DeleteHybridIdentityMetadata.json func ExampleHybridIdentityMetadataClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -102,7 +102,7 @@ func ExampleHybridIdentityMetadataClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/HybridIdentityMetadataListByCluster.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/HybridIdentityMetadataListByCluster.json func ExampleHybridIdentityMetadataClient_NewListByClusterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/kubernetesversions_client.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/kubernetesversions_client.go index 03555a0d6a81..600bfdc653ec 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/kubernetesversions_client.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/kubernetesversions_client.go @@ -38,10 +38,10 @@ func NewKubernetesVersionsClient(credential azcore.TokenCredential, options *arm return client, nil } -// NewListPager - Lists the supported kubernetes versions from the underlying custom location +// NewListPager - Lists the supported kubernetes versions for the specified custom location // -// Generated from API version 2023-11-15-preview -// - customLocationResourceURI - The fully qualified Azure Resource manager identifier of the custom location resource. +// Generated from API version 2024-01-01 +// - customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource. // - options - KubernetesVersionsClientListOptions contains the optional parameters for the KubernetesVersionsClient.NewListPager // method. func (client *KubernetesVersionsClient) NewListPager(customLocationResourceURI string, options *KubernetesVersionsClientListOptions) *runtime.Pager[KubernetesVersionsClientListResponse] { @@ -76,7 +76,7 @@ func (client *KubernetesVersionsClient) listCreateRequest(ctx context.Context, c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/kubernetesversions_client_example_test.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/kubernetesversions_client_example_test.go index 1d4731daedd0..43d32ccf123b 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/kubernetesversions_client_example_test.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/kubernetesversions_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/ListKubernetesVersions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListKubernetesVersions.json func ExampleKubernetesVersionsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -53,13 +53,30 @@ func ExampleKubernetesVersionsClient_NewListPager() { // ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded), // Values: []*armhybridcontainerservice.KubernetesVersionProperties{ // { - // Capabilities: &armhybridcontainerservice.KubernetesVersionCapabilities{ - // SupportPlan: []*string{ - // to.Ptr("KubernetesOfficial")}, - // }, - // IsPreview: to.Ptr(false), - // PatchVersions: map[string]*armhybridcontainerservice.KubernetesPatchVersions{ - // "1.23.12": &armhybridcontainerservice.KubernetesPatchVersions{ + // IsPreview: to.Ptr(false), + // PatchVersions: map[string]*armhybridcontainerservice.KubernetesPatchVersions{ + // "1.23.12": &armhybridcontainerservice.KubernetesPatchVersions{ + // Readiness: []*armhybridcontainerservice.KubernetesVersionReadiness{ + // { + // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUCBLMariner), + // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), + // Ready: to.Ptr(true), + // }, + // { + // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2019), + // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), + // Ready: to.Ptr(true), + // }, + // { + // ErrorMessage: to.Ptr("Not Ready. Reasons: Failed to find proudct stream windoes2022 in release aks-hybrid-catalog-stable-int"), + // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2022), + // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), + // Ready: to.Ptr(false), + // }}, + // Upgrades: []*string{ + // to.Ptr("1.23.13")}, + // }, + // "1.23.13": &armhybridcontainerservice.KubernetesPatchVersions{ // Readiness: []*armhybridcontainerservice.KubernetesVersionReadiness{ // { // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUCBLMariner), @@ -67,44 +84,23 @@ func ExampleKubernetesVersionsClient_NewListPager() { // Ready: to.Ptr(true), // }, // { - // OSSKU: to.Ptr(armhybridcontainerservice.OSSKU("Windows")), + // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2019), // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), // Ready: to.Ptr(true), // }, // { - // ErrorMessage: to.Ptr("Not Ready. Reasons: Failed to find proudct stream windoes2022 in release aks-hybrid-catalog-stable-int"), // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2022), // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), - // Ready: to.Ptr(false), + // Ready: to.Ptr(true), // }}, // Upgrades: []*string{ - // to.Ptr("1.23.13")}, - // }, - // "1.23.13": &armhybridcontainerservice.KubernetesPatchVersions{ - // Readiness: []*armhybridcontainerservice.KubernetesVersionReadiness{ - // { - // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUCBLMariner), - // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), - // Ready: to.Ptr(true), - // }, - // { - // OSSKU: to.Ptr(armhybridcontainerservice.OSSKU("Windows")), - // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), - // Ready: to.Ptr(true), - // }, - // { - // OSSKU: to.Ptr(armhybridcontainerservice.OSSKUWindows2022), - // OSType: to.Ptr(armhybridcontainerservice.OsTypeWindows), - // Ready: to.Ptr(true), - // }}, - // Upgrades: []*string{ - // }, // }, // }, - // Version: to.Ptr("1.23"), - // }}, - // }, - // }}, - // } + // }, + // Version: to.Ptr("1.23"), + // }}, + // }, + // }}, + // } } } diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/models.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/models.go index 1b5548b2967a..5e6bc281aee0 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/models.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/models.go @@ -10,174 +10,157 @@ package armhybridcontainerservice import "time" -// AddonStatusProfile - Defines the addon status profile. +// AddonStatusProfile - The status profile of the addons and other kubernetes components type AddonStatusProfile struct { - // Error message while deploying the addon + // Observed error message from the addon or component ErrorMessage *string - // Name of the addon + // Name of the addon or component Name *string - // Observed phase of the addon on the target cluster. Possible values include: 'pending', 'provisioning', 'provisioning {HelmChartInstalled}', - // 'provisioning {MSICertificateDownloaded}', 'provisioned', - // 'deleting', 'failed', 'upgrading' + // Observed phase of the addon or component on the provisioned cluster. Possible values include: 'pending', 'provisioning', + // 'provisioning {HelmChartInstalled}', 'provisioning {MSICertificateDownloaded}', + // 'provisioned', 'deleting', 'failed', 'upgrading' Phase *AddonPhase - // Indicates whether the addon is ready + // Indicates whether the addon or component is ready Ready *bool } // AgentPool - The agentPool resource definition type AgentPool struct { - // Extended Location definition + // Extended location pointing to the underlying infrastructure ExtendedLocation *ExtendedLocation - // The resource location - Location *string + // Properties of the agent pool resource Properties *AgentPoolProperties // Resource tags Tags map[string]*string - // READ-ONLY; Resource Id + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string - // READ-ONLY; Resource Name + // READ-ONLY; The name of the resource Name *string - // READ-ONLY; Metadata pertaining to creation and last modification of the resource. + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData - // READ-ONLY; Resource Type + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string } -// AgentPoolListResult - A list of agent pool resources. +// AgentPoolListResult - List of all agent pool resources associated with the provisioned cluster. type AgentPoolListResult struct { NextLink *string Value []*AgentPool } -// AgentPoolPatch - The agentPool resource patch definition -type AgentPoolPatch struct { - // Resource tags - Tags map[string]*string -} - +// AgentPoolProperties - Properties of the agent pool resource type AgentPoolProperties struct { - // AvailabilityZones - The list of Availability zones to use for nodes. Datacenter racks modelled as zones - AvailabilityZones []*string - - // Count - Number of agents to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default - // value is 1. + // Number of nodes in the agent pool. The default value is 1. Count *int32 - // The version of node image - NodeImageVersion *string + // Whether to enable auto-scaler. Default value is false + EnableAutoScaling *bool + + // The maximum number of nodes for auto-scaling + MaxCount *int32 + + // The maximum number of pods that can run on a node. + MaxPods *int32 + + // The minimum number of nodes for auto-scaling + MinCount *int32 + + // The node labels to be persisted across all nodes in agent pool. + NodeLabels map[string]*string + + // Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + NodeTaints []*string // Specifies the OS SKU used by the agent pool. The default is CBLMariner if OSType is Linux. The default is Windows2019 when // OSType is Windows. OSSKU *OSSKU - // The particular KubernetesVersion's Image's OS Type (Linux, Windows) + // The particular KubernetesVersion Image OS Type (Linux, Windows) OSType *OsType - // Defines the observed state of the agent pool + // The observed status of the agent pool. Status *AgentPoolProvisioningStatusStatus - // VmSize - The size of the agent pool VMs. + // The VM sku size of the agent pool node VMs. VMSize *string - // READ-ONLY; Provisioning state of the resource - ProvisioningState *ResourceProvisioningState -} - -// AgentPoolProvisioningStatusOperationStatus - Contains Provisioning errors -type AgentPoolProvisioningStatusOperationStatus struct { - Error *AgentPoolProvisioningStatusOperationStatusError - OperationID *string - Status *string -} + // READ-ONLY; Version of Kubernetes in use by the agent pool. This is inherited from the kubernetesVersion of the provisioned + // cluster. + KubernetesVersion *string -type AgentPoolProvisioningStatusOperationStatusError struct { - Code *string - Message *string + // READ-ONLY; The status of the latest long running operation for the agent pool. + ProvisioningState *ResourceProvisioningState } -// AgentPoolProvisioningStatusStatus - Defines the observed state of the agent pool +// AgentPoolProvisioningStatusStatus - The observed status of the agent pool. type AgentPoolProvisioningStatusStatus struct { - // ErrorMessage - Error messages during creation of agent pool - ErrorMessage *string + // Error messages during an agent pool operation or steady state. + ErrorMessage *string + ReadyReplicas []*AgentPoolUpdateProfile - // Contains Provisioning errors - OperationStatus *AgentPoolProvisioningStatusOperationStatus - ReadyReplicas []*AgentPoolUpdateProfile + // READ-ONLY; The current state of the agent pool. + CurrentState *ResourceProvisioningState } -// AgentPoolUpdateProfile - AgentPool update configuration +// AgentPoolUpdateProfile - Profile for agent pool properties that can be updated type AgentPoolUpdateProfile struct { - // Count - Number of agents to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default - // value is 1. + // Number of nodes in the agent pool. The default value is 1. Count *int32 - // VmSize - The size of the agent pool VMs. + // The VM sku size of the agent pool node VMs. VMSize *string + + // READ-ONLY; Version of Kubernetes in use by the agent pool. This is inherited from the kubernetesVersion of the provisioned + // cluster. + KubernetesVersion *string } -// CloudProviderProfile - The underlying cloud infra provider properties. +// CloudProviderProfile - The profile for the underlying cloud infrastructure provider for the provisioned cluster. type CloudProviderProfile struct { - // InfraNetworkProfile - List of infra network profiles for the provisioned cluster + // The profile for the infrastructure networks used by the provisioned cluster InfraNetworkProfile *CloudProviderProfileInfraNetworkProfile } -// CloudProviderProfileInfraNetworkProfile - InfraNetworkProfile - List of infra network profiles for the provisioned cluster +// CloudProviderProfileInfraNetworkProfile - The profile for the infrastructure networks used by the provisioned cluster type CloudProviderProfileInfraNetworkProfile struct { - // Array of references to azure resource corresponding to the Network object e.g. + // List of ARM resource Ids (maximum 1) for the infrastructure network object e.g. // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/logicalNetworks/{logicalNetworkName} VnetSubnetIDs []*string } -// ControlPlaneEndpointProfileControlPlaneEndpoint - API server endpoint for the control plane -type ControlPlaneEndpointProfileControlPlaneEndpoint struct { - // Host IP address for API server - HostIP *string - - // Port for the API server - Port *int32 +// ClusterVMAccessProfile - The SSH restricted access profile for the VMs in the provisioned cluster. +type ClusterVMAccessProfile struct { + // IP Address or CIDR for SSH access to VMs in the provisioned cluster + AuthorizedIPRanges *string } -// ControlPlaneProfile - The control plane properties for the provisioned cluster. +// ControlPlaneProfile - The properties of the control plane nodes of the provisioned cluster type ControlPlaneProfile struct { - // AvailabilityZones - The list of Availability zones to use for nodes. Datacenter racks modelled as zones - AvailabilityZones []*string + // IP Address of the Kubernetes API server + ControlPlaneEndpoint *ControlPlaneProfileControlPlaneEndpoint - // API server endpoint for the control plane - ControlPlaneEndpoint *ControlPlaneEndpointProfileControlPlaneEndpoint - - // Count - Number of agents to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default - // value is 1. + // Number of control plane nodes. The default value is 1, and the count should be an odd number Count *int32 - // Profile for Linux VMs in the container service cluster. - LinuxProfile *LinuxProfileProperties - - // Unique name of the agent pool profile in the context of the subscription and resource group. - Name *string - - // The version of node image - NodeImageVersion *string - - // Specifies the OS SKU used by the agent pool. The default is CBLMariner if OSType is Linux. The default is Windows2019 when - // OSType is Windows. - OSSKU *OSSKU - - // The particular KubernetesVersion's Image's OS Type (Linux, Windows) - OSType *OsType - - // VmSize - The size of the agent pool VMs. + // VM sku size of the control plane nodes VMSize *string } +// ControlPlaneProfileControlPlaneEndpoint - IP Address of the Kubernetes API server +type ControlPlaneProfileControlPlaneEndpoint struct { + // IP address of the Kubernetes API server + HostIP *string +} + // CredentialResult - The credential result response. type CredentialResult struct { // READ-ONLY; The name of the credential. @@ -187,12 +170,12 @@ type CredentialResult struct { Value []byte } -// ExtendedLocation - Extended Location definition +// ExtendedLocation - Extended location pointing to the underlying infrastructure type ExtendedLocation struct { - // The extended location name. + // ARM Id of the extended location. Name *string - // The extended location type. + // The extended location type. Allowed value: 'CustomLocation' Type *ExtendedLocationTypes } @@ -223,9 +206,9 @@ type HybridIdentityMetadataList struct { NextLink *string } -// HybridIdentityMetadataProperties - Defines the resource properties. +// HybridIdentityMetadataProperties - Defines the resource properties for the hybrid identity metadata. type HybridIdentityMetadataProperties struct { - // Onboarding public key for provisioning the Managed identity for the HybridAKS cluster. + // Onboarding public key for provisioning the Managed identity for the connected cluster. PublicKey *string // Unique id of the parent provisioned cluster resource. @@ -237,21 +220,16 @@ type HybridIdentityMetadataProperties struct { // KubernetesPatchVersions - Kubernetes Patch Version profile type KubernetesPatchVersions struct { - // Whether the kubernetes version variant (Linux, Windows, Windows2022) is ready or not + // Indicates whether the kubernetes version image is ready or not Readiness []*KubernetesVersionReadiness - // Possible upgrade path for given patch version + // Possible upgrade paths for given patch version Upgrades []*string } -// KubernetesVersionCapabilities - Capabilities on this kubernetes version -type KubernetesVersionCapabilities struct { - SupportPlan []*string -} - // KubernetesVersionProfile - The supported kubernetes versions. type KubernetesVersionProfile struct { - // Extended Location definition + // Extended location pointing to the underlying infrastructure ExtendedLocation *ExtendedLocation // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" @@ -270,7 +248,7 @@ type KubernetesVersionProfile struct { Type *string } -// KubernetesVersionProfileList - A list of kubernetes version resources. +// KubernetesVersionProfileList - List of supported kubernetes versions. type KubernetesVersionProfileList struct { NextLink *string Value []*KubernetesVersionProfile @@ -286,9 +264,6 @@ type KubernetesVersionProfileProperties struct { // KubernetesVersionProperties - Kubernetes version profile for given major.minor release type KubernetesVersionProperties struct { - // READ-ONLY; Capabilities on this kubernetes version - Capabilities *KubernetesVersionCapabilities - // READ-ONLY; Whether this version is in preview mode. IsPreview *bool @@ -299,38 +274,37 @@ type KubernetesVersionProperties struct { Version *string } -// KubernetesVersionReadiness - Whether a particular kubernetes version's variant (CBLMariner, Windows, Windows2022) is ready -// or not +// KubernetesVersionReadiness - Indicates whether the kubernetes version image is ready or not type KubernetesVersionReadiness struct { // Specifies the OS SKU used by the agent pool. The default is CBLMariner if OSType is Linux. The default is Windows2019 when // OSType is Windows. OSSKU *OSSKU - // READ-ONLY; If image is not ready, the error message for version not being ready + // READ-ONLY; The error message for version not being ready ErrorMessage *string - // READ-ONLY; The particular KubernetesVersion's Image's OS Type (Linux, Windows) + // READ-ONLY; The particular KubernetesVersion Image OS Type (Linux, Windows) OSType *OsType - // READ-ONLY; Whether or not the given image is ready + // READ-ONLY; Whether the kubernetes version image is ready or not Ready *bool } -// LinuxProfileProperties - LinuxProfile - Profile for Linux VMs in the container service cluster. +// LinuxProfileProperties - SSH profile for control plane and nodepool VMs of the provisioned cluster. type LinuxProfileProperties struct { - // SSH - SSH configuration for Linux-based VMs running on Azure. + // SSH configuration for VMs of the provisioned cluster. SSH *LinuxProfilePropertiesSSH } -// LinuxProfilePropertiesSSH - SSH - SSH configuration for Linux-based VMs running on Azure. +// LinuxProfilePropertiesSSH - SSH configuration for VMs of the provisioned cluster. type LinuxProfilePropertiesSSH struct { - // PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. + // The list of SSH public keys used to authenticate with VMs. A maximum of 1 key may be specified. PublicKeys []*LinuxProfilePropertiesSSHPublicKeysItem } type LinuxProfilePropertiesSSHPublicKeysItem struct { - // KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with - // or without headers. + // Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without + // headers. KeyData *string } @@ -362,48 +336,62 @@ type ListCredentialResponseProperties struct { Kubeconfigs []*CredentialResult } -// NamedAgentPoolProfile - Agent pool profile along with a name parameter +// NamedAgentPoolProfile - Profile of the default agent pool along with a name parameter type NamedAgentPoolProfile struct { - // AvailabilityZones - The list of Availability zones to use for nodes. Datacenter racks modelled as zones - AvailabilityZones []*string - - // Count - Number of agents to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default - // value is 1. + // Number of nodes in the agent pool. The default value is 1. Count *int32 - // Unique name of the agent pool profile in the context of the subscription and resource group. + // Whether to enable auto-scaler. Default value is false + EnableAutoScaling *bool + + // The maximum number of nodes for auto-scaling + MaxCount *int32 + + // The maximum number of pods that can run on a node. + MaxPods *int32 + + // The minimum number of nodes for auto-scaling + MinCount *int32 + + // Unique name of the default agent pool in the context of the provisioned cluster. Default value is -nodepool1 Name *string - // The version of node image - NodeImageVersion *string + // The node labels to be persisted across all nodes in agent pool. + NodeLabels map[string]*string + + // Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + NodeTaints []*string // Specifies the OS SKU used by the agent pool. The default is CBLMariner if OSType is Linux. The default is Windows2019 when // OSType is Windows. OSSKU *OSSKU - // The particular KubernetesVersion's Image's OS Type (Linux, Windows) + // The particular KubernetesVersion Image OS Type (Linux, Windows) OSType *OsType - // VmSize - The size of the agent pool VMs. + // The VM sku size of the agent pool node VMs. VMSize *string + + // READ-ONLY; Version of Kubernetes in use by the agent pool. This is inherited from the kubernetesVersion of the provisioned + // cluster. + KubernetesVersion *string } -// NetworkProfile - Profile of network configuration. +// NetworkProfile - The network configuration profile for the provisioned cluster. type NetworkProfile struct { - // LoadBalancerProfile - Profile of the cluster load balancer. + // Profile of the HA Proxy load balancer. LoadBalancerProfile *NetworkProfileLoadBalancerProfile - // NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'calico', 'flannel'. Default - // is 'calico' + // Network policy used for building Kubernetes network. Possible values include: 'calico'. NetworkPolicy *NetworkPolicy - // PodCidr - A CIDR notation IP range from which to assign pod IPs when kubenet is used. + // A CIDR notation IP Address range from which to assign pod IPs. PodCidr *string } -// NetworkProfileLoadBalancerProfile - LoadBalancerProfile - Profile of the cluster load balancer. +// NetworkProfileLoadBalancerProfile - Profile of the HA Proxy load balancer. type NetworkProfileLoadBalancerProfile struct { - // Count - Number of load balancer VMs. The default value is 0. + // Number of HA Proxy load balancer VMs. The default value is 0. Count *int32 } @@ -456,24 +444,48 @@ type OperationListResult struct { Value []*Operation } +// ProvisionedCluster - The provisioned cluster resource definition. +type ProvisionedCluster struct { + // Extended location pointing to the underlying infrastructure + ExtendedLocation *ExtendedLocation + + // Properties of the provisioned cluster. + Properties *ProvisionedClusterProperties + + // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + // ProvisionedClusterLicenseProfile - The license profile of the provisioned cluster. type ProvisionedClusterLicenseProfile struct { - // Indicates whether Azure Hybrid Benefit is opted in + // Indicates whether Azure Hybrid Benefit is opted in. Default value is false AzureHybridBenefit *AzureHybridBenefit } -// ProvisionedClusterPoolUpgradeProfile - The list of available upgrade versions. +// ProvisionedClusterListResult - Lists the ProvisionedClusterInstance resource associated with the ConnectedCluster. +type ProvisionedClusterListResult struct { + NextLink *string + Value []*ProvisionedCluster +} + +// ProvisionedClusterPoolUpgradeProfile - The list of available kubernetes versions for upgrade. type ProvisionedClusterPoolUpgradeProfile struct { - // List of orchestrator types and versions available for upgrade. + // List of available kubernetes versions for upgrade. Upgrades []*ProvisionedClusterPoolUpgradeProfileProperties // READ-ONLY; The Kubernetes version (major.minor.patch). KubernetesVersion *string - // READ-ONLY; The Agent Pool name. - Name *string - - // READ-ONLY; The particular KubernetesVersion's Image's OS Type (Linux, Windows) + // READ-ONLY; The particular KubernetesVersion Image OS Type (Linux, Windows) OSType *OsType } @@ -486,61 +498,118 @@ type ProvisionedClusterPoolUpgradeProfileProperties struct { KubernetesVersion *string } -// ProvisionedClusterProperties - All properties of the provisioned cluster +// ProvisionedClusterProperties - Properties of the provisioned cluster. type ProvisionedClusterProperties struct { - // The agent pools of the cluster. + // The agent pool properties for the provisioned cluster. AgentPoolProfiles []*NamedAgentPoolProfile - // The underlying cloud infra provider properties. + // Parameters to be applied to the cluster-autoscaler when auto scaling is enabled for the provisioned cluster. + AutoScalerProfile *ProvisionedClusterPropertiesAutoScalerProfile + + // The profile for the underlying cloud infrastructure provider for the provisioned cluster. CloudProviderProfile *CloudProviderProfile - // ControlPlane - ControlPlane Configuration + // The SSH restricted access profile for the VMs in the provisioned cluster. + ClusterVMAccessProfile *ClusterVMAccessProfile + + // The profile for control plane of the provisioned cluster. ControlPlane *ControlPlaneProfile - // KubernetesVersion - Version of Kubernetes specified when creating the managed cluster. + // The version of Kubernetes in use by the provisioned cluster. KubernetesVersion *string // The license profile of the provisioned cluster. LicenseProfile *ProvisionedClusterLicenseProfile - // LinuxProfile - The profile for Linux VMs in the Provisioned Cluster. + // The profile for Linux VMs in the provisioned cluster. LinuxProfile *LinuxProfileProperties - // NetworkProfile - Profile of network configuration. + // The network configuration profile for the provisioned cluster. NetworkProfile *NetworkProfile - // READ-ONLY; Provisioning state of the resource + // The storage configuration profile for the provisioned cluster. + StorageProfile *StorageProfile + + // READ-ONLY; The status of the latest long running operation for the provisioned cluster. ProvisioningState *ResourceProvisioningState - // READ-ONLY; HybridAKSClusterStatus defines the observed state of HybridAKSCluster + // READ-ONLY; The observed status of the provisioned cluster. Status *ProvisionedClusterPropertiesStatus } -// ProvisionedClusterPropertiesStatus - HybridAKSClusterStatus defines the observed state of HybridAKSCluster -type ProvisionedClusterPropertiesStatus struct { - // Status of the control plane components - ControlPlaneStatus []*AddonStatusProfile +// ProvisionedClusterPropertiesAutoScalerProfile - Parameters to be applied to the cluster-autoscaler when auto scaling is +// enabled for the provisioned cluster. +type ProvisionedClusterPropertiesAutoScalerProfile struct { + // Valid values are 'true' and 'false' + BalanceSimilarNodeGroups *string - // ErrorMessage - Error messages during creation of cluster - ErrorMessage *string + // If not specified, the default is 'random'. See expanders [https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders] + // for more information. + Expander *Expander - // Contains Provisioning errors - OperationStatus *ProvisionedClusterPropertiesStatusOperationStatus -} + // The default is 10. + MaxEmptyBulkDelete *string -// ProvisionedClusterPropertiesStatusOperationStatus - Contains Provisioning errors -type ProvisionedClusterPropertiesStatusOperationStatus struct { - Error *ProvisionedClusterPropertiesStatusOperationStatusError - OperationID *string - Status *string + // The default is 600. + MaxGracefulTerminationSec *string + + // The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + MaxNodeProvisionTime *string + + // The default is 45. The maximum is 100 and the minimum is 0. + MaxTotalUnreadyPercentage *string + + // For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all + // the pods, you can tell CA to ignore unscheduled pods before they're a certain + // age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, + // etc). + NewPodScaleUpDelay *string + + // This must be an integer. The default is 3. + OkTotalUnreadyCount *string + + // The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + ScaleDownDelayAfterAdd *string + + // The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) + // is supported. + ScaleDownDelayAfterDelete *string + + // The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + ScaleDownDelayAfterFailure *string + + // The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + ScaleDownUnneededTime *string + + // The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. + ScaleDownUnreadyTime *string + + // The default is '0.5'. + ScaleDownUtilizationThreshold *string + + // The default is '10'. Values must be an integer number of seconds. + ScanInterval *string + + // The default is true. + SkipNodesWithLocalStorage *string + + // The default is true. + SkipNodesWithSystemPods *string } -type ProvisionedClusterPropertiesStatusOperationStatusError struct { - Code *string - Message *string +// ProvisionedClusterPropertiesStatus - The observed status of the provisioned cluster. +type ProvisionedClusterPropertiesStatus struct { + // The detailed status of the provisioned cluster components including addons. + ControlPlaneStatus []*AddonStatusProfile + + // Error messages during a provisioned cluster operation or steady state. + ErrorMessage *string + + // READ-ONLY; The current state of the provisioned cluster. + CurrentState *ResourceProvisioningState } -// ProvisionedClusterUpgradeProfile - The list of available upgrades for compute pools. +// ProvisionedClusterUpgradeProfile - The list of available kubernetes version upgrades for the provisioned cluster. type ProvisionedClusterUpgradeProfile struct { // REQUIRED; The properties of the upgrade profile. Properties *ProvisionedClusterUpgradeProfileProperties @@ -560,41 +629,32 @@ type ProvisionedClusterUpgradeProfile struct { // ProvisionedClusterUpgradeProfileProperties - Control plane and agent pool upgrade profiles. type ProvisionedClusterUpgradeProfileProperties struct { - // REQUIRED; The list of available upgrade versions for agent pools. - AgentPoolProfiles []*ProvisionedClusterPoolUpgradeProfile - - // REQUIRED; The list of available upgrade versions for the control plane. + // REQUIRED; The list of available kubernetes version upgrades for the control plane. ControlPlaneProfile *ProvisionedClusterPoolUpgradeProfile // READ-ONLY; Provisioning state of the resource ProvisioningState *ResourceProvisioningState } -// ProvisionedClusters - The provisionedClusterInstances resource definition. -type ProvisionedClusters struct { - // Extended Location definition - ExtendedLocation *ExtendedLocation - - // All properties of the provisioned cluster - Properties *ProvisionedClusterProperties - - // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" - ID *string - - // READ-ONLY; The name of the resource - Name *string +// StorageProfile - The storage configuration profile for the provisioned cluster. +type StorageProfile struct { + // NFS CSI Driver settings for the storage profile. + NfsCsiDriver *StorageProfileNfsCSIDriver - // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. - SystemData *SystemData + // SMB CSI Driver settings for the storage profile. + SmbCsiDriver *StorageProfileSmbCSIDriver +} - // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - Type *string +// StorageProfileNfsCSIDriver - NFS CSI Driver settings for the storage profile. +type StorageProfileNfsCSIDriver struct { + // Indicates whether to enable NFS CSI Driver. The default value is true. + Enabled *bool } -// ProvisionedClustersListResult - A list of provisioned clusters resources. -type ProvisionedClustersListResult struct { - NextLink *string - Value []*ProvisionedClusters +// StorageProfileSmbCSIDriver - SMB CSI Driver settings for the storage profile. +type StorageProfileSmbCSIDriver struct { + // Indicates whether to enable SMB CSI Driver. The default value is true. + Enabled *bool } // SystemData - Metadata pertaining to creation and last modification of the resource. @@ -618,18 +678,18 @@ type SystemData struct { LastModifiedByType *CreatedByType } -// VMSKUCapabilities - describes the vm sku capabilities object +// VMSKUCapabilities - Describes the VM SKU capabilities like MemoryGB, vCPUs, etc. type VMSKUCapabilities struct { - // READ-ONLY; An invariant to describe the feature + // READ-ONLY; Name of the VM SKU capability Name *string - // READ-ONLY; An invariant if the feature is measured by quantity + // READ-ONLY; Value of the VM SKU capability Value *string } // VMSKUProfile - The list of supported VM SKUs. type VMSKUProfile struct { - // Extended Location definition + // Extended location pointing to the underlying infrastructure ExtendedLocation *ExtendedLocation // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" @@ -648,45 +708,47 @@ type VMSKUProfile struct { Type *string } -// VMSKUProfileList - A list of VM SKU resources. +// VMSKUProfileList - The list of supported VM SKUs. type VMSKUProfileList struct { NextLink *string Value []*VMSKUProfile } type VMSKUProfileProperties struct { - // Array of HybridAKS Support VM Skus + // List of supported VM SKUs. Values []*VMSKUProperties // READ-ONLY; Provisioning state of the resource ProvisioningState *ResourceProvisioningState } -// VMSKUProperties - The profile for supported VM skus +// VMSKUProperties - The profile for supported VM SKUs type VMSKUProperties struct { - // READ-ONLY; A name value pair to describe the specific vm's capability + // READ-ONLY; The list of name-value pairs to describe VM SKU capabilities like MemoryGB, vCPUs, etc. Capabilities []*VMSKUCapabilities - // READ-ONLY; The name of the VM Family + // READ-ONLY; The name of the VM SKU Name *string - // READ-ONLY; The resource type of the vm + // READ-ONLY; The type of resource the SKU applies to. ResourceType *string - // READ-ONLY; The size of the VM Family + // READ-ONLY; The size of the VM SKU Size *string - // READ-ONLY; The tier of the VM Family + // READ-ONLY; The tier of the VM SKU Tier *string } -// VirtualNetwork - The virtualNetworks resource definition. +// VirtualNetwork - The Virtual Network resource definition. type VirtualNetwork struct { // REQUIRED; The geo-location where the resource lives - Location *string + Location *string + + // Extended location pointing to the underlying infrastructure ExtendedLocation *VirtualNetworkExtendedLocation - // HybridAKSNetworkSpec defines the desired state of HybridAKSNetwork + // Properties of the virtual network resource Properties *VirtualNetworkProperties // Resource tags. @@ -705,56 +767,51 @@ type VirtualNetwork struct { Type *string } +// VirtualNetworkExtendedLocation - Extended location pointing to the underlying infrastructure type VirtualNetworkExtendedLocation struct { - // The extended location name. + // ARM Id of the extended location. Name *string - // The extended location type. - Type *string + // The extended location type. Allowed value: 'CustomLocation' + Type *ExtendedLocationTypes } -// VirtualNetworkProperties - HybridAKSNetworkSpec defines the desired state of HybridAKSNetwork +// VirtualNetworkProperties - Properties of the virtual network resource type VirtualNetworkProperties struct { - // Address of the DNS servers associated with the network + // List of DNS server IP Addresses associated with the network DNSServers []*string - // Address of the DHCP servers associated with the network - DhcpServers []*string - - // Address of the Gateway associated with the network + // IP Address of the Gateway associated with the network Gateway *string // IP Address Prefix of the network IPAddressPrefix *string InfraVnetProfile *VirtualNetworkPropertiesInfraVnetProfile - // Virtual IP Pool for Kubernetes + // Range of IP Addresses for Kubernetes API Server and services if using HA Proxy load balancer VipPool []*VirtualNetworkPropertiesVipPoolItem // VLAN Id used by the network VlanID *int32 - // IP Pool for Virtual Machines + // Range of IP Addresses for Kubernetes node VMs VmipPool []*VirtualNetworkPropertiesVmipPoolItem // READ-ONLY ProvisioningState *ProvisioningState - // READ-ONLY; HybridAKSNetworkStatus defines the observed state of HybridAKSNetwork + // READ-ONLY; Status of the virtual network resource Status *VirtualNetworkPropertiesStatus } type VirtualNetworkPropertiesInfraVnetProfile struct { - // Infra network profile for HCI platform + // Infrastructure network profile for HCI platform Hci *VirtualNetworkPropertiesInfraVnetProfileHci - - // Infra network profile for VMware platform - Vmware *VirtualNetworkPropertiesInfraVnetProfileVmware } -// VirtualNetworkPropertiesInfraVnetProfileHci - Infra network profile for HCI platform +// VirtualNetworkPropertiesInfraVnetProfileHci - Infrastructure network profile for HCI platform type VirtualNetworkPropertiesInfraVnetProfileHci struct { - // Resource group in MOC(Microsoft On-premises Cloud) + // Group in MOC(Microsoft On-premises Cloud) MocGroup *string // Location in MOC(Microsoft On-premises Cloud) @@ -764,30 +821,30 @@ type VirtualNetworkPropertiesInfraVnetProfileHci struct { MocVnetName *string } -// VirtualNetworkPropertiesInfraVnetProfileVmware - Infra network profile for VMware platform -type VirtualNetworkPropertiesInfraVnetProfileVmware struct { - // Name of the network segment in VSphere - SegmentName *string -} - -// VirtualNetworkPropertiesStatus - HybridAKSNetworkStatus defines the observed state of HybridAKSNetwork +// VirtualNetworkPropertiesStatus - Status of the virtual network resource type VirtualNetworkPropertiesStatus struct { - // Contains Provisioning errors + // The detailed status of the long running operation. OperationStatus *VirtualNetworkPropertiesStatusOperationStatus } -// VirtualNetworkPropertiesStatusOperationStatus - Contains Provisioning errors +// VirtualNetworkPropertiesStatusOperationStatus - The detailed status of the long running operation. type VirtualNetworkPropertiesStatusOperationStatus struct { - Error *VirtualNetworkPropertiesStatusOperationStatusError + // The error if any from the operation. + Error *VirtualNetworkPropertiesStatusOperationStatusError + + // The identifier of the operation. OperationID *string - // Phase represents the current phase of the virtual network provisioning. E.g. Pending, Running, Terminating, Failed etc. - Phase *string + // The status of the operation. Status *string } +// VirtualNetworkPropertiesStatusOperationStatusError - The error if any from the operation. type VirtualNetworkPropertiesStatusOperationStatusError struct { - Code *string + // The error code from the operation. + Code *string + + // The error message from the operation. Message *string } @@ -807,12 +864,13 @@ type VirtualNetworkPropertiesVmipPoolItem struct { StartIP *string } +// VirtualNetworksListResult - A list of virtual network resources. type VirtualNetworksListResult struct { NextLink *string Value []*VirtualNetwork } -// VirtualNetworksPatch - The virtualNetworks resource patch definition. +// VirtualNetworksPatch - The Virtual Network resource patch definition. type VirtualNetworksPatch struct { // Resource tags Tags map[string]*string diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/models_serde.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/models_serde.go index fd6c0949bcaf..daa874eceb99 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/models_serde.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/models_serde.go @@ -60,7 +60,6 @@ func (a AgentPool) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "extendedLocation", a.ExtendedLocation) populate(objectMap, "id", a.ID) - populate(objectMap, "location", a.Location) populate(objectMap, "name", a.Name) populate(objectMap, "properties", a.Properties) populate(objectMap, "systemData", a.SystemData) @@ -84,9 +83,6 @@ func (a *AgentPool) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &a.ID) delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &a.Location) - delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &a.Name) delete(rawMsg, key) @@ -141,39 +137,17 @@ func (a *AgentPoolListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AgentPoolPatch. -func (a AgentPoolPatch) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "tags", a.Tags) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolPatch. -func (a *AgentPoolPatch) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "tags": - err = unpopulate(val, "Tags", &a.Tags) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type AgentPoolProperties. func (a AgentPoolProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "availabilityZones", a.AvailabilityZones) populate(objectMap, "count", a.Count) - populate(objectMap, "nodeImageVersion", a.NodeImageVersion) + populate(objectMap, "enableAutoScaling", a.EnableAutoScaling) + populate(objectMap, "kubernetesVersion", a.KubernetesVersion) + populate(objectMap, "maxCount", a.MaxCount) + populate(objectMap, "maxPods", a.MaxPods) + populate(objectMap, "minCount", a.MinCount) + populate(objectMap, "nodeLabels", a.NodeLabels) + populate(objectMap, "nodeTaints", a.NodeTaints) populate(objectMap, "osSKU", a.OSSKU) populate(objectMap, "osType", a.OSType) populate(objectMap, "provisioningState", a.ProvisioningState) @@ -191,14 +165,29 @@ func (a *AgentPoolProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "availabilityZones": - err = unpopulate(val, "AvailabilityZones", &a.AvailabilityZones) - delete(rawMsg, key) case "count": err = unpopulate(val, "Count", &a.Count) delete(rawMsg, key) - case "nodeImageVersion": - err = unpopulate(val, "NodeImageVersion", &a.NodeImageVersion) + case "enableAutoScaling": + err = unpopulate(val, "EnableAutoScaling", &a.EnableAutoScaling) + delete(rawMsg, key) + case "kubernetesVersion": + err = unpopulate(val, "KubernetesVersion", &a.KubernetesVersion) + delete(rawMsg, key) + case "maxCount": + err = unpopulate(val, "MaxCount", &a.MaxCount) + delete(rawMsg, key) + case "maxPods": + err = unpopulate(val, "MaxPods", &a.MaxPods) + delete(rawMsg, key) + case "minCount": + err = unpopulate(val, "MinCount", &a.MinCount) + delete(rawMsg, key) + case "nodeLabels": + err = unpopulate(val, "NodeLabels", &a.NodeLabels) + delete(rawMsg, key) + case "nodeTaints": + err = unpopulate(val, "NodeTaints", &a.NodeTaints) delete(rawMsg, key) case "osSKU": err = unpopulate(val, "OSSKU", &a.OSSKU) @@ -223,77 +212,11 @@ func (a *AgentPoolProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AgentPoolProvisioningStatusOperationStatus. -func (a AgentPoolProvisioningStatusOperationStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", a.Error) - populate(objectMap, "operationId", a.OperationID) - populate(objectMap, "status", a.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolProvisioningStatusOperationStatus. -func (a *AgentPoolProvisioningStatusOperationStatus) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &a.Error) - delete(rawMsg, key) - case "operationId": - err = unpopulate(val, "OperationID", &a.OperationID) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &a.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type AgentPoolProvisioningStatusOperationStatusError. -func (a AgentPoolProvisioningStatusOperationStatusError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", a.Code) - populate(objectMap, "message", a.Message) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolProvisioningStatusOperationStatusError. -func (a *AgentPoolProvisioningStatusOperationStatusError) 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", a, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &a.Code) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &a.Message) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", a, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type AgentPoolProvisioningStatusStatus. func (a AgentPoolProvisioningStatusStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "currentState", a.CurrentState) populate(objectMap, "errorMessage", a.ErrorMessage) - populate(objectMap, "operationStatus", a.OperationStatus) populate(objectMap, "readyReplicas", a.ReadyReplicas) return json.Marshal(objectMap) } @@ -307,12 +230,12 @@ func (a *AgentPoolProvisioningStatusStatus) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "currentState": + err = unpopulate(val, "CurrentState", &a.CurrentState) + delete(rawMsg, key) case "errorMessage": err = unpopulate(val, "ErrorMessage", &a.ErrorMessage) delete(rawMsg, key) - case "operationStatus": - err = unpopulate(val, "OperationStatus", &a.OperationStatus) - delete(rawMsg, key) case "readyReplicas": err = unpopulate(val, "ReadyReplicas", &a.ReadyReplicas) delete(rawMsg, key) @@ -328,6 +251,7 @@ func (a *AgentPoolProvisioningStatusStatus) UnmarshalJSON(data []byte) error { func (a AgentPoolUpdateProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "count", a.Count) + populate(objectMap, "kubernetesVersion", a.KubernetesVersion) populate(objectMap, "vmSize", a.VMSize) return json.Marshal(objectMap) } @@ -344,6 +268,9 @@ func (a *AgentPoolUpdateProfile) UnmarshalJSON(data []byte) error { case "count": err = unpopulate(val, "Count", &a.Count) delete(rawMsg, key) + case "kubernetesVersion": + err = unpopulate(val, "KubernetesVersion", &a.KubernetesVersion) + delete(rawMsg, key) case "vmSize": err = unpopulate(val, "VMSize", &a.VMSize) delete(rawMsg, key) @@ -409,16 +336,15 @@ func (c *CloudProviderProfileInfraNetworkProfile) UnmarshalJSON(data []byte) err return nil } -// MarshalJSON implements the json.Marshaller interface for type ControlPlaneEndpointProfileControlPlaneEndpoint. -func (c ControlPlaneEndpointProfileControlPlaneEndpoint) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ClusterVMAccessProfile. +func (c ClusterVMAccessProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "hostIP", c.HostIP) - populate(objectMap, "port", c.Port) + populate(objectMap, "authorizedIPRanges", c.AuthorizedIPRanges) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ControlPlaneEndpointProfileControlPlaneEndpoint. -func (c *ControlPlaneEndpointProfileControlPlaneEndpoint) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterVMAccessProfile. +func (c *ClusterVMAccessProfile) 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", c, err) @@ -426,11 +352,8 @@ func (c *ControlPlaneEndpointProfileControlPlaneEndpoint) UnmarshalJSON(data []b for key, val := range rawMsg { var err error switch key { - case "hostIP": - err = unpopulate(val, "HostIP", &c.HostIP) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &c.Port) + case "authorizedIPRanges": + err = unpopulate(val, "AuthorizedIPRanges", &c.AuthorizedIPRanges) delete(rawMsg, key) } if err != nil { @@ -443,14 +366,8 @@ func (c *ControlPlaneEndpointProfileControlPlaneEndpoint) UnmarshalJSON(data []b // MarshalJSON implements the json.Marshaller interface for type ControlPlaneProfile. func (c ControlPlaneProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "availabilityZones", c.AvailabilityZones) populate(objectMap, "controlPlaneEndpoint", c.ControlPlaneEndpoint) populate(objectMap, "count", c.Count) - populate(objectMap, "linuxProfile", c.LinuxProfile) - populate(objectMap, "name", c.Name) - populate(objectMap, "nodeImageVersion", c.NodeImageVersion) - populate(objectMap, "osSKU", c.OSSKU) - populate(objectMap, "osType", c.OSType) populate(objectMap, "vmSize", c.VMSize) return json.Marshal(objectMap) } @@ -464,30 +381,12 @@ func (c *ControlPlaneProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "availabilityZones": - err = unpopulate(val, "AvailabilityZones", &c.AvailabilityZones) - delete(rawMsg, key) case "controlPlaneEndpoint": err = unpopulate(val, "ControlPlaneEndpoint", &c.ControlPlaneEndpoint) delete(rawMsg, key) case "count": err = unpopulate(val, "Count", &c.Count) delete(rawMsg, key) - case "linuxProfile": - err = unpopulate(val, "LinuxProfile", &c.LinuxProfile) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "nodeImageVersion": - err = unpopulate(val, "NodeImageVersion", &c.NodeImageVersion) - delete(rawMsg, key) - case "osSKU": - err = unpopulate(val, "OSSKU", &c.OSSKU) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &c.OSType) - delete(rawMsg, key) case "vmSize": err = unpopulate(val, "VMSize", &c.VMSize) delete(rawMsg, key) @@ -499,6 +398,33 @@ func (c *ControlPlaneProfile) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ControlPlaneProfileControlPlaneEndpoint. +func (c ControlPlaneProfileControlPlaneEndpoint) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "hostIP", c.HostIP) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ControlPlaneProfileControlPlaneEndpoint. +func (c *ControlPlaneProfileControlPlaneEndpoint) 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", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "hostIP": + err = unpopulate(val, "HostIP", &c.HostIP) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CredentialResult. func (c CredentialResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -701,33 +627,6 @@ func (k *KubernetesPatchVersions) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesVersionCapabilities. -func (k KubernetesVersionCapabilities) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "supportPlan", k.SupportPlan) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionCapabilities. -func (k *KubernetesVersionCapabilities) 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", k, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "supportPlan": - err = unpopulate(val, "SupportPlan", &k.SupportPlan) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type KubernetesVersionProfile. func (k KubernetesVersionProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -840,7 +739,6 @@ func (k *KubernetesVersionProfileProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type KubernetesVersionProperties. func (k KubernetesVersionProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "capabilities", k.Capabilities) populate(objectMap, "isPreview", k.IsPreview) populate(objectMap, "patchVersions", k.PatchVersions) populate(objectMap, "version", k.Version) @@ -856,9 +754,6 @@ func (k *KubernetesVersionProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "capabilities": - err = unpopulate(val, "Capabilities", &k.Capabilities) - delete(rawMsg, key) case "isPreview": err = unpopulate(val, "IsPreview", &k.IsPreview) delete(rawMsg, key) @@ -1104,10 +999,15 @@ func (l *ListCredentialResponseProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type NamedAgentPoolProfile. func (n NamedAgentPoolProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "availabilityZones", n.AvailabilityZones) populate(objectMap, "count", n.Count) + populate(objectMap, "enableAutoScaling", n.EnableAutoScaling) + populate(objectMap, "kubernetesVersion", n.KubernetesVersion) + populate(objectMap, "maxCount", n.MaxCount) + populate(objectMap, "maxPods", n.MaxPods) + populate(objectMap, "minCount", n.MinCount) populate(objectMap, "name", n.Name) - populate(objectMap, "nodeImageVersion", n.NodeImageVersion) + populate(objectMap, "nodeLabels", n.NodeLabels) + populate(objectMap, "nodeTaints", n.NodeTaints) populate(objectMap, "osSKU", n.OSSKU) populate(objectMap, "osType", n.OSType) populate(objectMap, "vmSize", n.VMSize) @@ -1123,17 +1023,32 @@ func (n *NamedAgentPoolProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "availabilityZones": - err = unpopulate(val, "AvailabilityZones", &n.AvailabilityZones) - delete(rawMsg, key) case "count": err = unpopulate(val, "Count", &n.Count) delete(rawMsg, key) + case "enableAutoScaling": + err = unpopulate(val, "EnableAutoScaling", &n.EnableAutoScaling) + delete(rawMsg, key) + case "kubernetesVersion": + err = unpopulate(val, "KubernetesVersion", &n.KubernetesVersion) + delete(rawMsg, key) + case "maxCount": + err = unpopulate(val, "MaxCount", &n.MaxCount) + delete(rawMsg, key) + case "maxPods": + err = unpopulate(val, "MaxPods", &n.MaxPods) + delete(rawMsg, key) + case "minCount": + err = unpopulate(val, "MinCount", &n.MinCount) + delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &n.Name) delete(rawMsg, key) - case "nodeImageVersion": - err = unpopulate(val, "NodeImageVersion", &n.NodeImageVersion) + case "nodeLabels": + err = unpopulate(val, "NodeLabels", &n.NodeLabels) + delete(rawMsg, key) + case "nodeTaints": + err = unpopulate(val, "NodeTaints", &n.NodeTaints) delete(rawMsg, key) case "osSKU": err = unpopulate(val, "OSSKU", &n.OSSKU) @@ -1327,6 +1242,53 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ProvisionedCluster. +func (p ProvisionedCluster) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "extendedLocation", p.ExtendedLocation) + populate(objectMap, "id", p.ID) + populate(objectMap, "name", p.Name) + populate(objectMap, "properties", p.Properties) + populate(objectMap, "systemData", p.SystemData) + populate(objectMap, "type", p.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedCluster. +func (p *ProvisionedCluster) 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 "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) + delete(rawMsg, key) + case "id": + err = unpopulate(val, "ID", &p.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &p.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &p.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &p.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &p.Type) + 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 ProvisionedClusterLicenseProfile. func (p ProvisionedClusterLicenseProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1354,11 +1316,41 @@ func (p *ProvisionedClusterLicenseProfile) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterListResult. +func (p ProvisionedClusterListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", p.NextLink) + populate(objectMap, "value", p.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterListResult. +func (p *ProvisionedClusterListResult) 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 "nextLink": + err = unpopulate(val, "NextLink", &p.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &p.Value) + 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 ProvisionedClusterPoolUpgradeProfile. func (p ProvisionedClusterPoolUpgradeProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "kubernetesVersion", p.KubernetesVersion) - populate(objectMap, "name", p.Name) populate(objectMap, "osType", p.OSType) populate(objectMap, "upgrades", p.Upgrades) return json.Marshal(objectMap) @@ -1376,9 +1368,6 @@ func (p *ProvisionedClusterPoolUpgradeProfile) UnmarshalJSON(data []byte) error case "kubernetesVersion": err = unpopulate(val, "KubernetesVersion", &p.KubernetesVersion) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) case "osType": err = unpopulate(val, "OSType", &p.OSType) delete(rawMsg, key) @@ -1428,7 +1417,9 @@ func (p *ProvisionedClusterPoolUpgradeProfileProperties) UnmarshalJSON(data []by func (p ProvisionedClusterProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "agentPoolProfiles", p.AgentPoolProfiles) + populate(objectMap, "autoScalerProfile", p.AutoScalerProfile) populate(objectMap, "cloudProviderProfile", p.CloudProviderProfile) + populate(objectMap, "clusterVMAccessProfile", p.ClusterVMAccessProfile) populate(objectMap, "controlPlane", p.ControlPlane) populate(objectMap, "kubernetesVersion", p.KubernetesVersion) populate(objectMap, "licenseProfile", p.LicenseProfile) @@ -1436,6 +1427,7 @@ func (p ProvisionedClusterProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "networkProfile", p.NetworkProfile) populate(objectMap, "provisioningState", p.ProvisioningState) populate(objectMap, "status", p.Status) + populate(objectMap, "storageProfile", p.StorageProfile) return json.Marshal(objectMap) } @@ -1451,9 +1443,15 @@ func (p *ProvisionedClusterProperties) UnmarshalJSON(data []byte) error { case "agentPoolProfiles": err = unpopulate(val, "AgentPoolProfiles", &p.AgentPoolProfiles) delete(rawMsg, key) + case "autoScalerProfile": + err = unpopulate(val, "AutoScalerProfile", &p.AutoScalerProfile) + delete(rawMsg, key) case "cloudProviderProfile": err = unpopulate(val, "CloudProviderProfile", &p.CloudProviderProfile) delete(rawMsg, key) + case "clusterVMAccessProfile": + err = unpopulate(val, "ClusterVMAccessProfile", &p.ClusterVMAccessProfile) + delete(rawMsg, key) case "controlPlane": err = unpopulate(val, "ControlPlane", &p.ControlPlane) delete(rawMsg, key) @@ -1475,6 +1473,9 @@ func (p *ProvisionedClusterProperties) UnmarshalJSON(data []byte) error { case "status": err = unpopulate(val, "Status", &p.Status) delete(rawMsg, key) + case "storageProfile": + err = unpopulate(val, "StorageProfile", &p.StorageProfile) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", p, err) @@ -1483,17 +1484,31 @@ func (p *ProvisionedClusterProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterPropertiesStatus. -func (p ProvisionedClusterPropertiesStatus) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterPropertiesAutoScalerProfile. +func (p ProvisionedClusterPropertiesAutoScalerProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "controlPlaneStatus", p.ControlPlaneStatus) - populate(objectMap, "errorMessage", p.ErrorMessage) - populate(objectMap, "operationStatus", p.OperationStatus) + populate(objectMap, "balance-similar-node-groups", p.BalanceSimilarNodeGroups) + populate(objectMap, "expander", p.Expander) + populate(objectMap, "max-empty-bulk-delete", p.MaxEmptyBulkDelete) + populate(objectMap, "max-graceful-termination-sec", p.MaxGracefulTerminationSec) + populate(objectMap, "max-node-provision-time", p.MaxNodeProvisionTime) + populate(objectMap, "max-total-unready-percentage", p.MaxTotalUnreadyPercentage) + populate(objectMap, "new-pod-scale-up-delay", p.NewPodScaleUpDelay) + populate(objectMap, "ok-total-unready-count", p.OkTotalUnreadyCount) + populate(objectMap, "scale-down-delay-after-add", p.ScaleDownDelayAfterAdd) + populate(objectMap, "scale-down-delay-after-delete", p.ScaleDownDelayAfterDelete) + populate(objectMap, "scale-down-delay-after-failure", p.ScaleDownDelayAfterFailure) + populate(objectMap, "scale-down-unneeded-time", p.ScaleDownUnneededTime) + populate(objectMap, "scale-down-unready-time", p.ScaleDownUnreadyTime) + populate(objectMap, "scale-down-utilization-threshold", p.ScaleDownUtilizationThreshold) + populate(objectMap, "scan-interval", p.ScanInterval) + populate(objectMap, "skip-nodes-with-local-storage", p.SkipNodesWithLocalStorage) + populate(objectMap, "skip-nodes-with-system-pods", p.SkipNodesWithSystemPods) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterPropertiesStatus. -func (p *ProvisionedClusterPropertiesStatus) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterPropertiesAutoScalerProfile. +func (p *ProvisionedClusterPropertiesAutoScalerProfile) 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) @@ -1501,49 +1516,56 @@ func (p *ProvisionedClusterPropertiesStatus) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "controlPlaneStatus": - err = unpopulate(val, "ControlPlaneStatus", &p.ControlPlaneStatus) + case "balance-similar-node-groups": + err = unpopulate(val, "BalanceSimilarNodeGroups", &p.BalanceSimilarNodeGroups) delete(rawMsg, key) - case "errorMessage": - err = unpopulate(val, "ErrorMessage", &p.ErrorMessage) + case "expander": + err = unpopulate(val, "Expander", &p.Expander) delete(rawMsg, key) - case "operationStatus": - err = unpopulate(val, "OperationStatus", &p.OperationStatus) + case "max-empty-bulk-delete": + err = unpopulate(val, "MaxEmptyBulkDelete", &p.MaxEmptyBulkDelete) 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 ProvisionedClusterPropertiesStatusOperationStatus. -func (p ProvisionedClusterPropertiesStatusOperationStatus) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", p.Error) - populate(objectMap, "operationId", p.OperationID) - populate(objectMap, "status", p.Status) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterPropertiesStatusOperationStatus. -func (p *ProvisionedClusterPropertiesStatusOperationStatus) 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 "error": - err = unpopulate(val, "Error", &p.Error) + case "max-graceful-termination-sec": + err = unpopulate(val, "MaxGracefulTerminationSec", &p.MaxGracefulTerminationSec) delete(rawMsg, key) - case "operationId": - err = unpopulate(val, "OperationID", &p.OperationID) + case "max-node-provision-time": + err = unpopulate(val, "MaxNodeProvisionTime", &p.MaxNodeProvisionTime) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &p.Status) + case "max-total-unready-percentage": + err = unpopulate(val, "MaxTotalUnreadyPercentage", &p.MaxTotalUnreadyPercentage) + delete(rawMsg, key) + case "new-pod-scale-up-delay": + err = unpopulate(val, "NewPodScaleUpDelay", &p.NewPodScaleUpDelay) + delete(rawMsg, key) + case "ok-total-unready-count": + err = unpopulate(val, "OkTotalUnreadyCount", &p.OkTotalUnreadyCount) + delete(rawMsg, key) + case "scale-down-delay-after-add": + err = unpopulate(val, "ScaleDownDelayAfterAdd", &p.ScaleDownDelayAfterAdd) + delete(rawMsg, key) + case "scale-down-delay-after-delete": + err = unpopulate(val, "ScaleDownDelayAfterDelete", &p.ScaleDownDelayAfterDelete) + delete(rawMsg, key) + case "scale-down-delay-after-failure": + err = unpopulate(val, "ScaleDownDelayAfterFailure", &p.ScaleDownDelayAfterFailure) + delete(rawMsg, key) + case "scale-down-unneeded-time": + err = unpopulate(val, "ScaleDownUnneededTime", &p.ScaleDownUnneededTime) + delete(rawMsg, key) + case "scale-down-unready-time": + err = unpopulate(val, "ScaleDownUnreadyTime", &p.ScaleDownUnreadyTime) + delete(rawMsg, key) + case "scale-down-utilization-threshold": + err = unpopulate(val, "ScaleDownUtilizationThreshold", &p.ScaleDownUtilizationThreshold) + delete(rawMsg, key) + case "scan-interval": + err = unpopulate(val, "ScanInterval", &p.ScanInterval) + delete(rawMsg, key) + case "skip-nodes-with-local-storage": + err = unpopulate(val, "SkipNodesWithLocalStorage", &p.SkipNodesWithLocalStorage) + delete(rawMsg, key) + case "skip-nodes-with-system-pods": + err = unpopulate(val, "SkipNodesWithSystemPods", &p.SkipNodesWithSystemPods) delete(rawMsg, key) } if err != nil { @@ -1553,16 +1575,17 @@ func (p *ProvisionedClusterPropertiesStatusOperationStatus) UnmarshalJSON(data [ return nil } -// MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterPropertiesStatusOperationStatusError. -func (p ProvisionedClusterPropertiesStatusOperationStatusError) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterPropertiesStatus. +func (p ProvisionedClusterPropertiesStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "code", p.Code) - populate(objectMap, "message", p.Message) + populate(objectMap, "controlPlaneStatus", p.ControlPlaneStatus) + populate(objectMap, "currentState", p.CurrentState) + populate(objectMap, "errorMessage", p.ErrorMessage) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterPropertiesStatusOperationStatusError. -func (p *ProvisionedClusterPropertiesStatusOperationStatusError) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusterPropertiesStatus. +func (p *ProvisionedClusterPropertiesStatus) 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) @@ -1570,11 +1593,14 @@ func (p *ProvisionedClusterPropertiesStatusOperationStatusError) UnmarshalJSON(d for key, val := range rawMsg { var err error switch key { - case "code": - err = unpopulate(val, "Code", &p.Code) + case "controlPlaneStatus": + err = unpopulate(val, "ControlPlaneStatus", &p.ControlPlaneStatus) delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &p.Message) + case "currentState": + err = unpopulate(val, "CurrentState", &p.CurrentState) + delete(rawMsg, key) + case "errorMessage": + err = unpopulate(val, "ErrorMessage", &p.ErrorMessage) delete(rawMsg, key) } if err != nil { @@ -1630,7 +1656,6 @@ func (p *ProvisionedClusterUpgradeProfile) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ProvisionedClusterUpgradeProfileProperties. func (p ProvisionedClusterUpgradeProfileProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "agentPoolProfiles", p.AgentPoolProfiles) populate(objectMap, "controlPlaneProfile", p.ControlPlaneProfile) populate(objectMap, "provisioningState", p.ProvisioningState) return json.Marshal(objectMap) @@ -1645,9 +1670,6 @@ func (p *ProvisionedClusterUpgradeProfileProperties) UnmarshalJSON(data []byte) for key, val := range rawMsg { var err error switch key { - case "agentPoolProfiles": - err = unpopulate(val, "AgentPoolProfiles", &p.AgentPoolProfiles) - delete(rawMsg, key) case "controlPlaneProfile": err = unpopulate(val, "ControlPlaneProfile", &p.ControlPlaneProfile) delete(rawMsg, key) @@ -1662,79 +1684,86 @@ func (p *ProvisionedClusterUpgradeProfileProperties) UnmarshalJSON(data []byte) return nil } -// MarshalJSON implements the json.Marshaller interface for type ProvisionedClusters. -func (p ProvisionedClusters) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type StorageProfile. +func (s StorageProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "extendedLocation", p.ExtendedLocation) - populate(objectMap, "id", p.ID) - populate(objectMap, "name", p.Name) - populate(objectMap, "properties", p.Properties) - populate(objectMap, "systemData", p.SystemData) - populate(objectMap, "type", p.Type) + populate(objectMap, "nfsCsiDriver", s.NfsCsiDriver) + populate(objectMap, "smbCsiDriver", s.SmbCsiDriver) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClusters. -func (p *ProvisionedClusters) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfile. +func (s *StorageProfile) 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) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &p.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &p.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &p.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &p.Properties) + case "nfsCsiDriver": + err = unpopulate(val, "NfsCsiDriver", &s.NfsCsiDriver) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &p.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &p.Type) + case "smbCsiDriver": + err = unpopulate(val, "SmbCsiDriver", &s.SmbCsiDriver) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ProvisionedClustersListResult. -func (p ProvisionedClustersListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type StorageProfileNfsCSIDriver. +func (s StorageProfileNfsCSIDriver) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", p.NextLink) - populate(objectMap, "value", p.Value) + populate(objectMap, "enabled", s.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ProvisionedClustersListResult. -func (p *ProvisionedClustersListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfileNfsCSIDriver. +func (s *StorageProfileNfsCSIDriver) 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) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &p.NextLink) + case "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &p.Value) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type StorageProfileSmbCSIDriver. +func (s StorageProfileSmbCSIDriver) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", s.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type StorageProfileSmbCSIDriver. +func (s *StorageProfileSmbCSIDriver) 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 "enabled": + err = unpopulate(val, "Enabled", &s.Enabled) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", p, err) + return fmt.Errorf("unmarshalling type %T: %v", s, err) } } return nil @@ -2060,7 +2089,6 @@ func (v *VirtualNetworkExtendedLocation) UnmarshalJSON(data []byte) error { func (v VirtualNetworkProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "dnsServers", v.DNSServers) - populate(objectMap, "dhcpServers", v.DhcpServers) populate(objectMap, "gateway", v.Gateway) populate(objectMap, "ipAddressPrefix", v.IPAddressPrefix) populate(objectMap, "infraVnetProfile", v.InfraVnetProfile) @@ -2084,9 +2112,6 @@ func (v *VirtualNetworkProperties) UnmarshalJSON(data []byte) error { case "dnsServers": err = unpopulate(val, "DNSServers", &v.DNSServers) delete(rawMsg, key) - case "dhcpServers": - err = unpopulate(val, "DhcpServers", &v.DhcpServers) - delete(rawMsg, key) case "gateway": err = unpopulate(val, "Gateway", &v.Gateway) delete(rawMsg, key) @@ -2123,7 +2148,6 @@ func (v *VirtualNetworkProperties) UnmarshalJSON(data []byte) error { func (v VirtualNetworkPropertiesInfraVnetProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "hci", v.Hci) - populate(objectMap, "vmware", v.Vmware) return json.Marshal(objectMap) } @@ -2139,9 +2163,6 @@ func (v *VirtualNetworkPropertiesInfraVnetProfile) UnmarshalJSON(data []byte) er case "hci": err = unpopulate(val, "Hci", &v.Hci) delete(rawMsg, key) - case "vmware": - err = unpopulate(val, "Vmware", &v.Vmware) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", v, err) @@ -2185,33 +2206,6 @@ func (v *VirtualNetworkPropertiesInfraVnetProfileHci) UnmarshalJSON(data []byte) return nil } -// MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesInfraVnetProfileVmware. -func (v VirtualNetworkPropertiesInfraVnetProfileVmware) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "segmentName", v.SegmentName) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkPropertiesInfraVnetProfileVmware. -func (v *VirtualNetworkPropertiesInfraVnetProfileVmware) 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", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "segmentName": - err = unpopulate(val, "SegmentName", &v.SegmentName) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type VirtualNetworkPropertiesStatus. func (v VirtualNetworkPropertiesStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2244,7 +2238,6 @@ func (v VirtualNetworkPropertiesStatusOperationStatus) MarshalJSON() ([]byte, er objectMap := make(map[string]any) populate(objectMap, "error", v.Error) populate(objectMap, "operationId", v.OperationID) - populate(objectMap, "phase", v.Phase) populate(objectMap, "status", v.Status) return json.Marshal(objectMap) } @@ -2264,9 +2257,6 @@ func (v *VirtualNetworkPropertiesStatusOperationStatus) UnmarshalJSON(data []byt case "operationId": err = unpopulate(val, "OperationID", &v.OperationID) delete(rawMsg, key) - case "phase": - err = unpopulate(val, "Phase", &v.Phase) - delete(rawMsg, key) case "status": err = unpopulate(val, "Status", &v.Status) delete(rawMsg, key) diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/operations_client.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/operations_client.go index 211ab360add1..53597f1bfa8f 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/operations_client.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/operations_client.go @@ -37,7 +37,10 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO return client, nil } -// - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. +// NewListPager - Lists the supported operations +// +// Generated from API version 2024-01-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]{ More: func(page OperationsClientListResponse) bool { @@ -69,7 +72,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/operations_client_example_test.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/operations_client_example_test.go index 6464cd7851f9..5d66586b0990 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/operations_client_example_test.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/ListOperations.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListOperations.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/options.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/options.go index 35b819859e01..ef53b1212cda 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/options.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/options.go @@ -21,18 +21,12 @@ type AgentPoolClientBeginDeleteOptions struct { ResumeToken string } -// AgentPoolClientBeginUpdateOptions contains the optional parameters for the AgentPoolClient.BeginUpdate method. -type AgentPoolClientBeginUpdateOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // AgentPoolClientGetOptions contains the optional parameters for the AgentPoolClient.Get method. type AgentPoolClientGetOptions struct { // placeholder for future optional parameters } -// AgentPoolClientListByProvisionedClusterOptions contains the optional parameters for the AgentPoolClient.ListByProvisionedCluster +// AgentPoolClientListByProvisionedClusterOptions contains the optional parameters for the AgentPoolClient.NewListByProvisionedClusterPager // method. type AgentPoolClientListByProvisionedClusterOptions struct { // placeholder for future optional parameters diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/provisionedclusterinstances_client.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/provisionedclusterinstances_client.go index 9362b6929ebf..b6a7f795c329 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/provisionedclusterinstances_client.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/provisionedclusterinstances_client.go @@ -38,14 +38,15 @@ func NewProvisionedClusterInstancesClient(credential azcore.TokenCredential, opt return client, nil } -// BeginCreateOrUpdate - Creates the Hybrid AKS provisioned cluster instance +// BeginCreateOrUpdate - Creates or updates the provisioned cluster instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. +// Generated from API version 2024-01-01 +// - connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource. +// - provisionedClusterInstance - Provisioned Cluster resource definition // - options - ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginCreateOrUpdate // method. -func (client *ProvisionedClusterInstancesClient) BeginCreateOrUpdate(ctx context.Context, connectedClusterResourceURI string, provisionedClusterInstance ProvisionedClusters, options *ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ProvisionedClusterInstancesClientCreateOrUpdateResponse], error) { +func (client *ProvisionedClusterInstancesClient) BeginCreateOrUpdate(ctx context.Context, connectedClusterResourceURI string, provisionedClusterInstance ProvisionedCluster, options *ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions) (*runtime.Poller[ProvisionedClusterInstancesClientCreateOrUpdateResponse], error) { if options == nil || options.ResumeToken == "" { resp, err := client.createOrUpdate(ctx, connectedClusterResourceURI, provisionedClusterInstance, options) if err != nil { @@ -63,11 +64,11 @@ func (client *ProvisionedClusterInstancesClient) BeginCreateOrUpdate(ctx context } } -// CreateOrUpdate - Creates the Hybrid AKS provisioned cluster instance +// CreateOrUpdate - Creates or updates the provisioned cluster instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -func (client *ProvisionedClusterInstancesClient) createOrUpdate(ctx context.Context, connectedClusterResourceURI string, provisionedClusterInstance ProvisionedClusters, options *ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions) (*http.Response, error) { +// Generated from API version 2024-01-01 +func (client *ProvisionedClusterInstancesClient) createOrUpdate(ctx context.Context, connectedClusterResourceURI string, provisionedClusterInstance ProvisionedCluster, options *ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ProvisionedClusterInstancesClient.BeginCreateOrUpdate" ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) @@ -89,7 +90,7 @@ func (client *ProvisionedClusterInstancesClient) createOrUpdate(ctx context.Cont } // createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ProvisionedClusterInstancesClient) createOrUpdateCreateRequest(ctx context.Context, connectedClusterResourceURI string, provisionedClusterInstance ProvisionedClusters, options *ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { +func (client *ProvisionedClusterInstancesClient) createOrUpdateCreateRequest(ctx context.Context, connectedClusterResourceURI string, provisionedClusterInstance ProvisionedCluster, options *ProvisionedClusterInstancesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { urlPath := "/{connectedClusterResourceUri}/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default" urlPath = strings.ReplaceAll(urlPath, "{connectedClusterResourceUri}", connectedClusterResourceURI) req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) @@ -97,7 +98,7 @@ func (client *ProvisionedClusterInstancesClient) createOrUpdateCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, provisionedClusterInstance); err != nil { @@ -106,11 +107,11 @@ func (client *ProvisionedClusterInstancesClient) createOrUpdateCreateRequest(ctx return req, nil } -// BeginDelete - Deletes the Hybrid AKS provisioned cluster instance +// BeginDelete - Deletes the provisioned cluster instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. +// Generated from API version 2024-01-01 +// - connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource. // - options - ProvisionedClusterInstancesClientBeginDeleteOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginDelete // method. func (client *ProvisionedClusterInstancesClient) BeginDelete(ctx context.Context, connectedClusterResourceURI string, options *ProvisionedClusterInstancesClientBeginDeleteOptions) (*runtime.Poller[ProvisionedClusterInstancesClientDeleteResponse], error) { @@ -131,10 +132,10 @@ func (client *ProvisionedClusterInstancesClient) BeginDelete(ctx context.Context } } -// Delete - Deletes the Hybrid AKS provisioned cluster instance +// Delete - Deletes the provisioned cluster instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 func (client *ProvisionedClusterInstancesClient) deleteOperation(ctx context.Context, connectedClusterResourceURI string, options *ProvisionedClusterInstancesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ProvisionedClusterInstancesClient.BeginDelete" @@ -165,17 +166,17 @@ func (client *ProvisionedClusterInstancesClient) deleteCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// Get - Gets the Hybrid AKS provisioned cluster instance +// Get - Gets the provisioned cluster instance // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. +// Generated from API version 2024-01-01 +// - connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource. // - options - ProvisionedClusterInstancesClientGetOptions contains the optional parameters for the ProvisionedClusterInstancesClient.Get // method. func (client *ProvisionedClusterInstancesClient) Get(ctx context.Context, connectedClusterResourceURI string, options *ProvisionedClusterInstancesClientGetOptions) (ProvisionedClusterInstancesClientGetResponse, error) { @@ -209,7 +210,7 @@ func (client *ProvisionedClusterInstancesClient) getCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -218,17 +219,17 @@ func (client *ProvisionedClusterInstancesClient) getCreateRequest(ctx context.Co // getHandleResponse handles the Get response. func (client *ProvisionedClusterInstancesClient) getHandleResponse(resp *http.Response) (ProvisionedClusterInstancesClientGetResponse, error) { result := ProvisionedClusterInstancesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProvisionedClusters); err != nil { + if err := runtime.UnmarshalAsJSON(resp, &result.ProvisionedCluster); err != nil { return ProvisionedClusterInstancesClientGetResponse{}, err } return result, nil } -// GetUpgradeProfile - Gets the upgrade profile of a provisioned cluster instance. +// GetUpgradeProfile - Gets the upgrade profile of a provisioned cluster // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. +// Generated from API version 2024-01-01 +// - connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource. // - options - ProvisionedClusterInstancesClientGetUpgradeProfileOptions contains the optional parameters for the ProvisionedClusterInstancesClient.GetUpgradeProfile // method. func (client *ProvisionedClusterInstancesClient) GetUpgradeProfile(ctx context.Context, connectedClusterResourceURI string, options *ProvisionedClusterInstancesClientGetUpgradeProfileOptions) (ProvisionedClusterInstancesClientGetUpgradeProfileResponse, error) { @@ -262,7 +263,7 @@ func (client *ProvisionedClusterInstancesClient) getUpgradeProfileCreateRequest( return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -277,10 +278,10 @@ func (client *ProvisionedClusterInstancesClient) getUpgradeProfileHandleResponse return result, nil } -// NewListPager - Gets the Hybrid AKS provisioned cluster instances associated with the connected cluster +// NewListPager - Lists the ProvisionedClusterInstance resource associated with the ConnectedCluster // -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. +// Generated from API version 2024-01-01 +// - connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource. // - options - ProvisionedClusterInstancesClientListOptions contains the optional parameters for the ProvisionedClusterInstancesClient.NewListPager // method. func (client *ProvisionedClusterInstancesClient) NewListPager(connectedClusterResourceURI string, options *ProvisionedClusterInstancesClientListOptions) *runtime.Pager[ProvisionedClusterInstancesClientListResponse] { @@ -315,7 +316,7 @@ func (client *ProvisionedClusterInstancesClient) listCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -324,17 +325,17 @@ func (client *ProvisionedClusterInstancesClient) listCreateRequest(ctx context.C // listHandleResponse handles the List response. func (client *ProvisionedClusterInstancesClient) listHandleResponse(resp *http.Response) (ProvisionedClusterInstancesClientListResponse, error) { result := ProvisionedClusterInstancesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ProvisionedClustersListResult); err != nil { + if err := runtime.UnmarshalAsJSON(resp, &result.ProvisionedClusterListResult); err != nil { return ProvisionedClusterInstancesClientListResponse{}, err } return result, nil } -// BeginListAdminKubeconfig - Lists the admin credentials of a provisioned cluster instance used only in direct mode. +// BeginListAdminKubeconfig - Lists the admin credentials of the provisioned cluster (can only be used within private network) // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. +// Generated from API version 2024-01-01 +// - connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource. // - options - ProvisionedClusterInstancesClientBeginListAdminKubeconfigOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginListAdminKubeconfig // method. func (client *ProvisionedClusterInstancesClient) BeginListAdminKubeconfig(ctx context.Context, connectedClusterResourceURI string, options *ProvisionedClusterInstancesClientBeginListAdminKubeconfigOptions) (*runtime.Poller[ProvisionedClusterInstancesClientListAdminKubeconfigResponse], error) { @@ -355,10 +356,10 @@ func (client *ProvisionedClusterInstancesClient) BeginListAdminKubeconfig(ctx co } } -// ListAdminKubeconfig - Lists the admin credentials of a provisioned cluster instance used only in direct mode. +// ListAdminKubeconfig - Lists the admin credentials of the provisioned cluster (can only be used within private network) // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 func (client *ProvisionedClusterInstancesClient) listAdminKubeconfig(ctx context.Context, connectedClusterResourceURI string, options *ProvisionedClusterInstancesClientBeginListAdminKubeconfigOptions) (*http.Response, error) { var err error const operationName = "ProvisionedClusterInstancesClient.BeginListAdminKubeconfig" @@ -389,17 +390,17 @@ func (client *ProvisionedClusterInstancesClient) listAdminKubeconfigCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginListUserKubeconfig - Lists the AAD user credentials of a provisioned cluster instance used only in direct mode. +// BeginListUserKubeconfig - Lists the user credentials of the provisioned cluster (can only be used within private network) // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview -// - connectedClusterResourceURI - The fully qualified Azure Resource manager identifier of the connected cluster resource. +// Generated from API version 2024-01-01 +// - connectedClusterResourceURI - The fully qualified Azure Resource Manager identifier of the connected cluster resource. // - options - ProvisionedClusterInstancesClientBeginListUserKubeconfigOptions contains the optional parameters for the ProvisionedClusterInstancesClient.BeginListUserKubeconfig // method. func (client *ProvisionedClusterInstancesClient) BeginListUserKubeconfig(ctx context.Context, connectedClusterResourceURI string, options *ProvisionedClusterInstancesClientBeginListUserKubeconfigOptions) (*runtime.Poller[ProvisionedClusterInstancesClientListUserKubeconfigResponse], error) { @@ -420,10 +421,10 @@ func (client *ProvisionedClusterInstancesClient) BeginListUserKubeconfig(ctx con } } -// ListUserKubeconfig - Lists the AAD user credentials of a provisioned cluster instance used only in direct mode. +// ListUserKubeconfig - Lists the user credentials of the provisioned cluster (can only be used within private network) // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 func (client *ProvisionedClusterInstancesClient) listUserKubeconfig(ctx context.Context, connectedClusterResourceURI string, options *ProvisionedClusterInstancesClientBeginListUserKubeconfigOptions) (*http.Response, error) { var err error const operationName = "ProvisionedClusterInstancesClient.BeginListUserKubeconfig" @@ -454,7 +455,7 @@ func (client *ProvisionedClusterInstancesClient) listUserKubeconfigCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/provisionedclusterinstances_client_example_test.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/provisionedclusterinstances_client_example_test.go index ddfca9738d97..911405a11d3d 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/provisionedclusterinstances_client_example_test.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/provisionedclusterinstances_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/GetProvisionedClusterInstance.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/GetProvisionedClusterInstance.json func ExampleProvisionedClusterInstancesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -36,7 +36,7 @@ func ExampleProvisionedClusterInstancesClient_Get() { // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ProvisionedClusters = armhybridcontainerservice.ProvisionedClusters{ + // res.ProvisionedCluster = armhybridcontainerservice.ProvisionedCluster{ // Name: to.Ptr("test-hybridakscluster"), // Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default"), @@ -59,15 +59,6 @@ func ExampleProvisionedClusterInstancesClient_Get() { // }, // }, // ControlPlane: &armhybridcontainerservice.ControlPlaneProfile{ - // LinuxProfile: &armhybridcontainerservice.LinuxProfileProperties{ - // SSH: &armhybridcontainerservice.LinuxProfilePropertiesSSH{ - // PublicKeys: []*armhybridcontainerservice.LinuxProfilePropertiesSSHPublicKeysItem{ - // { - // KeyData: to.Ptr("ssh-rsa AAAAB1NzaC1yc2EAAAADAQABAAACAQCY......"), - // }}, - // }, - // }, - // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), // Count: to.Ptr[int32](1), // VMSize: to.Ptr("Standard_A4_v2"), // }, @@ -92,7 +83,7 @@ func ExampleProvisionedClusterInstancesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/PutProvisionedClusterInstance.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/PutProvisionedClusterInstance.json func ExampleProvisionedClusterInstancesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -103,7 +94,7 @@ func ExampleProvisionedClusterInstancesClient_BeginCreateOrUpdate() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewProvisionedClusterInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", armhybridcontainerservice.ProvisionedClusters{ + poller, err := clientFactory.NewProvisionedClusterInstancesClient().BeginCreateOrUpdate(ctx, "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster", armhybridcontainerservice.ProvisionedCluster{ ExtendedLocation: &armhybridcontainerservice.ExtendedLocation{ Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"), Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation), @@ -111,7 +102,14 @@ func ExampleProvisionedClusterInstancesClient_BeginCreateOrUpdate() { Properties: &armhybridcontainerservice.ProvisionedClusterProperties{ AgentPoolProfiles: []*armhybridcontainerservice.NamedAgentPoolProfile{ { - Name: to.Ptr("default-nodepool-1"), + Name: to.Ptr("default-nodepool-1"), + NodeLabels: map[string]*string{ + "env": to.Ptr("dev"), + "goal": to.Ptr("test"), + }, + NodeTaints: []*string{ + to.Ptr("env=prod:NoSchedule"), + to.Ptr("sku=gpu:NoSchedule")}, OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), Count: to.Ptr[int32](1), VMSize: to.Ptr("Standard_A4_v2"), @@ -122,16 +120,10 @@ func ExampleProvisionedClusterInstancesClient_BeginCreateOrUpdate() { to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.AzureStackHCI/logicalNetworks/test-vnet-static")}, }, }, + ClusterVMAccessProfile: &armhybridcontainerservice.ClusterVMAccessProfile{ + AuthorizedIPRanges: to.Ptr("127.0.0.1,127.0.0.2"), + }, ControlPlane: &armhybridcontainerservice.ControlPlaneProfile{ - LinuxProfile: &armhybridcontainerservice.LinuxProfileProperties{ - SSH: &armhybridcontainerservice.LinuxProfilePropertiesSSH{ - PublicKeys: []*armhybridcontainerservice.LinuxProfilePropertiesSSHPublicKeysItem{ - { - KeyData: to.Ptr("ssh-rsa AAAAB1NzaC1yc2EAAAADAQABAAACAQCY......"), - }}, - }, - }, - OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), Count: to.Ptr[int32](1), VMSize: to.Ptr("Standard_A4_v2"), }, @@ -163,7 +155,7 @@ func ExampleProvisionedClusterInstancesClient_BeginCreateOrUpdate() { // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.ProvisionedClusters = armhybridcontainerservice.ProvisionedClusters{ + // res.ProvisionedCluster = armhybridcontainerservice.ProvisionedCluster{ // Name: to.Ptr("test-hybridakscluster"), // Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default"), @@ -175,51 +167,49 @@ func ExampleProvisionedClusterInstancesClient_BeginCreateOrUpdate() { // AgentPoolProfiles: []*armhybridcontainerservice.NamedAgentPoolProfile{ // { // Name: to.Ptr("default-nodepool-1"), - // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), - // Count: to.Ptr[int32](1), - // VMSize: to.Ptr("Standard_A4_v2"), - // }}, - // CloudProviderProfile: &armhybridcontainerservice.CloudProviderProfile{ - // InfraNetworkProfile: &armhybridcontainerservice.CloudProviderProfileInfraNetworkProfile{ - // VnetSubnetIDs: []*string{ - // to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.AzureStackHCI/logicalNetworks/test-vnet-static")}, + // NodeLabels: map[string]*string{ + // "env": to.Ptr("dev"), + // "goal": to.Ptr("test"), + // }, + // NodeTaints: []*string{ + // to.Ptr("env=prod:NoSchedule"), + // to.Ptr("sku=gpu:NoSchedule")}, + // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), + // Count: to.Ptr[int32](1), + // VMSize: to.Ptr("Standard_A4_v2"), + // }}, + // CloudProviderProfile: &armhybridcontainerservice.CloudProviderProfile{ + // InfraNetworkProfile: &armhybridcontainerservice.CloudProviderProfileInfraNetworkProfile{ + // VnetSubnetIDs: []*string{ + // to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourceGroups/test-arcappliance-resgrp/providers/Microsoft.AzureStackHCI/logicalNetworks/test-vnet-static")}, + // }, + // }, + // ControlPlane: &armhybridcontainerservice.ControlPlaneProfile{ + // Count: to.Ptr[int32](1), + // VMSize: to.Ptr("Standard_A4_v2"), + // }, + // KubernetesVersion: to.Ptr("v1.20.5"), + // LicenseProfile: &armhybridcontainerservice.ProvisionedClusterLicenseProfile{ + // AzureHybridBenefit: to.Ptr(armhybridcontainerservice.AzureHybridBenefitNotApplicable), // }, - // }, - // ControlPlane: &armhybridcontainerservice.ControlPlaneProfile{ // LinuxProfile: &armhybridcontainerservice.LinuxProfileProperties{ // SSH: &armhybridcontainerservice.LinuxProfilePropertiesSSH{ // PublicKeys: []*armhybridcontainerservice.LinuxProfilePropertiesSSHPublicKeysItem{ // { - // KeyData: to.Ptr("ssh-rsa AAAAB1NzaC1yc2EAAAADAQABAAACAQCY......"), + // KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCY......."), // }}, // }, // }, - // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), - // Count: to.Ptr[int32](1), - // VMSize: to.Ptr("Standard_A4_v2"), - // }, - // KubernetesVersion: to.Ptr("v1.20.5"), - // LicenseProfile: &armhybridcontainerservice.ProvisionedClusterLicenseProfile{ - // AzureHybridBenefit: to.Ptr(armhybridcontainerservice.AzureHybridBenefitNotApplicable), - // }, - // LinuxProfile: &armhybridcontainerservice.LinuxProfileProperties{ - // SSH: &armhybridcontainerservice.LinuxProfilePropertiesSSH{ - // PublicKeys: []*armhybridcontainerservice.LinuxProfilePropertiesSSHPublicKeysItem{ - // { - // KeyData: to.Ptr("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCY......."), - // }}, + // NetworkProfile: &armhybridcontainerservice.NetworkProfile{ + // NetworkPolicy: to.Ptr(armhybridcontainerservice.NetworkPolicyCalico), + // PodCidr: to.Ptr("10.244.0.0/16"), // }, + // ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded), // }, - // NetworkProfile: &armhybridcontainerservice.NetworkProfile{ - // NetworkPolicy: to.Ptr(armhybridcontainerservice.NetworkPolicyCalico), - // PodCidr: to.Ptr("10.244.0.0/16"), - // }, - // ProvisioningState: to.Ptr(armhybridcontainerservice.ResourceProvisioningStateSucceeded), - // }, - // } + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/DeleteProvisionedClusterInstance.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/DeleteProvisionedClusterInstance.json func ExampleProvisionedClusterInstancesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -240,7 +230,7 @@ func ExampleProvisionedClusterInstancesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/ListProvisionedClusterInstances.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListProvisionedClusterInstances.json func ExampleProvisionedClusterInstancesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -262,8 +252,8 @@ func ExampleProvisionedClusterInstancesClient_NewListPager() { _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.ProvisionedClustersListResult = armhybridcontainerservice.ProvisionedClustersListResult{ - // Value: []*armhybridcontainerservice.ProvisionedClusters{ + // page.ProvisionedClusterListResult = armhybridcontainerservice.ProvisionedClusterListResult{ + // Value: []*armhybridcontainerservice.ProvisionedCluster{ // { // Name: to.Ptr("test-hybridakscluster"), // Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances"), @@ -287,15 +277,6 @@ func ExampleProvisionedClusterInstancesClient_NewListPager() { // }, // }, // ControlPlane: &armhybridcontainerservice.ControlPlaneProfile{ - // LinuxProfile: &armhybridcontainerservice.LinuxProfileProperties{ - // SSH: &armhybridcontainerservice.LinuxProfilePropertiesSSH{ - // PublicKeys: []*armhybridcontainerservice.LinuxProfilePropertiesSSHPublicKeysItem{ - // { - // KeyData: to.Ptr("ssh-rsa AAAAB1NzaC1yc2EAAAADAQABAAACAQCY......"), - // }}, - // }, - // }, - // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), // Count: to.Ptr[int32](1), // VMSize: to.Ptr("Standard_A4_v2"), // }, @@ -322,7 +303,7 @@ func ExampleProvisionedClusterInstancesClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/ProvisionedClusterInstanceGetUpgradeProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ProvisionedClusterInstanceGetUpgradeProfile.json func ExampleProvisionedClusterInstancesClient_GetUpgradeProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -345,22 +326,7 @@ func ExampleProvisionedClusterInstancesClient_GetUpgradeProfile() { // Type: to.Ptr("Microsoft.HybridContainerService/provisionedClusterInstances/upgradeprofiles"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.Kubernetes/connectedClusters/test-hybridakscluster/providers/Microsoft.HybridContainerService/provisionedClusterInstances/default/upgradeprofiles/default"), // Properties: &armhybridcontainerservice.ProvisionedClusterUpgradeProfileProperties{ - // AgentPoolProfiles: []*armhybridcontainerservice.ProvisionedClusterPoolUpgradeProfile{ - // { - // Name: to.Ptr("agent"), - // KubernetesVersion: to.Ptr("1.7.7"), - // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), - // Upgrades: []*armhybridcontainerservice.ProvisionedClusterPoolUpgradeProfileProperties{ - // { - // KubernetesVersion: to.Ptr("1.7.9"), - // }, - // { - // IsPreview: to.Ptr(true), - // KubernetesVersion: to.Ptr("1.7.11"), - // }}, - // }}, // ControlPlaneProfile: &armhybridcontainerservice.ProvisionedClusterPoolUpgradeProfile{ - // Name: to.Ptr("master"), // KubernetesVersion: to.Ptr("1.7.7"), // OSType: to.Ptr(armhybridcontainerservice.OsTypeLinux), // Upgrades: []*armhybridcontainerservice.ProvisionedClusterPoolUpgradeProfileProperties{ @@ -376,7 +342,7 @@ func ExampleProvisionedClusterInstancesClient_GetUpgradeProfile() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/ProvisionedClusterInstanceListUserKubeconfig.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ProvisionedClusterInstanceListUserKubeconfig.json func ExampleProvisionedClusterInstancesClient_BeginListUserKubeconfig() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -413,7 +379,7 @@ func ExampleProvisionedClusterInstancesClient_BeginListUserKubeconfig() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/ProvisionedClusterInstanceListAdminKubeconfig.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ProvisionedClusterInstanceListAdminKubeconfig.json func ExampleProvisionedClusterInstancesClient_BeginListAdminKubeconfig() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/response_types.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/response_types.go index 15135de0eb86..e45a0b4194b8 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/response_types.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/response_types.go @@ -25,18 +25,12 @@ type AgentPoolClientGetResponse struct { AgentPool } -// AgentPoolClientListByProvisionedClusterResponse contains the response from method AgentPoolClient.ListByProvisionedCluster. +// AgentPoolClientListByProvisionedClusterResponse contains the response from method AgentPoolClient.NewListByProvisionedClusterPager. type AgentPoolClientListByProvisionedClusterResponse struct { - // A list of agent pool resources. + // List of all agent pool resources associated with the provisioned cluster. AgentPoolListResult } -// AgentPoolClientUpdateResponse contains the response from method AgentPoolClient.BeginUpdate. -type AgentPoolClientUpdateResponse struct { - // The agentPool resource definition - AgentPool -} - // ClientDeleteKubernetesVersionsResponse contains the response from method Client.BeginDeleteKubernetesVersions. type ClientDeleteKubernetesVersionsResponse struct { // placeholder for future response values @@ -96,7 +90,7 @@ type HybridIdentityMetadataClientPutResponse struct { // KubernetesVersionsClientListResponse contains the response from method KubernetesVersionsClient.NewListPager. type KubernetesVersionsClientListResponse struct { - // A list of kubernetes version resources. + // List of supported kubernetes versions. KubernetesVersionProfileList } @@ -108,8 +102,8 @@ type OperationsClientListResponse struct { // ProvisionedClusterInstancesClientCreateOrUpdateResponse contains the response from method ProvisionedClusterInstancesClient.BeginCreateOrUpdate. type ProvisionedClusterInstancesClientCreateOrUpdateResponse struct { - // The provisionedClusterInstances resource definition. - ProvisionedClusters + // The provisioned cluster resource definition. + ProvisionedCluster } // ProvisionedClusterInstancesClientDeleteResponse contains the response from method ProvisionedClusterInstancesClient.BeginDelete. @@ -119,13 +113,13 @@ type ProvisionedClusterInstancesClientDeleteResponse struct { // ProvisionedClusterInstancesClientGetResponse contains the response from method ProvisionedClusterInstancesClient.Get. type ProvisionedClusterInstancesClientGetResponse struct { - // The provisionedClusterInstances resource definition. - ProvisionedClusters + // The provisioned cluster resource definition. + ProvisionedCluster } // ProvisionedClusterInstancesClientGetUpgradeProfileResponse contains the response from method ProvisionedClusterInstancesClient.GetUpgradeProfile. type ProvisionedClusterInstancesClientGetUpgradeProfileResponse struct { - // The list of available upgrades for compute pools. + // The list of available kubernetes version upgrades for the provisioned cluster. ProvisionedClusterUpgradeProfile } @@ -137,8 +131,8 @@ type ProvisionedClusterInstancesClientListAdminKubeconfigResponse struct { // ProvisionedClusterInstancesClientListResponse contains the response from method ProvisionedClusterInstancesClient.NewListPager. type ProvisionedClusterInstancesClientListResponse struct { - // A list of provisioned clusters resources. - ProvisionedClustersListResult + // Lists the ProvisionedClusterInstance resource associated with the ConnectedCluster. + ProvisionedClusterListResult } // ProvisionedClusterInstancesClientListUserKubeconfigResponse contains the response from method ProvisionedClusterInstancesClient.BeginListUserKubeconfig. @@ -149,13 +143,13 @@ type ProvisionedClusterInstancesClientListUserKubeconfigResponse struct { // VMSKUsClientListResponse contains the response from method VMSKUsClient.NewListPager. type VMSKUsClientListResponse struct { - // A list of VM SKU resources. + // The list of supported VM SKUs. VMSKUProfileList } // VirtualNetworksClientCreateOrUpdateResponse contains the response from method VirtualNetworksClient.BeginCreateOrUpdate. type VirtualNetworksClientCreateOrUpdateResponse struct { - // The virtualNetworks resource definition. + // The Virtual Network resource definition. VirtualNetwork } @@ -166,22 +160,24 @@ type VirtualNetworksClientDeleteResponse struct { // VirtualNetworksClientListByResourceGroupResponse contains the response from method VirtualNetworksClient.NewListByResourceGroupPager. type VirtualNetworksClientListByResourceGroupResponse struct { + // A list of virtual network resources. VirtualNetworksListResult } // VirtualNetworksClientListBySubscriptionResponse contains the response from method VirtualNetworksClient.NewListBySubscriptionPager. type VirtualNetworksClientListBySubscriptionResponse struct { + // A list of virtual network resources. VirtualNetworksListResult } // VirtualNetworksClientRetrieveResponse contains the response from method VirtualNetworksClient.Retrieve. type VirtualNetworksClientRetrieveResponse struct { - // The virtualNetworks resource definition. + // The Virtual Network resource definition. VirtualNetwork } // VirtualNetworksClientUpdateResponse contains the response from method VirtualNetworksClient.BeginUpdate. type VirtualNetworksClientUpdateResponse struct { - // The virtualNetworks resource definition. + // The Virtual Network resource definition. VirtualNetwork } diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/virtualnetworks_client.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/virtualnetworks_client.go index 0cbbad08b11f..facb5b961a69 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/virtualnetworks_client.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/virtualnetworks_client.go @@ -43,12 +43,13 @@ func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCred return client, nil } -// BeginCreateOrUpdate - Puts the Hybrid AKS virtual network +// BeginCreateOrUpdate - Creates or updates the virtual network resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualNetworkName - Parameter for the name of the virtual network +// - virtualNetworks - Virtual Network resource definition // - options - VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate // method. func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworks VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworksClientCreateOrUpdateResponse], error) { @@ -69,10 +70,10 @@ func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, re } } -// CreateOrUpdate - Puts the Hybrid AKS virtual network +// CreateOrUpdate - Creates or updates the virtual network resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 func (client *VirtualNetworksClient) createOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworks VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "VirtualNetworksClient.BeginCreateOrUpdate" @@ -114,7 +115,7 @@ func (client *VirtualNetworksClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, virtualNetworks); err != nil { @@ -123,10 +124,10 @@ func (client *VirtualNetworksClient) createOrUpdateCreateRequest(ctx context.Con return req, nil } -// BeginDelete - Deletes the Hybrid AKS virtual network +// BeginDelete - Deletes the specified virtual network resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualNetworkName - Parameter for the name of the virtual network // - options - VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete @@ -149,10 +150,10 @@ func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGr } } -// Delete - Deletes the Hybrid AKS virtual network +// Delete - Deletes the specified virtual network resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 func (client *VirtualNetworksClient) deleteOperation(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "VirtualNetworksClient.BeginDelete" @@ -194,15 +195,15 @@ func (client *VirtualNetworksClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// NewListByResourceGroupPager - Lists the Hybrid AKS virtual networks by resource group +// NewListByResourceGroupPager - Lists the virtual networks in the specified resource group // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - VirtualNetworksClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworksClient.NewListByResourceGroupPager // method. @@ -245,7 +246,7 @@ func (client *VirtualNetworksClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,9 +261,9 @@ func (client *VirtualNetworksClient) listByResourceGroupHandleResponse(resp *htt return result, nil } -// NewListBySubscriptionPager - Lists the Hybrid AKS virtual networks by subscription +// NewListBySubscriptionPager - Lists the virtual networks in the specified subscription // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 // - options - VirtualNetworksClientListBySubscriptionOptions contains the optional parameters for the VirtualNetworksClient.NewListBySubscriptionPager // method. func (client *VirtualNetworksClient) NewListBySubscriptionPager(options *VirtualNetworksClientListBySubscriptionOptions) *runtime.Pager[VirtualNetworksClientListBySubscriptionResponse] { @@ -300,7 +301,7 @@ func (client *VirtualNetworksClient) listBySubscriptionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -315,10 +316,10 @@ func (client *VirtualNetworksClient) listBySubscriptionHandleResponse(resp *http return result, nil } -// Retrieve - Gets the Hybrid AKS virtual network +// Retrieve - Gets the specified virtual network resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualNetworkName - Parameter for the name of the virtual network // - options - VirtualNetworksClientRetrieveOptions contains the optional parameters for the VirtualNetworksClient.Retrieve @@ -365,7 +366,7 @@ func (client *VirtualNetworksClient) retrieveCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -380,12 +381,13 @@ func (client *VirtualNetworksClient) retrieveHandleResponse(resp *http.Response) return result, nil } -// BeginUpdate - Patches the Hybrid AKS virtual network +// BeginUpdate - Patches the virtual network resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - virtualNetworkName - Parameter for the name of the virtual network +// - virtualNetworks - Virtual Network resource patch definition // - options - VirtualNetworksClientBeginUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginUpdate // method. func (client *VirtualNetworksClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworks VirtualNetworksPatch, options *VirtualNetworksClientBeginUpdateOptions) (*runtime.Poller[VirtualNetworksClientUpdateResponse], error) { @@ -406,10 +408,10 @@ func (client *VirtualNetworksClient) BeginUpdate(ctx context.Context, resourceGr } } -// Update - Patches the Hybrid AKS virtual network +// Update - Patches the virtual network resource // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-15-preview +// Generated from API version 2024-01-01 func (client *VirtualNetworksClient) update(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworks VirtualNetworksPatch, options *VirtualNetworksClientBeginUpdateOptions) (*http.Response, error) { var err error const operationName = "VirtualNetworksClient.BeginUpdate" @@ -451,7 +453,7 @@ func (client *VirtualNetworksClient) updateCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, virtualNetworks); err != nil { diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/virtualnetworks_client_example_test.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/virtualnetworks_client_example_test.go index 6f5910741fb6..5cd790b28053 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/virtualnetworks_client_example_test.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/virtualnetworks_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/GetVirtualNetwork.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/GetVirtualNetwork.json func ExampleVirtualNetworksClient_Retrieve() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -43,15 +43,17 @@ func ExampleVirtualNetworksClient_Retrieve() { // Location: to.Ptr("westus"), // ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{ // Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"), - // Type: to.Ptr("CustomLocation"), + // Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation), // }, // Properties: &armhybridcontainerservice.VirtualNetworkProperties{ // DNSServers: []*string{ // to.Ptr("192.168.0.1")}, // Gateway: to.Ptr("192.168.0.1"), // InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{ - // Vmware: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileVmware{ - // SegmentName: to.Ptr("test-network"), + // Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{ + // MocGroup: to.Ptr("target-group"), + // MocLocation: to.Ptr("MocLocation"), + // MocVnetName: to.Ptr("vnet1"), // }, // }, // IPAddressPrefix: to.Ptr("192.168.0.0/16"), @@ -71,7 +73,7 @@ func ExampleVirtualNetworksClient_Retrieve() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/PutVirtualNetwork.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/PutVirtualNetwork.json func ExampleVirtualNetworksClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -86,15 +88,17 @@ func ExampleVirtualNetworksClient_BeginCreateOrUpdate() { Location: to.Ptr("westus"), ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{ Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"), - Type: to.Ptr("CustomLocation"), + Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation), }, Properties: &armhybridcontainerservice.VirtualNetworkProperties{ DNSServers: []*string{ to.Ptr("192.168.0.1")}, Gateway: to.Ptr("192.168.0.1"), InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{ - Vmware: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileVmware{ - SegmentName: to.Ptr("test-network"), + Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{ + MocGroup: to.Ptr("target-group"), + MocLocation: to.Ptr("MocLocation"), + MocVnetName: to.Ptr("vnet1"), }, }, IPAddressPrefix: to.Ptr("192.168.0.0/16"), @@ -128,15 +132,17 @@ func ExampleVirtualNetworksClient_BeginCreateOrUpdate() { // Location: to.Ptr("westus"), // ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{ // Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"), - // Type: to.Ptr("CustomLocation"), + // Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation), // }, // Properties: &armhybridcontainerservice.VirtualNetworkProperties{ // DNSServers: []*string{ // to.Ptr("192.168.0.1")}, // Gateway: to.Ptr("192.168.0.1"), // InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{ - // Vmware: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileVmware{ - // SegmentName: to.Ptr("test-network"), + // Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{ + // MocGroup: to.Ptr("target-group"), + // MocLocation: to.Ptr("MocLocation"), + // MocVnetName: to.Ptr("vnet1"), // }, // }, // IPAddressPrefix: to.Ptr("192.168.0.0/16"), @@ -156,7 +162,7 @@ func ExampleVirtualNetworksClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/DeleteVirtualNetwork.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/DeleteVirtualNetwork.json func ExampleVirtualNetworksClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -177,7 +183,7 @@ func ExampleVirtualNetworksClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/UpdateVirtualNetwork.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/UpdateVirtualNetwork.json func ExampleVirtualNetworksClient_BeginUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -213,15 +219,17 @@ func ExampleVirtualNetworksClient_BeginUpdate() { // }, // ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{ // Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"), - // Type: to.Ptr("CustomLocation"), + // Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation), // }, // Properties: &armhybridcontainerservice.VirtualNetworkProperties{ // DNSServers: []*string{ // to.Ptr("192.168.0.1")}, // Gateway: to.Ptr("192.168.0.1"), // InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{ - // Vmware: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileVmware{ - // SegmentName: to.Ptr("test-network"), + // Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{ + // MocGroup: to.Ptr("target-group"), + // MocLocation: to.Ptr("MocLocation"), + // MocVnetName: to.Ptr("vnet1"), // }, // }, // IPAddressPrefix: to.Ptr("192.168.0.0/16"), @@ -241,7 +249,7 @@ func ExampleVirtualNetworksClient_BeginUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/ListVirtualNetworkByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListVirtualNetworkByResourceGroup.json func ExampleVirtualNetworksClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -272,15 +280,17 @@ func ExampleVirtualNetworksClient_NewListByResourceGroupPager() { // Location: to.Ptr("westus"), // ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{ // Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"), - // Type: to.Ptr("CustomLocation"), + // Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation), // }, // Properties: &armhybridcontainerservice.VirtualNetworkProperties{ // DNSServers: []*string{ // to.Ptr("192.168.0.1")}, // Gateway: to.Ptr("192.168.0.1"), // InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{ - // Vmware: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileVmware{ - // SegmentName: to.Ptr("test-network"), + // Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{ + // MocGroup: to.Ptr("target-group"), + // MocLocation: to.Ptr("MocLocation"), + // MocVnetName: to.Ptr("vnet1"), // }, // }, // IPAddressPrefix: to.Ptr("192.168.0.0/16"), @@ -302,7 +312,7 @@ func ExampleVirtualNetworksClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/ListVirtualNetworkBySubscription.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListVirtualNetworkBySubscription.json func ExampleVirtualNetworksClient_NewListBySubscriptionPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -333,15 +343,17 @@ func ExampleVirtualNetworksClient_NewListBySubscriptionPager() { // Location: to.Ptr("westus"), // ExtendedLocation: &armhybridcontainerservice.VirtualNetworkExtendedLocation{ // Name: to.Ptr("/subscriptions/a3e42606-29b1-4d7d-b1d9-9ff6b9d3c71b/resourcegroups/test-arcappliance-resgrp/providers/microsoft.extendedlocation/customlocations/testcustomlocation"), - // Type: to.Ptr("CustomLocation"), + // Type: to.Ptr(armhybridcontainerservice.ExtendedLocationTypesCustomLocation), // }, // Properties: &armhybridcontainerservice.VirtualNetworkProperties{ // DNSServers: []*string{ // to.Ptr("192.168.0.1")}, // Gateway: to.Ptr("192.168.0.1"), // InfraVnetProfile: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfile{ - // Vmware: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileVmware{ - // SegmentName: to.Ptr("test-network"), + // Hci: &armhybridcontainerservice.VirtualNetworkPropertiesInfraVnetProfileHci{ + // MocGroup: to.Ptr("target-group"), + // MocLocation: to.Ptr("MocLocation"), + // MocVnetName: to.Ptr("vnet1"), // }, // }, // IPAddressPrefix: to.Ptr("192.168.0.0/16"), diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/vmskus_client.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/vmskus_client.go index cdb4a855a271..e0ef2aa61b0c 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/vmskus_client.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/vmskus_client.go @@ -38,10 +38,10 @@ func NewVMSKUsClient(credential azcore.TokenCredential, options *arm.ClientOptio return client, nil } -// NewListPager - Lists the supported VM SKUs from the underlying custom location +// NewListPager - Lists the supported VM skus for the specified custom location // -// Generated from API version 2023-11-15-preview -// - customLocationResourceURI - The fully qualified Azure Resource manager identifier of the custom location resource. +// Generated from API version 2024-01-01 +// - customLocationResourceURI - The fully qualified Azure Resource Manager identifier of the custom location resource. // - options - VMSKUsClientListOptions contains the optional parameters for the VMSKUsClient.NewListPager method. func (client *VMSKUsClient) NewListPager(customLocationResourceURI string, options *VMSKUsClientListOptions) *runtime.Pager[VMSKUsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[VMSKUsClientListResponse]{ @@ -75,7 +75,7 @@ func (client *VMSKUsClient) listCreateRequest(ctx context.Context, customLocatio return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-15-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/vmskus_client_example_test.go b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/vmskus_client_example_test.go index bd7fcd42c605..4c6a29de58da 100644 --- a/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/vmskus_client_example_test.go +++ b/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice/vmskus_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcontainerservice/armhybridcontainerservice" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4bb583bcb67c2bf448712f2bd1593a64a7a8f139/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/preview/2023-11-15-preview/examples/ListVmSkus.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/41e4538ed7bb3ceac3c1322c9455a0812ed110ac/specification/hybridaks/resource-manager/Microsoft.HybridContainerService/stable/2024-01-01/examples/ListVmSkus.json func ExampleVMSKUsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {