diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md b/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md index 36786849a5a6..12dc793d41ac 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md +++ b/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 8.2.0 (2025-12-25) +### Features Added + +- New value `OSSKUUbuntu2404` added to enum type `OSSKU` + + ## 8.2.0-beta.1 (2025-11-21) ### Features Added diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go index 4fee82dcff95..2cdc7fca9b17 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go @@ -43,10 +43,10 @@ func NewAgentPoolsClient(subscriptionID string, credential azcore.TokenCredentia // BeginAbortLatestOperation - Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a // Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes -// before cancellation can take place, an error is returned. +// before cancellation can take place, a 409 error code is returned. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -72,10 +72,10 @@ func (client *AgentPoolsClient) BeginAbortLatestOperation(ctx context.Context, r // AbortLatestOperation - Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling // state and eventually to a Canceled state when cancellation finishes. If the operation completes -// before cancellation can take place, an error is returned. +// before cancellation can take place, a 409 error code is returned. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *AgentPoolsClient) abortLatestOperation(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientBeginAbortLatestOperationOptions) (*http.Response, error) { var err error const operationName = "AgentPoolsClient.BeginAbortLatestOperation" @@ -121,89 +121,7 @@ func (client *AgentPoolsClient) abortLatestOperationCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// BeginCompleteUpgrade - Completes the upgrade operation for the specified agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - agentPoolName - The name of the agent pool. -// - options - AgentPoolsClientBeginCompleteUpgradeOptions contains the optional parameters for the AgentPoolsClient.BeginCompleteUpgrade -// method. -func (client *AgentPoolsClient) BeginCompleteUpgrade(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientBeginCompleteUpgradeOptions) (*runtime.Poller[AgentPoolsClientCompleteUpgradeResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.completeUpgrade(ctx, resourceGroupName, resourceName, agentPoolName, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AgentPoolsClientCompleteUpgradeResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AgentPoolsClientCompleteUpgradeResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CompleteUpgrade - Completes the upgrade operation for the specified agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -func (client *AgentPoolsClient) completeUpgrade(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientBeginCompleteUpgradeOptions) (*http.Response, error) { - var err error - const operationName = "AgentPoolsClient.BeginCompleteUpgrade" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.completeUpgradeCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, 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.StatusAccepted) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// completeUpgradeCreateRequest creates the CompleteUpgrade request. -func (client *AgentPoolsClient) completeUpgradeCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, _ *AgentPoolsClientBeginCompleteUpgradeOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/completeUpgrade" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - 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.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,7 +130,7 @@ func (client *AgentPoolsClient) completeUpgradeCreateRequest(ctx context.Context // BeginCreateOrUpdate - Creates or updates an agent pool in the specified managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -239,7 +157,7 @@ func (client *AgentPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourc // CreateOrUpdate - Creates or updates an agent pool in the specified managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *AgentPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool, options *AgentPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "AgentPoolsClient.BeginCreateOrUpdate" @@ -285,7 +203,7 @@ func (client *AgentPoolsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { @@ -303,7 +221,7 @@ func (client *AgentPoolsClient) createOrUpdateCreateRequest(ctx context.Context, // BeginDelete - Deletes an agent pool in the specified managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -328,7 +246,7 @@ func (client *AgentPoolsClient) BeginDelete(ctx context.Context, resourceGroupNa // Delete - Deletes an agent pool in the specified managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *AgentPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "AgentPoolsClient.BeginDelete" @@ -374,7 +292,7 @@ func (client *AgentPoolsClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") if options != nil && options.IgnorePodDisruptionBudget != nil { reqQP.Set("ignore-pod-disruption-budget", strconv.FormatBool(*options.IgnorePodDisruptionBudget)) } @@ -389,7 +307,7 @@ func (client *AgentPoolsClient) deleteCreateRequest(ctx context.Context, resourc // BeginDeleteMachines - Deletes specific machines in an agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -416,7 +334,7 @@ func (client *AgentPoolsClient) BeginDeleteMachines(ctx context.Context, resourc // DeleteMachines - Deletes specific machines in an agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *AgentPoolsClient) deleteMachines(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machines AgentPoolDeleteMachinesParameter, options *AgentPoolsClientBeginDeleteMachinesOptions) (*http.Response, error) { var err error const operationName = "AgentPoolsClient.BeginDeleteMachines" @@ -462,7 +380,7 @@ func (client *AgentPoolsClient) deleteMachinesCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, machines); err != nil { @@ -474,7 +392,7 @@ func (client *AgentPoolsClient) deleteMachinesCreateRequest(ctx context.Context, // Get - Gets the specified managed cluster agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -525,7 +443,7 @@ func (client *AgentPoolsClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -544,7 +462,7 @@ func (client *AgentPoolsClient) getHandleResponse(resp *http.Response) (AgentPoo // for more details about the version lifecycle. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - AgentPoolsClientGetAvailableAgentPoolVersionsOptions contains the optional parameters for the AgentPoolsClient.GetAvailableAgentPoolVersions @@ -591,7 +509,7 @@ func (client *AgentPoolsClient) getAvailableAgentPoolVersionsCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -609,7 +527,7 @@ func (client *AgentPoolsClient) getAvailableAgentPoolVersionsHandleResponse(resp // GetUpgradeProfile - Gets the upgrade profile for an agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -661,7 +579,7 @@ func (client *AgentPoolsClient) getUpgradeProfileCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -678,7 +596,7 @@ func (client *AgentPoolsClient) getUpgradeProfileHandleResponse(resp *http.Respo // NewListPager - Gets a list of agent pools in the specified managed cluster. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - AgentPoolsClientListOptions contains the optional parameters for the AgentPoolsClient.NewListPager method. @@ -725,7 +643,7 @@ func (client *AgentPoolsClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -745,7 +663,7 @@ func (client *AgentPoolsClient) listHandleResponse(resp *http.Response) (AgentPo // versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -774,7 +692,7 @@ func (client *AgentPoolsClient) BeginUpgradeNodeImageVersion(ctx context.Context // versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *AgentPoolsClient) upgradeNodeImageVersion(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientBeginUpgradeNodeImageVersionOptions) (*http.Response, error) { var err error const operationName = "AgentPoolsClient.BeginUpgradeNodeImageVersion" @@ -820,7 +738,7 @@ func (client *AgentPoolsClient) upgradeNodeImageVersionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go index 5b3a4bd2766f..8d577356cf36 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsAbortOperation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsAbortOperation.json func ExampleAgentPoolsClient_BeginAbortLatestOperation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -39,7 +39,7 @@ func ExampleAgentPoolsClient_BeginAbortLatestOperation() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsList.json func ExampleAgentPoolsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -82,7 +82,7 @@ func ExampleAgentPoolsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsGet.json func ExampleAgentPoolsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -120,8 +120,8 @@ func ExampleAgentPoolsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsAssociate_CRG.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_associateAgentPoolWithCapacityReservationGroup() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_Snapshot.json +func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPoolSnapshot() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -133,11 +133,14 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_associateAgentPoolWithCapacityR } poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{ Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - CapacityReservationGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"), - Count: to.Ptr[int32](3), - OrchestratorVersion: to.Ptr(""), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), + Count: to.Ptr[int32](3), + CreationData: &armcontainerservice.CreationData{ + SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), + }, + EnableFIPS: to.Ptr(true), + OrchestratorVersion: to.Ptr(""), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), }, }, &armcontainerservice.AgentPoolsClientBeginCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: nil, @@ -157,11 +160,14 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_associateAgentPoolWithCapacityR // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // CapacityReservationGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"), // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), + // CreationData: &armcontainerservice.CreationData{ + // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), + // }, + // CurrentOrchestratorVersion: to.Ptr("1.19.6"), + // EnableFIPS: to.Ptr(true), // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.9.6"), + // OrchestratorVersion: to.Ptr("1.19.6"), // OSType: to.Ptr(armcontainerservice.OSTypeLinux), // ProvisioningState: to.Ptr("Succeeded"), // VMSize: to.Ptr("Standard_DS2_v2"), @@ -169,8 +175,8 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_associateAgentPoolWithCapacityR // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_Snapshot.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPoolSnapshot() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_CRG.json +func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithCapacityReservationGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -182,14 +188,11 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPool } poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{ Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - Count: to.Ptr[int32](3), - CreationData: &armcontainerservice.CreationData{ - SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - }, - EnableFIPS: to.Ptr(true), - OrchestratorVersion: to.Ptr(""), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), + CapacityReservationGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"), + Count: to.Ptr[int32](3), + OrchestratorVersion: to.Ptr(""), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), }, }, &armcontainerservice.AgentPoolsClientBeginCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: nil, @@ -209,14 +212,11 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPool // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ + // CapacityReservationGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"), // Count: to.Ptr[int32](3), - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - // }, - // CurrentOrchestratorVersion: to.Ptr("1.19.6"), - // EnableFIPS: to.Ptr(true), + // CurrentOrchestratorVersion: to.Ptr("1.9.6"), // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.19.6"), + // OrchestratorVersion: to.Ptr("1.9.6"), // OSType: to.Ptr(armcontainerservice.OSTypeLinux), // ProvisioningState: to.Ptr("Succeeded"), // VMSize: to.Ptr("Standard_DS2_v2"), @@ -224,7 +224,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPool // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_DedicatedHostGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_DedicatedHostGroup.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithDedicatedHostGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -262,7 +262,6 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithDedicatedHos // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.19.6"), // HostGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"), // MaxPods: to.Ptr[int32](110), // OrchestratorVersion: to.Ptr("1.19.6"), @@ -273,7 +272,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithDedicatedHos // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_EnableEncryptionAtHost.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEncryptionAtHostEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -322,7 +321,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEncryptionAt // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_Ephemeral.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_Ephemeral.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEphemeralOsDisk() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -373,7 +372,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEphemeralOsD // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_EnableFIPS.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_EnableFIPS.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithFipsEnabledOs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -422,7 +421,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithFipsEnabledO // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_GPUMIG.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_GPUMIG.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithGpumig() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -517,7 +516,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithGpumig() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_WasmWasi.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_WasmWasi.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKrustletAndTheWasiRuntime() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -570,7 +569,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKrustletAndT // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_CustomNodeConfig.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKubeletConfigAndLinuxOsConfig() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -641,7 +640,6 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKubeletConfi // FailSwapOn: to.Ptr(false), // ImageGcHighThreshold: to.Ptr[int32](90), // ImageGcLowThreshold: to.Ptr[int32](70), - // SeccompDefault: to.Ptr(armcontainerservice.SeccompDefaultUnconfined), // TopologyManagerPolicy: to.Ptr("best-effort"), // }, // LinuxOSConfig: &armcontainerservice.LinuxOSConfig{ @@ -664,7 +662,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKubeletConfi // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_MessageOfTheDay.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_MessageOfTheDay.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithMessageOfTheDay() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -717,7 +715,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithMessageOfThe // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_OSSKU.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_OSSKU.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithOssku() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -812,7 +810,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithOssku() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_PPG.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_PPG.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithPpg() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -861,7 +859,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithPpg() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_EnableUltraSSD.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_EnableUltraSSD.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithUltraSsdEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -910,7 +908,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithUltraSsdEnab // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_TypeVirtualMachines.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithVirtualMachinesPoolType() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1007,92 +1005,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithVirtualMachi // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{ - Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachines), - NodeLabels: map[string]*string{ - "key1": to.Ptr("val1"), - }, - NodeTaints: []*string{ - to.Ptr("Key1=Value1:NoSchedule")}, - OrchestratorVersion: to.Ptr("1.29.0"), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - Tags: map[string]*string{ - "name1": to.Ptr("val1"), - }, - VirtualMachinesProfile: &armcontainerservice.VirtualMachinesProfile{ - Scale: &armcontainerservice.ScaleProfile{ - Autoscale: &armcontainerservice.AutoScaleProfile{ - MaxCount: to.Ptr[int32](5), - MinCount: to.Ptr[int32](1), - Size: to.Ptr("Standard_D2_v2"), - }, - }, - }, - }, - }, &armcontainerservice.AgentPoolsClientBeginCreateOrUpdateOptions{IfMatch: nil, - IfNoneMatch: 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 = armcontainerservice.AgentPool{ - // Name: to.Ptr("agentpool1"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachines), - // CurrentOrchestratorVersion: to.Ptr("1.29.0"), - // MaxPods: to.Ptr[int32](110), - // NodeImageVersion: to.Ptr("AKSUbuntu-1804gen2containerd-2021.09.11"), - // NodeLabels: map[string]*string{ - // "key1": to.Ptr("val1"), - // }, - // NodeTaints: []*string{ - // to.Ptr("Key1=Value1:NoSchedule")}, - // OrchestratorVersion: to.Ptr("1.29.0"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // Tags: map[string]*string{ - // "name1": to.Ptr("val1"), - // }, - // VirtualMachineNodesStatus: []*armcontainerservice.VirtualMachineNodes{ - // { - // Count: to.Ptr[int32](1), - // Size: to.Ptr("Standard_D2_v2"), - // }}, - // VirtualMachinesProfile: &armcontainerservice.VirtualMachinesProfile{ - // Scale: &armcontainerservice.ScaleProfile{ - // Autoscale: &armcontainerservice.AutoScaleProfile{ - // MaxCount: to.Ptr[int32](5), - // MinCount: to.Ptr[int32](1), - // Size: to.Ptr("Standard_D2_v2"), - // }, - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_WindowsOSSKU.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_WindowsOSSKU.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithWindowsOssku() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1141,7 +1054,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithWindowsOssku // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_Spot.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_Spot.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createSpotAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1209,7 +1122,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createSpotAgentPool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createWindowsAgentPoolWithDisablingOutboundNat() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1264,7 +1177,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createWindowsAgentPoolWithDisab // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCreate_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsCreate_Update.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createUpdateAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1312,6 +1225,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createUpdateAgentPool() { // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ // Count: to.Ptr[int32](3), + // CurrentOrchestratorVersion: to.Ptr("1.9.6"), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeUser), // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), @@ -1333,7 +1247,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createUpdateAgentPool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPools_Start.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPools_Start.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_startAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1380,7 +1294,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_startAgentPool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPools_Stop.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPools_Stop.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_stopAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1425,7 +1339,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_stopAgentPool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPools_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPools_Update.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_updateAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1486,31 +1400,8 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_updateAgentPool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsDelete.json -func ExampleAgentPoolsClient_BeginDelete_deleteAgentPool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAgentPoolsClient().BeginDelete(ctx, "rg1", "clustername1", "agentpool1", &armcontainerservice.AgentPoolsClientBeginDeleteOptions{IgnorePodDisruptionBudget: nil, - IfMatch: nil, - }) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsDelete_IgnorePodDisruptionBudget.json -func ExampleAgentPoolsClient_BeginDelete_deleteAgentPoolByIgnoringPodDisruptionBudget() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsDelete.json +func ExampleAgentPoolsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -1532,7 +1423,7 @@ func ExampleAgentPoolsClient_BeginDelete_deleteAgentPoolByIgnoringPodDisruptionB } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsGetUpgradeProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsGetUpgradeProfile.json func ExampleAgentPoolsClient_GetUpgradeProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1566,28 +1457,7 @@ func ExampleAgentPoolsClient_GetUpgradeProfile() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsCompleteUpgrade.json -func ExampleAgentPoolsClient_BeginCompleteUpgrade() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAgentPoolsClient().BeginCompleteUpgrade(ctx, "rg1", "clustername1", "agentpool1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsDeleteMachines.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsDeleteMachines.json func ExampleAgentPoolsClient_BeginDeleteMachines() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1612,7 +1482,7 @@ func ExampleAgentPoolsClient_BeginDeleteMachines() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json func ExampleAgentPoolsClient_GetAvailableAgentPoolVersions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1651,7 +1521,7 @@ func ExampleAgentPoolsClient_GetAvailableAgentPoolVersions() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/AgentPoolsUpgradeNodeImageVersion.json func ExampleAgentPoolsClient_BeginUpgradeNodeImageVersion() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md b/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md index 8042b72d0856..6df3202fd777 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md +++ b/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 8.2.0-beta.1 -tag: package-preview-2025-09 +module-version: 8.2.0 +tag: package-2025-10 ``` diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/client.go b/sdk/resourcemanager/containerservice/armcontainerservice/client.go deleted file mode 100644 index 3acddf7bf35c..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/client.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armcontainerservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// Client contains the methods for the ContainerService group. -// Don't use this type directly, use NewClient() instead. -type Client struct { - internal *arm.Client - subscriptionID string -} - -// NewClient creates a new instance of Client with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - Contains optional client configuration. Pass nil to accept the default values. -func NewClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*Client, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &Client{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// NewListNodeImageVersionsPager - Only returns the latest version of each node image. For example there may be an AKSUbuntu-1804gen2containerd-2024.01.26, -// but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this list. -// -// Generated from API version 2025-09-02-preview -// - location - The name of the Azure region. -// - options - ClientListNodeImageVersionsOptions contains the optional parameters for the Client.NewListNodeImageVersionsPager -// method. -func (client *Client) NewListNodeImageVersionsPager(location string, options *ClientListNodeImageVersionsOptions) *runtime.Pager[ClientListNodeImageVersionsResponse] { - return runtime.NewPager(runtime.PagingHandler[ClientListNodeImageVersionsResponse]{ - More: func(page ClientListNodeImageVersionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ClientListNodeImageVersionsResponse) (ClientListNodeImageVersionsResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "Client.NewListNodeImageVersionsPager") - 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.listNodeImageVersionsCreateRequest(ctx, location, options) - }, nil) - if err != nil { - return ClientListNodeImageVersionsResponse{}, err - } - return client.listNodeImageVersionsHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listNodeImageVersionsCreateRequest creates the ListNodeImageVersions request. -func (client *Client) listNodeImageVersionsCreateRequest(ctx context.Context, location string, _ *ClientListNodeImageVersionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/nodeImageVersions" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listNodeImageVersionsHandleResponse handles the ListNodeImageVersions response. -func (client *Client) listNodeImageVersionsHandleResponse(resp *http.Response) (ClientListNodeImageVersionsResponse, error) { - result := ClientListNodeImageVersionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.NodeImageVersionsListResult); err != nil { - return ClientListNodeImageVersionsResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/client_example_test.go deleted file mode 100644 index c5720f106951..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/client_example_test.go +++ /dev/null @@ -1,58 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcontainerservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/NodeImageVersions_List.json -func ExampleClient_NewListNodeImageVersionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewClient().NewListNodeImageVersionsPager("location1", 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.NodeImageVersionsListResult = armcontainerservice.NodeImageVersionsListResult{ - // Value: []*armcontainerservice.NodeImageVersion{ - // { - // FullName: to.Ptr("AKSCBLMariner-V1-202308.28.0"), - // OS: to.Ptr("AKSCBLMariner"), - // SKU: to.Ptr("V1"), - // Version: to.Ptr("202308.28.0"), - // }, - // { - // FullName: to.Ptr("AKSUbuntu-2204gen2minimalcontainerd-202401.12.0"), - // OS: to.Ptr("AKSUbuntu"), - // SKU: to.Ptr("2204gen2minimalcontainerd"), - // Version: to.Ptr("202401.12.0"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go b/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go index 270da822eb17..3756cfa88777 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go @@ -41,38 +41,6 @@ func (c *ClientFactory) NewAgentPoolsClient() *AgentPoolsClient { } } -// NewClient creates a new instance of Client. -func (c *ClientFactory) NewClient() *Client { - return &Client{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - -// NewIdentityBindingsClient creates a new instance of IdentityBindingsClient. -func (c *ClientFactory) NewIdentityBindingsClient() *IdentityBindingsClient { - return &IdentityBindingsClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - -// NewJWTAuthenticatorsClient creates a new instance of JWTAuthenticatorsClient. -func (c *ClientFactory) NewJWTAuthenticatorsClient() *JWTAuthenticatorsClient { - return &JWTAuthenticatorsClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - -// NewLoadBalancersClient creates a new instance of LoadBalancersClient. -func (c *ClientFactory) NewLoadBalancersClient() *LoadBalancersClient { - return &LoadBalancersClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - // NewMachinesClient creates a new instance of MachinesClient. func (c *ClientFactory) NewMachinesClient() *MachinesClient { return &MachinesClient{ @@ -89,14 +57,6 @@ func (c *ClientFactory) NewMaintenanceConfigurationsClient() *MaintenanceConfigu } } -// NewManagedClusterSnapshotsClient creates a new instance of ManagedClusterSnapshotsClient. -func (c *ClientFactory) NewManagedClusterSnapshotsClient() *ManagedClusterSnapshotsClient { - return &ManagedClusterSnapshotsClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - // NewManagedClustersClient creates a new instance of ManagedClustersClient. func (c *ClientFactory) NewManagedClustersClient() *ManagedClustersClient { return &ManagedClustersClient{ @@ -113,22 +73,6 @@ func (c *ClientFactory) NewManagedNamespacesClient() *ManagedNamespacesClient { } } -// NewMeshMembershipsClient creates a new instance of MeshMembershipsClient. -func (c *ClientFactory) NewMeshMembershipsClient() *MeshMembershipsClient { - return &MeshMembershipsClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - -// NewOperationStatusResultClient creates a new instance of OperationStatusResultClient. -func (c *ClientFactory) NewOperationStatusResultClient() *OperationStatusResultClient { - return &OperationStatusResultClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - // NewOperationsClient creates a new instance of OperationsClient. func (c *ClientFactory) NewOperationsClient() *OperationsClient { return &OperationsClient{ diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/constants.go b/sdk/resourcemanager/containerservice/armcontainerservice/constants.go index 72d4e9f32a01..6290d9c84436 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/constants.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/constants.go @@ -5,45 +5,6 @@ package armcontainerservice -// AccelerationMode - Enable advanced network acceleration options. This allows users to configure acceleration using BPF -// host routing. This can be enabled only with Cilium dataplane. If not specified, the default value is -// None (no acceleration). The acceleration mode can be changed on a pre-existing cluster. See https://aka.ms/acnsperformance -// for a detailed explanation -type AccelerationMode string - -const ( - // AccelerationModeBpfVeth - Enable eBPF host routing with veth device mode. - AccelerationModeBpfVeth AccelerationMode = "BpfVeth" - // AccelerationModeNone - Disable acceleration options. - AccelerationModeNone AccelerationMode = "None" -) - -// PossibleAccelerationModeValues returns the possible values for the AccelerationMode const type. -func PossibleAccelerationModeValues() []AccelerationMode { - return []AccelerationMode{ - AccelerationModeBpfVeth, - AccelerationModeNone, - } -} - -// AddonAutoscaling - Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. -type AddonAutoscaling string - -const ( - // AddonAutoscalingDisabled - Feature to autoscale AKS-managed add-ons is disabled. - AddonAutoscalingDisabled AddonAutoscaling = "Disabled" - // AddonAutoscalingEnabled - Feature to autoscale AKS-managed add-ons is enabled. The default VPA update mode is Initial mode. - AddonAutoscalingEnabled AddonAutoscaling = "Enabled" -) - -// PossibleAddonAutoscalingValues returns the possible values for the AddonAutoscaling const type. -func PossibleAddonAutoscalingValues() []AddonAutoscaling { - return []AddonAutoscaling{ - AddonAutoscalingDisabled, - AddonAutoscalingEnabled, - } -} - // AdoptionPolicy - Action if Kubernetes namespace with same name already exists. type AdoptionPolicy string @@ -100,13 +61,6 @@ const ( // AgentPoolModeGateway - Gateway agent pools are dedicated to providing static egress IPs to pods. For more details, see // https://aka.ms/aks/static-egress-gateway. AgentPoolModeGateway AgentPoolMode = "Gateway" - // AgentPoolModeMachines - Machines agent pools are dedicated to hosting machines. Only limited operations, such as creation - // and deletion, are allowed at the pool level. Please use the machine APIs to manage the full machine lifecycle. - AgentPoolModeMachines AgentPoolMode = "Machines" - // AgentPoolModeManagedSystem - ManagedSystem is a system pool managed by AKS. The pool scales dynamically according to cluster - // usage, and has additional automated monitoring and healing capabilities. There can only be one ManagedSystem pool, and - // it is recommended to delete all other system pools for the best experience. - AgentPoolModeManagedSystem AgentPoolMode = "ManagedSystem" // AgentPoolModeSystem - System agent pools are primarily for hosting critical system pods such as CoreDNS and metrics-server. // System agent pools osType must be Linux. System agent pools VM SKU must have at least 2vCPUs and 4GB of memory. AgentPoolModeSystem AgentPoolMode = "System" @@ -118,8 +72,6 @@ const ( func PossibleAgentPoolModeValues() []AgentPoolMode { return []AgentPoolMode{ AgentPoolModeGateway, - AgentPoolModeMachines, - AgentPoolModeManagedSystem, AgentPoolModeSystem, AgentPoolModeUser, } @@ -129,10 +81,8 @@ func PossibleAgentPoolModeValues() []AgentPoolMode { type AgentPoolSSHAccess string const ( - // AgentPoolSSHAccessDisabled - SSH service will be turned off on the node. More information can be found under https://aka.ms/aks/ssh/disable + // AgentPoolSSHAccessDisabled - SSH service will be turned off on the node. AgentPoolSSHAccessDisabled AgentPoolSSHAccess = "Disabled" - // AgentPoolSSHAccessEntraID - SSH to node with EntraId integration. More information can be found under https://aka.ms/aks/ssh/aad - AgentPoolSSHAccessEntraID AgentPoolSSHAccess = "EntraId" // AgentPoolSSHAccessLocalUser - Can SSH onto the node as a local user using private key. AgentPoolSSHAccessLocalUser AgentPoolSSHAccess = "LocalUser" ) @@ -141,7 +91,6 @@ const ( func PossibleAgentPoolSSHAccessValues() []AgentPoolSSHAccess { return []AgentPoolSSHAccess{ AgentPoolSSHAccessDisabled, - AgentPoolSSHAccessEntraID, AgentPoolSSHAccessLocalUser, } } @@ -203,26 +152,6 @@ func PossibleBackendPoolTypeValues() []BackendPoolType { } } -// ClusterServiceLoadBalancerHealthProbeMode - The health probing behavior for External Traffic Policy Cluster services. -type ClusterServiceLoadBalancerHealthProbeMode string - -const ( - // ClusterServiceLoadBalancerHealthProbeModeServiceNodePort - Each External Traffic Policy Cluster service will have its own - // health probe targeting service nodePort. - ClusterServiceLoadBalancerHealthProbeModeServiceNodePort ClusterServiceLoadBalancerHealthProbeMode = "ServiceNodePort" - // ClusterServiceLoadBalancerHealthProbeModeShared - All External Traffic Policy Cluster services in a Standard Load Balancer - // will have a dedicated health probe targeting the backend nodes' kube-proxy health check port 10256. - ClusterServiceLoadBalancerHealthProbeModeShared ClusterServiceLoadBalancerHealthProbeMode = "Shared" -) - -// PossibleClusterServiceLoadBalancerHealthProbeModeValues returns the possible values for the ClusterServiceLoadBalancerHealthProbeMode const type. -func PossibleClusterServiceLoadBalancerHealthProbeModeValues() []ClusterServiceLoadBalancerHealthProbeMode { - return []ClusterServiceLoadBalancerHealthProbeMode{ - ClusterServiceLoadBalancerHealthProbeModeServiceNodePort, - ClusterServiceLoadBalancerHealthProbeModeShared, - } -} - // Code - Tells whether the cluster is Running or Stopped type Code string @@ -299,46 +228,6 @@ func PossibleDeletePolicyValues() []DeletePolicy { } } -// DriftAction - The drift action of the machine. Indicates whether a machine has deviated from its expected state due to -// changes in managed cluster properties, requiring corrective action. -type DriftAction string - -const ( - // DriftActionRecreate - The machine has drifted and needs to be deleted and recreated. - DriftActionRecreate DriftAction = "Recreate" - // DriftActionSynced - The machine is up to date. - DriftActionSynced DriftAction = "Synced" -) - -// PossibleDriftActionValues returns the possible values for the DriftAction const type. -func PossibleDriftActionValues() []DriftAction { - return []DriftAction{ - DriftActionRecreate, - DriftActionSynced, - } -} - -// DriverType - Specify the type of GPU driver to install when creating Windows agent pools. If not provided, AKS selects -// the driver based on system compatibility. This cannot be changed once the AgentPool has been -// created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is selected based on system compatibility. -type DriverType string - -const ( - // DriverTypeCUDA - Install the CUDA driver for the GPU, optimized for computational tasks in scientific computing and data-intensive - // applications. - DriverTypeCUDA DriverType = "CUDA" - // DriverTypeGRID - Install the GRID driver for the GPU, suitable for applications requiring virtualization support. - DriverTypeGRID DriverType = "GRID" -) - -// PossibleDriverTypeValues returns the possible values for the DriverType const type. -func PossibleDriverTypeValues() []DriverType { - return []DriverType{ - DriverTypeCUDA, - DriverTypeGRID, - } -} - // Expander - The expander to use when scaling up. 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. @@ -442,32 +331,11 @@ func PossibleGPUInstanceProfileValues() []GPUInstanceProfile { } } -// GuardrailsSupport - Whether the version is preview or stable. -type GuardrailsSupport string - -const ( - // GuardrailsSupportPreview - The version is preview. It is not recommended to use preview versions on critical production - // clusters. The preview version may not support all use-cases. - GuardrailsSupportPreview GuardrailsSupport = "Preview" - // GuardrailsSupportStable - The version is stable and can be used on critical production clusters. - GuardrailsSupportStable GuardrailsSupport = "Stable" -) - -// PossibleGuardrailsSupportValues returns the possible values for the GuardrailsSupport const type. -func PossibleGuardrailsSupportValues() []GuardrailsSupport { - return []GuardrailsSupport{ - GuardrailsSupportPreview, - GuardrailsSupportStable, - } -} - -// IPFamily - To determine if address belongs IPv4 or IPv6 family +// IPFamily - The IP version to use for cluster networking and IP assignment. type IPFamily string const ( - // IPFamilyIPv4 - IPv4 family IPFamilyIPv4 IPFamily = "IPv4" - // IPFamilyIPv6 - IPv6 family IPFamilyIPv6 IPFamily = "IPv6" ) @@ -479,75 +347,6 @@ func PossibleIPFamilyValues() []IPFamily { } } -// IdentityBindingProvisioningState - The provisioning state of the last accepted operation. -type IdentityBindingProvisioningState string - -const ( - // IdentityBindingProvisioningStateCanceled - Resource creation was canceled. - IdentityBindingProvisioningStateCanceled IdentityBindingProvisioningState = "Canceled" - // IdentityBindingProvisioningStateCreating - The identity binding is being created. - IdentityBindingProvisioningStateCreating IdentityBindingProvisioningState = "Creating" - // IdentityBindingProvisioningStateDeleting - The identity binding is being deleted. - IdentityBindingProvisioningStateDeleting IdentityBindingProvisioningState = "Deleting" - // IdentityBindingProvisioningStateFailed - Resource creation failed. - IdentityBindingProvisioningStateFailed IdentityBindingProvisioningState = "Failed" - // IdentityBindingProvisioningStateSucceeded - Resource has been created. - IdentityBindingProvisioningStateSucceeded IdentityBindingProvisioningState = "Succeeded" - // IdentityBindingProvisioningStateUpdating - The identity binding is being updated. - IdentityBindingProvisioningStateUpdating IdentityBindingProvisioningState = "Updating" -) - -// PossibleIdentityBindingProvisioningStateValues returns the possible values for the IdentityBindingProvisioningState const type. -func PossibleIdentityBindingProvisioningStateValues() []IdentityBindingProvisioningState { - return []IdentityBindingProvisioningState{ - IdentityBindingProvisioningStateCanceled, - IdentityBindingProvisioningStateCreating, - IdentityBindingProvisioningStateDeleting, - IdentityBindingProvisioningStateFailed, - IdentityBindingProvisioningStateSucceeded, - IdentityBindingProvisioningStateUpdating, - } -} - -// InfrastructureEncryption - Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. -// More information on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. -type InfrastructureEncryption string - -const ( - // InfrastructureEncryptionDisabled - Encryption at rest of Kubernetes resource objects using service-managed keys is disabled. - // More information on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. - InfrastructureEncryptionDisabled InfrastructureEncryption = "Disabled" - // InfrastructureEncryptionEnabled - Encryption at rest of Kubernetes resource objects using service-managed keys is enabled. - // More information on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. - InfrastructureEncryptionEnabled InfrastructureEncryption = "Enabled" -) - -// PossibleInfrastructureEncryptionValues returns the possible values for the InfrastructureEncryption const type. -func PossibleInfrastructureEncryptionValues() []InfrastructureEncryption { - return []InfrastructureEncryption{ - InfrastructureEncryptionDisabled, - InfrastructureEncryptionEnabled, - } -} - -// IpvsScheduler - IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. -type IpvsScheduler string - -const ( - // IpvsSchedulerLeastConnection - Least Connection - IpvsSchedulerLeastConnection IpvsScheduler = "LeastConnection" - // IpvsSchedulerRoundRobin - Round Robin - IpvsSchedulerRoundRobin IpvsScheduler = "RoundRobin" -) - -// PossibleIpvsSchedulerValues returns the possible values for the IpvsScheduler const type. -func PossibleIpvsSchedulerValues() []IpvsScheduler { - return []IpvsScheduler{ - IpvsSchedulerLeastConnection, - IpvsSchedulerRoundRobin, - } -} - // IstioIngressGatewayMode - Mode of an ingress gateway. type IstioIngressGatewayMode string @@ -566,36 +365,6 @@ func PossibleIstioIngressGatewayModeValues() []IstioIngressGatewayMode { } } -// JWTAuthenticatorProvisioningState - The provisioning state of the last accepted operation. -type JWTAuthenticatorProvisioningState string - -const ( - // JWTAuthenticatorProvisioningStateCanceled - Resource creation was canceled. - JWTAuthenticatorProvisioningStateCanceled JWTAuthenticatorProvisioningState = "Canceled" - // JWTAuthenticatorProvisioningStateCreating - The JWT authenticator is being created. - JWTAuthenticatorProvisioningStateCreating JWTAuthenticatorProvisioningState = "Creating" - // JWTAuthenticatorProvisioningStateDeleting - The JWT authenticator is being deleted. - JWTAuthenticatorProvisioningStateDeleting JWTAuthenticatorProvisioningState = "Deleting" - // JWTAuthenticatorProvisioningStateFailed - Resource creation failed. - JWTAuthenticatorProvisioningStateFailed JWTAuthenticatorProvisioningState = "Failed" - // JWTAuthenticatorProvisioningStateSucceeded - Resource has been created. - JWTAuthenticatorProvisioningStateSucceeded JWTAuthenticatorProvisioningState = "Succeeded" - // JWTAuthenticatorProvisioningStateUpdating - The JWT authenticator is being updated. - JWTAuthenticatorProvisioningStateUpdating JWTAuthenticatorProvisioningState = "Updating" -) - -// PossibleJWTAuthenticatorProvisioningStateValues returns the possible values for the JWTAuthenticatorProvisioningState const type. -func PossibleJWTAuthenticatorProvisioningStateValues() []JWTAuthenticatorProvisioningState { - return []JWTAuthenticatorProvisioningState{ - JWTAuthenticatorProvisioningStateCanceled, - JWTAuthenticatorProvisioningStateCreating, - JWTAuthenticatorProvisioningStateDeleting, - JWTAuthenticatorProvisioningStateFailed, - JWTAuthenticatorProvisioningStateSucceeded, - JWTAuthenticatorProvisioningStateUpdating, - } -} - // KeyVaultNetworkAccessTypes - Network access of the key vault. Network access of key vault. The possible values are Public // and Private. Public means the key vault allows public access from all networks. Private means the key vault // disables public access and enables private link. The default value is Public. @@ -908,77 +677,6 @@ func PossibleManagedClusterSKUTierValues() []ManagedClusterSKUTier { } } -// ManagedGatewayType - Configuration for the managed Gateway API installation. If not specified, the default is 'Disabled'. -// See https://aka.ms/k8s-gateway-api for more details. -type ManagedGatewayType string - -const ( - // ManagedGatewayTypeDisabled - Gateway API CRDs will not be reconciled on your cluster. - ManagedGatewayTypeDisabled ManagedGatewayType = "Disabled" - // ManagedGatewayTypeStandard - The latest Gateway CRD bundle from the standard channel that is compatible with your Kubernetes - // version will be reconciled onto your cluster. See https://gateway-api.sigs.k8s.io/concepts/versioning/ for more details. - ManagedGatewayTypeStandard ManagedGatewayType = "Standard" -) - -// PossibleManagedGatewayTypeValues returns the possible values for the ManagedGatewayType const type. -func PossibleManagedGatewayTypeValues() []ManagedGatewayType { - return []ManagedGatewayType{ - ManagedGatewayTypeDisabled, - ManagedGatewayTypeStandard, - } -} - -// MeshMembershipProvisioningState - The provisioning state of the last accepted operation. -type MeshMembershipProvisioningState string - -const ( - // MeshMembershipProvisioningStateCanceled - Resource creation was canceled. - MeshMembershipProvisioningStateCanceled MeshMembershipProvisioningState = "Canceled" - // MeshMembershipProvisioningStateCreating - The Mesh Membership is being created. - MeshMembershipProvisioningStateCreating MeshMembershipProvisioningState = "Creating" - // MeshMembershipProvisioningStateDeleting - The Mesh Membership is being deleted. - MeshMembershipProvisioningStateDeleting MeshMembershipProvisioningState = "Deleting" - // MeshMembershipProvisioningStateFailed - Resource creation failed. - MeshMembershipProvisioningStateFailed MeshMembershipProvisioningState = "Failed" - // MeshMembershipProvisioningStateSucceeded - Resource has been created. - MeshMembershipProvisioningStateSucceeded MeshMembershipProvisioningState = "Succeeded" - // MeshMembershipProvisioningStateUpdating - The Mesh Membership is being updated. - MeshMembershipProvisioningStateUpdating MeshMembershipProvisioningState = "Updating" -) - -// PossibleMeshMembershipProvisioningStateValues returns the possible values for the MeshMembershipProvisioningState const type. -func PossibleMeshMembershipProvisioningStateValues() []MeshMembershipProvisioningState { - return []MeshMembershipProvisioningState{ - MeshMembershipProvisioningStateCanceled, - MeshMembershipProvisioningStateCreating, - MeshMembershipProvisioningStateDeleting, - MeshMembershipProvisioningStateFailed, - MeshMembershipProvisioningStateSucceeded, - MeshMembershipProvisioningStateUpdating, - } -} - -// Mode - Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES') -type Mode string - -const ( - // ModeIPTABLES - IPTables proxy mode - ModeIPTABLES Mode = "IPTABLES" - // ModeIPVS - IPVS proxy mode. Must be using Kubernetes version >= 1.22. - ModeIPVS Mode = "IPVS" - // ModeNFTABLES - NFTables proxy mode. Must be using Kubernetes version >= 1.33. - ModeNFTABLES Mode = "NFTABLES" -) - -// PossibleModeValues returns the possible values for the Mode const type. -func PossibleModeValues() []Mode { - return []Mode{ - ModeIPTABLES, - ModeIPVS, - ModeNFTABLES, - } -} - // NamespaceProvisioningState - The current provisioning state of the namespace. type NamespaceProvisioningState string @@ -1052,8 +750,8 @@ const ( // NetworkPluginKubenet - Use the Kubenet network plugin. See [Kubenet (basic) networking](https://docs.microsoft.com/azure/aks/concepts-network#kubenet-basic-networking) // for more information. NetworkPluginKubenet NetworkPlugin = "kubenet" - // NetworkPluginNone - Do not use a network plugin. A custom CNI will need to be installed after cluster creation for networking - // functionality. + // NetworkPluginNone - No CNI plugin is pre-installed. See [BYO CNI](https://docs.microsoft.com/en-us/azure/aks/use-byo-cni) + // for more information. NetworkPluginNone NetworkPlugin = "none" ) @@ -1070,8 +768,8 @@ func PossibleNetworkPluginValues() []NetworkPlugin { type NetworkPluginMode string const ( - // NetworkPluginModeOverlay - Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than - // Kubenet reference plugins host-local and bridge. + // NetworkPluginModeOverlay - Used with networkPlugin=azure, pods are given IPs from the PodCIDR address space but use Azure + // Routing Domains rather than Kubenet's method of route tables. For more information visit https://aka.ms/aks/azure-cni-overlay. NetworkPluginModeOverlay NetworkPluginMode = "overlay" ) @@ -1136,8 +834,7 @@ func PossibleNginxIngressControllerTypeValues() []NginxIngressControllerType { } } -// NodeOSUpgradeChannel - Manner in which the OS on your nodes is updated. The default is Unmanaged, but may change to either -// NodeImage or SecurityPatch at GA. +// NodeOSUpgradeChannel - Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. type NodeOSUpgradeChannel string const ( @@ -1155,10 +852,10 @@ const ( // just in time consumption. NodeOSUpgradeChannelSecurityPatch NodeOSUpgradeChannel = "SecurityPatch" // NodeOSUpgradeChannelUnmanaged - OS updates will be applied automatically through the OS built-in patching infrastructure. - // Newly scaled in machines will be unpatched initially, and will be patched at some later time by the OS's infrastructure. - // Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade - // roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option - // is equivalent to None till further notice + // Newly scaled in machines will be unpatched initially and will be patched at some point by the OS's infrastructure. Behavior + // of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly + // once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent + // to None till further notice NodeOSUpgradeChannelUnmanaged NodeOSUpgradeChannel = "Unmanaged" ) @@ -1238,9 +935,8 @@ func PossibleOSDiskTypeValues() []OSDiskType { } } -// OSSKU - Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 -// if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 -// after Windows2019 is deprecated. +// OSSKU - Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 +// when Kubernetes = 1.25 if OSType is Windows. type OSSKU string const ( @@ -1253,19 +949,13 @@ const ( OSSKUAzureLinux3 OSSKU = "AzureLinux3" // OSSKUCBLMariner - Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. OSSKUCBLMariner OSSKU = "CBLMariner" - // OSSKUFlatcar - Use Flatcar Container Linux as the OS for node images. Flatcar is a container-optimized, security-focused - // Linux OS, with an immutable filesystem and part of the Cloud Native Computing Foundation (CNCF). For more information about - // Flatcar Container Linux for AKS, see aka.ms/aks/flatcar-container-linux-for-aks - OSSKUFlatcar OSSKU = "Flatcar" - // OSSKUMariner - Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. - OSSKUMariner OSSKU = "Mariner" // OSSKUUbuntu - Use Ubuntu as the OS for node images. OSSKUUbuntu OSSKU = "Ubuntu" // OSSKUUbuntu2204 - Use Ubuntu2204 as the OS for node images, however, Ubuntu 22.04 may not be supported for all nodepools. - // For limitations and supported kubernetes versions, see see https://aka.ms/aks/supported-ubuntu-versions + // For limitations and supported kubernetes versions, see https://aka.ms/aks/supported-ubuntu-versions OSSKUUbuntu2204 OSSKU = "Ubuntu2204" // OSSKUUbuntu2404 - Use Ubuntu2404 as the OS for node images, however, Ubuntu 24.04 may not be supported for all nodepools. - // For limitations and supported kubernetes versions, see see https://aka.ms/aks/supported-ubuntu-versions + // For limitations and supported kubernetes versions, see https://aka.ms/aks/supported-ubuntu-versions OSSKUUbuntu2404 OSSKU = "Ubuntu2404" // OSSKUWindows2019 - Use Windows2019 as the OS for node images. Unsupported for system node pools. Windows2019 only supports // Windows2019 containers; it cannot run Windows2022 containers and vice versa. @@ -1273,12 +963,6 @@ const ( // OSSKUWindows2022 - Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports // Windows2022 containers; it cannot run Windows2019 containers and vice versa. OSSKUWindows2022 OSSKU = "Windows2022" - // OSSKUWindows2025 - Use Windows2025 as the OS for node images. Unsupported for system node pools. Windows2025 supports Windows2022 - // and Windows 2025 containers; it cannot run Windows2019 containers and vice versa. - OSSKUWindows2025 OSSKU = "Windows2025" - // OSSKUWindowsAnnual - Use Windows Annual Channel version as the OS for node images. Unsupported for system node pools. Details - // about supported container images and kubernetes versions under different AKS Annual Channel versions could be seen in https://aka.ms/aks/windows-annual-channel-details. - OSSKUWindowsAnnual OSSKU = "WindowsAnnual" ) // PossibleOSSKUValues returns the possible values for the OSSKU const type. @@ -1287,15 +971,11 @@ func PossibleOSSKUValues() []OSSKU { OSSKUAzureLinux, OSSKUAzureLinux3, OSSKUCBLMariner, - OSSKUFlatcar, - OSSKUMariner, OSSKUUbuntu, OSSKUUbuntu2204, OSSKUUbuntu2404, OSSKUWindows2019, OSSKUWindows2022, - OSSKUWindows2025, - OSSKUWindowsAnnual, } } @@ -1317,30 +997,6 @@ func PossibleOSTypeValues() []OSType { } } -// Operator - operator represents a key's relationship to a set of values. Valid operators are In and NotIn -type Operator string - -const ( - // OperatorDoesNotExist - The value of the key should not exist. - OperatorDoesNotExist Operator = "DoesNotExist" - // OperatorExists - The value of the key should exist. - OperatorExists Operator = "Exists" - // OperatorIn - The value of the key should be in the given list. - OperatorIn Operator = "In" - // OperatorNotIn - The value of the key should not be in the given list. - OperatorNotIn Operator = "NotIn" -) - -// PossibleOperatorValues returns the possible values for the Operator const type. -func PossibleOperatorValues() []Operator { - return []Operator{ - OperatorDoesNotExist, - OperatorExists, - OperatorIn, - OperatorNotIn, - } -} - // OutboundType - The outbound (egress) routing method. This can only be set at cluster creation time and cannot be changed // later. For more information see egress outbound type // [https://docs.microsoft.com/azure/aks/egress-outboundtype]. @@ -1398,25 +1054,6 @@ func PossiblePodIPAllocationModeValues() []PodIPAllocationMode { } } -// PodLinkLocalAccess - Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods -// with hostNetwork=false. If not specified, the default is 'IMDS'. -type PodLinkLocalAccess string - -const ( - // PodLinkLocalAccessIMDS - Pods with hostNetwork=false can access Azure Instance Metadata Service (IMDS) without restriction. - PodLinkLocalAccessIMDS PodLinkLocalAccess = "IMDS" - // PodLinkLocalAccessNone - Pods with hostNetwork=false cannot access Azure Instance Metadata Service (IMDS). - PodLinkLocalAccessNone PodLinkLocalAccess = "None" -) - -// PossiblePodLinkLocalAccessValues returns the possible values for the PodLinkLocalAccess const type. -func PossiblePodLinkLocalAccessValues() []PodLinkLocalAccess { - return []PodLinkLocalAccess{ - PodLinkLocalAccessIMDS, - PodLinkLocalAccessNone, - } -} - // PolicyRule - Enum representing different network policy rules. type PolicyRule string @@ -1478,35 +1115,12 @@ func PossibleProtocolValues() []Protocol { } } -// ProxyRedirectionMechanism - Mode of traffic redirection. -type ProxyRedirectionMechanism string - -const ( - // ProxyRedirectionMechanismCNIChaining - Istio will install a chained CNI plugin to redirect traffic (recommended). - ProxyRedirectionMechanismCNIChaining ProxyRedirectionMechanism = "CNIChaining" - // ProxyRedirectionMechanismInitContainers - Istio will inject an init container into each pod to redirect traffic (requires - // NET_ADMIN and NET_RAW). - ProxyRedirectionMechanismInitContainers ProxyRedirectionMechanism = "InitContainers" -) - -// PossibleProxyRedirectionMechanismValues returns the possible values for the ProxyRedirectionMechanism const type. -func PossibleProxyRedirectionMechanismValues() []ProxyRedirectionMechanism { - return []ProxyRedirectionMechanism{ - ProxyRedirectionMechanismCNIChaining, - ProxyRedirectionMechanismInitContainers, - } -} - // PublicNetworkAccess - PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS type PublicNetworkAccess string const ( - // PublicNetworkAccessDisabled - Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" - // PublicNetworkAccessEnabled - Inbound/Outbound to the managedCluster is allowed. - PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" - // PublicNetworkAccessSecuredByPerimeter - Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters. - PublicNetworkAccessSecuredByPerimeter PublicNetworkAccess = "SecuredByPerimeter" + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" ) // PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type. @@ -1514,7 +1128,6 @@ func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { return []PublicNetworkAccess{ PublicNetworkAccessDisabled, PublicNetworkAccessEnabled, - PublicNetworkAccessSecuredByPerimeter, } } @@ -1544,7 +1157,8 @@ func PossibleResourceIdentityTypeValues() []ResourceIdentityType { } } -// RestrictionLevel - The restriction level applied to the cluster's node resource group +// RestrictionLevel - The restriction level applied to the cluster's node resource group. If not specified, the default is +// 'Unrestricted' type RestrictionLevel string const ( @@ -1562,25 +1176,6 @@ func PossibleRestrictionLevelValues() []RestrictionLevel { } } -// SafeguardsSupport - Whether the version is preview or stable. -type SafeguardsSupport string - -const ( - // SafeguardsSupportPreview - The version is preview. It is not recommended to use preview versions on critical production - // clusters. The preview version may not support all use-cases. - SafeguardsSupportPreview SafeguardsSupport = "Preview" - // SafeguardsSupportStable - The version is stable and can be used on critical production clusters. - SafeguardsSupportStable SafeguardsSupport = "Stable" -) - -// PossibleSafeguardsSupportValues returns the possible values for the SafeguardsSupport const type. -func PossibleSafeguardsSupportValues() []SafeguardsSupport { - return []SafeguardsSupport{ - SafeguardsSupportPreview, - SafeguardsSupportStable, - } -} - // ScaleDownMode - Describes how VMs are added to or removed from Agent Pools. See billing states [https://docs.microsoft.com/azure/virtual-machines/states-billing]. type ScaleDownMode string @@ -1641,45 +1236,6 @@ func PossibleScaleSetPriorityValues() []ScaleSetPriority { } } -// SchedulerConfigMode - The config customization mode for this scheduler instance. -type SchedulerConfigMode string - -const ( - // SchedulerConfigModeDefault - No config customization. Use default configuration. - SchedulerConfigModeDefault SchedulerConfigMode = "Default" - // SchedulerConfigModeManagedByCRD - Enable config customization. Customer can specify scheduler configuration via a CRD. - // See aka.ms/aks/scheduler-crd for details. - SchedulerConfigModeManagedByCRD SchedulerConfigMode = "ManagedByCRD" -) - -// PossibleSchedulerConfigModeValues returns the possible values for the SchedulerConfigMode const type. -func PossibleSchedulerConfigModeValues() []SchedulerConfigMode { - return []SchedulerConfigMode{ - SchedulerConfigModeDefault, - SchedulerConfigModeManagedByCRD, - } -} - -// SeccompDefault - Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' will be -// used by default. -type SeccompDefault string - -const ( - // SeccompDefaultRuntimeDefault - The default seccomp profile for container runtime is applied, which restricts certain system - // calls for enhanced security. - SeccompDefaultRuntimeDefault SeccompDefault = "RuntimeDefault" - // SeccompDefaultUnconfined - No seccomp profile is applied, allowing all system calls. - SeccompDefaultUnconfined SeccompDefault = "Unconfined" -) - -// PossibleSeccompDefaultValues returns the possible values for the SeccompDefault const type. -func PossibleSeccompDefaultValues() []SeccompDefault { - return []SeccompDefault{ - SeccompDefaultRuntimeDefault, - SeccompDefaultUnconfined, - } -} - // ServiceMeshMode - Mode of the service mesh. type ServiceMeshMode string @@ -1702,8 +1258,6 @@ func PossibleServiceMeshModeValues() []ServiceMeshMode { type SnapshotType string const ( - // SnapshotTypeManagedCluster - The snapshot is a snapshot of a managed cluster. - SnapshotTypeManagedCluster SnapshotType = "ManagedCluster" // SnapshotTypeNodePool - The snapshot is a snapshot of a node pool. SnapshotTypeNodePool SnapshotType = "NodePool" ) @@ -1711,31 +1265,10 @@ const ( // PossibleSnapshotTypeValues returns the possible values for the SnapshotType const type. func PossibleSnapshotTypeValues() []SnapshotType { return []SnapshotType{ - SnapshotTypeManagedCluster, SnapshotTypeNodePool, } } -// TransitEncryptionType - Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not specified, -// the default value is None. -type TransitEncryptionType string - -const ( - // TransitEncryptionTypeNone - Disable Transit encryption - TransitEncryptionTypeNone TransitEncryptionType = "None" - // TransitEncryptionTypeWireGuard - Enable WireGuard encryption. Refer to https://docs.cilium.io/en/latest/security/network/encryption-wireguard/ - // on use cases and implementation details - TransitEncryptionTypeWireGuard TransitEncryptionType = "WireGuard" -) - -// PossibleTransitEncryptionTypeValues returns the possible values for the TransitEncryptionType const type. -func PossibleTransitEncryptionTypeValues() []TransitEncryptionType { - return []TransitEncryptionType{ - TransitEncryptionTypeNone, - TransitEncryptionTypeWireGuard, - } -} - // TrustedAccessRoleBindingProvisioningState - The current provisioning state of trusted access role binding. type TrustedAccessRoleBindingProvisioningState string @@ -1758,19 +1291,19 @@ func PossibleTrustedAccessRoleBindingProvisioningStateValues() []TrustedAccessRo } } -// Type - The week index. Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. +// Type - The week index. Specifies on which week of the month the dayOfWeek applies. type Type string const ( - // TypeFirst - First. + // TypeFirst - First week of the month. TypeFirst Type = "First" - // TypeFourth - Fourth. + // TypeFourth - Fourth week of the month. TypeFourth Type = "Fourth" - // TypeLast - Last. + // TypeLast - Last week of the month. TypeLast Type = "Last" - // TypeSecond - Second. + // TypeSecond - Second week of the month. TypeSecond Type = "Second" - // TypeThird - Third. + // TypeThird - Third week of the month. TypeThird Type = "Third" ) @@ -1849,42 +1382,6 @@ func PossibleUpgradeChannelValues() []UpgradeChannel { } } -// UpgradeStrategy - Defines the upgrade strategy for the agent pool. The default is Rolling. -type UpgradeStrategy string - -const ( - // UpgradeStrategyBlueGreen - Specifies that the agent pool will conduct blue-green upgrade. - UpgradeStrategyBlueGreen UpgradeStrategy = "BlueGreen" - // UpgradeStrategyRolling - Specifies that the agent pool will conduct rolling upgrade. This is the default upgrade strategy. - UpgradeStrategyRolling UpgradeStrategy = "Rolling" -) - -// PossibleUpgradeStrategyValues returns the possible values for the UpgradeStrategy const type. -func PossibleUpgradeStrategyValues() []UpgradeStrategy { - return []UpgradeStrategy{ - UpgradeStrategyBlueGreen, - UpgradeStrategyRolling, - } -} - -// VMState - Virtual machine state. Indicates the current state of the underlying virtual machine. -type VMState string - -const ( - // VMStateDeleted - The virtual machine has been deleted by the user or due to spot eviction. - VMStateDeleted VMState = "Deleted" - // VMStateRunning - The virtual machine is currently running. - VMStateRunning VMState = "Running" -) - -// PossibleVMStateValues returns the possible values for the VMState const type. -func PossibleVMStateValues() []VMState { - return []VMState{ - VMStateDeleted, - VMStateRunning, - } -} - // WeekDay - The weekday enum. type WeekDay string @@ -1915,11 +1412,6 @@ func PossibleWeekDayValues() []WeekDay { type WorkloadRuntime string const ( - // WorkloadRuntimeKataMshvVMIsolation - Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). - // Due to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series - // that support Nested Virtualization such as Dv3 series. This naming convention will be deprecated in future releases in - // favor of KataVmIsolation. - WorkloadRuntimeKataMshvVMIsolation WorkloadRuntime = "KataMshvVmIsolation" // WorkloadRuntimeKataVMIsolation - Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods. Due // to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series // that support Nested Virtualization such as Dv3 series. @@ -1933,7 +1425,6 @@ const ( // PossibleWorkloadRuntimeValues returns the possible values for the WorkloadRuntime const type. func PossibleWorkloadRuntimeValues() []WorkloadRuntime { return []WorkloadRuntime{ - WorkloadRuntimeKataMshvVMIsolation, WorkloadRuntimeKataVMIsolation, WorkloadRuntimeOCIContainer, WorkloadRuntimeWasmWasi, diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/agentpools_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/agentpools_server.go index f3d2935ae832..fddb1b696324 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/agentpools_server.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/fake/agentpools_server.go @@ -26,10 +26,6 @@ type AgentPoolsServer struct { // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent BeginAbortLatestOperation func(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *armcontainerservice.AgentPoolsClientBeginAbortLatestOperationOptions) (resp azfake.PollerResponder[armcontainerservice.AgentPoolsClientAbortLatestOperationResponse], errResp azfake.ErrorResponder) - // BeginCompleteUpgrade is the fake for method AgentPoolsClient.BeginCompleteUpgrade - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent - BeginCompleteUpgrade func(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *armcontainerservice.AgentPoolsClientBeginCompleteUpgradeOptions) (resp azfake.PollerResponder[armcontainerservice.AgentPoolsClientCompleteUpgradeResponse], errResp azfake.ErrorResponder) - // BeginCreateOrUpdate is the fake for method AgentPoolsClient.BeginCreateOrUpdate // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters armcontainerservice.AgentPool, options *armcontainerservice.AgentPoolsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armcontainerservice.AgentPoolsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) @@ -70,7 +66,6 @@ func NewAgentPoolsServerTransport(srv *AgentPoolsServer) *AgentPoolsServerTransp return &AgentPoolsServerTransport{ srv: srv, beginAbortLatestOperation: newTracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientAbortLatestOperationResponse]](), - beginCompleteUpgrade: newTracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientCompleteUpgradeResponse]](), beginCreateOrUpdate: newTracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientCreateOrUpdateResponse]](), beginDelete: newTracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientDeleteResponse]](), beginDeleteMachines: newTracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientDeleteMachinesResponse]](), @@ -84,7 +79,6 @@ func NewAgentPoolsServerTransport(srv *AgentPoolsServer) *AgentPoolsServerTransp type AgentPoolsServerTransport struct { srv *AgentPoolsServer beginAbortLatestOperation *tracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientAbortLatestOperationResponse]] - beginCompleteUpgrade *tracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientCompleteUpgradeResponse]] beginCreateOrUpdate *tracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientCreateOrUpdateResponse]] beginDelete *tracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientDeleteResponse]] beginDeleteMachines *tracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientDeleteMachinesResponse]] @@ -117,8 +111,6 @@ func (a *AgentPoolsServerTransport) dispatchToMethodFake(req *http.Request, meth switch method { case "AgentPoolsClient.BeginAbortLatestOperation": res.resp, res.err = a.dispatchBeginAbortLatestOperation(req) - case "AgentPoolsClient.BeginCompleteUpgrade": - res.resp, res.err = a.dispatchBeginCompleteUpgrade(req) case "AgentPoolsClient.BeginCreateOrUpdate": res.resp, res.err = a.dispatchBeginCreateOrUpdate(req) case "AgentPoolsClient.BeginDelete": @@ -202,54 +194,6 @@ func (a *AgentPoolsServerTransport) dispatchBeginAbortLatestOperation(req *http. return resp, nil } -func (a *AgentPoolsServerTransport) dispatchBeginCompleteUpgrade(req *http.Request) (*http.Response, error) { - if a.srv.BeginCompleteUpgrade == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginCompleteUpgrade not implemented")} - } - beginCompleteUpgrade := a.beginCompleteUpgrade.get(req) - if beginCompleteUpgrade == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/agentPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/completeUpgrade` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - agentPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("agentPoolName")]) - if err != nil { - return nil, err - } - respr, errRespr := a.srv.BeginCompleteUpgrade(req.Context(), resourceGroupNameParam, resourceNameParam, agentPoolNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginCompleteUpgrade = &respr - a.beginCompleteUpgrade.add(req, beginCompleteUpgrade) - } - - resp, err := server.PollerResponderNext(beginCompleteUpgrade, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { - a.beginCompleteUpgrade.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} - } - if !server.PollerResponderMore(beginCompleteUpgrade) { - a.beginCompleteUpgrade.remove(req) - } - - return resp, nil -} - func (a *AgentPoolsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { if a.srv.BeginCreateOrUpdate == nil { return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/identitybindings_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/identitybindings_server.go deleted file mode 100644 index fa03486e331e..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/identitybindings_server.go +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package fake - -import ( - "context" - "errors" - "fmt" - 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/containerservice/armcontainerservice/v8" - "net/http" - "net/url" - "regexp" -) - -// IdentityBindingsServer is a fake server for instances of the armcontainerservice.IdentityBindingsClient type. -type IdentityBindingsServer struct { - // BeginCreateOrUpdate is the fake for method IdentityBindingsClient.BeginCreateOrUpdate - // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated - BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, resourceName string, identityBindingName string, parameters armcontainerservice.IdentityBinding, options *armcontainerservice.IdentityBindingsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armcontainerservice.IdentityBindingsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) - - // BeginDelete is the fake for method IdentityBindingsClient.BeginDelete - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent - BeginDelete func(ctx context.Context, resourceGroupName string, resourceName string, identityBindingName string, options *armcontainerservice.IdentityBindingsClientBeginDeleteOptions) (resp azfake.PollerResponder[armcontainerservice.IdentityBindingsClientDeleteResponse], errResp azfake.ErrorResponder) - - // Get is the fake for method IdentityBindingsClient.Get - // HTTP status codes to indicate success: http.StatusOK - Get func(ctx context.Context, resourceGroupName string, resourceName string, identityBindingName string, options *armcontainerservice.IdentityBindingsClientGetOptions) (resp azfake.Responder[armcontainerservice.IdentityBindingsClientGetResponse], errResp azfake.ErrorResponder) - - // NewListByManagedClusterPager is the fake for method IdentityBindingsClient.NewListByManagedClusterPager - // HTTP status codes to indicate success: http.StatusOK - NewListByManagedClusterPager func(resourceGroupName string, resourceName string, options *armcontainerservice.IdentityBindingsClientListByManagedClusterOptions) (resp azfake.PagerResponder[armcontainerservice.IdentityBindingsClientListByManagedClusterResponse]) -} - -// NewIdentityBindingsServerTransport creates a new instance of IdentityBindingsServerTransport with the provided implementation. -// The returned IdentityBindingsServerTransport instance is connected to an instance of armcontainerservice.IdentityBindingsClient via the -// azcore.ClientOptions.Transporter field in the client's constructor parameters. -func NewIdentityBindingsServerTransport(srv *IdentityBindingsServer) *IdentityBindingsServerTransport { - return &IdentityBindingsServerTransport{ - srv: srv, - beginCreateOrUpdate: newTracker[azfake.PollerResponder[armcontainerservice.IdentityBindingsClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[armcontainerservice.IdentityBindingsClientDeleteResponse]](), - newListByManagedClusterPager: newTracker[azfake.PagerResponder[armcontainerservice.IdentityBindingsClientListByManagedClusterResponse]](), - } -} - -// IdentityBindingsServerTransport connects instances of armcontainerservice.IdentityBindingsClient to instances of IdentityBindingsServer. -// Don't use this type directly, use NewIdentityBindingsServerTransport instead. -type IdentityBindingsServerTransport struct { - srv *IdentityBindingsServer - beginCreateOrUpdate *tracker[azfake.PollerResponder[armcontainerservice.IdentityBindingsClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[armcontainerservice.IdentityBindingsClientDeleteResponse]] - newListByManagedClusterPager *tracker[azfake.PagerResponder[armcontainerservice.IdentityBindingsClientListByManagedClusterResponse]] -} - -// Do implements the policy.Transporter interface for IdentityBindingsServerTransport. -func (i *IdentityBindingsServerTransport) Do(req *http.Request) (*http.Response, error) { - rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) - method, ok := rawMethod.(string) - if !ok { - return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} - } - - return i.dispatchToMethodFake(req, method) -} - -func (i *IdentityBindingsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - resultChan := make(chan result) - defer close(resultChan) - - go func() { - var intercepted bool - var res result - if identityBindingsServerTransportInterceptor != nil { - res.resp, res.err, intercepted = identityBindingsServerTransportInterceptor.Do(req) - } - if !intercepted { - switch method { - case "IdentityBindingsClient.BeginCreateOrUpdate": - res.resp, res.err = i.dispatchBeginCreateOrUpdate(req) - case "IdentityBindingsClient.BeginDelete": - res.resp, res.err = i.dispatchBeginDelete(req) - case "IdentityBindingsClient.Get": - res.resp, res.err = i.dispatchGet(req) - case "IdentityBindingsClient.NewListByManagedClusterPager": - res.resp, res.err = i.dispatchNewListByManagedClusterPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) - } - - } - select { - case resultChan <- res: - case <-req.Context().Done(): - } - }() - - select { - case <-req.Context().Done(): - return nil, req.Context().Err() - case res := <-resultChan: - return res.resp, res.err - } -} - -func (i *IdentityBindingsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { - if i.srv.BeginCreateOrUpdate == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} - } - beginCreateOrUpdate := i.beginCreateOrUpdate.get(req) - if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/identityBindings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armcontainerservice.IdentityBinding](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - identityBindingNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("identityBindingName")]) - if err != nil { - return nil, err - } - respr, errRespr := i.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, resourceNameParam, identityBindingNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginCreateOrUpdate = &respr - i.beginCreateOrUpdate.add(req, beginCreateOrUpdate) - } - - resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { - i.beginCreateOrUpdate.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} - } - if !server.PollerResponderMore(beginCreateOrUpdate) { - i.beginCreateOrUpdate.remove(req) - } - - return resp, nil -} - -func (i *IdentityBindingsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { - if i.srv.BeginDelete == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} - } - beginDelete := i.beginDelete.get(req) - if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/identityBindings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - identityBindingNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("identityBindingName")]) - if err != nil { - return nil, err - } - respr, errRespr := i.srv.BeginDelete(req.Context(), resourceGroupNameParam, resourceNameParam, identityBindingNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginDelete = &respr - i.beginDelete.add(req, beginDelete) - } - - resp, err := server.PollerResponderNext(beginDelete, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { - i.beginDelete.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} - } - if !server.PollerResponderMore(beginDelete) { - i.beginDelete.remove(req) - } - - return resp, nil -} - -func (i *IdentityBindingsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { - if i.srv.Get == nil { - return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/identityBindings/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - identityBindingNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("identityBindingName")]) - if err != nil { - return nil, err - } - respr, errRespr := i.srv.Get(req.Context(), resourceGroupNameParam, resourceNameParam, identityBindingNameParam, 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)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).IdentityBinding, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (i *IdentityBindingsServerTransport) dispatchNewListByManagedClusterPager(req *http.Request) (*http.Response, error) { - if i.srv.NewListByManagedClusterPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListByManagedClusterPager not implemented")} - } - newListByManagedClusterPager := i.newListByManagedClusterPager.get(req) - if newListByManagedClusterPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/identityBindings` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - resp := i.srv.NewListByManagedClusterPager(resourceGroupNameParam, resourceNameParam, nil) - newListByManagedClusterPager = &resp - i.newListByManagedClusterPager.add(req, newListByManagedClusterPager) - server.PagerResponderInjectNextLinks(newListByManagedClusterPager, req, func(page *armcontainerservice.IdentityBindingsClientListByManagedClusterResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListByManagedClusterPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - i.newListByManagedClusterPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListByManagedClusterPager) { - i.newListByManagedClusterPager.remove(req) - } - return resp, nil -} - -// set this to conditionally intercept incoming requests to IdentityBindingsServerTransport -var identityBindingsServerTransportInterceptor interface { - // Do returns true if the server transport should use the returned response/error - Do(*http.Request) (*http.Response, error, bool) -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/jwtauthenticators_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/jwtauthenticators_server.go deleted file mode 100644 index 223113aa75ce..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/jwtauthenticators_server.go +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package fake - -import ( - "context" - "errors" - "fmt" - 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/containerservice/armcontainerservice/v8" - "net/http" - "net/url" - "regexp" -) - -// JWTAuthenticatorsServer is a fake server for instances of the armcontainerservice.JWTAuthenticatorsClient type. -type JWTAuthenticatorsServer struct { - // BeginCreateOrUpdate is the fake for method JWTAuthenticatorsClient.BeginCreateOrUpdate - // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated - BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, resourceName string, jwtAuthenticatorName string, parameters armcontainerservice.JWTAuthenticator, options *armcontainerservice.JWTAuthenticatorsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armcontainerservice.JWTAuthenticatorsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) - - // BeginDelete is the fake for method JWTAuthenticatorsClient.BeginDelete - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent - BeginDelete func(ctx context.Context, resourceGroupName string, resourceName string, jwtAuthenticatorName string, options *armcontainerservice.JWTAuthenticatorsClientBeginDeleteOptions) (resp azfake.PollerResponder[armcontainerservice.JWTAuthenticatorsClientDeleteResponse], errResp azfake.ErrorResponder) - - // Get is the fake for method JWTAuthenticatorsClient.Get - // HTTP status codes to indicate success: http.StatusOK - Get func(ctx context.Context, resourceGroupName string, resourceName string, jwtAuthenticatorName string, options *armcontainerservice.JWTAuthenticatorsClientGetOptions) (resp azfake.Responder[armcontainerservice.JWTAuthenticatorsClientGetResponse], errResp azfake.ErrorResponder) - - // NewListByManagedClusterPager is the fake for method JWTAuthenticatorsClient.NewListByManagedClusterPager - // HTTP status codes to indicate success: http.StatusOK - NewListByManagedClusterPager func(resourceGroupName string, resourceName string, options *armcontainerservice.JWTAuthenticatorsClientListByManagedClusterOptions) (resp azfake.PagerResponder[armcontainerservice.JWTAuthenticatorsClientListByManagedClusterResponse]) -} - -// NewJWTAuthenticatorsServerTransport creates a new instance of JWTAuthenticatorsServerTransport with the provided implementation. -// The returned JWTAuthenticatorsServerTransport instance is connected to an instance of armcontainerservice.JWTAuthenticatorsClient via the -// azcore.ClientOptions.Transporter field in the client's constructor parameters. -func NewJWTAuthenticatorsServerTransport(srv *JWTAuthenticatorsServer) *JWTAuthenticatorsServerTransport { - return &JWTAuthenticatorsServerTransport{ - srv: srv, - beginCreateOrUpdate: newTracker[azfake.PollerResponder[armcontainerservice.JWTAuthenticatorsClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[armcontainerservice.JWTAuthenticatorsClientDeleteResponse]](), - newListByManagedClusterPager: newTracker[azfake.PagerResponder[armcontainerservice.JWTAuthenticatorsClientListByManagedClusterResponse]](), - } -} - -// JWTAuthenticatorsServerTransport connects instances of armcontainerservice.JWTAuthenticatorsClient to instances of JWTAuthenticatorsServer. -// Don't use this type directly, use NewJWTAuthenticatorsServerTransport instead. -type JWTAuthenticatorsServerTransport struct { - srv *JWTAuthenticatorsServer - beginCreateOrUpdate *tracker[azfake.PollerResponder[armcontainerservice.JWTAuthenticatorsClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[armcontainerservice.JWTAuthenticatorsClientDeleteResponse]] - newListByManagedClusterPager *tracker[azfake.PagerResponder[armcontainerservice.JWTAuthenticatorsClientListByManagedClusterResponse]] -} - -// Do implements the policy.Transporter interface for JWTAuthenticatorsServerTransport. -func (j *JWTAuthenticatorsServerTransport) Do(req *http.Request) (*http.Response, error) { - rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) - method, ok := rawMethod.(string) - if !ok { - return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} - } - - return j.dispatchToMethodFake(req, method) -} - -func (j *JWTAuthenticatorsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - resultChan := make(chan result) - defer close(resultChan) - - go func() { - var intercepted bool - var res result - if jwtAuthenticatorsServerTransportInterceptor != nil { - res.resp, res.err, intercepted = jwtAuthenticatorsServerTransportInterceptor.Do(req) - } - if !intercepted { - switch method { - case "JWTAuthenticatorsClient.BeginCreateOrUpdate": - res.resp, res.err = j.dispatchBeginCreateOrUpdate(req) - case "JWTAuthenticatorsClient.BeginDelete": - res.resp, res.err = j.dispatchBeginDelete(req) - case "JWTAuthenticatorsClient.Get": - res.resp, res.err = j.dispatchGet(req) - case "JWTAuthenticatorsClient.NewListByManagedClusterPager": - res.resp, res.err = j.dispatchNewListByManagedClusterPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) - } - - } - select { - case resultChan <- res: - case <-req.Context().Done(): - } - }() - - select { - case <-req.Context().Done(): - return nil, req.Context().Err() - case res := <-resultChan: - return res.resp, res.err - } -} - -func (j *JWTAuthenticatorsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { - if j.srv.BeginCreateOrUpdate == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} - } - beginCreateOrUpdate := j.beginCreateOrUpdate.get(req) - if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/jwtAuthenticators/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armcontainerservice.JWTAuthenticator](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - jwtAuthenticatorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("jwtAuthenticatorName")]) - if err != nil { - return nil, err - } - respr, errRespr := j.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, resourceNameParam, jwtAuthenticatorNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginCreateOrUpdate = &respr - j.beginCreateOrUpdate.add(req, beginCreateOrUpdate) - } - - resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { - j.beginCreateOrUpdate.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} - } - if !server.PollerResponderMore(beginCreateOrUpdate) { - j.beginCreateOrUpdate.remove(req) - } - - return resp, nil -} - -func (j *JWTAuthenticatorsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { - if j.srv.BeginDelete == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} - } - beginDelete := j.beginDelete.get(req) - if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/jwtAuthenticators/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - jwtAuthenticatorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("jwtAuthenticatorName")]) - if err != nil { - return nil, err - } - respr, errRespr := j.srv.BeginDelete(req.Context(), resourceGroupNameParam, resourceNameParam, jwtAuthenticatorNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginDelete = &respr - j.beginDelete.add(req, beginDelete) - } - - resp, err := server.PollerResponderNext(beginDelete, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { - j.beginDelete.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} - } - if !server.PollerResponderMore(beginDelete) { - j.beginDelete.remove(req) - } - - return resp, nil -} - -func (j *JWTAuthenticatorsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { - if j.srv.Get == nil { - return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/jwtAuthenticators/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - jwtAuthenticatorNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("jwtAuthenticatorName")]) - if err != nil { - return nil, err - } - respr, errRespr := j.srv.Get(req.Context(), resourceGroupNameParam, resourceNameParam, jwtAuthenticatorNameParam, 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)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).JWTAuthenticator, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (j *JWTAuthenticatorsServerTransport) dispatchNewListByManagedClusterPager(req *http.Request) (*http.Response, error) { - if j.srv.NewListByManagedClusterPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListByManagedClusterPager not implemented")} - } - newListByManagedClusterPager := j.newListByManagedClusterPager.get(req) - if newListByManagedClusterPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/jwtAuthenticators` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - resp := j.srv.NewListByManagedClusterPager(resourceGroupNameParam, resourceNameParam, nil) - newListByManagedClusterPager = &resp - j.newListByManagedClusterPager.add(req, newListByManagedClusterPager) - server.PagerResponderInjectNextLinks(newListByManagedClusterPager, req, func(page *armcontainerservice.JWTAuthenticatorsClientListByManagedClusterResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListByManagedClusterPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - j.newListByManagedClusterPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListByManagedClusterPager) { - j.newListByManagedClusterPager.remove(req) - } - return resp, nil -} - -// set this to conditionally intercept incoming requests to JWTAuthenticatorsServerTransport -var jwtAuthenticatorsServerTransportInterceptor interface { - // Do returns true if the server transport should use the returned response/error - Do(*http.Request) (*http.Response, error, bool) -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/loadbalancers_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/loadbalancers_server.go deleted file mode 100644 index c00a12e6c94f..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/loadbalancers_server.go +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package fake - -import ( - "context" - "errors" - "fmt" - 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/containerservice/armcontainerservice/v8" - "net/http" - "net/url" - "regexp" -) - -// LoadBalancersServer is a fake server for instances of the armcontainerservice.LoadBalancersClient type. -type LoadBalancersServer struct { - // CreateOrUpdate is the fake for method LoadBalancersClient.CreateOrUpdate - // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated - CreateOrUpdate func(ctx context.Context, resourceGroupName string, resourceName string, loadBalancerName string, parameters armcontainerservice.LoadBalancer, options *armcontainerservice.LoadBalancersClientCreateOrUpdateOptions) (resp azfake.Responder[armcontainerservice.LoadBalancersClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) - - // BeginDelete is the fake for method LoadBalancersClient.BeginDelete - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent - BeginDelete func(ctx context.Context, resourceGroupName string, resourceName string, loadBalancerName string, options *armcontainerservice.LoadBalancersClientBeginDeleteOptions) (resp azfake.PollerResponder[armcontainerservice.LoadBalancersClientDeleteResponse], errResp azfake.ErrorResponder) - - // Get is the fake for method LoadBalancersClient.Get - // HTTP status codes to indicate success: http.StatusOK - Get func(ctx context.Context, resourceGroupName string, resourceName string, loadBalancerName string, options *armcontainerservice.LoadBalancersClientGetOptions) (resp azfake.Responder[armcontainerservice.LoadBalancersClientGetResponse], errResp azfake.ErrorResponder) - - // NewListByManagedClusterPager is the fake for method LoadBalancersClient.NewListByManagedClusterPager - // HTTP status codes to indicate success: http.StatusOK - NewListByManagedClusterPager func(resourceGroupName string, resourceName string, options *armcontainerservice.LoadBalancersClientListByManagedClusterOptions) (resp azfake.PagerResponder[armcontainerservice.LoadBalancersClientListByManagedClusterResponse]) -} - -// NewLoadBalancersServerTransport creates a new instance of LoadBalancersServerTransport with the provided implementation. -// The returned LoadBalancersServerTransport instance is connected to an instance of armcontainerservice.LoadBalancersClient via the -// azcore.ClientOptions.Transporter field in the client's constructor parameters. -func NewLoadBalancersServerTransport(srv *LoadBalancersServer) *LoadBalancersServerTransport { - return &LoadBalancersServerTransport{ - srv: srv, - beginDelete: newTracker[azfake.PollerResponder[armcontainerservice.LoadBalancersClientDeleteResponse]](), - newListByManagedClusterPager: newTracker[azfake.PagerResponder[armcontainerservice.LoadBalancersClientListByManagedClusterResponse]](), - } -} - -// LoadBalancersServerTransport connects instances of armcontainerservice.LoadBalancersClient to instances of LoadBalancersServer. -// Don't use this type directly, use NewLoadBalancersServerTransport instead. -type LoadBalancersServerTransport struct { - srv *LoadBalancersServer - beginDelete *tracker[azfake.PollerResponder[armcontainerservice.LoadBalancersClientDeleteResponse]] - newListByManagedClusterPager *tracker[azfake.PagerResponder[armcontainerservice.LoadBalancersClientListByManagedClusterResponse]] -} - -// Do implements the policy.Transporter interface for LoadBalancersServerTransport. -func (l *LoadBalancersServerTransport) Do(req *http.Request) (*http.Response, error) { - rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) - method, ok := rawMethod.(string) - if !ok { - return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} - } - - return l.dispatchToMethodFake(req, method) -} - -func (l *LoadBalancersServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - resultChan := make(chan result) - defer close(resultChan) - - go func() { - var intercepted bool - var res result - if loadBalancersServerTransportInterceptor != nil { - res.resp, res.err, intercepted = loadBalancersServerTransportInterceptor.Do(req) - } - if !intercepted { - switch method { - case "LoadBalancersClient.CreateOrUpdate": - res.resp, res.err = l.dispatchCreateOrUpdate(req) - case "LoadBalancersClient.BeginDelete": - res.resp, res.err = l.dispatchBeginDelete(req) - case "LoadBalancersClient.Get": - res.resp, res.err = l.dispatchGet(req) - case "LoadBalancersClient.NewListByManagedClusterPager": - res.resp, res.err = l.dispatchNewListByManagedClusterPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) - } - - } - select { - case resultChan <- res: - case <-req.Context().Done(): - } - }() - - select { - case <-req.Context().Done(): - return nil, req.Context().Err() - case res := <-resultChan: - return res.resp, res.err - } -} - -func (l *LoadBalancersServerTransport) dispatchCreateOrUpdate(req *http.Request) (*http.Response, error) { - if l.srv.CreateOrUpdate == nil { - return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armcontainerservice.LoadBalancer](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) - if err != nil { - return nil, err - } - respr, errRespr := l.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, resourceNameParam, loadBalancerNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - respContent := server.GetResponseContent(respr) - if !contains([]int{http.StatusOK, http.StatusCreated}, respContent.HTTPStatus) { - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", respContent.HTTPStatus)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).LoadBalancer, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (l *LoadBalancersServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { - if l.srv.BeginDelete == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} - } - beginDelete := l.beginDelete.get(req) - if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) - if err != nil { - return nil, err - } - respr, errRespr := l.srv.BeginDelete(req.Context(), resourceGroupNameParam, resourceNameParam, loadBalancerNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginDelete = &respr - l.beginDelete.add(req, beginDelete) - } - - resp, err := server.PollerResponderNext(beginDelete, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { - l.beginDelete.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} - } - if !server.PollerResponderMore(beginDelete) { - l.beginDelete.remove(req) - } - - return resp, nil -} - -func (l *LoadBalancersServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { - if l.srv.Get == nil { - return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancers/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - loadBalancerNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("loadBalancerName")]) - if err != nil { - return nil, err - } - respr, errRespr := l.srv.Get(req.Context(), resourceGroupNameParam, resourceNameParam, loadBalancerNameParam, 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)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).LoadBalancer, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (l *LoadBalancersServerTransport) dispatchNewListByManagedClusterPager(req *http.Request) (*http.Response, error) { - if l.srv.NewListByManagedClusterPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListByManagedClusterPager not implemented")} - } - newListByManagedClusterPager := l.newListByManagedClusterPager.get(req) - if newListByManagedClusterPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/loadBalancers` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - resp := l.srv.NewListByManagedClusterPager(resourceGroupNameParam, resourceNameParam, nil) - newListByManagedClusterPager = &resp - l.newListByManagedClusterPager.add(req, newListByManagedClusterPager) - server.PagerResponderInjectNextLinks(newListByManagedClusterPager, req, func(page *armcontainerservice.LoadBalancersClientListByManagedClusterResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListByManagedClusterPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - l.newListByManagedClusterPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListByManagedClusterPager) { - l.newListByManagedClusterPager.remove(req) - } - return resp, nil -} - -// set this to conditionally intercept incoming requests to LoadBalancersServerTransport -var loadBalancersServerTransportInterceptor interface { - // Do returns true if the server transport should use the returned response/error - Do(*http.Request) (*http.Response, error, bool) -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/machines_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/machines_server.go index dd873cab671e..865ce7a8f115 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/machines_server.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/fake/machines_server.go @@ -21,10 +21,6 @@ import ( // MachinesServer is a fake server for instances of the armcontainerservice.MachinesClient type. type MachinesServer struct { - // BeginCreateOrUpdate is the fake for method MachinesClient.BeginCreateOrUpdate - // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated - BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machineName string, parameters armcontainerservice.Machine, options *armcontainerservice.MachinesClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armcontainerservice.MachinesClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) - // Get is the fake for method MachinesClient.Get // HTTP status codes to indicate success: http.StatusOK Get func(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machineName string, options *armcontainerservice.MachinesClientGetOptions) (resp azfake.Responder[armcontainerservice.MachinesClientGetResponse], errResp azfake.ErrorResponder) @@ -39,18 +35,16 @@ type MachinesServer struct { // azcore.ClientOptions.Transporter field in the client's constructor parameters. func NewMachinesServerTransport(srv *MachinesServer) *MachinesServerTransport { return &MachinesServerTransport{ - srv: srv, - beginCreateOrUpdate: newTracker[azfake.PollerResponder[armcontainerservice.MachinesClientCreateOrUpdateResponse]](), - newListPager: newTracker[azfake.PagerResponder[armcontainerservice.MachinesClientListResponse]](), + srv: srv, + newListPager: newTracker[azfake.PagerResponder[armcontainerservice.MachinesClientListResponse]](), } } // MachinesServerTransport connects instances of armcontainerservice.MachinesClient to instances of MachinesServer. // Don't use this type directly, use NewMachinesServerTransport instead. type MachinesServerTransport struct { - srv *MachinesServer - beginCreateOrUpdate *tracker[azfake.PollerResponder[armcontainerservice.MachinesClientCreateOrUpdateResponse]] - newListPager *tracker[azfake.PagerResponder[armcontainerservice.MachinesClientListResponse]] + srv *MachinesServer + newListPager *tracker[azfake.PagerResponder[armcontainerservice.MachinesClientListResponse]] } // Do implements the policy.Transporter interface for MachinesServerTransport. @@ -76,8 +70,6 @@ func (m *MachinesServerTransport) dispatchToMethodFake(req *http.Request, method } if !intercepted { switch method { - case "MachinesClient.BeginCreateOrUpdate": - res.resp, res.err = m.dispatchBeginCreateOrUpdate(req) case "MachinesClient.Get": res.resp, res.err = m.dispatchGet(req) case "MachinesClient.NewListPager": @@ -101,71 +93,6 @@ func (m *MachinesServerTransport) dispatchToMethodFake(req *http.Request, method } } -func (m *MachinesServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { - if m.srv.BeginCreateOrUpdate == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} - } - beginCreateOrUpdate := m.beginCreateOrUpdate.get(req) - if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/agentPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/machines/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 6 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armcontainerservice.Machine](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - agentPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("agentPoolName")]) - if err != nil { - return nil, err - } - machineNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("machineName")]) - if err != nil { - return nil, err - } - ifMatchParam := getOptional(getHeaderValue(req.Header, "If-Match")) - ifNoneMatchParam := getOptional(getHeaderValue(req.Header, "If-None-Match")) - var options *armcontainerservice.MachinesClientBeginCreateOrUpdateOptions - if ifMatchParam != nil || ifNoneMatchParam != nil { - options = &armcontainerservice.MachinesClientBeginCreateOrUpdateOptions{ - IfMatch: ifMatchParam, - IfNoneMatch: ifNoneMatchParam, - } - } - respr, errRespr := m.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, resourceNameParam, agentPoolNameParam, machineNameParam, body, options) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginCreateOrUpdate = &respr - m.beginCreateOrUpdate.add(req, beginCreateOrUpdate) - } - - resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { - m.beginCreateOrUpdate.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} - } - if !server.PollerResponderMore(beginCreateOrUpdate) { - m.beginCreateOrUpdate.remove(req) - } - - return resp, nil -} - func (m *MachinesServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { if m.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclusters_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclusters_server.go index 1e17ada248a9..8855bfe1c03c 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclusters_server.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclusters_server.go @@ -17,7 +17,6 @@ import ( "net/http" "net/url" "regexp" - "strconv" ) // ManagedClustersServer is a fake server for instances of the armcontainerservice.ManagedClustersClient type. @@ -46,10 +45,6 @@ type ManagedClustersServer struct { // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted GetCommandResult func(ctx context.Context, resourceGroupName string, resourceName string, commandID string, options *armcontainerservice.ManagedClustersClientGetCommandResultOptions) (resp azfake.Responder[armcontainerservice.ManagedClustersClientGetCommandResultResponse], errResp azfake.ErrorResponder) - // GetGuardrailsVersions is the fake for method ManagedClustersClient.GetGuardrailsVersions - // HTTP status codes to indicate success: http.StatusOK - GetGuardrailsVersions func(ctx context.Context, location string, version string, options *armcontainerservice.ManagedClustersClientGetGuardrailsVersionsOptions) (resp azfake.Responder[armcontainerservice.ManagedClustersClientGetGuardrailsVersionsResponse], errResp azfake.ErrorResponder) - // GetMeshRevisionProfile is the fake for method ManagedClustersClient.GetMeshRevisionProfile // HTTP status codes to indicate success: http.StatusOK GetMeshRevisionProfile func(ctx context.Context, location string, mode string, options *armcontainerservice.ManagedClustersClientGetMeshRevisionProfileOptions) (resp azfake.Responder[armcontainerservice.ManagedClustersClientGetMeshRevisionProfileResponse], errResp azfake.ErrorResponder) @@ -58,10 +53,6 @@ type ManagedClustersServer struct { // HTTP status codes to indicate success: http.StatusOK GetMeshUpgradeProfile func(ctx context.Context, resourceGroupName string, resourceName string, mode string, options *armcontainerservice.ManagedClustersClientGetMeshUpgradeProfileOptions) (resp azfake.Responder[armcontainerservice.ManagedClustersClientGetMeshUpgradeProfileResponse], errResp azfake.ErrorResponder) - // GetSafeguardsVersions is the fake for method ManagedClustersClient.GetSafeguardsVersions - // HTTP status codes to indicate success: http.StatusOK - GetSafeguardsVersions func(ctx context.Context, location string, version string, options *armcontainerservice.ManagedClustersClientGetSafeguardsVersionsOptions) (resp azfake.Responder[armcontainerservice.ManagedClustersClientGetSafeguardsVersionsResponse], errResp azfake.ErrorResponder) - // GetUpgradeProfile is the fake for method ManagedClustersClient.GetUpgradeProfile // HTTP status codes to indicate success: http.StatusOK GetUpgradeProfile func(ctx context.Context, resourceGroupName string, resourceName string, options *armcontainerservice.ManagedClustersClientGetUpgradeProfileOptions) (resp azfake.Responder[armcontainerservice.ManagedClustersClientGetUpgradeProfileResponse], errResp azfake.ErrorResponder) @@ -86,10 +77,6 @@ type ManagedClustersServer struct { // HTTP status codes to indicate success: http.StatusOK ListClusterUserCredentials func(ctx context.Context, resourceGroupName string, resourceName string, options *armcontainerservice.ManagedClustersClientListClusterUserCredentialsOptions) (resp azfake.Responder[armcontainerservice.ManagedClustersClientListClusterUserCredentialsResponse], errResp azfake.ErrorResponder) - // NewListGuardrailsVersionsPager is the fake for method ManagedClustersClient.NewListGuardrailsVersionsPager - // HTTP status codes to indicate success: http.StatusOK - NewListGuardrailsVersionsPager func(location string, options *armcontainerservice.ManagedClustersClientListGuardrailsVersionsOptions) (resp azfake.PagerResponder[armcontainerservice.ManagedClustersClientListGuardrailsVersionsResponse]) - // ListKubernetesVersions is the fake for method ManagedClustersClient.ListKubernetesVersions // HTTP status codes to indicate success: http.StatusOK ListKubernetesVersions func(ctx context.Context, location string, options *armcontainerservice.ManagedClustersClientListKubernetesVersionsOptions) (resp azfake.Responder[armcontainerservice.ManagedClustersClientListKubernetesVersionsResponse], errResp azfake.ErrorResponder) @@ -106,14 +93,6 @@ type ManagedClustersServer struct { // HTTP status codes to indicate success: http.StatusOK NewListOutboundNetworkDependenciesEndpointsPager func(resourceGroupName string, resourceName string, options *armcontainerservice.ManagedClustersClientListOutboundNetworkDependenciesEndpointsOptions) (resp azfake.PagerResponder[armcontainerservice.ManagedClustersClientListOutboundNetworkDependenciesEndpointsResponse]) - // NewListSafeguardsVersionsPager is the fake for method ManagedClustersClient.NewListSafeguardsVersionsPager - // HTTP status codes to indicate success: http.StatusOK - NewListSafeguardsVersionsPager func(location string, options *armcontainerservice.ManagedClustersClientListSafeguardsVersionsOptions) (resp azfake.PagerResponder[armcontainerservice.ManagedClustersClientListSafeguardsVersionsResponse]) - - // BeginRebalanceLoadBalancers is the fake for method ManagedClustersClient.BeginRebalanceLoadBalancers - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent - BeginRebalanceLoadBalancers func(ctx context.Context, resourceGroupName string, resourceName string, parameters armcontainerservice.RebalanceLoadBalancersRequestBody, options *armcontainerservice.ManagedClustersClientBeginRebalanceLoadBalancersOptions) (resp azfake.PollerResponder[armcontainerservice.ManagedClustersClientRebalanceLoadBalancersResponse], errResp azfake.ErrorResponder) - // BeginResetAADProfile is the fake for method ManagedClustersClient.BeginResetAADProfile // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent BeginResetAADProfile func(ctx context.Context, resourceGroupName string, resourceName string, parameters armcontainerservice.ManagedClusterAADProfile, options *armcontainerservice.ManagedClustersClientBeginResetAADProfileOptions) (resp azfake.PollerResponder[armcontainerservice.ManagedClustersClientResetAADProfileResponse], errResp azfake.ErrorResponder) @@ -158,12 +137,9 @@ func NewManagedClustersServerTransport(srv *ManagedClustersServer) *ManagedClust beginDelete: newTracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientDeleteResponse]](), newListPager: newTracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListResponse]](), newListByResourceGroupPager: newTracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListByResourceGroupResponse]](), - newListGuardrailsVersionsPager: newTracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListGuardrailsVersionsResponse]](), newListMeshRevisionProfilesPager: newTracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListMeshRevisionProfilesResponse]](), newListMeshUpgradeProfilesPager: newTracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListMeshUpgradeProfilesResponse]](), newListOutboundNetworkDependenciesEndpointsPager: newTracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListOutboundNetworkDependenciesEndpointsResponse]](), - newListSafeguardsVersionsPager: newTracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListSafeguardsVersionsResponse]](), - beginRebalanceLoadBalancers: newTracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientRebalanceLoadBalancersResponse]](), beginResetAADProfile: newTracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientResetAADProfileResponse]](), beginResetServicePrincipalProfile: newTracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientResetServicePrincipalProfileResponse]](), beginRotateClusterCertificates: newTracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientRotateClusterCertificatesResponse]](), @@ -184,12 +160,9 @@ type ManagedClustersServerTransport struct { beginDelete *tracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientDeleteResponse]] newListPager *tracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListResponse]] newListByResourceGroupPager *tracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListByResourceGroupResponse]] - newListGuardrailsVersionsPager *tracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListGuardrailsVersionsResponse]] newListMeshRevisionProfilesPager *tracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListMeshRevisionProfilesResponse]] newListMeshUpgradeProfilesPager *tracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListMeshUpgradeProfilesResponse]] newListOutboundNetworkDependenciesEndpointsPager *tracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListOutboundNetworkDependenciesEndpointsResponse]] - newListSafeguardsVersionsPager *tracker[azfake.PagerResponder[armcontainerservice.ManagedClustersClientListSafeguardsVersionsResponse]] - beginRebalanceLoadBalancers *tracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientRebalanceLoadBalancersResponse]] beginResetAADProfile *tracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientResetAADProfileResponse]] beginResetServicePrincipalProfile *tracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientResetServicePrincipalProfileResponse]] beginRotateClusterCertificates *tracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientRotateClusterCertificatesResponse]] @@ -235,14 +208,10 @@ func (m *ManagedClustersServerTransport) dispatchToMethodFake(req *http.Request, res.resp, res.err = m.dispatchGetAccessProfile(req) case "ManagedClustersClient.GetCommandResult": res.resp, res.err = m.dispatchGetCommandResult(req) - case "ManagedClustersClient.GetGuardrailsVersions": - res.resp, res.err = m.dispatchGetGuardrailsVersions(req) case "ManagedClustersClient.GetMeshRevisionProfile": res.resp, res.err = m.dispatchGetMeshRevisionProfile(req) case "ManagedClustersClient.GetMeshUpgradeProfile": res.resp, res.err = m.dispatchGetMeshUpgradeProfile(req) - case "ManagedClustersClient.GetSafeguardsVersions": - res.resp, res.err = m.dispatchGetSafeguardsVersions(req) case "ManagedClustersClient.GetUpgradeProfile": res.resp, res.err = m.dispatchGetUpgradeProfile(req) case "ManagedClustersClient.NewListPager": @@ -255,8 +224,6 @@ func (m *ManagedClustersServerTransport) dispatchToMethodFake(req *http.Request, res.resp, res.err = m.dispatchListClusterMonitoringUserCredentials(req) case "ManagedClustersClient.ListClusterUserCredentials": res.resp, res.err = m.dispatchListClusterUserCredentials(req) - case "ManagedClustersClient.NewListGuardrailsVersionsPager": - res.resp, res.err = m.dispatchNewListGuardrailsVersionsPager(req) case "ManagedClustersClient.ListKubernetesVersions": res.resp, res.err = m.dispatchListKubernetesVersions(req) case "ManagedClustersClient.NewListMeshRevisionProfilesPager": @@ -265,10 +232,6 @@ func (m *ManagedClustersServerTransport) dispatchToMethodFake(req *http.Request, res.resp, res.err = m.dispatchNewListMeshUpgradeProfilesPager(req) case "ManagedClustersClient.NewListOutboundNetworkDependenciesEndpointsPager": res.resp, res.err = m.dispatchNewListOutboundNetworkDependenciesEndpointsPager(req) - case "ManagedClustersClient.NewListSafeguardsVersionsPager": - res.resp, res.err = m.dispatchNewListSafeguardsVersionsPager(req) - case "ManagedClustersClient.BeginRebalanceLoadBalancers": - res.resp, res.err = m.dispatchBeginRebalanceLoadBalancers(req) case "ManagedClustersClient.BeginResetAADProfile": res.resp, res.err = m.dispatchBeginResetAADProfile(req) case "ManagedClustersClient.BeginResetServicePrincipalProfile": @@ -417,7 +380,6 @@ func (m *ManagedClustersServerTransport) dispatchBeginDelete(req *http.Request) if len(matches) < 4 { return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) } - qp := req.URL.Query() resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) if err != nil { return nil, err @@ -427,19 +389,10 @@ func (m *ManagedClustersServerTransport) dispatchBeginDelete(req *http.Request) return nil, err } ifMatchParam := getOptional(getHeaderValue(req.Header, "If-Match")) - ignorePodDisruptionBudgetUnescaped, err := url.QueryUnescape(qp.Get("ignore-pod-disruption-budget")) - if err != nil { - return nil, err - } - ignorePodDisruptionBudgetParam, err := parseOptional(ignorePodDisruptionBudgetUnescaped, strconv.ParseBool) - if err != nil { - return nil, err - } var options *armcontainerservice.ManagedClustersClientBeginDeleteOptions - if ifMatchParam != nil || ignorePodDisruptionBudgetParam != nil { + if ifMatchParam != nil { options = &armcontainerservice.ManagedClustersClientBeginDeleteOptions{ - IfMatch: ifMatchParam, - IgnorePodDisruptionBudget: ignorePodDisruptionBudgetParam, + IfMatch: ifMatchParam, } } respr, errRespr := m.srv.BeginDelete(req.Context(), resourceGroupNameParam, resourceNameParam, options) @@ -576,39 +529,6 @@ func (m *ManagedClustersServerTransport) dispatchGetCommandResult(req *http.Requ return resp, nil } -func (m *ManagedClustersServerTransport) dispatchGetGuardrailsVersions(req *http.Request) (*http.Response, error) { - if m.srv.GetGuardrailsVersions == nil { - return nil, &nonRetriableError{errors.New("fake for method GetGuardrailsVersions not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/guardrailsVersions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) - if err != nil { - return nil, err - } - versionParam, err := url.PathUnescape(matches[regex.SubexpIndex("version")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.GetGuardrailsVersions(req.Context(), locationParam, versionParam, 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)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).GuardrailsAvailableVersion, req) - if err != nil { - return nil, err - } - return resp, nil -} - func (m *ManagedClustersServerTransport) dispatchGetMeshRevisionProfile(req *http.Request) (*http.Response, error) { if m.srv.GetMeshRevisionProfile == nil { return nil, &nonRetriableError{errors.New("fake for method GetMeshRevisionProfile not implemented")} @@ -679,39 +599,6 @@ func (m *ManagedClustersServerTransport) dispatchGetMeshUpgradeProfile(req *http return resp, nil } -func (m *ManagedClustersServerTransport) dispatchGetSafeguardsVersions(req *http.Request) (*http.Response, error) { - if m.srv.GetSafeguardsVersions == nil { - return nil, &nonRetriableError{errors.New("fake for method GetSafeguardsVersions not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/safeguardsVersions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) - if err != nil { - return nil, err - } - versionParam, err := url.PathUnescape(matches[regex.SubexpIndex("version")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.GetSafeguardsVersions(req.Context(), locationParam, versionParam, 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)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).SafeguardsAvailableVersion, req) - if err != nil { - return nil, err - } - return resp, nil -} - func (m *ManagedClustersServerTransport) dispatchGetUpgradeProfile(req *http.Request) (*http.Response, error) { if m.srv.GetUpgradeProfile == nil { return nil, &nonRetriableError{errors.New("fake for method GetUpgradeProfile not implemented")} @@ -956,43 +843,6 @@ func (m *ManagedClustersServerTransport) dispatchListClusterUserCredentials(req return resp, nil } -func (m *ManagedClustersServerTransport) dispatchNewListGuardrailsVersionsPager(req *http.Request) (*http.Response, error) { - if m.srv.NewListGuardrailsVersionsPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListGuardrailsVersionsPager not implemented")} - } - newListGuardrailsVersionsPager := m.newListGuardrailsVersionsPager.get(req) - if newListGuardrailsVersionsPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/guardrailsVersions` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) - if err != nil { - return nil, err - } - resp := m.srv.NewListGuardrailsVersionsPager(locationParam, nil) - newListGuardrailsVersionsPager = &resp - m.newListGuardrailsVersionsPager.add(req, newListGuardrailsVersionsPager) - server.PagerResponderInjectNextLinks(newListGuardrailsVersionsPager, req, func(page *armcontainerservice.ManagedClustersClientListGuardrailsVersionsResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListGuardrailsVersionsPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - m.newListGuardrailsVersionsPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListGuardrailsVersionsPager) { - m.newListGuardrailsVersionsPager.remove(req) - } - return resp, nil -} - func (m *ManagedClustersServerTransport) dispatchListKubernetesVersions(req *http.Request) (*http.Response, error) { if m.srv.ListKubernetesVersions == nil { return nil, &nonRetriableError{errors.New("fake for method ListKubernetesVersions not implemented")} @@ -1141,91 +991,6 @@ func (m *ManagedClustersServerTransport) dispatchNewListOutboundNetworkDependenc return resp, nil } -func (m *ManagedClustersServerTransport) dispatchNewListSafeguardsVersionsPager(req *http.Request) (*http.Response, error) { - if m.srv.NewListSafeguardsVersionsPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListSafeguardsVersionsPager not implemented")} - } - newListSafeguardsVersionsPager := m.newListSafeguardsVersionsPager.get(req) - if newListSafeguardsVersionsPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/safeguardsVersions` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) - if err != nil { - return nil, err - } - resp := m.srv.NewListSafeguardsVersionsPager(locationParam, nil) - newListSafeguardsVersionsPager = &resp - m.newListSafeguardsVersionsPager.add(req, newListSafeguardsVersionsPager) - server.PagerResponderInjectNextLinks(newListSafeguardsVersionsPager, req, func(page *armcontainerservice.ManagedClustersClientListSafeguardsVersionsResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListSafeguardsVersionsPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - m.newListSafeguardsVersionsPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListSafeguardsVersionsPager) { - m.newListSafeguardsVersionsPager.remove(req) - } - return resp, nil -} - -func (m *ManagedClustersServerTransport) dispatchBeginRebalanceLoadBalancers(req *http.Request) (*http.Response, error) { - if m.srv.BeginRebalanceLoadBalancers == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginRebalanceLoadBalancers not implemented")} - } - beginRebalanceLoadBalancers := m.beginRebalanceLoadBalancers.get(req) - if beginRebalanceLoadBalancers == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/rebalanceLoadBalancers` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armcontainerservice.RebalanceLoadBalancersRequestBody](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.BeginRebalanceLoadBalancers(req.Context(), resourceGroupNameParam, resourceNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginRebalanceLoadBalancers = &respr - m.beginRebalanceLoadBalancers.add(req, beginRebalanceLoadBalancers) - } - - resp, err := server.PollerResponderNext(beginRebalanceLoadBalancers, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { - m.beginRebalanceLoadBalancers.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} - } - if !server.PollerResponderMore(beginRebalanceLoadBalancers) { - m.beginRebalanceLoadBalancers.remove(req) - } - - return resp, nil -} - func (m *ManagedClustersServerTransport) dispatchBeginResetAADProfile(req *http.Request) (*http.Response, error) { if m.srv.BeginResetAADProfile == nil { return nil, &nonRetriableError{errors.New("fake for method BeginResetAADProfile not implemented")} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclustersnapshots_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclustersnapshots_server.go deleted file mode 100644 index 91a5ddb23b0d..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclustersnapshots_server.go +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package fake - -import ( - "context" - "errors" - "fmt" - 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/containerservice/armcontainerservice/v8" - "net/http" - "net/url" - "regexp" -) - -// ManagedClusterSnapshotsServer is a fake server for instances of the armcontainerservice.ManagedClusterSnapshotsClient type. -type ManagedClusterSnapshotsServer struct { - // CreateOrUpdate is the fake for method ManagedClusterSnapshotsClient.CreateOrUpdate - // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated - CreateOrUpdate func(ctx context.Context, resourceGroupName string, resourceName string, parameters armcontainerservice.ManagedClusterSnapshot, options *armcontainerservice.ManagedClusterSnapshotsClientCreateOrUpdateOptions) (resp azfake.Responder[armcontainerservice.ManagedClusterSnapshotsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) - - // Delete is the fake for method ManagedClusterSnapshotsClient.Delete - // HTTP status codes to indicate success: http.StatusOK, http.StatusNoContent - Delete func(ctx context.Context, resourceGroupName string, resourceName string, options *armcontainerservice.ManagedClusterSnapshotsClientDeleteOptions) (resp azfake.Responder[armcontainerservice.ManagedClusterSnapshotsClientDeleteResponse], errResp azfake.ErrorResponder) - - // Get is the fake for method ManagedClusterSnapshotsClient.Get - // HTTP status codes to indicate success: http.StatusOK - Get func(ctx context.Context, resourceGroupName string, resourceName string, options *armcontainerservice.ManagedClusterSnapshotsClientGetOptions) (resp azfake.Responder[armcontainerservice.ManagedClusterSnapshotsClientGetResponse], errResp azfake.ErrorResponder) - - // NewListPager is the fake for method ManagedClusterSnapshotsClient.NewListPager - // HTTP status codes to indicate success: http.StatusOK - NewListPager func(options *armcontainerservice.ManagedClusterSnapshotsClientListOptions) (resp azfake.PagerResponder[armcontainerservice.ManagedClusterSnapshotsClientListResponse]) - - // NewListByResourceGroupPager is the fake for method ManagedClusterSnapshotsClient.NewListByResourceGroupPager - // HTTP status codes to indicate success: http.StatusOK - NewListByResourceGroupPager func(resourceGroupName string, options *armcontainerservice.ManagedClusterSnapshotsClientListByResourceGroupOptions) (resp azfake.PagerResponder[armcontainerservice.ManagedClusterSnapshotsClientListByResourceGroupResponse]) - - // UpdateTags is the fake for method ManagedClusterSnapshotsClient.UpdateTags - // HTTP status codes to indicate success: http.StatusOK - UpdateTags func(ctx context.Context, resourceGroupName string, resourceName string, parameters armcontainerservice.TagsObject, options *armcontainerservice.ManagedClusterSnapshotsClientUpdateTagsOptions) (resp azfake.Responder[armcontainerservice.ManagedClusterSnapshotsClientUpdateTagsResponse], errResp azfake.ErrorResponder) -} - -// NewManagedClusterSnapshotsServerTransport creates a new instance of ManagedClusterSnapshotsServerTransport with the provided implementation. -// The returned ManagedClusterSnapshotsServerTransport instance is connected to an instance of armcontainerservice.ManagedClusterSnapshotsClient via the -// azcore.ClientOptions.Transporter field in the client's constructor parameters. -func NewManagedClusterSnapshotsServerTransport(srv *ManagedClusterSnapshotsServer) *ManagedClusterSnapshotsServerTransport { - return &ManagedClusterSnapshotsServerTransport{ - srv: srv, - newListPager: newTracker[azfake.PagerResponder[armcontainerservice.ManagedClusterSnapshotsClientListResponse]](), - newListByResourceGroupPager: newTracker[azfake.PagerResponder[armcontainerservice.ManagedClusterSnapshotsClientListByResourceGroupResponse]](), - } -} - -// ManagedClusterSnapshotsServerTransport connects instances of armcontainerservice.ManagedClusterSnapshotsClient to instances of ManagedClusterSnapshotsServer. -// Don't use this type directly, use NewManagedClusterSnapshotsServerTransport instead. -type ManagedClusterSnapshotsServerTransport struct { - srv *ManagedClusterSnapshotsServer - newListPager *tracker[azfake.PagerResponder[armcontainerservice.ManagedClusterSnapshotsClientListResponse]] - newListByResourceGroupPager *tracker[azfake.PagerResponder[armcontainerservice.ManagedClusterSnapshotsClientListByResourceGroupResponse]] -} - -// Do implements the policy.Transporter interface for ManagedClusterSnapshotsServerTransport. -func (m *ManagedClusterSnapshotsServerTransport) Do(req *http.Request) (*http.Response, error) { - rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) - method, ok := rawMethod.(string) - if !ok { - return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} - } - - return m.dispatchToMethodFake(req, method) -} - -func (m *ManagedClusterSnapshotsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - resultChan := make(chan result) - defer close(resultChan) - - go func() { - var intercepted bool - var res result - if managedClusterSnapshotsServerTransportInterceptor != nil { - res.resp, res.err, intercepted = managedClusterSnapshotsServerTransportInterceptor.Do(req) - } - if !intercepted { - switch method { - case "ManagedClusterSnapshotsClient.CreateOrUpdate": - res.resp, res.err = m.dispatchCreateOrUpdate(req) - case "ManagedClusterSnapshotsClient.Delete": - res.resp, res.err = m.dispatchDelete(req) - case "ManagedClusterSnapshotsClient.Get": - res.resp, res.err = m.dispatchGet(req) - case "ManagedClusterSnapshotsClient.NewListPager": - res.resp, res.err = m.dispatchNewListPager(req) - case "ManagedClusterSnapshotsClient.NewListByResourceGroupPager": - res.resp, res.err = m.dispatchNewListByResourceGroupPager(req) - case "ManagedClusterSnapshotsClient.UpdateTags": - res.resp, res.err = m.dispatchUpdateTags(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) - } - - } - select { - case resultChan <- res: - case <-req.Context().Done(): - } - }() - - select { - case <-req.Context().Done(): - return nil, req.Context().Err() - case res := <-resultChan: - return res.resp, res.err - } -} - -func (m *ManagedClusterSnapshotsServerTransport) dispatchCreateOrUpdate(req *http.Request) (*http.Response, error) { - if m.srv.CreateOrUpdate == nil { - return nil, &nonRetriableError{errors.New("fake for method CreateOrUpdate not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedclustersnapshots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armcontainerservice.ManagedClusterSnapshot](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.CreateOrUpdate(req.Context(), resourceGroupNameParam, resourceNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - respContent := server.GetResponseContent(respr) - if !contains([]int{http.StatusOK, http.StatusCreated}, respContent.HTTPStatus) { - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", respContent.HTTPStatus)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ManagedClusterSnapshot, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (m *ManagedClusterSnapshotsServerTransport) dispatchDelete(req *http.Request) (*http.Response, error) { - if m.srv.Delete == nil { - return nil, &nonRetriableError{errors.New("fake for method Delete not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedclustersnapshots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.Delete(req.Context(), resourceGroupNameParam, resourceNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - respContent := server.GetResponseContent(respr) - if !contains([]int{http.StatusOK, http.StatusNoContent}, respContent.HTTPStatus) { - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusNoContent", respContent.HTTPStatus)} - } - resp, err := server.NewResponse(respContent, req, nil) - if err != nil { - return nil, err - } - return resp, nil -} - -func (m *ManagedClusterSnapshotsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { - if m.srv.Get == nil { - return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedclustersnapshots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.Get(req.Context(), resourceGroupNameParam, resourceNameParam, 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)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ManagedClusterSnapshot, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (m *ManagedClusterSnapshotsServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { - if m.srv.NewListPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} - } - newListPager := m.newListPager.get(req) - if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedclustersnapshots` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 2 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resp := m.srv.NewListPager(nil) - newListPager = &resp - m.newListPager.add(req, newListPager) - server.PagerResponderInjectNextLinks(newListPager, req, func(page *armcontainerservice.ManagedClusterSnapshotsClientListResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - m.newListPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListPager) { - m.newListPager.remove(req) - } - return resp, nil -} - -func (m *ManagedClusterSnapshotsServerTransport) dispatchNewListByResourceGroupPager(req *http.Request) (*http.Response, error) { - if m.srv.NewListByResourceGroupPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListByResourceGroupPager not implemented")} - } - newListByResourceGroupPager := m.newListByResourceGroupPager.get(req) - if newListByResourceGroupPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedclustersnapshots` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resp := m.srv.NewListByResourceGroupPager(resourceGroupNameParam, nil) - newListByResourceGroupPager = &resp - m.newListByResourceGroupPager.add(req, newListByResourceGroupPager) - server.PagerResponderInjectNextLinks(newListByResourceGroupPager, req, func(page *armcontainerservice.ManagedClusterSnapshotsClientListByResourceGroupResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListByResourceGroupPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - m.newListByResourceGroupPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListByResourceGroupPager) { - m.newListByResourceGroupPager.remove(req) - } - return resp, nil -} - -func (m *ManagedClusterSnapshotsServerTransport) dispatchUpdateTags(req *http.Request) (*http.Response, error) { - if m.srv.UpdateTags == nil { - return nil, &nonRetriableError{errors.New("fake for method UpdateTags not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedclustersnapshots/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armcontainerservice.TagsObject](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.UpdateTags(req.Context(), resourceGroupNameParam, resourceNameParam, body, 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)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).ManagedClusterSnapshot, req) - if err != nil { - return nil, err - } - return resp, nil -} - -// set this to conditionally intercept incoming requests to ManagedClusterSnapshotsServerTransport -var managedClusterSnapshotsServerTransportInterceptor interface { - // Do returns true if the server transport should use the returned response/error - Do(*http.Request) (*http.Response, error, bool) -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/meshmemberships_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/meshmemberships_server.go deleted file mode 100644 index 07f4762771c8..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/meshmemberships_server.go +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package fake - -import ( - "context" - "errors" - "fmt" - 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/containerservice/armcontainerservice/v8" - "net/http" - "net/url" - "regexp" -) - -// MeshMembershipsServer is a fake server for instances of the armcontainerservice.MeshMembershipsClient type. -type MeshMembershipsServer struct { - // BeginCreateOrUpdate is the fake for method MeshMembershipsClient.BeginCreateOrUpdate - // HTTP status codes to indicate success: http.StatusOK, http.StatusCreated - BeginCreateOrUpdate func(ctx context.Context, resourceGroupName string, resourceName string, meshMembershipName string, parameters armcontainerservice.MeshMembership, options *armcontainerservice.MeshMembershipsClientBeginCreateOrUpdateOptions) (resp azfake.PollerResponder[armcontainerservice.MeshMembershipsClientCreateOrUpdateResponse], errResp azfake.ErrorResponder) - - // BeginDelete is the fake for method MeshMembershipsClient.BeginDelete - // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted, http.StatusNoContent - BeginDelete func(ctx context.Context, resourceGroupName string, resourceName string, meshMembershipName string, options *armcontainerservice.MeshMembershipsClientBeginDeleteOptions) (resp azfake.PollerResponder[armcontainerservice.MeshMembershipsClientDeleteResponse], errResp azfake.ErrorResponder) - - // Get is the fake for method MeshMembershipsClient.Get - // HTTP status codes to indicate success: http.StatusOK - Get func(ctx context.Context, resourceGroupName string, resourceName string, meshMembershipName string, options *armcontainerservice.MeshMembershipsClientGetOptions) (resp azfake.Responder[armcontainerservice.MeshMembershipsClientGetResponse], errResp azfake.ErrorResponder) - - // NewListByManagedClusterPager is the fake for method MeshMembershipsClient.NewListByManagedClusterPager - // HTTP status codes to indicate success: http.StatusOK - NewListByManagedClusterPager func(resourceGroupName string, resourceName string, options *armcontainerservice.MeshMembershipsClientListByManagedClusterOptions) (resp azfake.PagerResponder[armcontainerservice.MeshMembershipsClientListByManagedClusterResponse]) -} - -// NewMeshMembershipsServerTransport creates a new instance of MeshMembershipsServerTransport with the provided implementation. -// The returned MeshMembershipsServerTransport instance is connected to an instance of armcontainerservice.MeshMembershipsClient via the -// azcore.ClientOptions.Transporter field in the client's constructor parameters. -func NewMeshMembershipsServerTransport(srv *MeshMembershipsServer) *MeshMembershipsServerTransport { - return &MeshMembershipsServerTransport{ - srv: srv, - beginCreateOrUpdate: newTracker[azfake.PollerResponder[armcontainerservice.MeshMembershipsClientCreateOrUpdateResponse]](), - beginDelete: newTracker[azfake.PollerResponder[armcontainerservice.MeshMembershipsClientDeleteResponse]](), - newListByManagedClusterPager: newTracker[azfake.PagerResponder[armcontainerservice.MeshMembershipsClientListByManagedClusterResponse]](), - } -} - -// MeshMembershipsServerTransport connects instances of armcontainerservice.MeshMembershipsClient to instances of MeshMembershipsServer. -// Don't use this type directly, use NewMeshMembershipsServerTransport instead. -type MeshMembershipsServerTransport struct { - srv *MeshMembershipsServer - beginCreateOrUpdate *tracker[azfake.PollerResponder[armcontainerservice.MeshMembershipsClientCreateOrUpdateResponse]] - beginDelete *tracker[azfake.PollerResponder[armcontainerservice.MeshMembershipsClientDeleteResponse]] - newListByManagedClusterPager *tracker[azfake.PagerResponder[armcontainerservice.MeshMembershipsClientListByManagedClusterResponse]] -} - -// Do implements the policy.Transporter interface for MeshMembershipsServerTransport. -func (m *MeshMembershipsServerTransport) Do(req *http.Request) (*http.Response, error) { - rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) - method, ok := rawMethod.(string) - if !ok { - return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} - } - - return m.dispatchToMethodFake(req, method) -} - -func (m *MeshMembershipsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - resultChan := make(chan result) - defer close(resultChan) - - go func() { - var intercepted bool - var res result - if meshMembershipsServerTransportInterceptor != nil { - res.resp, res.err, intercepted = meshMembershipsServerTransportInterceptor.Do(req) - } - if !intercepted { - switch method { - case "MeshMembershipsClient.BeginCreateOrUpdate": - res.resp, res.err = m.dispatchBeginCreateOrUpdate(req) - case "MeshMembershipsClient.BeginDelete": - res.resp, res.err = m.dispatchBeginDelete(req) - case "MeshMembershipsClient.Get": - res.resp, res.err = m.dispatchGet(req) - case "MeshMembershipsClient.NewListByManagedClusterPager": - res.resp, res.err = m.dispatchNewListByManagedClusterPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) - } - - } - select { - case resultChan <- res: - case <-req.Context().Done(): - } - }() - - select { - case <-req.Context().Done(): - return nil, req.Context().Err() - case res := <-resultChan: - return res.resp, res.err - } -} - -func (m *MeshMembershipsServerTransport) dispatchBeginCreateOrUpdate(req *http.Request) (*http.Response, error) { - if m.srv.BeginCreateOrUpdate == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginCreateOrUpdate not implemented")} - } - beginCreateOrUpdate := m.beginCreateOrUpdate.get(req) - if beginCreateOrUpdate == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/meshMemberships/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armcontainerservice.MeshMembership](req) - if err != nil { - return nil, err - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - meshMembershipNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("meshMembershipName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.BeginCreateOrUpdate(req.Context(), resourceGroupNameParam, resourceNameParam, meshMembershipNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginCreateOrUpdate = &respr - m.beginCreateOrUpdate.add(req, beginCreateOrUpdate) - } - - resp, err := server.PollerResponderNext(beginCreateOrUpdate, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusCreated}, resp.StatusCode) { - m.beginCreateOrUpdate.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusCreated", resp.StatusCode)} - } - if !server.PollerResponderMore(beginCreateOrUpdate) { - m.beginCreateOrUpdate.remove(req) - } - - return resp, nil -} - -func (m *MeshMembershipsServerTransport) dispatchBeginDelete(req *http.Request) (*http.Response, error) { - if m.srv.BeginDelete == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginDelete not implemented")} - } - beginDelete := m.beginDelete.get(req) - if beginDelete == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/meshMemberships/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - meshMembershipNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("meshMembershipName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.BeginDelete(req.Context(), resourceGroupNameParam, resourceNameParam, meshMembershipNameParam, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginDelete = &respr - m.beginDelete.add(req, beginDelete) - } - - resp, err := server.PollerResponderNext(beginDelete, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusOK, http.StatusAccepted, http.StatusNoContent}, resp.StatusCode) { - m.beginDelete.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK, http.StatusAccepted, http.StatusNoContent", resp.StatusCode)} - } - if !server.PollerResponderMore(beginDelete) { - m.beginDelete.remove(req) - } - - return resp, nil -} - -func (m *MeshMembershipsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { - if m.srv.Get == nil { - return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/meshMemberships/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - meshMembershipNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("meshMembershipName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.Get(req.Context(), resourceGroupNameParam, resourceNameParam, meshMembershipNameParam, 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)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).MeshMembership, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (m *MeshMembershipsServerTransport) dispatchNewListByManagedClusterPager(req *http.Request) (*http.Response, error) { - if m.srv.NewListByManagedClusterPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListByManagedClusterPager not implemented")} - } - newListByManagedClusterPager := m.newListByManagedClusterPager.get(req) - if newListByManagedClusterPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/meshMemberships` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - resp := m.srv.NewListByManagedClusterPager(resourceGroupNameParam, resourceNameParam, nil) - newListByManagedClusterPager = &resp - m.newListByManagedClusterPager.add(req, newListByManagedClusterPager) - server.PagerResponderInjectNextLinks(newListByManagedClusterPager, req, func(page *armcontainerservice.MeshMembershipsClientListByManagedClusterResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListByManagedClusterPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - m.newListByManagedClusterPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListByManagedClusterPager) { - m.newListByManagedClusterPager.remove(req) - } - return resp, nil -} - -// set this to conditionally intercept incoming requests to MeshMembershipsServerTransport -var meshMembershipsServerTransportInterceptor interface { - // Do returns true if the server transport should use the returned response/error - Do(*http.Request) (*http.Response, error, bool) -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/operationstatusresult_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/operationstatusresult_server.go deleted file mode 100644 index ebfb8e1bb0f8..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/operationstatusresult_server.go +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package fake - -import ( - "context" - "errors" - "fmt" - 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/containerservice/armcontainerservice/v8" - "net/http" - "net/url" - "regexp" -) - -// OperationStatusResultServer is a fake server for instances of the armcontainerservice.OperationStatusResultClient type. -type OperationStatusResultServer struct { - // Get is the fake for method OperationStatusResultClient.Get - // HTTP status codes to indicate success: http.StatusOK - Get func(ctx context.Context, resourceGroupName string, resourceName string, operationID string, options *armcontainerservice.OperationStatusResultClientGetOptions) (resp azfake.Responder[armcontainerservice.OperationStatusResultClientGetResponse], errResp azfake.ErrorResponder) - - // GetByAgentPool is the fake for method OperationStatusResultClient.GetByAgentPool - // HTTP status codes to indicate success: http.StatusOK - GetByAgentPool func(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, operationID string, options *armcontainerservice.OperationStatusResultClientGetByAgentPoolOptions) (resp azfake.Responder[armcontainerservice.OperationStatusResultClientGetByAgentPoolResponse], errResp azfake.ErrorResponder) - - // NewListPager is the fake for method OperationStatusResultClient.NewListPager - // HTTP status codes to indicate success: http.StatusOK - NewListPager func(resourceGroupName string, resourceName string, options *armcontainerservice.OperationStatusResultClientListOptions) (resp azfake.PagerResponder[armcontainerservice.OperationStatusResultClientListResponse]) -} - -// NewOperationStatusResultServerTransport creates a new instance of OperationStatusResultServerTransport with the provided implementation. -// The returned OperationStatusResultServerTransport instance is connected to an instance of armcontainerservice.OperationStatusResultClient via the -// azcore.ClientOptions.Transporter field in the client's constructor parameters. -func NewOperationStatusResultServerTransport(srv *OperationStatusResultServer) *OperationStatusResultServerTransport { - return &OperationStatusResultServerTransport{ - srv: srv, - newListPager: newTracker[azfake.PagerResponder[armcontainerservice.OperationStatusResultClientListResponse]](), - } -} - -// OperationStatusResultServerTransport connects instances of armcontainerservice.OperationStatusResultClient to instances of OperationStatusResultServer. -// Don't use this type directly, use NewOperationStatusResultServerTransport instead. -type OperationStatusResultServerTransport struct { - srv *OperationStatusResultServer - newListPager *tracker[azfake.PagerResponder[armcontainerservice.OperationStatusResultClientListResponse]] -} - -// Do implements the policy.Transporter interface for OperationStatusResultServerTransport. -func (o *OperationStatusResultServerTransport) Do(req *http.Request) (*http.Response, error) { - rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) - method, ok := rawMethod.(string) - if !ok { - return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} - } - - return o.dispatchToMethodFake(req, method) -} - -func (o *OperationStatusResultServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - resultChan := make(chan result) - defer close(resultChan) - - go func() { - var intercepted bool - var res result - if operationStatusResultServerTransportInterceptor != nil { - res.resp, res.err, intercepted = operationStatusResultServerTransportInterceptor.Do(req) - } - if !intercepted { - switch method { - case "OperationStatusResultClient.Get": - res.resp, res.err = o.dispatchGet(req) - case "OperationStatusResultClient.GetByAgentPool": - res.resp, res.err = o.dispatchGetByAgentPool(req) - case "OperationStatusResultClient.NewListPager": - res.resp, res.err = o.dispatchNewListPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) - } - - } - select { - case resultChan <- res: - case <-req.Context().Done(): - } - }() - - select { - case <-req.Context().Done(): - return nil, req.Context().Err() - case res := <-resultChan: - return res.resp, res.err - } -} - -func (o *OperationStatusResultServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { - if o.srv.Get == nil { - return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 5 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) - if err != nil { - return nil, err - } - respr, errRespr := o.srv.Get(req.Context(), resourceGroupNameParam, resourceNameParam, operationIDParam, 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)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).OperationStatusResult, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (o *OperationStatusResultServerTransport) dispatchGetByAgentPool(req *http.Request) (*http.Response, error) { - if o.srv.GetByAgentPool == nil { - return nil, &nonRetriableError{errors.New("fake for method GetByAgentPool not implemented")} - } - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/agentPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 6 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - agentPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("agentPoolName")]) - if err != nil { - return nil, err - } - operationIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("operationId")]) - if err != nil { - return nil, err - } - respr, errRespr := o.srv.GetByAgentPool(req.Context(), resourceGroupNameParam, resourceNameParam, agentPoolNameParam, operationIDParam, 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)} - } - resp, err := server.MarshalResponseAsJSON(respContent, server.GetResponse(respr).OperationStatusResult, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (o *OperationStatusResultServerTransport) dispatchNewListPager(req *http.Request) (*http.Response, error) { - if o.srv.NewListPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListPager not implemented")} - } - newListPager := o.newListPager.get(req) - if newListPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/operations` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) - if err != nil { - return nil, err - } - resourceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceName")]) - if err != nil { - return nil, err - } - resp := o.srv.NewListPager(resourceGroupNameParam, resourceNameParam, nil) - newListPager = &resp - o.newListPager.add(req, newListPager) - server.PagerResponderInjectNextLinks(newListPager, req, func(page *armcontainerservice.OperationStatusResultClientListResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - o.newListPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListPager) { - o.newListPager.remove(req) - } - return resp, nil -} - -// set this to conditionally intercept incoming requests to OperationStatusResultServerTransport -var operationStatusResultServerTransportInterceptor interface { - // Do returns true if the server transport should use the returned response/error - Do(*http.Request) (*http.Response, error, bool) -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/server.go deleted file mode 100644 index 238de2202c06..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/server.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package fake - -import ( - "errors" - "fmt" - 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/containerservice/armcontainerservice/v8" - "net/http" - "net/url" - "regexp" -) - -// Server is a fake server for instances of the armcontainerservice.Client type. -type Server struct { - // NewListNodeImageVersionsPager is the fake for method Client.NewListNodeImageVersionsPager - // HTTP status codes to indicate success: http.StatusOK - NewListNodeImageVersionsPager func(location string, options *armcontainerservice.ClientListNodeImageVersionsOptions) (resp azfake.PagerResponder[armcontainerservice.ClientListNodeImageVersionsResponse]) -} - -// NewServerTransport creates a new instance of ServerTransport with the provided implementation. -// The returned ServerTransport instance is connected to an instance of armcontainerservice.Client via the -// azcore.ClientOptions.Transporter field in the client's constructor parameters. -func NewServerTransport(srv *Server) *ServerTransport { - return &ServerTransport{ - srv: srv, - newListNodeImageVersionsPager: newTracker[azfake.PagerResponder[armcontainerservice.ClientListNodeImageVersionsResponse]](), - } -} - -// ServerTransport connects instances of armcontainerservice.Client to instances of Server. -// Don't use this type directly, use NewServerTransport instead. -type ServerTransport struct { - srv *Server - newListNodeImageVersionsPager *tracker[azfake.PagerResponder[armcontainerservice.ClientListNodeImageVersionsResponse]] -} - -// Do implements the policy.Transporter interface for ServerTransport. -func (s *ServerTransport) Do(req *http.Request) (*http.Response, error) { - rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) - method, ok := rawMethod.(string) - if !ok { - return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} - } - - return s.dispatchToMethodFake(req, method) -} - -func (s *ServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { - resultChan := make(chan result) - defer close(resultChan) - - go func() { - var intercepted bool - var res result - if serverTransportInterceptor != nil { - res.resp, res.err, intercepted = serverTransportInterceptor.Do(req) - } - if !intercepted { - switch method { - case "Client.NewListNodeImageVersionsPager": - res.resp, res.err = s.dispatchNewListNodeImageVersionsPager(req) - default: - res.err = fmt.Errorf("unhandled API %s", method) - } - - } - select { - case resultChan <- res: - case <-req.Context().Done(): - } - }() - - select { - case <-req.Context().Done(): - return nil, req.Context().Err() - case res := <-resultChan: - return res.resp, res.err - } -} - -func (s *ServerTransport) dispatchNewListNodeImageVersionsPager(req *http.Request) (*http.Response, error) { - if s.srv.NewListNodeImageVersionsPager == nil { - return nil, &nonRetriableError{errors.New("fake for method NewListNodeImageVersionsPager not implemented")} - } - newListNodeImageVersionsPager := s.newListNodeImageVersionsPager.get(req) - if newListNodeImageVersionsPager == nil { - const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/locations/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/nodeImageVersions` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if len(matches) < 3 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - locationParam, err := url.PathUnescape(matches[regex.SubexpIndex("location")]) - if err != nil { - return nil, err - } - resp := s.srv.NewListNodeImageVersionsPager(locationParam, nil) - newListNodeImageVersionsPager = &resp - s.newListNodeImageVersionsPager.add(req, newListNodeImageVersionsPager) - server.PagerResponderInjectNextLinks(newListNodeImageVersionsPager, req, func(page *armcontainerservice.ClientListNodeImageVersionsResponse, createLink func() string) { - page.NextLink = to.Ptr(createLink()) - }) - } - resp, err := server.PagerResponderNext(newListNodeImageVersionsPager, req) - if err != nil { - return nil, err - } - if !contains([]int{http.StatusOK}, resp.StatusCode) { - s.newListNodeImageVersionsPager.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} - } - if !server.PagerResponderMore(newListNodeImageVersionsPager) { - s.newListNodeImageVersionsPager.remove(req) - } - return resp, nil -} - -// set this to conditionally intercept incoming requests to ServerTransport -var serverTransportInterceptor interface { - // Do returns true if the server transport should use the returned response/error - Do(*http.Request) (*http.Response, error, bool) -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/server_factory.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/server_factory.go index 9171b49b5d41..9cc2d6637840 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/server_factory.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/fake/server_factory.go @@ -19,39 +19,18 @@ type ServerFactory struct { // AgentPoolsServer contains the fakes for client AgentPoolsClient AgentPoolsServer AgentPoolsServer - // Server contains the fakes for client Client - Server Server - - // IdentityBindingsServer contains the fakes for client IdentityBindingsClient - IdentityBindingsServer IdentityBindingsServer - - // JWTAuthenticatorsServer contains the fakes for client JWTAuthenticatorsClient - JWTAuthenticatorsServer JWTAuthenticatorsServer - - // LoadBalancersServer contains the fakes for client LoadBalancersClient - LoadBalancersServer LoadBalancersServer - // MachinesServer contains the fakes for client MachinesClient MachinesServer MachinesServer // MaintenanceConfigurationsServer contains the fakes for client MaintenanceConfigurationsClient MaintenanceConfigurationsServer MaintenanceConfigurationsServer - // ManagedClusterSnapshotsServer contains the fakes for client ManagedClusterSnapshotsClient - ManagedClusterSnapshotsServer ManagedClusterSnapshotsServer - // ManagedClustersServer contains the fakes for client ManagedClustersClient ManagedClustersServer ManagedClustersServer // ManagedNamespacesServer contains the fakes for client ManagedNamespacesClient ManagedNamespacesServer ManagedNamespacesServer - // MeshMembershipsServer contains the fakes for client MeshMembershipsClient - MeshMembershipsServer MeshMembershipsServer - - // OperationStatusResultServer contains the fakes for client OperationStatusResultClient - OperationStatusResultServer OperationStatusResultServer - // OperationsServer contains the fakes for client OperationsClient OperationsServer OperationsServer @@ -89,17 +68,10 @@ type ServerFactoryTransport struct { srv *ServerFactory trMu sync.Mutex trAgentPoolsServer *AgentPoolsServerTransport - trServer *ServerTransport - trIdentityBindingsServer *IdentityBindingsServerTransport - trJWTAuthenticatorsServer *JWTAuthenticatorsServerTransport - trLoadBalancersServer *LoadBalancersServerTransport trMachinesServer *MachinesServerTransport trMaintenanceConfigurationsServer *MaintenanceConfigurationsServerTransport - trManagedClusterSnapshotsServer *ManagedClusterSnapshotsServerTransport trManagedClustersServer *ManagedClustersServerTransport trManagedNamespacesServer *ManagedNamespacesServerTransport - trMeshMembershipsServer *MeshMembershipsServerTransport - trOperationStatusResultServer *OperationStatusResultServerTransport trOperationsServer *OperationsServerTransport trPrivateEndpointConnectionsServer *PrivateEndpointConnectionsServerTransport trPrivateLinkResourcesServer *PrivateLinkResourcesServerTransport @@ -125,24 +97,6 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { case "AgentPoolsClient": initServer(s, &s.trAgentPoolsServer, func() *AgentPoolsServerTransport { return NewAgentPoolsServerTransport(&s.srv.AgentPoolsServer) }) resp, err = s.trAgentPoolsServer.Do(req) - case "Client": - initServer(s, &s.trServer, func() *ServerTransport { return NewServerTransport(&s.srv.Server) }) - resp, err = s.trServer.Do(req) - case "IdentityBindingsClient": - initServer(s, &s.trIdentityBindingsServer, func() *IdentityBindingsServerTransport { - return NewIdentityBindingsServerTransport(&s.srv.IdentityBindingsServer) - }) - resp, err = s.trIdentityBindingsServer.Do(req) - case "JWTAuthenticatorsClient": - initServer(s, &s.trJWTAuthenticatorsServer, func() *JWTAuthenticatorsServerTransport { - return NewJWTAuthenticatorsServerTransport(&s.srv.JWTAuthenticatorsServer) - }) - resp, err = s.trJWTAuthenticatorsServer.Do(req) - case "LoadBalancersClient": - initServer(s, &s.trLoadBalancersServer, func() *LoadBalancersServerTransport { - return NewLoadBalancersServerTransport(&s.srv.LoadBalancersServer) - }) - resp, err = s.trLoadBalancersServer.Do(req) case "MachinesClient": initServer(s, &s.trMachinesServer, func() *MachinesServerTransport { return NewMachinesServerTransport(&s.srv.MachinesServer) }) resp, err = s.trMachinesServer.Do(req) @@ -151,11 +105,6 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { return NewMaintenanceConfigurationsServerTransport(&s.srv.MaintenanceConfigurationsServer) }) resp, err = s.trMaintenanceConfigurationsServer.Do(req) - case "ManagedClusterSnapshotsClient": - initServer(s, &s.trManagedClusterSnapshotsServer, func() *ManagedClusterSnapshotsServerTransport { - return NewManagedClusterSnapshotsServerTransport(&s.srv.ManagedClusterSnapshotsServer) - }) - resp, err = s.trManagedClusterSnapshotsServer.Do(req) case "ManagedClustersClient": initServer(s, &s.trManagedClustersServer, func() *ManagedClustersServerTransport { return NewManagedClustersServerTransport(&s.srv.ManagedClustersServer) @@ -166,16 +115,6 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { return NewManagedNamespacesServerTransport(&s.srv.ManagedNamespacesServer) }) resp, err = s.trManagedNamespacesServer.Do(req) - case "MeshMembershipsClient": - initServer(s, &s.trMeshMembershipsServer, func() *MeshMembershipsServerTransport { - return NewMeshMembershipsServerTransport(&s.srv.MeshMembershipsServer) - }) - resp, err = s.trMeshMembershipsServer.Do(req) - case "OperationStatusResultClient": - initServer(s, &s.trOperationStatusResultServer, func() *OperationStatusResultServerTransport { - return NewOperationStatusResultServerTransport(&s.srv.OperationStatusResultServer) - }) - resp, err = s.trOperationStatusResultServer.Do(req) case "OperationsClient": initServer(s, &s.trOperationsServer, func() *OperationsServerTransport { return NewOperationsServerTransport(&s.srv.OperationsServer) }) resp, err = s.trOperationsServer.Do(req) diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/identitybindings_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/identitybindings_client.go deleted file mode 100644 index 8c8d8d64b8a8..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/identitybindings_client.go +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armcontainerservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// IdentityBindingsClient contains the methods for the IdentityBindings group. -// Don't use this type directly, use NewIdentityBindingsClient() instead. -type IdentityBindingsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewIdentityBindingsClient creates a new instance of IdentityBindingsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - Contains optional client configuration. Pass nil to accept the default values. -func NewIdentityBindingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*IdentityBindingsClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &IdentityBindingsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates an identity binding in the specified managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - identityBindingName - The name of the identity binding. -// - parameters - The identity binding to create or update. -// - options - IdentityBindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the IdentityBindingsClient.BeginCreateOrUpdate -// method. -func (client *IdentityBindingsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, identityBindingName string, parameters IdentityBinding, options *IdentityBindingsClientBeginCreateOrUpdateOptions) (*runtime.Poller[IdentityBindingsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, resourceName, identityBindingName, parameters, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IdentityBindingsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IdentityBindingsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateOrUpdate - Creates or updates an identity binding in the specified managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -func (client *IdentityBindingsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, identityBindingName string, parameters IdentityBinding, options *IdentityBindingsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - var err error - const operationName = "IdentityBindingsClient.BeginCreateOrUpdate" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, identityBindingName, parameters, 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.StatusCreated) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *IdentityBindingsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, identityBindingName string, parameters IdentityBinding, _ *IdentityBindingsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if identityBindingName == "" { - return nil, errors.New("parameter identityBindingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{identityBindingName}", url.PathEscape(identityBindingName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - -// BeginDelete - Deletes an identity binding in the specified managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - identityBindingName - The name of the identity binding. -// - options - IdentityBindingsClientBeginDeleteOptions contains the optional parameters for the IdentityBindingsClient.BeginDelete -// method. -func (client *IdentityBindingsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, identityBindingName string, options *IdentityBindingsClientBeginDeleteOptions) (*runtime.Poller[IdentityBindingsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, identityBindingName, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[IdentityBindingsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[IdentityBindingsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Delete - Deletes an identity binding in the specified managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -func (client *IdentityBindingsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, identityBindingName string, options *IdentityBindingsClientBeginDeleteOptions) (*http.Response, error) { - var err error - const operationName = "IdentityBindingsClient.BeginDelete" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, identityBindingName, 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.StatusAccepted, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *IdentityBindingsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, identityBindingName string, _ *IdentityBindingsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if identityBindingName == "" { - return nil, errors.New("parameter identityBindingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{identityBindingName}", url.PathEscape(identityBindingName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified Identity Binding. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - identityBindingName - The name of the identity binding. -// - options - IdentityBindingsClientGetOptions contains the optional parameters for the IdentityBindingsClient.Get method. -func (client *IdentityBindingsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, identityBindingName string, options *IdentityBindingsClientGetOptions) (IdentityBindingsClientGetResponse, error) { - var err error - const operationName = "IdentityBindingsClient.Get" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, identityBindingName, options) - if err != nil { - return IdentityBindingsClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return IdentityBindingsClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return IdentityBindingsClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *IdentityBindingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, identityBindingName string, _ *IdentityBindingsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if identityBindingName == "" { - return nil, errors.New("parameter identityBindingName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{identityBindingName}", url.PathEscape(identityBindingName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *IdentityBindingsClient) getHandleResponse(resp *http.Response) (IdentityBindingsClientGetResponse, error) { - result := IdentityBindingsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IdentityBinding); err != nil { - return IdentityBindingsClientGetResponse{}, err - } - return result, nil -} - -// NewListByManagedClusterPager - Gets a list of identity bindings in the specified managed cluster. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - options - IdentityBindingsClientListByManagedClusterOptions contains the optional parameters for the IdentityBindingsClient.NewListByManagedClusterPager -// method. -func (client *IdentityBindingsClient) NewListByManagedClusterPager(resourceGroupName string, resourceName string, options *IdentityBindingsClientListByManagedClusterOptions) *runtime.Pager[IdentityBindingsClientListByManagedClusterResponse] { - return runtime.NewPager(runtime.PagingHandler[IdentityBindingsClientListByManagedClusterResponse]{ - More: func(page IdentityBindingsClientListByManagedClusterResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *IdentityBindingsClientListByManagedClusterResponse) (IdentityBindingsClientListByManagedClusterResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "IdentityBindingsClient.NewListByManagedClusterPager") - 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.listByManagedClusterCreateRequest(ctx, resourceGroupName, resourceName, options) - }, nil) - if err != nil { - return IdentityBindingsClientListByManagedClusterResponse{}, err - } - return client.listByManagedClusterHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listByManagedClusterCreateRequest creates the ListByManagedCluster request. -func (client *IdentityBindingsClient) listByManagedClusterCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *IdentityBindingsClientListByManagedClusterOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByManagedClusterHandleResponse handles the ListByManagedCluster response. -func (client *IdentityBindingsClient) listByManagedClusterHandleResponse(resp *http.Response) (IdentityBindingsClientListByManagedClusterResponse, error) { - result := IdentityBindingsClientListByManagedClusterResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.IdentityBindingListResult); err != nil { - return IdentityBindingsClientListByManagedClusterResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/identitybindings_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/identitybindings_client_example_test.go deleted file mode 100644 index d83118cab41a..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/identitybindings_client_example_test.go +++ /dev/null @@ -1,172 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcontainerservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/IdentityBindings_List.json -func ExampleIdentityBindingsClient_NewListByManagedClusterPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewIdentityBindingsClient().NewListByManagedClusterPager("rg1", "clustername1", 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.IdentityBindingListResult = armcontainerservice.IdentityBindingListResult{ - // Value: []*armcontainerservice.IdentityBinding{ - // { - // Name: to.Ptr("identitybinding1"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/identityBindings"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/identityBindings/identitybinding1"), - // ETag: to.Ptr("string"), - // Properties: &armcontainerservice.IdentityBindingProperties{ - // ManagedIdentity: &armcontainerservice.IdentityBindingManagedIdentityProfile{ - // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"), - // TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // }, - // OidcIssuer: &armcontainerservice.IdentityBindingOidcIssuerProfile{ - // OidcIssuerURL: to.Ptr("https://oidc-endpoint"), - // }, - // ProvisioningState: to.Ptr(armcontainerservice.IdentityBindingProvisioningStateSucceeded), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/IdentityBindings_Get.json -func ExampleIdentityBindingsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewIdentityBindingsClient().Get(ctx, "rg1", "clustername1", "identitybinding1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.IdentityBinding = armcontainerservice.IdentityBinding{ - // Name: to.Ptr("identitybinding1"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/identityBindings"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/identityBindings/identitybinding1"), - // ETag: to.Ptr("string"), - // Properties: &armcontainerservice.IdentityBindingProperties{ - // ManagedIdentity: &armcontainerservice.IdentityBindingManagedIdentityProfile{ - // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"), - // TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // }, - // OidcIssuer: &armcontainerservice.IdentityBindingOidcIssuerProfile{ - // OidcIssuerURL: to.Ptr("https://oidc-endpoint"), - // }, - // ProvisioningState: to.Ptr(armcontainerservice.IdentityBindingProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/IdentityBindings_Create_Or_Update.json -func ExampleIdentityBindingsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIdentityBindingsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "identitybinding1", armcontainerservice.IdentityBinding{ - Properties: &armcontainerservice.IdentityBindingProperties{ - ManagedIdentity: &armcontainerservice.IdentityBindingManagedIdentityProfile{ - ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"), - }, - }, - }, 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.IdentityBinding = armcontainerservice.IdentityBinding{ - // Name: to.Ptr("identitybinding1"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/identityBindings"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/identityBindings/identitybinding1"), - // ETag: to.Ptr("string"), - // Properties: &armcontainerservice.IdentityBindingProperties{ - // ManagedIdentity: &armcontainerservice.IdentityBindingManagedIdentityProfile{ - // ClientID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // ObjectID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // ResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"), - // TenantID: to.Ptr("00000000-0000-0000-0000-000000000000"), - // }, - // OidcIssuer: &armcontainerservice.IdentityBindingOidcIssuerProfile{ - // OidcIssuerURL: to.Ptr("https://oidc-endpoint"), - // }, - // ProvisioningState: to.Ptr(armcontainerservice.IdentityBindingProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/IdentityBindings_Delete.json -func ExampleIdentityBindingsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewIdentityBindingsClient().BeginDelete(ctx, "rg1", "clustername1", "identitybinding1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/jwtauthenticators_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/jwtauthenticators_client.go deleted file mode 100644 index c5904e734258..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/jwtauthenticators_client.go +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armcontainerservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// JWTAuthenticatorsClient contains the methods for the JWTAuthenticators group. -// Don't use this type directly, use NewJWTAuthenticatorsClient() instead. -type JWTAuthenticatorsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewJWTAuthenticatorsClient creates a new instance of JWTAuthenticatorsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - Contains optional client configuration. Pass nil to accept the default values. -func NewJWTAuthenticatorsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*JWTAuthenticatorsClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &JWTAuthenticatorsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply -// the settings. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - jwtAuthenticatorName - The name of the JWT authenticator. -// - parameters - The JWT authenticator to create or update. -// - options - JWTAuthenticatorsClientBeginCreateOrUpdateOptions contains the optional parameters for the JWTAuthenticatorsClient.BeginCreateOrUpdate -// method. -func (client *JWTAuthenticatorsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, jwtAuthenticatorName string, parameters JWTAuthenticator, options *JWTAuthenticatorsClientBeginCreateOrUpdateOptions) (*runtime.Poller[JWTAuthenticatorsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, resourceName, jwtAuthenticatorName, parameters, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JWTAuthenticatorsClientCreateOrUpdateResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JWTAuthenticatorsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateOrUpdate - Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the -// settings. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -func (client *JWTAuthenticatorsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, jwtAuthenticatorName string, parameters JWTAuthenticator, options *JWTAuthenticatorsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - var err error - const operationName = "JWTAuthenticatorsClient.BeginCreateOrUpdate" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, jwtAuthenticatorName, parameters, 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.StatusCreated) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *JWTAuthenticatorsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, jwtAuthenticatorName string, parameters JWTAuthenticator, _ *JWTAuthenticatorsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if jwtAuthenticatorName == "" { - return nil, errors.New("parameter jwtAuthenticatorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jwtAuthenticatorName}", url.PathEscape(jwtAuthenticatorName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - -// BeginDelete - Deletes a JWT authenticator and updates the managed cluster to apply the settings. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - jwtAuthenticatorName - The name of the JWT authenticator. -// - options - JWTAuthenticatorsClientBeginDeleteOptions contains the optional parameters for the JWTAuthenticatorsClient.BeginDelete -// method. -func (client *JWTAuthenticatorsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, jwtAuthenticatorName string, options *JWTAuthenticatorsClientBeginDeleteOptions) (*runtime.Poller[JWTAuthenticatorsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, jwtAuthenticatorName, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[JWTAuthenticatorsClientDeleteResponse]{ - FinalStateVia: runtime.FinalStateViaLocation, - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[JWTAuthenticatorsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Delete - Deletes a JWT authenticator and updates the managed cluster to apply the settings. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -func (client *JWTAuthenticatorsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, jwtAuthenticatorName string, options *JWTAuthenticatorsClientBeginDeleteOptions) (*http.Response, error) { - var err error - const operationName = "JWTAuthenticatorsClient.BeginDelete" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, jwtAuthenticatorName, 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.StatusAccepted, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *JWTAuthenticatorsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, jwtAuthenticatorName string, _ *JWTAuthenticatorsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if jwtAuthenticatorName == "" { - return nil, errors.New("parameter jwtAuthenticatorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jwtAuthenticatorName}", url.PathEscape(jwtAuthenticatorName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified JWT authenticator of a managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - jwtAuthenticatorName - The name of the JWT authenticator. -// - options - JWTAuthenticatorsClientGetOptions contains the optional parameters for the JWTAuthenticatorsClient.Get method. -func (client *JWTAuthenticatorsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, jwtAuthenticatorName string, options *JWTAuthenticatorsClientGetOptions) (JWTAuthenticatorsClientGetResponse, error) { - var err error - const operationName = "JWTAuthenticatorsClient.Get" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, jwtAuthenticatorName, options) - if err != nil { - return JWTAuthenticatorsClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return JWTAuthenticatorsClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return JWTAuthenticatorsClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *JWTAuthenticatorsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, jwtAuthenticatorName string, _ *JWTAuthenticatorsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if jwtAuthenticatorName == "" { - return nil, errors.New("parameter jwtAuthenticatorName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{jwtAuthenticatorName}", url.PathEscape(jwtAuthenticatorName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *JWTAuthenticatorsClient) getHandleResponse(resp *http.Response) (JWTAuthenticatorsClientGetResponse, error) { - result := JWTAuthenticatorsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.JWTAuthenticator); err != nil { - return JWTAuthenticatorsClientGetResponse{}, err - } - return result, nil -} - -// NewListByManagedClusterPager - Gets a list of JWT authenticators in the specified managed cluster. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - options - JWTAuthenticatorsClientListByManagedClusterOptions contains the optional parameters for the JWTAuthenticatorsClient.NewListByManagedClusterPager -// method. -func (client *JWTAuthenticatorsClient) NewListByManagedClusterPager(resourceGroupName string, resourceName string, options *JWTAuthenticatorsClientListByManagedClusterOptions) *runtime.Pager[JWTAuthenticatorsClientListByManagedClusterResponse] { - return runtime.NewPager(runtime.PagingHandler[JWTAuthenticatorsClientListByManagedClusterResponse]{ - More: func(page JWTAuthenticatorsClientListByManagedClusterResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *JWTAuthenticatorsClientListByManagedClusterResponse) (JWTAuthenticatorsClientListByManagedClusterResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "JWTAuthenticatorsClient.NewListByManagedClusterPager") - 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.listByManagedClusterCreateRequest(ctx, resourceGroupName, resourceName, options) - }, nil) - if err != nil { - return JWTAuthenticatorsClientListByManagedClusterResponse{}, err - } - return client.listByManagedClusterHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listByManagedClusterCreateRequest creates the ListByManagedCluster request. -func (client *JWTAuthenticatorsClient) listByManagedClusterCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *JWTAuthenticatorsClientListByManagedClusterOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByManagedClusterHandleResponse handles the ListByManagedCluster response. -func (client *JWTAuthenticatorsClient) listByManagedClusterHandleResponse(resp *http.Response) (JWTAuthenticatorsClientListByManagedClusterResponse, error) { - result := JWTAuthenticatorsClientListByManagedClusterResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.JWTAuthenticatorListResult); err != nil { - return JWTAuthenticatorsClientListByManagedClusterResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/jwtauthenticators_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/jwtauthenticators_client_example_test.go deleted file mode 100644 index 75cfdf61075d..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/jwtauthenticators_client_example_test.go +++ /dev/null @@ -1,271 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcontainerservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/JWTAuthenticators_List.json -func ExampleJWTAuthenticatorsClient_NewListByManagedClusterPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewJWTAuthenticatorsClient().NewListByManagedClusterPager("rg1", "clustername1", 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.JWTAuthenticatorListResult = armcontainerservice.JWTAuthenticatorListResult{ - // Value: []*armcontainerservice.JWTAuthenticator{ - // { - // Name: to.Ptr("jwt1"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/jwtAuthenticators"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/jwtAuthenticators/jwt1"), - // Properties: &armcontainerservice.JWTAuthenticatorProperties{ - // ClaimMappings: &armcontainerservice.JWTAuthenticatorClaimMappings{ - // Extra: []*armcontainerservice.JWTAuthenticatorExtraClaimMappingExpression{ - // { - // Key: to.Ptr("example.com/extrakey"), - // ValueExpression: to.Ptr("claims.customfield"), - // }}, - // Groups: &armcontainerservice.JWTAuthenticatorClaimMappingExpression{ - // Expression: to.Ptr("claims.groups.split(',').map(group, 'aks:jwt:' + group)"), - // }, - // Username: &armcontainerservice.JWTAuthenticatorClaimMappingExpression{ - // Expression: to.Ptr("'aks:jwt:' + claims.sub"), - // }, - // }, - // ClaimValidationRules: []*armcontainerservice.JWTAuthenticatorValidationRule{ - // { - // Expression: to.Ptr("has(claims.sub)"), - // Message: to.Ptr("Sub is required"), - // }, - // { - // Expression: to.Ptr("claims.sub != ''"), - // Message: to.Ptr("Sub cannot be empty"), - // }}, - // Issuer: &armcontainerservice.JWTAuthenticatorIssuer{ - // Audiences: []*string{ - // to.Ptr("https://example.com/audience1"), - // to.Ptr("https://example.com/audience2")}, - // URL: to.Ptr("https://example.com"), - // }, - // ProvisioningState: to.Ptr(armcontainerservice.JWTAuthenticatorProvisioningStateSucceeded), - // UserValidationRules: []*armcontainerservice.JWTAuthenticatorValidationRule{ - // { - // Expression: to.Ptr("user.groups.all(group, group.startsWith('aks:jwt:admin:'))"), - // Message: to.Ptr("Must be in admin user group"), - // }}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/JWTAuthenticators_Get.json -func ExampleJWTAuthenticatorsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewJWTAuthenticatorsClient().Get(ctx, "rg1", "clustername1", "jwt1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.JWTAuthenticator = armcontainerservice.JWTAuthenticator{ - // Name: to.Ptr("jwt1"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/jwtAuthenticators"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/jwtAuthenticators/jwt1"), - // Properties: &armcontainerservice.JWTAuthenticatorProperties{ - // ClaimMappings: &armcontainerservice.JWTAuthenticatorClaimMappings{ - // Extra: []*armcontainerservice.JWTAuthenticatorExtraClaimMappingExpression{ - // { - // Key: to.Ptr("example.com/extrakey"), - // ValueExpression: to.Ptr("claims.customfield"), - // }}, - // Groups: &armcontainerservice.JWTAuthenticatorClaimMappingExpression{ - // Expression: to.Ptr("claims.groups.split(',').map(group, 'aks:jwt:' + group)"), - // }, - // Username: &armcontainerservice.JWTAuthenticatorClaimMappingExpression{ - // Expression: to.Ptr("'aks:jwt:' + claims.sub"), - // }, - // }, - // ClaimValidationRules: []*armcontainerservice.JWTAuthenticatorValidationRule{ - // { - // Expression: to.Ptr("has(claims.sub)"), - // Message: to.Ptr("Sub is required"), - // }, - // { - // Expression: to.Ptr("claims.sub != ''"), - // Message: to.Ptr("Sub cannot be empty"), - // }}, - // Issuer: &armcontainerservice.JWTAuthenticatorIssuer{ - // Audiences: []*string{ - // to.Ptr("https://example.com/audience1"), - // to.Ptr("https://example.com/audience2")}, - // URL: to.Ptr("https://example.com"), - // }, - // ProvisioningState: to.Ptr(armcontainerservice.JWTAuthenticatorProvisioningStateSucceeded), - // UserValidationRules: []*armcontainerservice.JWTAuthenticatorValidationRule{ - // { - // Expression: to.Ptr("user.groups.all(group, group.startsWith('aks:jwt:admin:'))"), - // Message: to.Ptr("Must be in admin user group"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/JWTAuthenticators_Create_Or_Update.json -func ExampleJWTAuthenticatorsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJWTAuthenticatorsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "jwt1", armcontainerservice.JWTAuthenticator{ - Properties: &armcontainerservice.JWTAuthenticatorProperties{ - ClaimMappings: &armcontainerservice.JWTAuthenticatorClaimMappings{ - Extra: []*armcontainerservice.JWTAuthenticatorExtraClaimMappingExpression{ - { - Key: to.Ptr("example.com/extrakey"), - ValueExpression: to.Ptr("claims.customfield"), - }}, - Groups: &armcontainerservice.JWTAuthenticatorClaimMappingExpression{ - Expression: to.Ptr("claims.groups.split(',').map(group, 'aks:jwt:' + group)"), - }, - Username: &armcontainerservice.JWTAuthenticatorClaimMappingExpression{ - Expression: to.Ptr("'aks:jwt:' + claims.sub"), - }, - }, - ClaimValidationRules: []*armcontainerservice.JWTAuthenticatorValidationRule{ - { - Expression: to.Ptr("has(claims.sub)"), - Message: to.Ptr("Sub is required"), - }, - { - Expression: to.Ptr("claims.sub != ''"), - Message: to.Ptr("Sub cannot be empty"), - }}, - Issuer: &armcontainerservice.JWTAuthenticatorIssuer{ - Audiences: []*string{ - to.Ptr("https://example.com/audience1"), - to.Ptr("https://example.com/audience2")}, - URL: to.Ptr("https://example.com"), - }, - UserValidationRules: []*armcontainerservice.JWTAuthenticatorValidationRule{ - { - Expression: to.Ptr("user.groups.all(group, group.startsWith('aks:jwt:admin:'))"), - Message: to.Ptr("Must be in admin user group"), - }}, - }, - }, 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.JWTAuthenticator = armcontainerservice.JWTAuthenticator{ - // Name: to.Ptr("jwt1"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/jwtAuthenticators"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/jwtAuthenticators/jwt1"), - // Properties: &armcontainerservice.JWTAuthenticatorProperties{ - // ClaimMappings: &armcontainerservice.JWTAuthenticatorClaimMappings{ - // Extra: []*armcontainerservice.JWTAuthenticatorExtraClaimMappingExpression{ - // { - // Key: to.Ptr("example.com/extrakey"), - // ValueExpression: to.Ptr("claims.customfield"), - // }}, - // Groups: &armcontainerservice.JWTAuthenticatorClaimMappingExpression{ - // Expression: to.Ptr("claims.groups.split(',').map(group, 'aks:jwt:' + group)"), - // }, - // Username: &armcontainerservice.JWTAuthenticatorClaimMappingExpression{ - // Expression: to.Ptr("'aks:jwt:' + claims.sub"), - // }, - // }, - // ClaimValidationRules: []*armcontainerservice.JWTAuthenticatorValidationRule{ - // { - // Expression: to.Ptr("has(claims.sub)"), - // Message: to.Ptr("Sub is required"), - // }, - // { - // Expression: to.Ptr("claims.sub != ''"), - // Message: to.Ptr("Sub cannot be empty"), - // }}, - // Issuer: &armcontainerservice.JWTAuthenticatorIssuer{ - // Audiences: []*string{ - // to.Ptr("https://example.com/audience1"), - // to.Ptr("https://example.com/audience2")}, - // URL: to.Ptr("https://example.com"), - // }, - // ProvisioningState: to.Ptr(armcontainerservice.JWTAuthenticatorProvisioningStateSucceeded), - // UserValidationRules: []*armcontainerservice.JWTAuthenticatorValidationRule{ - // { - // Expression: to.Ptr("user.groups.all(group, group.startsWith('aks:jwt:admin:'))"), - // Message: to.Ptr("Must be in admin user group"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/JWTAuthenticators_Delete.json -func ExampleJWTAuthenticatorsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewJWTAuthenticatorsClient().BeginDelete(ctx, "rg1", "clustername1", "jwt1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/loadbalancers_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/loadbalancers_client.go deleted file mode 100644 index 473136ec7f83..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/loadbalancers_client.go +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armcontainerservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// LoadBalancersClient contains the methods for the LoadBalancers group. -// Don't use this type directly, use NewLoadBalancersClient() instead. -type LoadBalancersClient struct { - internal *arm.Client - subscriptionID string -} - -// NewLoadBalancersClient creates a new instance of LoadBalancersClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - Contains optional client configuration. Pass nil to accept the default values. -func NewLoadBalancersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*LoadBalancersClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &LoadBalancersClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a load balancer in the specified managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - loadBalancerName - The name of the load balancer. -// - parameters - The load balancer to create or update. -// - options - LoadBalancersClientCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.CreateOrUpdate -// method. -func (client *LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, loadBalancerName string, parameters LoadBalancer, options *LoadBalancersClientCreateOrUpdateOptions) (LoadBalancersClientCreateOrUpdateResponse, error) { - var err error - const operationName = "LoadBalancersClient.CreateOrUpdate" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, loadBalancerName, parameters, options) - if err != nil { - return LoadBalancersClientCreateOrUpdateResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LoadBalancersClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { - err = runtime.NewResponseError(httpResp) - return LoadBalancersClientCreateOrUpdateResponse{}, err - } - resp, err := client.createOrUpdateHandleResponse(httpResp) - return resp, err -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *LoadBalancersClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, loadBalancerName string, parameters LoadBalancer, _ *LoadBalancersClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *LoadBalancersClient) createOrUpdateHandleResponse(resp *http.Response) (LoadBalancersClientCreateOrUpdateResponse, error) { - result := LoadBalancersClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancer); err != nil { - return LoadBalancersClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// BeginDelete - Deletes a load balancer in the specified managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - loadBalancerName - The name of the load balancer. -// - options - LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete -// method. -func (client *LoadBalancersClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (*runtime.Poller[LoadBalancersClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, loadBalancerName, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[LoadBalancersClientDeleteResponse]{ - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[LoadBalancersClientDeleteResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Delete - Deletes a load balancer in the specified managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -func (client *LoadBalancersClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, loadBalancerName string, options *LoadBalancersClientBeginDeleteOptions) (*http.Response, error) { - var err error - const operationName = "LoadBalancersClient.BeginDelete" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, loadBalancerName, 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.StatusAccepted, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *LoadBalancersClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, loadBalancerName string, _ *LoadBalancersClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the specified load balancer. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - loadBalancerName - The name of the load balancer. -// - options - LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. -func (client *LoadBalancersClient) Get(ctx context.Context, resourceGroupName string, resourceName string, loadBalancerName string, options *LoadBalancersClientGetOptions) (LoadBalancersClientGetResponse, error) { - var err error - const operationName = "LoadBalancersClient.Get" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, loadBalancerName, options) - if err != nil { - return LoadBalancersClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return LoadBalancersClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return LoadBalancersClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *LoadBalancersClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, loadBalancerName string, _ *LoadBalancersClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if loadBalancerName == "" { - return nil, errors.New("parameter loadBalancerName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{loadBalancerName}", url.PathEscape(loadBalancerName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *LoadBalancersClient) getHandleResponse(resp *http.Response) (LoadBalancersClientGetResponse, error) { - result := LoadBalancersClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancer); err != nil { - return LoadBalancersClientGetResponse{}, err - } - return result, nil -} - -// NewListByManagedClusterPager - Gets a list of load balancers in the specified managed cluster. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - options - LoadBalancersClientListByManagedClusterOptions contains the optional parameters for the LoadBalancersClient.NewListByManagedClusterPager -// method. -func (client *LoadBalancersClient) NewListByManagedClusterPager(resourceGroupName string, resourceName string, options *LoadBalancersClientListByManagedClusterOptions) *runtime.Pager[LoadBalancersClientListByManagedClusterResponse] { - return runtime.NewPager(runtime.PagingHandler[LoadBalancersClientListByManagedClusterResponse]{ - More: func(page LoadBalancersClientListByManagedClusterResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *LoadBalancersClientListByManagedClusterResponse) (LoadBalancersClientListByManagedClusterResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "LoadBalancersClient.NewListByManagedClusterPager") - 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.listByManagedClusterCreateRequest(ctx, resourceGroupName, resourceName, options) - }, nil) - if err != nil { - return LoadBalancersClientListByManagedClusterResponse{}, err - } - return client.listByManagedClusterHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listByManagedClusterCreateRequest creates the ListByManagedCluster request. -func (client *LoadBalancersClient) listByManagedClusterCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *LoadBalancersClientListByManagedClusterOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByManagedClusterHandleResponse handles the ListByManagedCluster response. -func (client *LoadBalancersClient) listByManagedClusterHandleResponse(resp *http.Response) (LoadBalancersClientListByManagedClusterResponse, error) { - result := LoadBalancersClientListByManagedClusterResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.LoadBalancerListResult); err != nil { - return LoadBalancersClientListByManagedClusterResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/loadbalancers_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/loadbalancers_client_example_test.go deleted file mode 100644 index 41ec5a54c508..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/loadbalancers_client_example_test.go +++ /dev/null @@ -1,140 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcontainerservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/LoadBalancers_List.json -func ExampleLoadBalancersClient_NewListByManagedClusterPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewLoadBalancersClient().NewListByManagedClusterPager("rg1", "clustername1", 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.LoadBalancerListResult = armcontainerservice.LoadBalancerListResult{ - // Value: []*armcontainerservice.LoadBalancer{ - // { - // Name: to.Ptr("kubernetes"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/loadBalancers/kubernetes"), - // Properties: &armcontainerservice.LoadBalancerProperties{ - // AllowServicePlacement: to.Ptr(true), - // PrimaryAgentPoolName: to.Ptr("agentPool1"), - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/LoadBalancers_Get.json -func ExampleLoadBalancersClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLoadBalancersClient().Get(ctx, "rg1", "clustername1", "kubernetes", nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.LoadBalancer = armcontainerservice.LoadBalancer{ - // Name: to.Ptr("kubernetes"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/loadBalancers/kubernetes"), - // Properties: &armcontainerservice.LoadBalancerProperties{ - // AllowServicePlacement: to.Ptr(true), - // PrimaryAgentPoolName: to.Ptr("agentPool1"), - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/LoadBalancers_Create_Or_Update.json -func ExampleLoadBalancersClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewLoadBalancersClient().CreateOrUpdate(ctx, "rg1", "clustername1", "kubernetes", armcontainerservice.LoadBalancer{ - Properties: &armcontainerservice.LoadBalancerProperties{ - AllowServicePlacement: to.Ptr(true), - PrimaryAgentPoolName: to.Ptr("agentpool1"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.LoadBalancer = armcontainerservice.LoadBalancer{ - // Name: to.Ptr("kubernetes"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/loadBalancers/kubernetes"), - // Properties: &armcontainerservice.LoadBalancerProperties{ - // AllowServicePlacement: to.Ptr(true), - // PrimaryAgentPoolName: to.Ptr("agentPool1"), - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/LoadBalancers_Delete.json -func ExampleLoadBalancersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewLoadBalancersClient().BeginDelete(ctx, "rg1", "clustername1", "kubernetes", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/machines_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/machines_client.go index 770422734a9c..a14a7cb3d8b4 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/machines_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/machines_client.go @@ -40,110 +40,14 @@ func NewMachinesClient(subscriptionID string, credential azcore.TokenCredential, return client, nil } -// BeginCreateOrUpdate - Creates or updates a machine in the specified agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - agentPoolName - The name of the agent pool. -// - machineName - Host name of the machine. -// - parameters - The machine to create or update. -// - options - MachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the MachinesClient.BeginCreateOrUpdate -// method. -func (client *MachinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machineName string, parameters Machine, options *MachinesClientBeginCreateOrUpdateOptions) (*runtime.Poller[MachinesClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, resourceName, agentPoolName, machineName, parameters, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MachinesClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MachinesClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateOrUpdate - Creates or updates a machine in the specified agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -func (client *MachinesClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machineName string, parameters Machine, options *MachinesClientBeginCreateOrUpdateOptions) (*http.Response, error) { - var err error - const operationName = "MachinesClient.BeginCreateOrUpdate" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, machineName, parameters, 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.StatusCreated) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *MachinesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machineName string, parameters Machine, options *MachinesClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if agentPoolName == "" { - return nil, errors.New("parameter agentPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) - if machineName == "" { - return nil, errors.New("parameter machineName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{machineName}", url.PathEscape(machineName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if options != nil && options.IfMatch != nil { - req.Raw().Header["If-Match"] = []string{*options.IfMatch} - } - if options != nil && options.IfNoneMatch != nil { - req.Raw().Header["If-None-Match"] = []string{*options.IfNoneMatch} - } - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - // Get - Get a specific machine in the specified agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. -// - machineName - Host name of the machine. +// - machineName - host name of the machine // - options - MachinesClientGetOptions contains the optional parameters for the MachinesClient.Get method. func (client *MachinesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machineName string, options *MachinesClientGetOptions) (MachinesClientGetResponse, error) { var err error @@ -195,7 +99,7 @@ func (client *MachinesClient) getCreateRequest(ctx context.Context, resourceGrou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,7 +116,7 @@ func (client *MachinesClient) getHandleResponse(resp *http.Response) (MachinesCl // NewListPager - Gets a list of machines in the specified agent pool. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -264,7 +168,7 @@ func (client *MachinesClient) listCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/machines_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/machines_client_example_test.go index 1b7b33610ce1..d145d1b054ef 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/machines_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/machines_client_example_test.go @@ -13,12 +13,11 @@ import ( "context" "log" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MachineList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/MachineList.json func ExampleMachinesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -47,45 +46,27 @@ func ExampleMachinesClient_NewListPager() { // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools/machines"), // ID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.ContainerService/managedClusters/round/agentPools/nodepool1/machines/aks-nodepool1-25481572-vmss000000"), // Properties: &armcontainerservice.MachineProperties{ - // Hardware: &armcontainerservice.MachineHardwareProfile{ - // VMSize: to.Ptr("Standard_DS1_v2"), + // Network: &armcontainerservice.MachineNetworkProperties{ + // IPAddresses: []*armcontainerservice.MachineIPAddress{ + // { + // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), + // IP: to.Ptr("172.20.2.4"), + // }, + // { + // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), + // IP: to.Ptr("10.0.0.1"), + // }}, // }, - // Kubernetes: &armcontainerservice.MachineKubernetesProfile{ - // CurrentOrchestratorVersion: to.Ptr("1.30.6"), - // KubeletDiskType: to.Ptr(armcontainerservice.KubeletDiskTypeOS), - // MaxPods: to.Ptr[int32](110), - // NodeLabels: map[string]*string{ - // "key1": to.Ptr("val1"), - // }, - // NodeTaints: []*string{ - // to.Ptr("Key1=Value1:NoSchedule")}, - // OrchestratorVersion: to.Ptr("1.30"), - // }, - // Mode: to.Ptr(armcontainerservice.AgentPoolModeUser), - // Network: &armcontainerservice.MachineNetworkProperties{ - // IPAddresses: []*armcontainerservice.MachineIPAddress{ - // { - // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), - // IP: to.Ptr("172.20.2.4"), - // }, - // { - // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), - // IP: to.Ptr("10.0.0.1"), - // }}, - // }, - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2023.03.11"), - // Priority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot), - // ProvisioningState: to.Ptr("Succeeded"), - // ResourceID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-25481572-vmss/virtualMachines/0"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // }}, - // } + // ResourceID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-25481572-vmss/virtualMachines/0"), + // }, + // Zones: []*string{ + // to.Ptr("1")}, + // }}, + // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MachineGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/MachineGet.json func ExampleMachinesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -108,133 +89,20 @@ func ExampleMachinesClient_Get() { // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools/machines"), // ID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.ContainerService/managedClusters/round/agentPools/nodepool1/machines/aks-nodepool1-25481572-vmss000000"), // Properties: &armcontainerservice.MachineProperties{ - // Hardware: &armcontainerservice.MachineHardwareProfile{ - // VMSize: to.Ptr("Standard_DS1_v2"), - // }, - // Kubernetes: &armcontainerservice.MachineKubernetesProfile{ - // CurrentOrchestratorVersion: to.Ptr("1.30.6"), - // KubeletDiskType: to.Ptr(armcontainerservice.KubeletDiskTypeOS), - // MaxPods: to.Ptr[int32](110), - // NodeLabels: map[string]*string{ - // "key1": to.Ptr("val1"), - // }, - // NodeTaints: []*string{ - // to.Ptr("Key1=Value1:NoSchedule")}, - // OrchestratorVersion: to.Ptr("1.30"), - // }, - // Mode: to.Ptr(armcontainerservice.AgentPoolModeUser), - // Network: &armcontainerservice.MachineNetworkProperties{ - // IPAddresses: []*armcontainerservice.MachineIPAddress{ - // { - // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), - // IP: to.Ptr("172.20.2.4"), - // }, - // { - // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), - // IP: to.Ptr("10.0.0.1"), - // }}, - // }, - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2023.03.11"), - // Priority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot), - // ProvisioningState: to.Ptr("Succeeded"), - // ResourceID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-25481572-vmss/virtualMachines/0"), - // }, - // Zones: []*string{ - // to.Ptr("1")}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MachineCreate_Update.json -func ExampleMachinesClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMachinesClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", "machine1", armcontainerservice.Machine{ - Properties: &armcontainerservice.MachineProperties{ - Hardware: &armcontainerservice.MachineHardwareProfile{ - VMSize: to.Ptr("Standard_DS1_v2"), - }, - Kubernetes: &armcontainerservice.MachineKubernetesProfile{ - KubeletDiskType: to.Ptr(armcontainerservice.KubeletDiskTypeOS), - MaxPods: to.Ptr[int32](110), - NodeLabels: map[string]*string{ - "key1": to.Ptr("val1"), - }, - NodeTaints: []*string{ - to.Ptr("Key1=Value1:NoSchedule")}, - OrchestratorVersion: to.Ptr("1.30"), - }, - Mode: to.Ptr(armcontainerservice.AgentPoolModeUser), - OperatingSystem: &armcontainerservice.MachineOSProfile{ - EnableFIPS: to.Ptr(false), - OSSKU: to.Ptr(armcontainerservice.OSSKUUbuntu), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - }, - Priority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot), - Tags: map[string]*string{ - "name1": to.Ptr("val1"), - }, - }, - Zones: []*string{ - to.Ptr("1")}, - }, &armcontainerservice.MachinesClientBeginCreateOrUpdateOptions{IfMatch: nil, - IfNoneMatch: 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.Machine = armcontainerservice.Machine{ - // Name: to.Ptr("machine1"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools/machines"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1/machines/machine1"), - // Properties: &armcontainerservice.MachineProperties{ - // Hardware: &armcontainerservice.MachineHardwareProfile{ - // VMSize: to.Ptr("Standard_DS1_v2"), - // }, - // Kubernetes: &armcontainerservice.MachineKubernetesProfile{ - // CurrentOrchestratorVersion: to.Ptr("1.30.6"), - // KubeletDiskType: to.Ptr(armcontainerservice.KubeletDiskTypeOS), - // MaxPods: to.Ptr[int32](110), - // NodeLabels: map[string]*string{ - // "key1": to.Ptr("val1"), - // }, - // NodeName: to.Ptr("aks-nodepool1-machine1-25481572-vm0"), - // NodeTaints: []*string{ - // to.Ptr("Key1=Value1:NoSchedule")}, - // OrchestratorVersion: to.Ptr("1.30"), - // }, - // Mode: to.Ptr(armcontainerservice.AgentPoolModeUser), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2023.03.11"), - // OperatingSystem: &armcontainerservice.MachineOSProfile{ - // EnableFIPS: to.Ptr(false), - // OSSKU: to.Ptr(armcontainerservice.OSSKUUbuntu), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // }, - // Priority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot), - // ProvisioningState: to.Ptr("Succeeded"), - // Status: &armcontainerservice.MachineStatus{ - // CreationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2025-04-02T12:00:00.000Z"); return t}()), - // DriftAction: to.Ptr(armcontainerservice.DriftActionSynced), - // VMState: to.Ptr(armcontainerservice.VMStateRunning), - // }, - // Tags: map[string]*string{ - // "name1": to.Ptr("val1"), - // }, + // Network: &armcontainerservice.MachineNetworkProperties{ + // IPAddresses: []*armcontainerservice.MachineIPAddress{ + // { + // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), + // IP: to.Ptr("172.20.2.4"), + // }, + // { + // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), + // IP: to.Ptr("10.0.0.1"), + // }}, // }, - // Zones: []*string{ - // to.Ptr("1")}, - // } + // ResourceID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-25481572-vmss/virtualMachines/0"), + // }, + // Zones: []*string{ + // to.Ptr("1")}, + // } } diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go index 42e98ee41623..bb9f80d87ebf 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go @@ -43,10 +43,11 @@ func NewMaintenanceConfigurationsClient(subscriptionID string, credential azcore // CreateOrUpdate - Creates or updates a maintenance configuration in the specified managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. -// - configName - The name of the maintenance configuration. +// - configName - The name of the maintenance configuration. Supported values are 'default', 'aksManagedAutoUpgradeSchedule', +// or 'aksManagedNodeOSUpgradeSchedule'. // - parameters - The maintenance configuration to create or update. // - options - MaintenanceConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the MaintenanceConfigurationsClient.CreateOrUpdate // method. @@ -96,7 +97,7 @@ func (client *MaintenanceConfigurationsClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -117,10 +118,11 @@ func (client *MaintenanceConfigurationsClient) createOrUpdateHandleResponse(resp // Delete - Deletes a maintenance configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. -// - configName - The name of the maintenance configuration. +// - configName - The name of the maintenance configuration. Supported values are 'default', 'aksManagedAutoUpgradeSchedule', +// or 'aksManagedNodeOSUpgradeSchedule'. // - options - MaintenanceConfigurationsClientDeleteOptions contains the optional parameters for the MaintenanceConfigurationsClient.Delete // method. func (client *MaintenanceConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, configName string, options *MaintenanceConfigurationsClientDeleteOptions) (MaintenanceConfigurationsClientDeleteResponse, error) { @@ -168,7 +170,7 @@ func (client *MaintenanceConfigurationsClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -177,10 +179,11 @@ func (client *MaintenanceConfigurationsClient) deleteCreateRequest(ctx context.C // Get - Gets the specified maintenance configuration of a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. -// - configName - The name of the maintenance configuration. +// - configName - The name of the maintenance configuration. Supported values are 'default', 'aksManagedAutoUpgradeSchedule', +// or 'aksManagedNodeOSUpgradeSchedule'. // - options - MaintenanceConfigurationsClientGetOptions contains the optional parameters for the MaintenanceConfigurationsClient.Get // method. func (client *MaintenanceConfigurationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, configName string, options *MaintenanceConfigurationsClientGetOptions) (MaintenanceConfigurationsClientGetResponse, error) { @@ -229,7 +232,7 @@ func (client *MaintenanceConfigurationsClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -246,7 +249,7 @@ func (client *MaintenanceConfigurationsClient) getHandleResponse(resp *http.Resp // NewListByManagedClusterPager - Gets a list of maintenance configurations in the specified managed cluster. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - MaintenanceConfigurationsClientListByManagedClusterOptions contains the optional parameters for the MaintenanceConfigurationsClient.NewListByManagedClusterPager @@ -294,7 +297,7 @@ func (client *MaintenanceConfigurationsClient) listByManagedClusterCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go index 834292de9576..157bd34fb1bb 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go @@ -20,7 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MaintenanceConfigurationsList_MaintenanceWindow.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -46,7 +46,7 @@ func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager() { // Value: []*armcontainerservice.MaintenanceConfiguration{ // { // Name: to.Ptr("aksManagedNodeOSUpgradeSchedule"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule"), // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ // DurationHours: to.Ptr[int32](10), @@ -63,7 +63,7 @@ func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager() { // }, // { // Name: to.Ptr("aksManagedAutoUpgradeSchedule"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedAutoUpgradeSchedule"), // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ // DurationHours: to.Ptr[int32](5), @@ -92,7 +92,7 @@ func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -112,7 +112,7 @@ func ExampleMaintenanceConfigurationsClient_Get() { // 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.MaintenanceConfiguration = armcontainerservice.MaintenanceConfiguration{ // Name: to.Ptr("aksManagedNodeOSUpgradeSchedule"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule"), // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ // DurationHours: to.Ptr[int32](4), @@ -135,18 +135,10 @@ func ExampleMaintenanceConfigurationsClient_Get() { // UTCOffset: to.Ptr("-07:00"), // }, // }, - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcontainerservice.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcontainerservice.CreatedByTypeUser), - // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -191,8 +183,7 @@ func ExampleMaintenanceConfigurationsClient_CreateOrUpdate() { // 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.MaintenanceConfiguration = armcontainerservice.MaintenanceConfiguration{ // Name: to.Ptr("aksManagedAutoUpgradeSchedule"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/maintenanceConfigurations"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedAutoUpgradeSchedule"), // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ // DurationHours: to.Ptr[int32](10), @@ -216,18 +207,10 @@ func ExampleMaintenanceConfigurationsClient_CreateOrUpdate() { // UTCOffset: to.Ptr("+05:30"), // }, // }, - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcontainerservice.CreatedByTypeUser), - // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcontainerservice.CreatedByTypeUser), - // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go index 77784fecd6ea..fec152ddf9db 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go @@ -14,7 +14,6 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" - "strconv" "strings" ) @@ -43,10 +42,10 @@ func NewManagedClustersClient(subscriptionID string, credential azcore.TokenCred // BeginAbortLatestOperation - Aborts the currently running operation on the managed cluster. The Managed Cluster will be // moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation -// completes before cancellation can take place, an error is returned. +// completes before cancellation can take place, a 409 error code is returned. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientBeginAbortLatestOperationOptions contains the optional parameters for the ManagedClustersClient.BeginAbortLatestOperation @@ -71,10 +70,10 @@ func (client *ManagedClustersClient) BeginAbortLatestOperation(ctx context.Conte // AbortLatestOperation - Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved // to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation -// completes before cancellation can take place, an error is returned. +// completes before cancellation can take place, a 409 error code is returned. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedClustersClient) abortLatestOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginAbortLatestOperationOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginAbortLatestOperation" @@ -116,7 +115,7 @@ func (client *ManagedClustersClient) abortLatestOperationCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -125,7 +124,7 @@ func (client *ManagedClustersClient) abortLatestOperationCreateRequest(ctx conte // BeginCreateOrUpdate - Creates or updates a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - parameters - The managed cluster to create or update. @@ -151,7 +150,7 @@ func (client *ManagedClustersClient) BeginCreateOrUpdate(ctx context.Context, re // CreateOrUpdate - Creates or updates a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedClustersClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster, options *ManagedClustersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginCreateOrUpdate" @@ -193,7 +192,7 @@ func (client *ManagedClustersClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { @@ -211,7 +210,7 @@ func (client *ManagedClustersClient) createOrUpdateCreateRequest(ctx context.Con // BeginDelete - Deletes a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientBeginDeleteOptions contains the optional parameters for the ManagedClustersClient.BeginDelete @@ -236,7 +235,7 @@ func (client *ManagedClustersClient) BeginDelete(ctx context.Context, resourceGr // Delete - Deletes a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginDelete" @@ -278,10 +277,7 @@ func (client *ManagedClustersClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - if options != nil && options.IgnorePodDisruptionBudget != nil { - reqQP.Set("ignore-pod-disruption-budget", strconv.FormatBool(*options.IgnorePodDisruptionBudget)) - } + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { @@ -293,7 +289,7 @@ func (client *ManagedClustersClient) deleteCreateRequest(ctx context.Context, re // Get - Gets a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientGetOptions contains the optional parameters for the ManagedClustersClient.Get method. @@ -339,7 +335,7 @@ func (client *ManagedClustersClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -359,7 +355,7 @@ func (client *ManagedClustersClient) getHandleResponse(resp *http.Response) (Man // [https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials] . // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - roleName - The name of the role for managed cluster accessProfile resource. @@ -411,7 +407,7 @@ func (client *ManagedClustersClient) getAccessProfileCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -429,7 +425,7 @@ func (client *ManagedClustersClient) getAccessProfileHandleResponse(resp *http.R // GetCommandResult - Gets the results of a command which has been run on the Managed Cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - commandID - Id of the command. @@ -481,7 +477,7 @@ func (client *ManagedClustersClient) getCommandResultCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -499,76 +495,11 @@ func (client *ManagedClustersClient) getCommandResultHandleResponse(resp *http.R return result, nil } -// GetGuardrailsVersions - Contains Guardrails version along with its support info and whether it is a default version. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - location - The name of the Azure region. -// - version - Safeguards version -// - options - ManagedClustersClientGetGuardrailsVersionsOptions contains the optional parameters for the ManagedClustersClient.GetGuardrailsVersions -// method. -func (client *ManagedClustersClient) GetGuardrailsVersions(ctx context.Context, location string, version string, options *ManagedClustersClientGetGuardrailsVersionsOptions) (ManagedClustersClientGetGuardrailsVersionsResponse, error) { - var err error - const operationName = "ManagedClustersClient.GetGuardrailsVersions" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getGuardrailsVersionsCreateRequest(ctx, location, version, options) - if err != nil { - return ManagedClustersClientGetGuardrailsVersionsResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedClustersClientGetGuardrailsVersionsResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return ManagedClustersClientGetGuardrailsVersionsResponse{}, err - } - resp, err := client.getGuardrailsVersionsHandleResponse(httpResp) - return resp, err -} - -// getGuardrailsVersionsCreateRequest creates the GetGuardrailsVersions request. -func (client *ManagedClustersClient) getGuardrailsVersionsCreateRequest(ctx context.Context, location string, version string, _ *ManagedClustersClientGetGuardrailsVersionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if version == "" { - return nil, errors.New("parameter version cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getGuardrailsVersionsHandleResponse handles the GetGuardrailsVersions response. -func (client *ManagedClustersClient) getGuardrailsVersionsHandleResponse(resp *http.Response) (ManagedClustersClientGetGuardrailsVersionsResponse, error) { - result := ManagedClustersClientGetGuardrailsVersionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GuardrailsAvailableVersion); err != nil { - return ManagedClustersClientGetGuardrailsVersionsResponse{}, err - } - return result, nil -} - // GetMeshRevisionProfile - Contains extra metadata on the revision, including supported revisions, cluster compatibility // and available upgrades // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - location - The name of the Azure region. // - mode - The mode of the mesh. // - options - ManagedClustersClientGetMeshRevisionProfileOptions contains the optional parameters for the ManagedClustersClient.GetMeshRevisionProfile @@ -615,7 +546,7 @@ func (client *ManagedClustersClient) getMeshRevisionProfileCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -633,7 +564,7 @@ func (client *ManagedClustersClient) getMeshRevisionProfileHandleResponse(resp * // GetMeshUpgradeProfile - Gets available upgrades for a service mesh in a cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - mode - The mode of the mesh. @@ -685,7 +616,7 @@ func (client *ManagedClustersClient) getMeshUpgradeProfileCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -700,75 +631,10 @@ func (client *ManagedClustersClient) getMeshUpgradeProfileHandleResponse(resp *h return result, nil } -// GetSafeguardsVersions - Contains Safeguards version along with its support info and whether it is a default version. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - location - The name of the Azure region. -// - version - Safeguards version -// - options - ManagedClustersClientGetSafeguardsVersionsOptions contains the optional parameters for the ManagedClustersClient.GetSafeguardsVersions -// method. -func (client *ManagedClustersClient) GetSafeguardsVersions(ctx context.Context, location string, version string, options *ManagedClustersClientGetSafeguardsVersionsOptions) (ManagedClustersClientGetSafeguardsVersionsResponse, error) { - var err error - const operationName = "ManagedClustersClient.GetSafeguardsVersions" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getSafeguardsVersionsCreateRequest(ctx, location, version, options) - if err != nil { - return ManagedClustersClientGetSafeguardsVersionsResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedClustersClientGetSafeguardsVersionsResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return ManagedClustersClientGetSafeguardsVersionsResponse{}, err - } - resp, err := client.getSafeguardsVersionsHandleResponse(httpResp) - return resp, err -} - -// getSafeguardsVersionsCreateRequest creates the GetSafeguardsVersions request. -func (client *ManagedClustersClient) getSafeguardsVersionsCreateRequest(ctx context.Context, location string, version string, _ *ManagedClustersClientGetSafeguardsVersionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - if version == "" { - return nil, errors.New("parameter version cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getSafeguardsVersionsHandleResponse handles the GetSafeguardsVersions response. -func (client *ManagedClustersClient) getSafeguardsVersionsHandleResponse(resp *http.Response) (ManagedClustersClientGetSafeguardsVersionsResponse, error) { - result := ManagedClustersClientGetSafeguardsVersionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SafeguardsAvailableVersion); err != nil { - return ManagedClustersClientGetSafeguardsVersionsResponse{}, err - } - return result, nil -} - // GetUpgradeProfile - Gets the upgrade profile of a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientGetUpgradeProfileOptions contains the optional parameters for the ManagedClustersClient.GetUpgradeProfile @@ -815,7 +681,7 @@ func (client *ManagedClustersClient) getUpgradeProfileCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -832,7 +698,7 @@ func (client *ManagedClustersClient) getUpgradeProfileHandleResponse(resp *http. // NewListPager - Gets a list of managed clusters in the specified subscription. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - options - ManagedClustersClientListOptions contains the optional parameters for the ManagedClustersClient.NewListPager // method. func (client *ManagedClustersClient) NewListPager(options *ManagedClustersClientListOptions) *runtime.Pager[ManagedClustersClientListResponse] { @@ -870,7 +736,7 @@ func (client *ManagedClustersClient) listCreateRequest(ctx context.Context, _ *M return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -887,7 +753,7 @@ func (client *ManagedClustersClient) listHandleResponse(resp *http.Response) (Ma // NewListByResourceGroupPager - Lists managed clusters in the specified subscription and resource group. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ManagedClustersClientListByResourceGroupOptions contains the optional parameters for the ManagedClustersClient.NewListByResourceGroupPager // method. @@ -930,7 +796,7 @@ func (client *ManagedClustersClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -948,7 +814,7 @@ func (client *ManagedClustersClient) listByResourceGroupHandleResponse(resp *htt // ListClusterAdminCredentials - Lists the admin credentials of a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientListClusterAdminCredentialsOptions contains the optional parameters for the ManagedClustersClient.ListClusterAdminCredentials @@ -995,7 +861,7 @@ func (client *ManagedClustersClient) listClusterAdminCredentialsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -1016,7 +882,7 @@ func (client *ManagedClustersClient) listClusterAdminCredentialsHandleResponse(r // ListClusterMonitoringUserCredentials - Lists the cluster monitoring user credentials of a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientListClusterMonitoringUserCredentialsOptions contains the optional parameters for the ManagedClustersClient.ListClusterMonitoringUserCredentials @@ -1063,7 +929,7 @@ func (client *ManagedClustersClient) listClusterMonitoringUserCredentialsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -1084,7 +950,7 @@ func (client *ManagedClustersClient) listClusterMonitoringUserCredentialsHandleR // ListClusterUserCredentials - Lists the user credentials of a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientListClusterUserCredentialsOptions contains the optional parameters for the ManagedClustersClient.ListClusterUserCredentials @@ -1131,7 +997,7 @@ func (client *ManagedClustersClient) listClusterUserCredentialsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") if options != nil && options.Format != nil { reqQP.Set("format", string(*options.Format)) } @@ -1152,72 +1018,11 @@ func (client *ManagedClustersClient) listClusterUserCredentialsHandleResponse(re return result, nil } -// NewListGuardrailsVersionsPager - Contains list of Guardrails version along with its support info and whether it is a default -// version. -// -// Generated from API version 2025-09-02-preview -// - location - The name of the Azure region. -// - options - ManagedClustersClientListGuardrailsVersionsOptions contains the optional parameters for the ManagedClustersClient.NewListGuardrailsVersionsPager -// method. -func (client *ManagedClustersClient) NewListGuardrailsVersionsPager(location string, options *ManagedClustersClientListGuardrailsVersionsOptions) *runtime.Pager[ManagedClustersClientListGuardrailsVersionsResponse] { - return runtime.NewPager(runtime.PagingHandler[ManagedClustersClientListGuardrailsVersionsResponse]{ - More: func(page ManagedClustersClientListGuardrailsVersionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagedClustersClientListGuardrailsVersionsResponse) (ManagedClustersClientListGuardrailsVersionsResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedClustersClient.NewListGuardrailsVersionsPager") - 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.listGuardrailsVersionsCreateRequest(ctx, location, options) - }, nil) - if err != nil { - return ManagedClustersClientListGuardrailsVersionsResponse{}, err - } - return client.listGuardrailsVersionsHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listGuardrailsVersionsCreateRequest creates the ListGuardrailsVersions request. -func (client *ManagedClustersClient) listGuardrailsVersionsCreateRequest(ctx context.Context, location string, _ *ManagedClustersClientListGuardrailsVersionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listGuardrailsVersionsHandleResponse handles the ListGuardrailsVersions response. -func (client *ManagedClustersClient) listGuardrailsVersionsHandleResponse(resp *http.Response) (ManagedClustersClientListGuardrailsVersionsResponse, error) { - result := ManagedClustersClientListGuardrailsVersionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.GuardrailsAvailableVersionsList); err != nil { - return ManagedClustersClientListGuardrailsVersionsResponse{}, err - } - return result, nil -} - // ListKubernetesVersions - Contains extra metadata on the version, including supported patch versions, capabilities, available // upgrades, and details on preview status of the version // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - location - The name of the Azure region. // - options - ManagedClustersClientListKubernetesVersionsOptions contains the optional parameters for the ManagedClustersClient.ListKubernetesVersions // method. @@ -1259,7 +1064,7 @@ func (client *ManagedClustersClient) listKubernetesVersionsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1277,7 +1082,7 @@ func (client *ManagedClustersClient) listKubernetesVersionsHandleResponse(resp * // NewListMeshRevisionProfilesPager - Contains extra metadata on each revision, including supported revisions, cluster compatibility // and available upgrades // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - location - The name of the Azure region. // - options - ManagedClustersClientListMeshRevisionProfilesOptions contains the optional parameters for the ManagedClustersClient.NewListMeshRevisionProfilesPager // method. @@ -1320,7 +1125,7 @@ func (client *ManagedClustersClient) listMeshRevisionProfilesCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1337,7 +1142,7 @@ func (client *ManagedClustersClient) listMeshRevisionProfilesHandleResponse(resp // NewListMeshUpgradeProfilesPager - Lists available upgrades for all service meshes in a specific cluster. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientListMeshUpgradeProfilesOptions contains the optional parameters for the ManagedClustersClient.NewListMeshUpgradeProfilesPager @@ -1385,7 +1190,7 @@ func (client *ManagedClustersClient) listMeshUpgradeProfilesCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1403,7 +1208,7 @@ func (client *ManagedClustersClient) listMeshUpgradeProfilesHandleResponse(resp // NewListOutboundNetworkDependenciesEndpointsPager - Gets a list of egress endpoints (network endpoints of all outbound dependencies) // in the specified managed cluster. The operation returns properties of each egress endpoint. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientListOutboundNetworkDependenciesEndpointsOptions contains the optional parameters for the @@ -1451,7 +1256,7 @@ func (client *ManagedClustersClient) listOutboundNetworkDependenciesEndpointsCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1466,152 +1271,11 @@ func (client *ManagedClustersClient) listOutboundNetworkDependenciesEndpointsHan return result, nil } -// NewListSafeguardsVersionsPager - Contains list of Safeguards version along with its support info and whether it is a default -// version. -// -// Generated from API version 2025-09-02-preview -// - location - The name of the Azure region. -// - options - ManagedClustersClientListSafeguardsVersionsOptions contains the optional parameters for the ManagedClustersClient.NewListSafeguardsVersionsPager -// method. -func (client *ManagedClustersClient) NewListSafeguardsVersionsPager(location string, options *ManagedClustersClientListSafeguardsVersionsOptions) *runtime.Pager[ManagedClustersClientListSafeguardsVersionsResponse] { - return runtime.NewPager(runtime.PagingHandler[ManagedClustersClientListSafeguardsVersionsResponse]{ - More: func(page ManagedClustersClientListSafeguardsVersionsResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagedClustersClientListSafeguardsVersionsResponse) (ManagedClustersClientListSafeguardsVersionsResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedClustersClient.NewListSafeguardsVersionsPager") - 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.listSafeguardsVersionsCreateRequest(ctx, location, options) - }, nil) - if err != nil { - return ManagedClustersClientListSafeguardsVersionsResponse{}, err - } - return client.listSafeguardsVersionsHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listSafeguardsVersionsCreateRequest creates the ListSafeguardsVersions request. -func (client *ManagedClustersClient) listSafeguardsVersionsCreateRequest(ctx context.Context, location string, _ *ManagedClustersClientListSafeguardsVersionsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if location == "" { - return nil, errors.New("parameter location cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listSafeguardsVersionsHandleResponse handles the ListSafeguardsVersions response. -func (client *ManagedClustersClient) listSafeguardsVersionsHandleResponse(resp *http.Response) (ManagedClustersClientListSafeguardsVersionsResponse, error) { - result := ManagedClustersClientListSafeguardsVersionsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.SafeguardsAvailableVersionsList); err != nil { - return ManagedClustersClientListSafeguardsVersionsResponse{}, err - } - return result, nil -} - -// BeginRebalanceLoadBalancers - Rebalance nodes across specific load balancers. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - parameters - The names of the load balancers to be rebalanced. If set to empty, all load balancers will be rebalanced. -// - options - ManagedClustersClientBeginRebalanceLoadBalancersOptions contains the optional parameters for the ManagedClustersClient.BeginRebalanceLoadBalancers -// method. -func (client *ManagedClustersClient) BeginRebalanceLoadBalancers(ctx context.Context, resourceGroupName string, resourceName string, parameters RebalanceLoadBalancersRequestBody, options *ManagedClustersClientBeginRebalanceLoadBalancersOptions) (*runtime.Poller[ManagedClustersClientRebalanceLoadBalancersResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.rebalanceLoadBalancers(ctx, resourceGroupName, resourceName, parameters, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[ManagedClustersClientRebalanceLoadBalancersResponse]{ - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[ManagedClustersClientRebalanceLoadBalancersResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// RebalanceLoadBalancers - Rebalance nodes across specific load balancers. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -func (client *ManagedClustersClient) rebalanceLoadBalancers(ctx context.Context, resourceGroupName string, resourceName string, parameters RebalanceLoadBalancersRequestBody, options *ManagedClustersClientBeginRebalanceLoadBalancersOptions) (*http.Response, error) { - var err error - const operationName = "ManagedClustersClient.BeginRebalanceLoadBalancers" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.rebalanceLoadBalancersCreateRequest(ctx, resourceGroupName, resourceName, parameters, 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.StatusAccepted) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// rebalanceLoadBalancersCreateRequest creates the RebalanceLoadBalancers request. -func (client *ManagedClustersClient) rebalanceLoadBalancersCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, parameters RebalanceLoadBalancersRequestBody, _ *ManagedClustersClientBeginRebalanceLoadBalancersOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodPost, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - // BeginResetAADProfile - WARNING: This API will be deprecated. Please see AKS-managed Azure Active Directory integration // [https://aka.ms/aks-managed-aad] to update your cluster with AKS-managed Azure AD. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - parameters - The AAD profile to set on the Managed Cluster @@ -1639,7 +1303,7 @@ func (client *ManagedClustersClient) BeginResetAADProfile(ctx context.Context, r // to update your cluster with AKS-managed Azure AD. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedClustersClient) resetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile, options *ManagedClustersClientBeginResetAADProfileOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginResetAADProfile" @@ -1681,7 +1345,7 @@ func (client *ManagedClustersClient) resetAADProfileCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1693,7 +1357,7 @@ func (client *ManagedClustersClient) resetAADProfileCreateRequest(ctx context.Co // BeginResetServicePrincipalProfile - This action cannot be performed on a cluster that is not using a service principal // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - parameters - The service principal profile to set on the managed cluster. @@ -1720,7 +1384,7 @@ func (client *ManagedClustersClient) BeginResetServicePrincipalProfile(ctx conte // ResetServicePrincipalProfile - This action cannot be performed on a cluster that is not using a service principal // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedClustersClient) resetServicePrincipalProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile, options *ManagedClustersClientBeginResetServicePrincipalProfileOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginResetServicePrincipalProfile" @@ -1762,7 +1426,7 @@ func (client *ManagedClustersClient) resetServicePrincipalProfileCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1775,7 +1439,7 @@ func (client *ManagedClustersClient) resetServicePrincipalProfileCreateRequest(c // more details about rotating managed cluster certificates. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientBeginRotateClusterCertificatesOptions contains the optional parameters for the ManagedClustersClient.BeginRotateClusterCertificates @@ -1802,7 +1466,7 @@ func (client *ManagedClustersClient) BeginRotateClusterCertificates(ctx context. // details about rotating managed cluster certificates. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedClustersClient) rotateClusterCertificates(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginRotateClusterCertificatesOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginRotateClusterCertificates" @@ -1844,7 +1508,7 @@ func (client *ManagedClustersClient) rotateClusterCertificatesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1853,7 +1517,7 @@ func (client *ManagedClustersClient) rotateClusterCertificatesCreateRequest(ctx // BeginRotateServiceAccountSigningKeys - Rotates the service account signing keys of a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientBeginRotateServiceAccountSigningKeysOptions contains the optional parameters for the ManagedClustersClient.BeginRotateServiceAccountSigningKeys @@ -1879,7 +1543,7 @@ func (client *ManagedClustersClient) BeginRotateServiceAccountSigningKeys(ctx co // RotateServiceAccountSigningKeys - Rotates the service account signing keys of a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedClustersClient) rotateServiceAccountSigningKeys(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginRotateServiceAccountSigningKeysOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginRotateServiceAccountSigningKeys" @@ -1921,7 +1585,7 @@ func (client *ManagedClustersClient) rotateServiceAccountSigningKeysCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1932,7 +1596,7 @@ func (client *ManagedClustersClient) rotateServiceAccountSigningKeysCreateReques // [https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview]. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - requestPayload - The run command request @@ -1961,7 +1625,7 @@ func (client *ManagedClustersClient) BeginRunCommand(ctx context.Context, resour // [https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview]. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedClustersClient) runCommand(ctx context.Context, resourceGroupName string, resourceName string, requestPayload RunCommandRequest, options *ManagedClustersClientBeginRunCommandOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginRunCommand" @@ -2003,7 +1667,7 @@ func (client *ManagedClustersClient) runCommandCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, requestPayload); err != nil { @@ -2016,7 +1680,7 @@ func (client *ManagedClustersClient) runCommandCreateRequest(ctx context.Context // a cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientBeginStartOptions contains the optional parameters for the ManagedClustersClient.BeginStart @@ -2043,7 +1707,7 @@ func (client *ManagedClustersClient) BeginStart(ctx context.Context, resourceGro // a cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedClustersClient) start(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginStart" @@ -2085,7 +1749,7 @@ func (client *ManagedClustersClient) startCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2097,7 +1761,7 @@ func (client *ManagedClustersClient) startCreateRequest(ctx context.Context, res // for more details about stopping a cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedClustersClientBeginStopOptions contains the optional parameters for the ManagedClustersClient.BeginStop @@ -2126,7 +1790,7 @@ func (client *ManagedClustersClient) BeginStop(ctx context.Context, resourceGrou // for more details about stopping a cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedClustersClient) stop(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginStopOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginStop" @@ -2168,7 +1832,7 @@ func (client *ManagedClustersClient) stopCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2177,7 +1841,7 @@ func (client *ManagedClustersClient) stopCreateRequest(ctx context.Context, reso // BeginUpdateTags - Updates tags on a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - parameters - Parameters supplied to the Update Managed Cluster Tags operation. @@ -2203,7 +1867,7 @@ func (client *ManagedClustersClient) BeginUpdateTags(ctx context.Context, resour // UpdateTags - Updates tags on a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedClustersClient) updateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject, options *ManagedClustersClientBeginUpdateTagsOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginUpdateTags" @@ -2245,7 +1909,7 @@ func (client *ManagedClustersClient) updateTagsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if options != nil && options.IfMatch != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go index 24156915f35a..8c6e70d4644a 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go @@ -20,7 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/KubernetesVersions_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/KubernetesVersions_List.json func ExampleManagedClustersClient_ListKubernetesVersions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -116,7 +116,7 @@ func ExampleManagedClustersClient_ListKubernetesVersions() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersList.json func ExampleManagedClustersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -143,7 +143,7 @@ func ExampleManagedClustersClient_NewListPager() { // { // Name: to.Ptr("clustername1"), // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/managedClusters/clustername1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), // Location: to.Ptr("location1"), // Tags: map[string]*string{ // "archv2": to.Ptr(""), @@ -163,7 +163,8 @@ func ExampleManagedClustersClient_NewListPager() { // VMSize: to.Ptr("Standard_DS1_v2"), // Name: to.Ptr("nodepool1"), // }}, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(false), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -195,7 +196,7 @@ func ExampleManagedClustersClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListByResourceGroup.json func ExampleManagedClustersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -240,7 +241,8 @@ func ExampleManagedClustersClient_NewListByResourceGroupPager() { // VMSize: to.Ptr("Standard_DS1_v2"), // Name: to.Ptr("nodepool1"), // }}, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(false), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -272,7 +274,7 @@ func ExampleManagedClustersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersGetUpgradeProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersGetUpgradeProfile.json func ExampleManagedClustersClient_GetUpgradeProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -326,7 +328,7 @@ func ExampleManagedClustersClient_GetUpgradeProfile() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersGetAccessProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersGetAccessProfile.json func ExampleManagedClustersClient_GetAccessProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -355,7 +357,7 @@ func ExampleManagedClustersClient_GetAccessProfile() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListClusterAdminCredentials.json func ExampleManagedClustersClient_ListClusterAdminCredentials() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -382,7 +384,7 @@ func ExampleManagedClustersClient_ListClusterAdminCredentials() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListClusterUserCredentials.json func ExampleManagedClustersClient_ListClusterUserCredentials() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -411,7 +413,7 @@ func ExampleManagedClustersClient_ListClusterUserCredentials() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersListClusterCredentialResult.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json func ExampleManagedClustersClient_ListClusterMonitoringUserCredentials() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -438,7 +440,7 @@ func ExampleManagedClustersClient_ListClusterMonitoringUserCredentials() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersGet.json func ExampleManagedClustersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -488,7 +490,8 @@ func ExampleManagedClustersClient_Get() { // Name: to.Ptr("nodepool1"), // }}, // AzurePortalFQDN: to.Ptr("dnsprefix1-abcd1234.portal.hcp.eastus.azmk8s.io"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(false), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -511,19 +514,19 @@ func ExampleManagedClustersClient_Get() { // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // OutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileOutboundIPs{ // PublicIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/customeroutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Network/publicIPAddresses/customeroutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/customeroutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Network/publicIPAddresses/customeroutboundip2"), // }}, // }, // }, @@ -552,8 +555,8 @@ func ExampleManagedClustersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersAssociate_CRG.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_associateManagedClusterWithCapacityReservationGroup() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_Snapshot.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingAnAgentPoolSnapshot() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -573,20 +576,23 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_associateManagedClusterWit AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - CapacityReservationGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1"), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), + Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), + Count: to.Ptr[int32](3), + CreationData: &armcontainerservice.CreationData{ + SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), + }, + EnableFIPS: to.Ptr(true), + EnableNodePublicIP: to.Ptr(true), + Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), + Name: to.Ptr("nodepool1"), }}, AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -647,9 +653,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_associateManagedClusterWit // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ // { // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // CapacityReservationGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1"), // Count: to.Ptr[int32](3), + // CreationData: &armcontainerservice.CreationData{ + // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), + // }, // CurrentOrchestratorVersion: to.Ptr("1.9.6"), + // EnableFIPS: to.Ptr(true), // EnableNodePublicIP: to.Ptr(true), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), @@ -664,7 +673,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_associateManagedClusterWit // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -687,10 +697,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_associateManagedClusterWit // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -719,8 +729,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_associateManagedClusterWit // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_MCSnapshot.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingAManagedClusterSnapshot() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_ManagedNATGateway.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAksManagedNatGatewayAsOutboundType() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -737,22 +747,25 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA "tier": to.Ptr("production"), }, Properties: &armcontainerservice.ManagedClusterProperties{ + AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ { Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), Count: to.Ptr[int32](3), - EnableFIPS: to.Ptr(true), - EnableNodePublicIP: to.Ptr(true), + EnableNodePublicIP: to.Ptr(false), Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), OSType: to.Ptr(armcontainerservice.OSTypeLinux), VMSize: to.Ptr("Standard_DS2_v2"), Name: to.Ptr("nodepool1"), }}, - CreationData: &armcontainerservice.CreationData{ - SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), + AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ + ScaleDownDelayAfterAdd: to.Ptr("15m"), + ScanInterval: to.Ptr("20s"), }, - DNSPrefix: to.Ptr("dnsprefix1"), - KubernetesVersion: to.Ptr(""), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DNSPrefix: to.Ptr("dnsprefix1"), + EnableRBAC: to.Ptr(true), + KubernetesVersion: to.Ptr(""), LinuxProfile: &armcontainerservice.LinuxProfile{ AdminUsername: to.Ptr("azureuser"), SSH: &armcontainerservice.SSHConfiguration{ @@ -762,10 +775,23 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA }}, }, }, + NetworkProfile: &armcontainerservice.NetworkProfile{ + LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), + NatGatewayProfile: &armcontainerservice.ManagedClusterNATGatewayProfile{ + ManagedOutboundIPProfile: &armcontainerservice.ManagedClusterManagedOutboundIPProfile{ + Count: to.Ptr[int32](2), + }, + }, + OutboundType: to.Ptr(armcontainerservice.OutboundTypeManagedNATGateway), + }, ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ ClientID: to.Ptr("clientid"), Secret: to.Ptr("secret"), }, + WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + AdminPassword: to.Ptr("replacePassword1234$"), + AdminUsername: to.Ptr("azureuser"), + }, }, SKU: &armcontainerservice.ManagedClusterSKU{ Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), @@ -798,8 +824,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA // { // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), // Count: to.Ptr[int32](3), - // EnableFIPS: to.Ptr(true), - // EnableNodePublicIP: to.Ptr(true), + // CurrentOrchestratorVersion: to.Ptr("1.9.6"), + // EnableNodePublicIP: to.Ptr(false), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), @@ -809,9 +835,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA // VMSize: to.Ptr("Standard_DS2_v2"), // Name: to.Ptr("nodepool1"), // }}, - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), + // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ + // ScaleDownDelayAfterAdd: to.Ptr("15m"), + // ScanInterval: to.Ptr("20s"), // }, + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -828,43 +857,39 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA // MaxAgentPools: to.Ptr[int32](1), // NetworkProfile: &armcontainerservice.NetworkProfile{ // DNSServiceIP: to.Ptr("10.0.0.10"), - // IPFamilies: []*armcontainerservice.IPFamily{ - // to.Ptr(armcontainerservice.IPFamilyIPv4)}, - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), - // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - // PodCidr: to.Ptr("10.244.0.0/16"), - // PodCidrs: []*string{ - // to.Ptr("10.244.0.0/16")}, - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // ServiceCidrs: []*string{ - // to.Ptr("10.0.0.0/16")}, - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), + // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), + // NatGatewayProfile: &armcontainerservice.ManagedClusterNATGatewayProfile{ + // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ + // { + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, + // { + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // }}, + // IdleTimeoutInMinutes: to.Ptr[int32](4), + // ManagedOutboundIPProfile: &armcontainerservice.ManagedClusterManagedOutboundIPProfile{ + // Count: to.Ptr[int32](2), // }, - // } + // }, + // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), + // OutboundType: to.Ptr(armcontainerservice.OutboundTypeManagedNATGateway), + // PodCidr: to.Ptr("10.244.0.0/16"), + // ServiceCidr: to.Ptr("10.0.0.0/16"), + // }, + // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), + // ProvisioningState: to.Ptr("Succeeded"), + // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ + // ClientID: to.Ptr("clientid"), + // }, + // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + // AdminUsername: to.Ptr("azureuser"), + // }, + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_Snapshot.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingAnAgentPoolSnapshot() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -881,15 +906,19 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA "tier": to.Ptr("production"), }, Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, + AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{ + "azureKeyvaultSecretsProvider": { + Config: map[string]*string{ + "enableSecretRotation": to.Ptr("true"), + "rotationPollInterval": to.Ptr("2m"), + }, + Enabled: to.Ptr(true), + }, + }, AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - CreationData: &armcontainerservice.CreationData{ - SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - }, - EnableFIPS: to.Ptr(true), + Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), + Count: to.Ptr[int32](3), EnableNodePublicIP: to.Ptr(true), Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), OSType: to.Ptr(armcontainerservice.OSTypeLinux), @@ -900,7 +929,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -958,15 +987,20 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA // "tier": to.Ptr("production"), // }, // Properties: &armcontainerservice.ManagedClusterProperties{ + // AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{ + // "azureKeyvaultSecretsProvider": &armcontainerservice.ManagedClusterAddonProfile{ + // Config: map[string]*string{ + // "enableSecretRotation": to.Ptr("true"), + // "rotationPollInterval": to.Ptr("2m"), + // }, + // Enabled: to.Ptr(true), + // }, + // }, // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ // { // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), // Count: to.Ptr[int32](3), - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - // }, - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableFIPS: to.Ptr(true), + // EnableEncryptionAtHost: to.Ptr(true), // EnableNodePublicIP: to.Ptr(true), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), @@ -981,7 +1015,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -998,46 +1032,40 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA // MaxAgentPools: to.Ptr[int32](1), // NetworkProfile: &armcontainerservice.NetworkProfile{ // DNSServiceIP: to.Ptr("10.0.0.10"), - // IPFamilies: []*armcontainerservice.IPFamily{ - // to.Ptr(armcontainerservice.IPFamilyIPv4)}, - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), - // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - // PodCidr: to.Ptr("10.244.0.0/16"), - // PodCidrs: []*string{ - // to.Ptr("10.244.0.0/16")}, - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // ServiceCidrs: []*string{ - // to.Ptr("10.0.0.0/16")}, - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), + // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ + // AllocatedOutboundPorts: to.Ptr[int32](2000), + // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ + // { + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, + // { + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // }}, + // IdleTimeoutInMinutes: to.Ptr[int32](10), + // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ + // Count: to.Ptr[int32](2), // }, - // } + // }, + // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), + // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), + // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), + // PodCidr: to.Ptr("10.244.0.0/16"), + // ServiceCidr: to.Ptr("10.0.0.0/16"), + // }, + // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), + // ProvisioningState: to.Ptr("Succeeded"), + // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ + // ClientID: to.Ptr("clientid"), + // }, + // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + // AdminUsername: to.Ptr("azureuser"), + // }, + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_EnableAIToolchainOperator.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAiToolchainOperatorEnabled() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_CRG.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCapacityReservationGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -1057,20 +1085,23 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAi AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), + Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), + CapacityReservationGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1"), + Count: to.Ptr[int32](3), + EnableNodePublicIP: to.Ptr(true), + Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), + Name: to.Ptr("nodepool1"), }}, - AiToolchainOperatorProfile: &armcontainerservice.ManagedClusterAIToolchainOperatorProfile{ - Enabled: to.Ptr(true), + AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ + ScaleDownDelayAfterAdd: to.Ptr("15m"), + ScanInterval: to.Ptr("20s"), }, - DNSPrefix: to.Ptr("dnsprefix1"), - EnableRBAC: to.Ptr(true), - KubernetesVersion: to.Ptr(""), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DNSPrefix: to.Ptr("dnsprefix1"), + EnableRBAC: to.Ptr(true), + KubernetesVersion: to.Ptr(""), LinuxProfile: &armcontainerservice.LinuxProfile{ AdminUsername: to.Ptr("azureuser"), SSH: &armcontainerservice.SSHConfiguration{ @@ -1086,16 +1117,17 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAi Count: to.Ptr[int32](2), }, }, - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - NetworkDataplane: to.Ptr(armcontainerservice.NetworkDataplaneCilium), - NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginAzure), - NetworkPluginMode: to.Ptr(armcontainerservice.NetworkPluginModeOverlay), - OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), + LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), + OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), }, ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ ClientID: to.Ptr("clientid"), Secret: to.Ptr("secret"), }, + WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + AdminPassword: to.Ptr("replacePassword1234$"), + AdminUsername: to.Ptr("azureuser"), + }, }, SKU: &armcontainerservice.ManagedClusterSKU{ Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), @@ -1119,683 +1151,17 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAi // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableNodePublicIP: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // AiToolchainOperatorProfile: &armcontainerservice.ManagedClusterAIToolchainOperatorProfile{ - // Enabled: to.Ptr(true), - // }, - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableRBAC: to.Ptr(true), - // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), - // KubernetesVersion: to.Ptr("1.9.6"), - // LinuxProfile: &armcontainerservice.LinuxProfile{ - // AdminUsername: to.Ptr("azureuser"), - // SSH: &armcontainerservice.SSHConfiguration{ - // PublicKeys: []*armcontainerservice.SSHPublicKey{ - // { - // KeyData: to.Ptr("keydata"), - // }}, - // }, - // }, - // MaxAgentPools: to.Ptr[int32](1), - // NetworkProfile: &armcontainerservice.NetworkProfile{ - // DNSServiceIP: to.Ptr("10.0.0.10"), - // IPFamilies: []*armcontainerservice.IPFamily{ - // to.Ptr(armcontainerservice.IPFamilyIPv4)}, - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), - // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - // NetworkDataplane: to.Ptr(armcontainerservice.NetworkDataplaneCilium), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginAzure), - // NetworkPluginMode: to.Ptr(armcontainerservice.NetworkPluginModeOverlay), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - // PodCidr: to.Ptr("10.244.0.0/16"), - // PodCidrs: []*string{ - // to.Ptr("10.244.0.0/16")}, - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // ServiceCidrs: []*string{ - // to.Ptr("10.0.0.0/16")}, - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_ManagedNATGateway.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAksManagedNatGatewayAsOutboundType() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(false), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - DNSPrefix: to.Ptr("dnsprefix1"), - EnableRBAC: to.Ptr(true), - KubernetesVersion: to.Ptr(""), - LinuxProfile: &armcontainerservice.LinuxProfile{ - AdminUsername: to.Ptr("azureuser"), - SSH: &armcontainerservice.SSHConfiguration{ - PublicKeys: []*armcontainerservice.SSHPublicKey{ - { - KeyData: to.Ptr("keydata"), - }}, - }, - }, - NetworkProfile: &armcontainerservice.NetworkProfile{ - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - NatGatewayProfile: &armcontainerservice.ManagedClusterNATGatewayProfile{ - ManagedOutboundIPProfile: &armcontainerservice.ManagedClusterManagedOutboundIPProfile{ - Count: to.Ptr[int32](2), - }, - }, - OutboundType: to.Ptr(armcontainerservice.OutboundTypeManagedNATGateway), - }, - ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - ClientID: to.Ptr("clientid"), - Secret: to.Ptr("secret"), - }, - WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - AdminPassword: to.Ptr("replacePassword1234$"), - AdminUsername: to.Ptr("azureuser"), - }, - }, - SKU: &armcontainerservice.ManagedClusterSKU{ - Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - }, - }, &armcontainerservice.ManagedClustersClientBeginCreateOrUpdateOptions{IfMatch: nil, - IfNoneMatch: 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.ManagedCluster = armcontainerservice.ManagedCluster{ - // Name: to.Ptr("clustername1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableNodePublicIP: to.Ptr(false), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableRBAC: to.Ptr(true), - // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), - // KubernetesVersion: to.Ptr("1.9.6"), - // LinuxProfile: &armcontainerservice.LinuxProfile{ - // AdminUsername: to.Ptr("azureuser"), - // SSH: &armcontainerservice.SSHConfiguration{ - // PublicKeys: []*armcontainerservice.SSHPublicKey{ - // { - // KeyData: to.Ptr("keydata"), - // }}, - // }, - // }, - // MaxAgentPools: to.Ptr[int32](1), - // NetworkProfile: &armcontainerservice.NetworkProfile{ - // DNSServiceIP: to.Ptr("10.0.0.10"), - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NatGatewayProfile: &armcontainerservice.ManagedClusterNATGatewayProfile{ - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](4), - // ManagedOutboundIPProfile: &armcontainerservice.ManagedClusterManagedOutboundIPProfile{ - // Count: to.Ptr[int32](2), - // }, - // }, - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeManagedNATGateway), - // PodCidr: to.Ptr("10.244.0.0/16"), - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/AdvancedNetworkingTransitEncryption.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAdvancedNetworkingTransitEncryption() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - DNSPrefix: to.Ptr("dnsprefix1"), - EnableRBAC: to.Ptr(true), - KubernetesVersion: to.Ptr(""), - LinuxProfile: &armcontainerservice.LinuxProfile{ - AdminUsername: to.Ptr("azureuser"), - SSH: &armcontainerservice.SSHConfiguration{ - PublicKeys: []*armcontainerservice.SSHPublicKey{ - { - KeyData: to.Ptr("keydata"), - }}, - }, - }, - NetworkProfile: &armcontainerservice.NetworkProfile{ - AdvancedNetworking: &armcontainerservice.AdvancedNetworking{ - Enabled: to.Ptr(true), - Observability: &armcontainerservice.AdvancedNetworkingObservability{ - Enabled: to.Ptr(false), - }, - Security: &armcontainerservice.AdvancedNetworkingSecurity{ - AdvancedNetworkPolicies: to.Ptr(armcontainerservice.AdvancedNetworkPoliciesFQDN), - Enabled: to.Ptr(true), - TransitEncryption: &armcontainerservice.AdvancedNetworkingSecurityTransitEncryption{ - Type: to.Ptr(armcontainerservice.TransitEncryptionTypeWireGuard), - }, - }, - }, - LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - Count: to.Ptr[int32](2), - }, - }, - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - NetworkDataplane: to.Ptr(armcontainerservice.NetworkDataplaneCilium), - NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginAzure), - NetworkPluginMode: to.Ptr(armcontainerservice.NetworkPluginModeOverlay), - OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - }, - ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - ClientID: to.Ptr("clientid"), - Secret: to.Ptr("secret"), - }, - }, - SKU: &armcontainerservice.ManagedClusterSKU{ - Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - }, - }, &armcontainerservice.ManagedClustersClientBeginCreateOrUpdateOptions{IfMatch: nil, - IfNoneMatch: 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.ManagedCluster = armcontainerservice.ManagedCluster{ - // Name: to.Ptr("clustername1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableNodePublicIP: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableRBAC: to.Ptr(true), - // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), - // KubernetesVersion: to.Ptr("1.9.6"), - // LinuxProfile: &armcontainerservice.LinuxProfile{ - // AdminUsername: to.Ptr("azureuser"), - // SSH: &armcontainerservice.SSHConfiguration{ - // PublicKeys: []*armcontainerservice.SSHPublicKey{ - // { - // KeyData: to.Ptr("keydata"), - // }}, - // }, - // }, - // MaxAgentPools: to.Ptr[int32](1), - // NetworkProfile: &armcontainerservice.NetworkProfile{ - // AdvancedNetworking: &armcontainerservice.AdvancedNetworking{ - // Enabled: to.Ptr(true), - // Observability: &armcontainerservice.AdvancedNetworkingObservability{ - // Enabled: to.Ptr(false), - // }, - // Security: &armcontainerservice.AdvancedNetworkingSecurity{ - // AdvancedNetworkPolicies: to.Ptr(armcontainerservice.AdvancedNetworkPoliciesFQDN), - // Enabled: to.Ptr(true), - // TransitEncryption: &armcontainerservice.AdvancedNetworkingSecurityTransitEncryption{ - // Type: to.Ptr(armcontainerservice.TransitEncryptionTypeWireGuard), - // }, - // }, - // }, - // DNSServiceIP: to.Ptr("10.0.0.10"), - // IPFamilies: []*armcontainerservice.IPFamily{ - // to.Ptr(armcontainerservice.IPFamilyIPv4)}, - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), - // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - // NetworkDataplane: to.Ptr(armcontainerservice.NetworkDataplaneCilium), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginAzure), - // NetworkPluginMode: to.Ptr(armcontainerservice.NetworkPluginModeOverlay), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - // PodCidr: to.Ptr("10.244.0.0/16"), - // PodCidrs: []*string{ - // to.Ptr("10.244.0.0/16")}, - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // ServiceCidrs: []*string{ - // to.Ptr("10.0.0.0/16")}, - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_IngressProfile_ApplicationLoadBalancer.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithApplicationLoadBalancerProfileConfigured() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - DNSPrefix: to.Ptr("dnsprefix1"), - IngressProfile: &armcontainerservice.ManagedClusterIngressProfile{ - ApplicationLoadBalancer: &armcontainerservice.ManagedClusterIngressProfileApplicationLoadBalancer{ - Enabled: to.Ptr(true), - }, - }, - KubernetesVersion: to.Ptr(""), - LinuxProfile: &armcontainerservice.LinuxProfile{ - AdminUsername: to.Ptr("azureuser"), - SSH: &armcontainerservice.SSHConfiguration{ - PublicKeys: []*armcontainerservice.SSHPublicKey{ - { - KeyData: to.Ptr("keydata"), - }}, - }, - }, - NetworkProfile: &armcontainerservice.NetworkProfile{ - LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - Count: to.Ptr[int32](2), - }, - }, - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - }, - }, - SKU: &armcontainerservice.ManagedClusterSKU{ - Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - }, - }, &armcontainerservice.ManagedClustersClientBeginCreateOrUpdateOptions{IfMatch: nil, - IfNoneMatch: 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.ManagedCluster = armcontainerservice.ManagedCluster{ - // Name: to.Ptr("clustername1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // Count: to.Ptr[int32](3), - // EnableNodePublicIP: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableRBAC: to.Ptr(true), - // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), - // IngressProfile: &armcontainerservice.ManagedClusterIngressProfile{ - // WebAppRouting: &armcontainerservice.ManagedClusterIngressProfileWebAppRouting{ - // DNSZoneResourceIDs: []*string{ - // to.Ptr("/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.Network/dnszones/DNS_ZONE_NAME")}, - // Enabled: to.Ptr(true), - // }, - // }, - // KubernetesVersion: to.Ptr("1.9.6"), - // LinuxProfile: &armcontainerservice.LinuxProfile{ - // AdminUsername: to.Ptr("azureuser"), - // SSH: &armcontainerservice.SSHConfiguration{ - // PublicKeys: []*armcontainerservice.SSHPublicKey{ - // { - // KeyData: to.Ptr("keydata"), - // }}, - // }, - // }, - // MaxAgentPools: to.Ptr[int32](1), - // NetworkProfile: &armcontainerservice.NetworkProfile{ - // DNSServiceIP: to.Ptr("10.0.0.10"), - // IPFamilies: []*armcontainerservice.IPFamily{ - // to.Ptr(armcontainerservice.IPFamilyIPv4)}, - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), - // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - // PodCidr: to.Ptr("10.244.0.0/16"), - // PodCidrs: []*string{ - // to.Ptr("10.244.0.0/16")}, - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // ServiceCidrs: []*string{ - // to.Ptr("10.0.0.0/16")}, - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{ - "azureKeyvaultSecretsProvider": { - Config: map[string]*string{ - "enableSecretRotation": to.Ptr("true"), - "rotationPollInterval": to.Ptr("2m"), - }, - Enabled: to.Ptr(true), - }, - }, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - DNSPrefix: to.Ptr("dnsprefix1"), - EnableRBAC: to.Ptr(true), - KubernetesVersion: to.Ptr(""), - LinuxProfile: &armcontainerservice.LinuxProfile{ - AdminUsername: to.Ptr("azureuser"), - SSH: &armcontainerservice.SSHConfiguration{ - PublicKeys: []*armcontainerservice.SSHPublicKey{ - { - KeyData: to.Ptr("keydata"), - }}, - }, - }, - NetworkProfile: &armcontainerservice.NetworkProfile{ - LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - Count: to.Ptr[int32](2), - }, - }, - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - }, - ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - ClientID: to.Ptr("clientid"), - Secret: to.Ptr("secret"), - }, - WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - AdminPassword: to.Ptr("replacePassword1234$"), - AdminUsername: to.Ptr("azureuser"), - }, - }, - SKU: &armcontainerservice.ManagedClusterSKU{ - Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - }, - }, &armcontainerservice.ManagedClustersClientBeginCreateOrUpdateOptions{IfMatch: nil, - IfNoneMatch: 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.ManagedCluster = armcontainerservice.ManagedCluster{ - // Name: to.Ptr("clustername1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{ - // "azureKeyvaultSecretsProvider": &armcontainerservice.ManagedClusterAddonProfile{ - // Config: map[string]*string{ - // "enableSecretRotation": to.Ptr("true"), - // "rotationPollInterval": to.Ptr("2m"), - // }, - // Enabled: to.Ptr(true), - // }, - // }, + // Tags: map[string]*string{ + // "archv2": to.Ptr(""), + // "tier": to.Ptr("production"), + // }, + // Properties: &armcontainerservice.ManagedClusterProperties{ // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ // { // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), + // CapacityReservationGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1"), // Count: to.Ptr[int32](3), - // EnableEncryptionAtHost: to.Ptr(true), + // CurrentOrchestratorVersion: to.Ptr("1.9.6"), // EnableNodePublicIP: to.Ptr(true), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), @@ -1810,7 +1176,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAz // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -1827,40 +1193,46 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAz // MaxAgentPools: to.Ptr[int32](1), // NetworkProfile: &armcontainerservice.NetworkProfile{ // DNSServiceIP: to.Ptr("10.0.0.10"), - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // IPFamilies: []*armcontainerservice.IPFamily{ + // to.Ptr(armcontainerservice.IPFamilyIPv4)}, + // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ + // AllocatedOutboundPorts: to.Ptr[int32](2000), + // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ + // { + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // }, + // { + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // }}, + // IdleTimeoutInMinutes: to.Ptr[int32](10), + // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ + // Count: to.Ptr[int32](2), // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - // PodCidr: to.Ptr("10.244.0.0/16"), - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } + // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), + // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), + // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), + // PodCidr: to.Ptr("10.244.0.0/16"), + // PodCidrs: []*string{ + // to.Ptr("10.244.0.0/16")}, + // ServiceCidr: to.Ptr("10.0.0.0/16"), + // ServiceCidrs: []*string{ + // to.Ptr("10.0.0.0/16")}, + // }, + // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), + // ProvisioningState: to.Ptr("Succeeded"), + // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ + // ClientID: to.Ptr("clientid"), + // }, + // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + // AdminUsername: to.Ptr("azureuser"), + // }, + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_CustomCATrustCertificates.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCustomCaTrustCertificatesPopulated() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_CustomCATrustCertificates.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCustomCaTrustCertificates() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -1892,7 +1264,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCu ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -1973,7 +1345,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCu // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -2032,7 +1404,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCu // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_DedicatedHostGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_DedicatedHostGroup.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDedicatedHostGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2065,7 +1437,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDe ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -2127,7 +1499,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDe // { // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), // EnableNodePublicIP: to.Ptr(true), // HostGroupID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"), // MaxPods: to.Ptr[int32](110), @@ -2142,7 +1513,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDe // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -2165,10 +1536,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDe // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -2197,7 +1568,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDe // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_EnableEncryptionAtHost.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_EnableEncryptionAtHost.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithEncryptionAtHostEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2231,7 +1602,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithEn ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -2309,7 +1680,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithEn // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -2332,10 +1704,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithEn // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -2364,7 +1736,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithEn // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_EnabledFIPS.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_EnabledFIPS.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithFipsEnabledOs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2398,7 +1770,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithFi ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -2476,7 +1848,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithFi // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -2499,10 +1872,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithFi // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -2531,7 +1904,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithFi // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_GPUMIG.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_GPUMIG.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithGpumig() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2565,7 +1938,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithGp ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), HTTPProxyConfig: &armcontainerservice.ManagedClusterHTTPProxyConfig{ @@ -2651,7 +2024,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithGp // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -2682,10 +2056,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithGp // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -2714,7 +2088,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithGp // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_HTTPProxy.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_HTTPProxy.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithHttpProxyConfigured() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2747,7 +2121,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithHt ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), HTTPProxyConfig: &armcontainerservice.ManagedClusterHTTPProxyConfig{ @@ -2832,7 +2206,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithHt // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -2863,10 +2238,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithHt // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -2886,195 +2261,17 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithHt // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), // ProvisioningState: to.Ptr("Succeeded"), // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_Premium.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithLongTermSupport() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableEncryptionAtHost: to.Ptr(true), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - APIServerAccessProfile: &armcontainerservice.ManagedClusterAPIServerAccessProfile{ - DisableRunCommand: to.Ptr(true), - }, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DNSPrefix: to.Ptr("dnsprefix1"), - EnableRBAC: to.Ptr(true), - KubernetesVersion: to.Ptr(""), - LinuxProfile: &armcontainerservice.LinuxProfile{ - AdminUsername: to.Ptr("azureuser"), - SSH: &armcontainerservice.SSHConfiguration{ - PublicKeys: []*armcontainerservice.SSHPublicKey{ - { - KeyData: to.Ptr("keydata"), - }}, - }, - }, - NetworkProfile: &armcontainerservice.NetworkProfile{ - LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - Count: to.Ptr[int32](2), - }, - }, - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - }, - ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - ClientID: to.Ptr("clientid"), - Secret: to.Ptr("secret"), - }, - SupportPlan: to.Ptr(armcontainerservice.KubernetesSupportPlanAKSLongTermSupport), - WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - AdminPassword: to.Ptr("replacePassword1234$"), - AdminUsername: to.Ptr("azureuser"), - }, - }, - SKU: &armcontainerservice.ManagedClusterSKU{ - Name: to.Ptr(armcontainerservice.ManagedClusterSKUNameBase), - Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierPremium), - }, - }, &armcontainerservice.ManagedClustersClientBeginCreateOrUpdateOptions{IfMatch: nil, - IfNoneMatch: 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.ManagedCluster = armcontainerservice.ManagedCluster{ - // Name: to.Ptr("clustername1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableEncryptionAtHost: to.Ptr(true), - // EnableNodePublicIP: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // APIServerAccessProfile: &armcontainerservice.ManagedClusterAPIServerAccessProfile{ - // DisableRunCommand: to.Ptr(true), - // }, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableRBAC: to.Ptr(true), - // Fqdn: to.Ptr("dnsprefix1-ee788a1f.hcp.location1.azmk8s.io"), - // KubernetesVersion: to.Ptr("1.9.6"), - // LinuxProfile: &armcontainerservice.LinuxProfile{ - // AdminUsername: to.Ptr("azureuser"), - // SSH: &armcontainerservice.SSHConfiguration{ - // PublicKeys: []*armcontainerservice.SSHPublicKey{ - // { - // KeyData: to.Ptr("keydata"), - // }}, - // }, - // }, - // MaxAgentPools: to.Ptr[int32](1), - // NetworkProfile: &armcontainerservice.NetworkProfile{ - // DNSServiceIP: to.Ptr("10.0.0.10"), - // IPFamilies: []*armcontainerservice.IPFamily{ - // to.Ptr(armcontainerservice.IPFamilyIPv4)}, - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), - // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - // PodCidr: to.Ptr("10.244.0.0/16"), - // PodCidrs: []*string{ - // to.Ptr("10.244.0.0/16")}, - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // ServiceCidrs: []*string{ - // to.Ptr("10.0.0.0/16")}, - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // PrivateFQDN: to.Ptr("dnsprefix1-aae7e0f0.5cef6058-b6b5-414d-8cb1-4bd14eb0b15c.privatelink.location1.azmk8s.io"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // SupportPlan: to.Ptr(armcontainerservice.KubernetesSupportPlanAKSLongTermSupport), - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), + // ClientID: to.Ptr("clientid"), + // }, + // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + // AdminUsername: to.Ptr("azureuser"), + // }, // }, - // }, - // SKU: &armcontainerservice.ManagedClusterSKU{ - // Name: to.Ptr(armcontainerservice.ManagedClusterSKUNameBase), - // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierPremium), - // }, - // } + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_NodeAutoProvisioning.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNodeAutoProvisioning() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_Premium.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithLongTermSupport() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -3094,14 +2291,22 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), + Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), + Count: to.Ptr[int32](3), + EnableEncryptionAtHost: to.Ptr(true), + EnableNodePublicIP: to.Ptr(true), + Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), + Name: to.Ptr("nodepool1"), }}, + APIServerAccessProfile: &armcontainerservice.ManagedClusterAPIServerAccessProfile{ + DisableRunCommand: to.Ptr(true), + }, + AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ + ScaleDownDelayAfterAdd: to.Ptr("15m"), + ScanInterval: to.Ptr("20s"), + }, DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -3120,20 +2325,22 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo Count: to.Ptr[int32](2), }, }, - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - NetworkDataplane: to.Ptr(armcontainerservice.NetworkDataplaneCilium), - NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginAzure), - NetworkPluginMode: to.Ptr(armcontainerservice.NetworkPluginModeOverlay), - OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), + LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), + OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), }, ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ ClientID: to.Ptr("clientid"), Secret: to.Ptr("secret"), }, + SupportPlan: to.Ptr(armcontainerservice.KubernetesSupportPlanAKSLongTermSupport), + WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + AdminPassword: to.Ptr("replacePassword1234$"), + AdminUsername: to.Ptr("azureuser"), + }, }, SKU: &armcontainerservice.ManagedClusterSKU{ - Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), + Name: to.Ptr(armcontainerservice.ManagedClusterSKUNameBase), + Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierPremium), }, }, &armcontainerservice.ManagedClustersClientBeginCreateOrUpdateOptions{IfMatch: nil, IfNoneMatch: nil, @@ -3163,6 +2370,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), // Count: to.Ptr[int32](3), // CurrentOrchestratorVersion: to.Ptr("1.9.6"), + // EnableEncryptionAtHost: to.Ptr(true), // EnableNodePublicIP: to.Ptr(true), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), @@ -3173,9 +2381,16 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo // VMSize: to.Ptr("Standard_DS2_v2"), // Name: to.Ptr("nodepool1"), // }}, + // APIServerAccessProfile: &armcontainerservice.ManagedClusterAPIServerAccessProfile{ + // DisableRunCommand: to.Ptr(true), + // }, + // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ + // ScaleDownDelayAfterAdd: to.Ptr("15m"), + // ScanInterval: to.Ptr("20s"), + // }, // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), - // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), + // Fqdn: to.Ptr("dnsprefix1-ee788a1f.hcp.location1.azmk8s.io"), // KubernetesVersion: to.Ptr("1.9.6"), // LinuxProfile: &armcontainerservice.LinuxProfile{ // AdminUsername: to.Ptr("azureuser"), @@ -3195,20 +2410,18 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ // Count: to.Ptr[int32](2), // }, // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - // NetworkDataplane: to.Ptr(armcontainerservice.NetworkDataplaneCilium), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginAzure), - // NetworkPluginMode: to.Ptr(armcontainerservice.NetworkPluginModeOverlay), + // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), + // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), // PodCidr: to.Ptr("10.244.0.0/16"), // PodCidrs: []*string{ @@ -3218,12 +2431,24 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo // to.Ptr("10.0.0.0/16")}, // }, // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), + // PrivateFQDN: to.Ptr("dnsprefix1-aae7e0f0.5cef6058-b6b5-414d-8cb1-4bd14eb0b15c.privatelink.location1.azmk8s.io"), // ProvisioningState: to.Ptr("Succeeded"), + // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ + // ClientID: to.Ptr("clientid"), + // }, + // SupportPlan: to.Ptr(armcontainerservice.KubernetesSupportPlanAKSLongTermSupport), + // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + // AdminUsername: to.Ptr("azureuser"), + // }, + // }, + // SKU: &armcontainerservice.ManagedClusterSKU{ + // Name: to.Ptr(armcontainerservice.ManagedClusterSKUNameBase), + // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierPremium), // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_NodePublicIPPrefix.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_NodePublicIPPrefix.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNodePublicIpPrefix() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3257,7 +2482,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -3335,7 +2560,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -3358,10 +2584,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -3390,7 +2616,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_OSSKU.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_OSSKU.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithOssku() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3424,7 +2650,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithOs ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), HTTPProxyConfig: &armcontainerservice.ManagedClusterHTTPProxyConfig{ @@ -3510,7 +2736,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithOs // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -3541,10 +2768,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithOs // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -3573,7 +2800,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithOs // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_PPG.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_PPG.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPpg() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3607,7 +2834,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPp ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -3685,7 +2912,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPp // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -3708,10 +2936,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPp // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -3740,7 +2968,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPp // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_PodIdentity.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_PodIdentity.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPodIdentityEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3773,7 +3001,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPo ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -3854,7 +3082,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPo // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -3877,10 +3106,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPo // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -3913,7 +3142,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPo // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_DisableRunCommand.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_DisableRunCommand.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithRunCommandDisabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4030,6 +3259,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithRu // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, + // CurrentKubernetesVersion: to.Ptr("1.9.6"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-ee788a1f.hcp.location1.azmk8s.io"), @@ -4052,10 +3282,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithRu // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -4086,7 +3316,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithRu // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_SecurityProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_SecurityProfile.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithSecurityProfileConfigured() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4137,204 +3367,13 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithSe SecurityProfile: &armcontainerservice.ManagedClusterSecurityProfile{ Defender: &armcontainerservice.ManagedClusterSecurityProfileDefender{ LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/SUB_ID/resourcegroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME"), - SecurityGating: &armcontainerservice.ManagedClusterSecurityProfileDefenderSecurityGating{ - AllowSecretAccess: to.Ptr(true), - Enabled: to.Ptr(true), - Identities: []*armcontainerservice.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem{ - { - AzureContainerRegistry: to.Ptr("registry1"), - Identity: &armcontainerservice.UserAssignedIdentity{ - ClientID: to.Ptr("client1"), - ResourceID: to.Ptr("/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.ManagedIdentity/userAssignedIdentities/IDENTITY_NAME"), - }, - }}, - }, SecurityMonitoring: &armcontainerservice.ManagedClusterSecurityProfileDefenderSecurityMonitoring{ Enabled: to.Ptr(true), }, - }, - }, - }, - SKU: &armcontainerservice.ManagedClusterSKU{ - Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - }, - }, &armcontainerservice.ManagedClustersClientBeginCreateOrUpdateOptions{IfMatch: nil, - IfNoneMatch: 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.ManagedCluster = armcontainerservice.ManagedCluster{ - // Name: to.Ptr("clustername1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableNodePublicIP: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableRBAC: to.Ptr(true), - // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), - // KubernetesVersion: to.Ptr("1.9.6"), - // LinuxProfile: &armcontainerservice.LinuxProfile{ - // AdminUsername: to.Ptr("azureuser"), - // SSH: &armcontainerservice.SSHConfiguration{ - // PublicKeys: []*armcontainerservice.SSHPublicKey{ - // { - // KeyData: to.Ptr("keydata"), - // }}, - // }, - // }, - // MaxAgentPools: to.Ptr[int32](1), - // NetworkProfile: &armcontainerservice.NetworkProfile{ - // DNSServiceIP: to.Ptr("10.0.0.10"), - // IPFamilies: []*armcontainerservice.IPFamily{ - // to.Ptr(armcontainerservice.IPFamilyIPv4)}, - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), - // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - // PodCidr: to.Ptr("10.244.0.0/16"), - // PodCidrs: []*string{ - // to.Ptr("10.244.0.0/16")}, - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // ServiceCidrs: []*string{ - // to.Ptr("10.0.0.0/16")}, - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // SecurityProfile: &armcontainerservice.ManagedClusterSecurityProfile{ - // Defender: &armcontainerservice.ManagedClusterSecurityProfileDefender{ - // LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/SUB_ID/resourcegroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME"), - // SecurityGating: &armcontainerservice.ManagedClusterSecurityProfileDefenderSecurityGating{ - // AllowSecretAccess: to.Ptr(true), - // Enabled: to.Ptr(true), - // Identities: []*armcontainerservice.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem{ - // { - // AzureContainerRegistry: to.Ptr("registry1"), - // Identity: &armcontainerservice.UserAssignedIdentity{ - // ClientID: to.Ptr("client1"), - // ResourceID: to.Ptr("/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.ManagedIdentity/userAssignedIdentities/IDENTITY_NAME"), - // }, - // }}, - // }, - // SecurityMonitoring: &armcontainerservice.ManagedClusterSecurityProfileDefenderSecurityMonitoring{ - // Enabled: to.Ptr(true), - // }, - // }, - // }, - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_EnableUltraSSD.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUltraSsdEnabled() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(true), - EnableUltraSSD: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - DNSPrefix: to.Ptr("dnsprefix1"), - EnableRBAC: to.Ptr(true), - KubernetesVersion: to.Ptr(""), - LinuxProfile: &armcontainerservice.LinuxProfile{ - AdminUsername: to.Ptr("azureuser"), - SSH: &armcontainerservice.SSHConfiguration{ - PublicKeys: []*armcontainerservice.SSHPublicKey{ - { - KeyData: to.Ptr("keydata"), - }}, - }, - }, - NetworkProfile: &armcontainerservice.NetworkProfile{ - LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - Count: to.Ptr[int32](2), - }, - }, - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - }, - ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - ClientID: to.Ptr("clientid"), - Secret: to.Ptr("secret"), - }, - WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - AdminPassword: to.Ptr("replacePassword1234$"), - AdminUsername: to.Ptr("azureuser"), + }, + WorkloadIdentity: &armcontainerservice.ManagedClusterSecurityProfileWorkloadIdentity{ + Enabled: to.Ptr(true), + }, }, }, SKU: &armcontainerservice.ManagedClusterSKU{ @@ -4370,7 +3409,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUl // Count: to.Ptr[int32](3), // CurrentOrchestratorVersion: to.Ptr("1.9.6"), // EnableNodePublicIP: to.Ptr(true), - // EnableUltraSSD: to.Ptr(true), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), @@ -4380,11 +3418,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUl // VMSize: to.Ptr("Standard_DS2_v2"), // Name: to.Ptr("nodepool1"), // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -4407,10 +3442,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUl // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -4429,6 +3464,17 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUl // }, // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), // ProvisioningState: to.Ptr("Succeeded"), + // SecurityProfile: &armcontainerservice.ManagedClusterSecurityProfile{ + // Defender: &armcontainerservice.ManagedClusterSecurityProfileDefender{ + // LogAnalyticsWorkspaceResourceID: to.Ptr("/subscriptions/SUB_ID/resourcegroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME"), + // SecurityMonitoring: &armcontainerservice.ManagedClusterSecurityProfileDefenderSecurityMonitoring{ + // Enabled: to.Ptr(true), + // }, + // }, + // WorkloadIdentity: &armcontainerservice.ManagedClusterSecurityProfileWorkloadIdentity{ + // Enabled: to.Ptr(true), + // }, + // }, // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ // ClientID: to.Ptr("clientid"), // }, @@ -4439,8 +3485,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUl // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_VirtualMachines.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithVirtualMachinesPoolType() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_EnableUltraSSD.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUltraSsdEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -4460,15 +3506,20 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithVi AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachines), - Count: to.Ptr[int32](3), - EnableFIPS: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), + Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), + Count: to.Ptr[int32](3), + EnableNodePublicIP: to.Ptr(true), + EnableUltraSSD: to.Ptr(true), + Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), + Name: to.Ptr("nodepool1"), }}, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ + ScaleDownDelayAfterAdd: to.Ptr("15m"), + ScanInterval: to.Ptr("20s"), + }, + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -4494,6 +3545,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithVi ClientID: to.Ptr("clientid"), Secret: to.Ptr("secret"), }, + WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + AdminPassword: to.Ptr("replacePassword1234$"), + AdminUsername: to.Ptr("azureuser"), + }, }, SKU: &armcontainerservice.ManagedClusterSKU{ Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), @@ -4524,10 +3579,11 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithVi // Properties: &armcontainerservice.ManagedClusterProperties{ // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachines), + // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), // Count: to.Ptr[int32](3), // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableFIPS: to.Ptr(true), + // EnableNodePublicIP: to.Ptr(true), + // EnableUltraSSD: to.Ptr(true), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), @@ -4537,7 +3593,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithVi // VMSize: to.Ptr("Standard_DS2_v2"), // Name: to.Ptr("nodepool1"), // }}, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ + // ScaleDownDelayAfterAdd: to.Ptr("15m"), + // ScanInterval: to.Ptr("20s"), + // }, + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -4560,10 +3621,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithVi // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -4585,11 +3646,14 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithVi // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ // ClientID: to.Ptr("clientid"), // }, + // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + // AdminUsername: to.Ptr("azureuser"), + // }, // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithWebAppRoutingIngressProfileConfigured() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4686,7 +3750,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithWe // VMSize: to.Ptr("Standard_DS2_v2"), // Name: to.Ptr("nodepool1"), // }}, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -4748,7 +3812,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithWe // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_UserAssignedNATGateway.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4781,7 +3845,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUs ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -4853,7 +3917,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUs // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -4888,7 +3953,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUs // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateClusterWithPublicFqdnSpecified() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5008,6 +4073,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, + // CurrentKubernetesVersion: to.Ptr("1.9.6"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-ee788a1f.hcp.location1.azmk8s.io"), @@ -5030,10 +4096,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -5063,7 +4129,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateClusterWithFqdnSubdomainSpecified() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5182,6 +4248,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, + // CurrentKubernetesVersion: to.Ptr("1.9.6"), // EnableRBAC: to.Ptr(true), // FqdnSubdomain: to.Ptr("domain1"), // KubernetesVersion: to.Ptr("1.9.6"), @@ -5203,10 +4270,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -5236,7 +4303,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClusterWithEnableAzureRbac() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5277,7 +4344,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClus ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -5363,7 +4430,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClus // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -5386,10 +4454,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClus // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -5418,7 +4486,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClus // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_Update.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5438,7 +4506,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster Identity: &armcontainerservice.ManagedClusterIdentity{ Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, Properties: &armcontainerservice.ManagedClusterProperties{ @@ -5467,7 +4535,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster ScanInterval: to.Ptr("20s"), SkipNodesWithSystemPods: to.Ptr("false"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -5495,7 +4563,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster }, UpgradeSettings: &armcontainerservice.ClusterUpgradeSettings{ OverrideSettings: &armcontainerservice.UpgradeOverrideSettings{ - ForceUpgrade: to.Ptr(true), + ForceUpgrade: to.Ptr(false), Until: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-01T13:00:00.000Z"); return t }()), }, }, @@ -5533,7 +4601,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // Identity: &armcontainerservice.ManagedClusterIdentity{ // Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ // ClientID: to.Ptr("clientId1"), // PrincipalID: to.Ptr("principalId1"), // }, @@ -5569,7 +4637,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // ScanInterval: to.Ptr("20s"), // SkipNodesWithSystemPods: to.Ptr("false"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -5592,10 +4661,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -5630,7 +4699,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_AzureServiceMesh.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_AzureServiceMesh.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithAzureServiceMesh() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5671,7 +4740,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -5707,8 +4776,9 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster Components: &armcontainerservice.IstioComponents{ EgressGateways: []*armcontainerservice.IstioEgressGateway{ { - Name: to.Ptr("istioegress1"), - Enabled: to.Ptr(true), + Name: to.Ptr("test-istio-egress"), + Enabled: to.Ptr(true), + GatewayConfigurationName: to.Ptr("test-gateway-configuration"), }}, IngressGateways: []*armcontainerservice.IstioIngressGateway{ { @@ -5783,275 +4853,86 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), // KubernetesVersion: to.Ptr("1.9.6"), // LinuxProfile: &armcontainerservice.LinuxProfile{ - // AdminUsername: to.Ptr("azureuser"), - // SSH: &armcontainerservice.SSHConfiguration{ - // PublicKeys: []*armcontainerservice.SSHPublicKey{ - // { - // KeyData: to.Ptr("keydata"), - // }}, - // }, - // }, - // MaxAgentPools: to.Ptr[int32](1), - // NetworkProfile: &armcontainerservice.NetworkProfile{ - // DNSServiceIP: to.Ptr("10.0.0.10"), - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), - // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - // PodCidr: to.Ptr("10.244.0.0/16"), - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServiceMeshProfile: &armcontainerservice.ServiceMeshProfile{ - // Istio: &armcontainerservice.IstioServiceMesh{ - // CertificateAuthority: &armcontainerservice.IstioCertificateAuthority{ - // Plugin: &armcontainerservice.IstioPluginCertificateAuthority{ - // CertChainObjectName: to.Ptr("cert-chain"), - // CertObjectName: to.Ptr("ca-cert"), - // KeyObjectName: to.Ptr("ca-key"), - // KeyVaultID: to.Ptr("/subscriptions/854c9ddb-fe9e-4aea-8d58-99ed88282881/resourceGroups/ddama-test/providers/Microsoft.KeyVault/vaults/my-akv"), - // RootCertObjectName: to.Ptr("root-cert"), - // }, - // }, - // Components: &armcontainerservice.IstioComponents{ - // EgressGateways: []*armcontainerservice.IstioEgressGateway{ - // { - // Name: to.Ptr("istioegress1"), - // Enabled: to.Ptr(true), - // }}, - // IngressGateways: []*armcontainerservice.IstioIngressGateway{ - // { - // Enabled: to.Ptr(true), - // Mode: to.Ptr(armcontainerservice.IstioIngressGatewayModeInternal), - // }}, - // }, - // Revisions: []*string{ - // to.Ptr("asm-1-17")}, - // }, - // Mode: to.Ptr(armcontainerservice.ServiceMeshModeIstio), - // }, - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_UpdateWithAHUB.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithEnableAhub() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Identity: &armcontainerservice.ManagedClusterIdentity{ - Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, - }, - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - AvailabilityZones: []*string{ - to.Ptr("1"), - to.Ptr("2"), - to.Ptr("3")}, - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS1_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - DNSPrefix: to.Ptr("dnsprefix1"), - EnableRBAC: to.Ptr(true), - KubernetesVersion: to.Ptr(""), - LinuxProfile: &armcontainerservice.LinuxProfile{ - AdminUsername: to.Ptr("azureuser"), - SSH: &armcontainerservice.SSHConfiguration{ - PublicKeys: []*armcontainerservice.SSHPublicKey{ - { - KeyData: to.Ptr("keydata"), - }}, - }, - }, - NetworkProfile: &armcontainerservice.NetworkProfile{ - LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - Count: to.Ptr[int32](2), - }, - }, - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - }, - ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - ClientID: to.Ptr("clientid"), - Secret: to.Ptr("secret"), - }, - WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - AdminPassword: to.Ptr("replacePassword1234$"), - AdminUsername: to.Ptr("azureuser"), - LicenseType: to.Ptr(armcontainerservice.LicenseTypeWindowsServer), - }, - }, - SKU: &armcontainerservice.ManagedClusterSKU{ - Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - }, - }, &armcontainerservice.ManagedClustersClientBeginCreateOrUpdateOptions{IfMatch: nil, - IfNoneMatch: 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.ManagedCluster = armcontainerservice.ManagedCluster{ - // Name: to.Ptr("clustername1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Identity: &armcontainerservice.ManagedClusterIdentity{ - // Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // }, - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // AvailabilityZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableNodePublicIP: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS1_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), + // AdminUsername: to.Ptr("azureuser"), + // SSH: &armcontainerservice.SSHConfiguration{ + // PublicKeys: []*armcontainerservice.SSHPublicKey{ + // { + // KeyData: to.Ptr("keydata"), + // }}, // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableRBAC: to.Ptr(true), - // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), - // KubernetesVersion: to.Ptr("1.9.6"), - // LinuxProfile: &armcontainerservice.LinuxProfile{ - // AdminUsername: to.Ptr("azureuser"), - // SSH: &armcontainerservice.SSHConfiguration{ - // PublicKeys: []*armcontainerservice.SSHPublicKey{ + // }, + // MaxAgentPools: to.Ptr[int32](1), + // NetworkProfile: &armcontainerservice.NetworkProfile{ + // DNSServiceIP: to.Ptr("10.0.0.10"), + // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ + // AllocatedOutboundPorts: to.Ptr[int32](2000), + // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ + // { + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // }, + // { + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // }}, + // IdleTimeoutInMinutes: to.Ptr[int32](10), + // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ + // Count: to.Ptr[int32](2), + // }, + // }, + // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), + // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), + // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), + // PodCidr: to.Ptr("10.244.0.0/16"), + // ServiceCidr: to.Ptr("10.0.0.0/16"), + // }, + // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), + // ProvisioningState: to.Ptr("Succeeded"), + // ServiceMeshProfile: &armcontainerservice.ServiceMeshProfile{ + // Istio: &armcontainerservice.IstioServiceMesh{ + // CertificateAuthority: &armcontainerservice.IstioCertificateAuthority{ + // Plugin: &armcontainerservice.IstioPluginCertificateAuthority{ + // CertChainObjectName: to.Ptr("cert-chain"), + // CertObjectName: to.Ptr("ca-cert"), + // KeyObjectName: to.Ptr("ca-key"), + // KeyVaultID: to.Ptr("/subscriptions/854c9ddb-fe9e-4aea-8d58-99ed88282881/resourceGroups/ddama-test/providers/Microsoft.KeyVault/vaults/my-akv"), + // RootCertObjectName: to.Ptr("root-cert"), + // }, + // }, + // Components: &armcontainerservice.IstioComponents{ + // EgressGateways: []*armcontainerservice.IstioEgressGateway{ // { - // KeyData: to.Ptr("keydata"), + // Name: to.Ptr("test-istio-egress"), + // Enabled: to.Ptr(true), + // GatewayConfigurationName: to.Ptr("test-gateway-configuration"), + // }}, + // IngressGateways: []*armcontainerservice.IstioIngressGateway{ + // { + // Enabled: to.Ptr(true), + // Mode: to.Ptr(armcontainerservice.IstioIngressGatewayModeInternal), // }}, // }, + // Revisions: []*string{ + // to.Ptr("asm-1-17")}, + // }, + // Mode: to.Ptr(armcontainerservice.ServiceMeshModeIstio), // }, - // MaxAgentPools: to.Ptr[int32](1), - // NetworkProfile: &armcontainerservice.NetworkProfile{ - // DNSServiceIP: to.Ptr("10.0.0.10"), - // IPFamilies: []*armcontainerservice.IPFamily{ - // to.Ptr(armcontainerservice.IPFamilyIPv4)}, - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), - // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - // PodCidr: to.Ptr("10.244.0.0/16"), - // PodCidrs: []*string{ - // to.Ptr("10.244.0.0/16")}, - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // ServiceCidrs: []*string{ - // to.Ptr("10.0.0.0/16")}, - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // LicenseType: to.Ptr(armcontainerservice.LicenseTypeWindowsServer), - // }, - // }, - // } + // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ + // ClientID: to.Ptr("clientid"), + // }, + // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + // AdminUsername: to.Ptr("azureuser"), + // }, + // }, + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithEnableNamespaceResources() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_UpdateWithAHUB.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithEnableAhub() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -6067,6 +4948,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster "archv2": to.Ptr(""), "tier": to.Ptr("production"), }, + Identity: &armcontainerservice.ManagedClusterIdentity{ + Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), + UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, + }, + }, Properties: &armcontainerservice.ManagedClusterProperties{ AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ @@ -6087,11 +4974,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - DNSPrefix: to.Ptr("dnsprefix1"), - EnableNamespaceResources: to.Ptr(true), - EnableRBAC: to.Ptr(true), - KubernetesVersion: to.Ptr(""), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DNSPrefix: to.Ptr("dnsprefix1"), + EnableRBAC: to.Ptr(true), + KubernetesVersion: to.Ptr(""), LinuxProfile: &armcontainerservice.LinuxProfile{ AdminUsername: to.Ptr("azureuser"), SSH: &armcontainerservice.SSHConfiguration{ @@ -6117,6 +5003,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ AdminPassword: to.Ptr("replacePassword1234$"), AdminUsername: to.Ptr("azureuser"), + LicenseType: to.Ptr(armcontainerservice.LicenseTypeWindowsServer), }, }, SKU: &armcontainerservice.ManagedClusterSKU{ @@ -6145,6 +5032,15 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // "archv2": to.Ptr(""), // "tier": to.Ptr("production"), // }, + // Identity: &armcontainerservice.ManagedClusterIdentity{ + // Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), + // UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ + // ClientID: to.Ptr("clientId1"), + // PrincipalID: to.Ptr("principalId1"), + // }, + // }, + // }, // Properties: &armcontainerservice.ManagedClusterProperties{ // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ // { @@ -6169,9 +5065,9 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableNamespaceResources: to.Ptr(true), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), // KubernetesVersion: to.Ptr("1.9.6"), @@ -6193,10 +5089,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -6220,12 +5116,13 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // }, // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ // AdminUsername: to.Ptr("azureuser"), + // LicenseType: to.Ptr(armcontainerservice.LicenseTypeWindowsServer), // }, // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_UpdateWindowsGmsa.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithWindowsGMsaEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6245,7 +5142,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster Identity: &armcontainerservice.ManagedClusterIdentity{ Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, Properties: &armcontainerservice.ManagedClusterProperties{ @@ -6268,7 +5165,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster ScaleDownDelayAfterAdd: to.Ptr("15m"), ScanInterval: to.Ptr("20s"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -6331,7 +5228,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // Identity: &armcontainerservice.ManagedClusterIdentity{ // Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ // ClientID: to.Ptr("clientId1"), // PrincipalID: to.Ptr("principalId1"), // }, @@ -6361,7 +5258,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.9.6"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -6384,10 +5282,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -6419,7 +5317,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersCreate_DualStackNetworking.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersCreate_DualStackNetworking.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithDualStackNetworking() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6439,7 +5337,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster Identity: &armcontainerservice.ManagedClusterIdentity{ Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, }, }, Properties: &armcontainerservice.ManagedClusterProperties{ @@ -6468,7 +5366,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster ScanInterval: to.Ptr("20s"), SkipNodesWithSystemPods: to.Ptr("false"), }, - DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), @@ -6531,7 +5429,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // Identity: &armcontainerservice.ManagedClusterIdentity{ // Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), // UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - // "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ + // "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ // ClientID: to.Ptr("clientId1"), // PrincipalID: to.Ptr("principalId1"), // }, @@ -6546,12 +5444,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), + // CurrentOrchestratorVersion: to.Ptr("1.22.1"), // EnableNodePublicIP: to.Ptr(true), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), + // OrchestratorVersion: to.Ptr("1.22.1"), // OSType: to.Ptr(armcontainerservice.OSTypeLinux), // ProvisioningState: to.Ptr("Succeeded"), // ScaleDownMode: to.Ptr(armcontainerservice.ScaleDownModeDeallocate), @@ -6567,11 +5465,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // ScanInterval: to.Ptr("20s"), // SkipNodesWithSystemPods: to.Ptr("false"), // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // CurrentKubernetesVersion: to.Ptr("1.22.1"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), - // KubernetesVersion: to.Ptr("1.9.6"), + // KubernetesVersion: to.Ptr("1.22.1"), // LinuxProfile: &armcontainerservice.LinuxProfile{ // AdminUsername: to.Ptr("azureuser"), // SSH: &armcontainerservice.SSHConfiguration{ @@ -6591,13 +5490,13 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }, // { - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip3-ipv6"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip3-ipv6"), // }}, // IdleTimeoutInMinutes: to.Ptr[int32](10), // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ @@ -6629,7 +5528,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersUpdateTags.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersUpdateTags.json func ExampleManagedClustersClient_BeginUpdateTags() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6677,7 +5576,7 @@ func ExampleManagedClustersClient_BeginUpdateTags() { // VMSize: to.Ptr("Standard_DS1_v2"), // Name: to.Ptr("nodepool1"), // }}, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnableRBAC: to.Ptr(false), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -6706,7 +5605,7 @@ func ExampleManagedClustersClient_BeginUpdateTags() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersDelete.json func ExampleManagedClustersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6717,9 +5616,7 @@ func ExampleManagedClustersClient_BeginDelete() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewManagedClustersClient().BeginDelete(ctx, "rg1", "clustername1", &armcontainerservice.ManagedClustersClientBeginDeleteOptions{IfMatch: nil, - IgnorePodDisruptionBudget: nil, - }) + poller, err := clientFactory.NewManagedClustersClient().BeginDelete(ctx, "rg1", "clustername1", &armcontainerservice.ManagedClustersClientBeginDeleteOptions{IfMatch: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -6729,7 +5626,7 @@ func ExampleManagedClustersClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersResetServicePrincipalProfile.json func ExampleManagedClustersClient_BeginResetServicePrincipalProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6753,7 +5650,7 @@ func ExampleManagedClustersClient_BeginResetServicePrincipalProfile() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersResetAADProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersResetAADProfile.json func ExampleManagedClustersClient_BeginResetAADProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6779,8 +5676,8 @@ func ExampleManagedClustersClient_BeginResetAADProfile() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersAbortOperation.json -func ExampleManagedClustersClient_BeginAbortLatestOperation() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersRotateClusterCertificates.json +func ExampleManagedClustersClient_BeginRotateClusterCertificates() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -6790,7 +5687,7 @@ func ExampleManagedClustersClient_BeginAbortLatestOperation() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewManagedClustersClient().BeginAbortLatestOperation(ctx, "rg1", "clustername1", nil) + poller, err := clientFactory.NewManagedClustersClient().BeginRotateClusterCertificates(ctx, "rg1", "clustername1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -6800,8 +5697,8 @@ func ExampleManagedClustersClient_BeginAbortLatestOperation() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersRotateClusterCertificates.json -func ExampleManagedClustersClient_BeginRotateClusterCertificates() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersAbortOperation.json +func ExampleManagedClustersClient_BeginAbortLatestOperation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -6811,7 +5708,7 @@ func ExampleManagedClustersClient_BeginRotateClusterCertificates() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewManagedClustersClient().BeginRotateClusterCertificates(ctx, "rg1", "clustername1", nil) + poller, err := clientFactory.NewManagedClustersClient().BeginAbortLatestOperation(ctx, "rg1", "clustername1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -6821,7 +5718,7 @@ func ExampleManagedClustersClient_BeginRotateClusterCertificates() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json func ExampleManagedClustersClient_BeginRotateServiceAccountSigningKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6842,7 +5739,7 @@ func ExampleManagedClustersClient_BeginRotateServiceAccountSigningKeys() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersStop.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersStop.json func ExampleManagedClustersClient_BeginStop() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6863,7 +5760,7 @@ func ExampleManagedClustersClient_BeginStop() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersStart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersStart.json func ExampleManagedClustersClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6884,7 +5781,7 @@ func ExampleManagedClustersClient_BeginStart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/RunCommandRequest.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/RunCommandRequest.json func ExampleManagedClustersClient_BeginRunCommand() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6922,7 +5819,7 @@ func ExampleManagedClustersClient_BeginRunCommand() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/RunCommandResultFailed.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/RunCommandResultFailed.json func ExampleManagedClustersClient_GetCommandResult_commandFailedResult() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6949,7 +5846,7 @@ func ExampleManagedClustersClient_GetCommandResult_commandFailedResult() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/RunCommandResultSucceed.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/RunCommandResultSucceed.json func ExampleManagedClustersClient_GetCommandResult_commandSucceedResult() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6979,7 +5876,7 @@ func ExampleManagedClustersClient_GetCommandResult_commandSucceedResult() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/OutboundNetworkDependenciesEndpointsList.json func ExampleManagedClustersClient_NewListOutboundNetworkDependenciesEndpointsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -7204,139 +6101,7 @@ func ExampleManagedClustersClient_NewListOutboundNetworkDependenciesEndpointsPag } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/GetGuardrailsVersions.json -func ExampleManagedClustersClient_GetGuardrailsVersions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedClustersClient().GetGuardrailsVersions(ctx, "location1", "v1.0.0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.GuardrailsAvailableVersion = armcontainerservice.GuardrailsAvailableVersion{ - // Name: to.Ptr("v1.0.0"), - // Type: to.Ptr("Microsoft.ContainerService/locations/guardrailsVersions"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/location1/guardrailsVersions/v1.0.0"), - // Properties: &armcontainerservice.GuardrailsAvailableVersionsProperties{ - // IsDefaultVersion: to.Ptr(true), - // Support: to.Ptr(armcontainerservice.GuardrailsSupportPreview), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ListGuardrailsVersions.json -func ExampleManagedClustersClient_NewListGuardrailsVersionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewManagedClustersClient().NewListGuardrailsVersionsPager("location1", 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.GuardrailsAvailableVersionsList = armcontainerservice.GuardrailsAvailableVersionsList{ - // Value: []*armcontainerservice.GuardrailsAvailableVersion{ - // { - // Name: to.Ptr("v1.0.0"), - // Type: to.Ptr("Microsoft.ContainerService/locations/guardrailsVersions"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/location1/guardrailsVersions/v1.0.0"), - // Properties: &armcontainerservice.GuardrailsAvailableVersionsProperties{ - // IsDefaultVersion: to.Ptr(true), - // Support: to.Ptr(armcontainerservice.GuardrailsSupportPreview), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/GetSafeguardsVersions.json -func ExampleManagedClustersClient_GetSafeguardsVersions() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedClustersClient().GetSafeguardsVersions(ctx, "location1", "v1.0.0", nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.SafeguardsAvailableVersion = armcontainerservice.SafeguardsAvailableVersion{ - // Name: to.Ptr("v1.0.0"), - // Type: to.Ptr("Microsoft.ContainerService/locations/safeguardsVersions"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/location1/safeguardsVersions/v1.0.0"), - // Properties: &armcontainerservice.SafeguardsAvailableVersionsProperties{ - // IsDefaultVersion: to.Ptr(true), - // Support: to.Ptr(armcontainerservice.SafeguardsSupportPreview), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ListSafeguardsVersions.json -func ExampleManagedClustersClient_NewListSafeguardsVersionsPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewManagedClustersClient().NewListSafeguardsVersionsPager("location1", 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.SafeguardsAvailableVersionsList = armcontainerservice.SafeguardsAvailableVersionsList{ - // Value: []*armcontainerservice.SafeguardsAvailableVersion{ - // { - // Name: to.Ptr("v1.0.0"), - // Type: to.Ptr("Microsoft.ContainerService/locations/safeguardsVersions"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/location1/safeguardsVersions/v1.0.0"), - // Properties: &armcontainerservice.SafeguardsAvailableVersionsProperties{ - // IsDefaultVersion: to.Ptr(true), - // Support: to.Ptr(armcontainerservice.SafeguardsSupportPreview), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersList_MeshRevisionProfiles.json func ExampleManagedClustersClient_NewListMeshRevisionProfilesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -7378,7 +6143,7 @@ func ExampleManagedClustersClient_NewListMeshRevisionProfilesPager() { // }}, // Revision: to.Ptr("asm-1-17"), // Upgrades: []*string{ - // to.Ptr("1-18")}, + // to.Ptr("asm-1-18")}, // }, // { // CompatibleWith: []*armcontainerservice.CompatibleVersions{ @@ -7400,7 +6165,7 @@ func ExampleManagedClustersClient_NewListMeshRevisionProfilesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersGet_MeshRevisionProfile.json func ExampleManagedClustersClient_GetMeshRevisionProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -7436,7 +6201,7 @@ func ExampleManagedClustersClient_GetMeshRevisionProfile() { // }}, // Revision: to.Ptr("asm-1-17"), // Upgrades: []*string{ - // to.Ptr("1-18")}, + // to.Ptr("asm-1-18")}, // }, // { // CompatibleWith: []*armcontainerservice.CompatibleVersions{ @@ -7456,7 +6221,7 @@ func ExampleManagedClustersClient_GetMeshRevisionProfile() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersList_MeshUpgradeProfiles.json func ExampleManagedClustersClient_NewListMeshUpgradeProfilesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -7496,14 +6261,14 @@ func ExampleManagedClustersClient_NewListMeshUpgradeProfilesPager() { // }}, // Revision: to.Ptr("asm-1-17"), // Upgrades: []*string{ - // to.Ptr("1-18")}, + // to.Ptr("asm-1-18")}, // }, // }}, // } } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersGet_MeshUpgradeProfile.json func ExampleManagedClustersClient_GetMeshUpgradeProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -7537,31 +6302,7 @@ func ExampleManagedClustersClient_GetMeshUpgradeProfile() { // }}, // Revision: to.Ptr("asm-1-17"), // Upgrades: []*string{ - // to.Ptr("1-18")}, + // to.Ptr("asm-1-18")}, // }, // } } - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/LoadBalancers_Rebalance.json -func ExampleManagedClustersClient_BeginRebalanceLoadBalancers() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginRebalanceLoadBalancers(ctx, "rg1", "clustername1", armcontainerservice.RebalanceLoadBalancersRequestBody{ - LoadBalancerNames: []*string{ - to.Ptr("kubernetes")}, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client.go deleted file mode 100644 index c7dd807c59c0..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client.go +++ /dev/null @@ -1,414 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armcontainerservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// ManagedClusterSnapshotsClient contains the methods for the ManagedClusterSnapshots group. -// Don't use this type directly, use NewManagedClusterSnapshotsClient() instead. -type ManagedClusterSnapshotsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewManagedClusterSnapshotsClient creates a new instance of ManagedClusterSnapshotsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - Contains optional client configuration. Pass nil to accept the default values. -func NewManagedClusterSnapshotsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedClusterSnapshotsClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &ManagedClusterSnapshotsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// CreateOrUpdate - Creates or updates a managed cluster snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - parameters - The managed cluster snapshot to create or update. -// - options - ManagedClusterSnapshotsClientCreateOrUpdateOptions contains the optional parameters for the ManagedClusterSnapshotsClient.CreateOrUpdate -// method. -func (client *ManagedClusterSnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterSnapshot, options *ManagedClusterSnapshotsClientCreateOrUpdateOptions) (ManagedClusterSnapshotsClientCreateOrUpdateResponse, error) { - var err error - const operationName = "ManagedClusterSnapshotsClient.CreateOrUpdate" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, parameters, options) - if err != nil { - return ManagedClusterSnapshotsClientCreateOrUpdateResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedClusterSnapshotsClientCreateOrUpdateResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { - err = runtime.NewResponseError(httpResp) - return ManagedClusterSnapshotsClientCreateOrUpdateResponse{}, err - } - resp, err := client.createOrUpdateHandleResponse(httpResp) - return resp, err -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *ManagedClusterSnapshotsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterSnapshot, _ *ManagedClusterSnapshotsClientCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - -// createOrUpdateHandleResponse handles the CreateOrUpdate response. -func (client *ManagedClusterSnapshotsClient) createOrUpdateHandleResponse(resp *http.Response) (ManagedClusterSnapshotsClientCreateOrUpdateResponse, error) { - result := ManagedClusterSnapshotsClientCreateOrUpdateResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagedClusterSnapshot); err != nil { - return ManagedClusterSnapshotsClientCreateOrUpdateResponse{}, err - } - return result, nil -} - -// Delete - Deletes a managed cluster snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - options - ManagedClusterSnapshotsClientDeleteOptions contains the optional parameters for the ManagedClusterSnapshotsClient.Delete -// method. -func (client *ManagedClusterSnapshotsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClusterSnapshotsClientDeleteOptions) (ManagedClusterSnapshotsClientDeleteResponse, error) { - var err error - const operationName = "ManagedClusterSnapshotsClient.Delete" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, options) - if err != nil { - return ManagedClusterSnapshotsClientDeleteResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedClusterSnapshotsClientDeleteResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return ManagedClusterSnapshotsClientDeleteResponse{}, err - } - return ManagedClusterSnapshotsClientDeleteResponse{}, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *ManagedClusterSnapshotsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ManagedClusterSnapshotsClientDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets a managed cluster snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - options - ManagedClusterSnapshotsClientGetOptions contains the optional parameters for the ManagedClusterSnapshotsClient.Get -// method. -func (client *ManagedClusterSnapshotsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClusterSnapshotsClientGetOptions) (ManagedClusterSnapshotsClientGetResponse, error) { - var err error - const operationName = "ManagedClusterSnapshotsClient.Get" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, options) - if err != nil { - return ManagedClusterSnapshotsClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedClusterSnapshotsClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return ManagedClusterSnapshotsClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *ManagedClusterSnapshotsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *ManagedClusterSnapshotsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *ManagedClusterSnapshotsClient) getHandleResponse(resp *http.Response) (ManagedClusterSnapshotsClientGetResponse, error) { - result := ManagedClusterSnapshotsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagedClusterSnapshot); err != nil { - return ManagedClusterSnapshotsClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets a list of managed cluster snapshots in the specified subscription. -// -// Generated from API version 2025-09-02-preview -// - options - ManagedClusterSnapshotsClientListOptions contains the optional parameters for the ManagedClusterSnapshotsClient.NewListPager -// method. -func (client *ManagedClusterSnapshotsClient) NewListPager(options *ManagedClusterSnapshotsClientListOptions) *runtime.Pager[ManagedClusterSnapshotsClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[ManagedClusterSnapshotsClientListResponse]{ - More: func(page ManagedClusterSnapshotsClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagedClusterSnapshotsClientListResponse) (ManagedClusterSnapshotsClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedClusterSnapshotsClient.NewListPager") - 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.listCreateRequest(ctx, options) - }, nil) - if err != nil { - return ManagedClusterSnapshotsClientListResponse{}, err - } - return client.listHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listCreateRequest creates the List request. -func (client *ManagedClusterSnapshotsClient) listCreateRequest(ctx context.Context, _ *ManagedClusterSnapshotsClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *ManagedClusterSnapshotsClient) listHandleResponse(resp *http.Response) (ManagedClusterSnapshotsClientListResponse, error) { - result := ManagedClusterSnapshotsClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagedClusterSnapshotListResult); err != nil { - return ManagedClusterSnapshotsClientListResponse{}, err - } - return result, nil -} - -// NewListByResourceGroupPager - Lists managed cluster snapshots in the specified subscription and resource group. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - options - ManagedClusterSnapshotsClientListByResourceGroupOptions contains the optional parameters for the ManagedClusterSnapshotsClient.NewListByResourceGroupPager -// method. -func (client *ManagedClusterSnapshotsClient) NewListByResourceGroupPager(resourceGroupName string, options *ManagedClusterSnapshotsClientListByResourceGroupOptions) *runtime.Pager[ManagedClusterSnapshotsClientListByResourceGroupResponse] { - return runtime.NewPager(runtime.PagingHandler[ManagedClusterSnapshotsClientListByResourceGroupResponse]{ - More: func(page ManagedClusterSnapshotsClientListByResourceGroupResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *ManagedClusterSnapshotsClientListByResourceGroupResponse) (ManagedClusterSnapshotsClientListByResourceGroupResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "ManagedClusterSnapshotsClient.NewListByResourceGroupPager") - 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.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) - }, nil) - if err != nil { - return ManagedClusterSnapshotsClientListByResourceGroupResponse{}, err - } - return client.listByResourceGroupHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listByResourceGroupCreateRequest creates the ListByResourceGroup request. -func (client *ManagedClusterSnapshotsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, _ *ManagedClusterSnapshotsClientListByResourceGroupOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByResourceGroupHandleResponse handles the ListByResourceGroup response. -func (client *ManagedClusterSnapshotsClient) listByResourceGroupHandleResponse(resp *http.Response) (ManagedClusterSnapshotsClientListByResourceGroupResponse, error) { - result := ManagedClusterSnapshotsClientListByResourceGroupResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagedClusterSnapshotListResult); err != nil { - return ManagedClusterSnapshotsClientListByResourceGroupResponse{}, err - } - return result, nil -} - -// UpdateTags - Updates tags on a managed cluster snapshot. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - parameters - Parameters supplied to the Update managed cluster snapshot Tags operation. -// - options - ManagedClusterSnapshotsClientUpdateTagsOptions contains the optional parameters for the ManagedClusterSnapshotsClient.UpdateTags -// method. -func (client *ManagedClusterSnapshotsClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject, options *ManagedClusterSnapshotsClientUpdateTagsOptions) (ManagedClusterSnapshotsClientUpdateTagsResponse, error) { - var err error - const operationName = "ManagedClusterSnapshotsClient.UpdateTags" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, resourceName, parameters, options) - if err != nil { - return ManagedClusterSnapshotsClientUpdateTagsResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return ManagedClusterSnapshotsClientUpdateTagsResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return ManagedClusterSnapshotsClientUpdateTagsResponse{}, err - } - resp, err := client.updateTagsHandleResponse(httpResp) - return resp, err -} - -// updateTagsCreateRequest creates the UpdateTags request. -func (client *ManagedClusterSnapshotsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject, _ *ManagedClusterSnapshotsClientUpdateTagsOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - 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", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - -// updateTagsHandleResponse handles the UpdateTags response. -func (client *ManagedClusterSnapshotsClient) updateTagsHandleResponse(resp *http.Response) (ManagedClusterSnapshotsClientUpdateTagsResponse, error) { - result := ManagedClusterSnapshotsClientUpdateTagsResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.ManagedClusterSnapshot); err != nil { - return ManagedClusterSnapshotsClientUpdateTagsResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client_example_test.go deleted file mode 100644 index 6e85d9d06d84..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client_example_test.go +++ /dev/null @@ -1,343 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcontainerservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClusterSnapshotsList.json -func ExampleManagedClusterSnapshotsClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewManagedClusterSnapshotsClient().NewListPager(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.ManagedClusterSnapshotListResult = armcontainerservice.ManagedClusterSnapshotListResult{ - // Value: []*armcontainerservice.ManagedClusterSnapshot{ - // { - // Name: to.Ptr("snapshot1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusterSnapshots"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.298Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcontainerservice.CreatedByTypeUser), - // }, - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("val1"), - // "key2": to.Ptr("val2"), - // }, - // Properties: &armcontainerservice.ManagedClusterSnapshotProperties{ - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), - // }, - // ManagedClusterPropertiesReadOnly: &armcontainerservice.ManagedClusterPropertiesForSnapshot{ - // EnableRbac: to.Ptr(true), - // KubernetesVersion: to.Ptr("1.20.5"), - // NetworkProfile: &armcontainerservice.NetworkProfileForSnapshot{ - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - // NetworkMode: to.Ptr(armcontainerservice.NetworkModeBridge), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // NetworkPolicy: to.Ptr(armcontainerservice.NetworkPolicyCalico), - // }, - // SKU: &armcontainerservice.ManagedClusterSKU{ - // Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - // }, - // }, - // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeManagedCluster), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json -func ExampleManagedClusterSnapshotsClient_NewListByResourceGroupPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewManagedClusterSnapshotsClient().NewListByResourceGroupPager("rg1", 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.ManagedClusterSnapshotListResult = armcontainerservice.ManagedClusterSnapshotListResult{ - // Value: []*armcontainerservice.ManagedClusterSnapshot{ - // { - // Name: to.Ptr("snapshot1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusterSnapshots"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.298Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcontainerservice.CreatedByTypeUser), - // }, - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("val1"), - // "key2": to.Ptr("val2"), - // }, - // Properties: &armcontainerservice.ManagedClusterSnapshotProperties{ - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), - // }, - // ManagedClusterPropertiesReadOnly: &armcontainerservice.ManagedClusterPropertiesForSnapshot{ - // EnableRbac: to.Ptr(true), - // KubernetesVersion: to.Ptr("1.20.5"), - // NetworkProfile: &armcontainerservice.NetworkProfileForSnapshot{ - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - // NetworkMode: to.Ptr(armcontainerservice.NetworkModeBridge), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // NetworkPolicy: to.Ptr(armcontainerservice.NetworkPolicyCalico), - // }, - // SKU: &armcontainerservice.ManagedClusterSKU{ - // Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - // }, - // }, - // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeManagedCluster), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClusterSnapshotsGet.json -func ExampleManagedClusterSnapshotsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedClusterSnapshotsClient().Get(ctx, "rg1", "snapshot1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.ManagedClusterSnapshot = armcontainerservice.ManagedClusterSnapshot{ - // Name: to.Ptr("snapshot1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusterSnapshots"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.298Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcontainerservice.CreatedByTypeUser), - // }, - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("val1"), - // "key2": to.Ptr("val2"), - // }, - // Properties: &armcontainerservice.ManagedClusterSnapshotProperties{ - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), - // }, - // ManagedClusterPropertiesReadOnly: &armcontainerservice.ManagedClusterPropertiesForSnapshot{ - // EnableRbac: to.Ptr(true), - // KubernetesVersion: to.Ptr("1.20.5"), - // NetworkProfile: &armcontainerservice.NetworkProfileForSnapshot{ - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - // NetworkMode: to.Ptr(armcontainerservice.NetworkModeBridge), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // NetworkPolicy: to.Ptr(armcontainerservice.NetworkPolicyCalico), - // }, - // SKU: &armcontainerservice.ManagedClusterSKU{ - // Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - // }, - // }, - // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeManagedCluster), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClusterSnapshotsCreate.json -func ExampleManagedClusterSnapshotsClient_CreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedClusterSnapshotsClient().CreateOrUpdate(ctx, "rg1", "snapshot1", armcontainerservice.ManagedClusterSnapshot{ - Location: to.Ptr("westus"), - Tags: map[string]*string{ - "key1": to.Ptr("val1"), - "key2": to.Ptr("val2"), - }, - Properties: &armcontainerservice.ManagedClusterSnapshotProperties{ - CreationData: &armcontainerservice.CreationData{ - SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), - }, - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.ManagedClusterSnapshot = armcontainerservice.ManagedClusterSnapshot{ - // Name: to.Ptr("snapshot1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusterSnapshots"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.298Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcontainerservice.CreatedByTypeUser), - // }, - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("val1"), - // "key2": to.Ptr("val2"), - // }, - // Properties: &armcontainerservice.ManagedClusterSnapshotProperties{ - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), - // }, - // ManagedClusterPropertiesReadOnly: &armcontainerservice.ManagedClusterPropertiesForSnapshot{ - // EnableRbac: to.Ptr(true), - // KubernetesVersion: to.Ptr("1.20.5"), - // NetworkProfile: &armcontainerservice.NetworkProfileForSnapshot{ - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - // NetworkMode: to.Ptr(armcontainerservice.NetworkModeBridge), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // NetworkPolicy: to.Ptr(armcontainerservice.NetworkPolicyCalico), - // }, - // SKU: &armcontainerservice.ManagedClusterSKU{ - // Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - // }, - // }, - // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeManagedCluster), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json -func ExampleManagedClusterSnapshotsClient_UpdateTags() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewManagedClusterSnapshotsClient().UpdateTags(ctx, "rg1", "snapshot1", armcontainerservice.TagsObject{ - Tags: map[string]*string{ - "key2": to.Ptr("new-val2"), - "key3": to.Ptr("val3"), - }, - }, nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.ManagedClusterSnapshot = armcontainerservice.ManagedClusterSnapshot{ - // Name: to.Ptr("snapshot1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusterSnapshots"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.298Z"); return t}()), - // CreatedBy: to.Ptr("user1"), - // CreatedByType: to.Ptr(armcontainerservice.CreatedByTypeUser), - // }, - // Location: to.Ptr("westus"), - // Tags: map[string]*string{ - // "key1": to.Ptr("val1"), - // "key2": to.Ptr("val2"), - // }, - // Properties: &armcontainerservice.ManagedClusterSnapshotProperties{ - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), - // }, - // ManagedClusterPropertiesReadOnly: &armcontainerservice.ManagedClusterPropertiesForSnapshot{ - // EnableRbac: to.Ptr(true), - // KubernetesVersion: to.Ptr("1.20.5"), - // NetworkProfile: &armcontainerservice.NetworkProfileForSnapshot{ - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - // NetworkMode: to.Ptr(armcontainerservice.NetworkModeBridge), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // NetworkPolicy: to.Ptr(armcontainerservice.NetworkPolicyCalico), - // }, - // SKU: &armcontainerservice.ManagedClusterSKU{ - // Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - // }, - // }, - // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeManagedCluster), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedClusterSnapshotsDelete.json -func ExampleManagedClusterSnapshotsClient_Delete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - _, err = clientFactory.NewManagedClusterSnapshotsClient().Delete(ctx, "rg1", "snapshot1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managednamespaces_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/managednamespaces_client.go index 0379fc3ec0d2..7341a8604377 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managednamespaces_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/managednamespaces_client.go @@ -45,7 +45,7 @@ func NewManagedNamespacesClient(subscriptionID string, credential azcore.TokenCr // aka.ms/aks/managed-namespaces for more details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - managedNamespaceName - The name of the managed namespace. @@ -74,7 +74,7 @@ func (client *ManagedNamespacesClient) BeginCreateOrUpdate(ctx context.Context, // aka.ms/aks/managed-namespaces for more details. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedNamespacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, managedNamespaceName string, parameters ManagedNamespace, options *ManagedNamespacesClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "ManagedNamespacesClient.BeginCreateOrUpdate" @@ -120,7 +120,7 @@ func (client *ManagedNamespacesClient) createOrUpdateCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -132,7 +132,7 @@ func (client *ManagedNamespacesClient) createOrUpdateCreateRequest(ctx context.C // BeginDelete - Deletes a namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - managedNamespaceName - The name of the managed namespace. @@ -158,7 +158,7 @@ func (client *ManagedNamespacesClient) BeginDelete(ctx context.Context, resource // Delete - Deletes a namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *ManagedNamespacesClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, managedNamespaceName string, options *ManagedNamespacesClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ManagedNamespacesClient.BeginDelete" @@ -204,7 +204,7 @@ func (client *ManagedNamespacesClient) deleteCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -213,7 +213,7 @@ func (client *ManagedNamespacesClient) deleteCreateRequest(ctx context.Context, // Get - Gets the specified namespace of a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - managedNamespaceName - The name of the managed namespace. @@ -264,7 +264,7 @@ func (client *ManagedNamespacesClient) getCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -281,7 +281,7 @@ func (client *ManagedNamespacesClient) getHandleResponse(resp *http.Response) (M // NewListByManagedClusterPager - Gets a list of managed namespaces in the specified managed cluster. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - ManagedNamespacesClientListByManagedClusterOptions contains the optional parameters for the ManagedNamespacesClient.NewListByManagedClusterPager @@ -329,7 +329,7 @@ func (client *ManagedNamespacesClient) listByManagedClusterCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -347,7 +347,7 @@ func (client *ManagedNamespacesClient) listByManagedClusterHandleResponse(resp * // ListCredential - Lists the credentials of a namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - managedNamespaceName - The name of the managed namespace. @@ -399,7 +399,7 @@ func (client *ManagedNamespacesClient) listCredentialCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -417,7 +417,7 @@ func (client *ManagedNamespacesClient) listCredentialHandleResponse(resp *http.R // Update - Updates tags on a managed namespace. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - managedNamespaceName - The name of the managed namespace. @@ -470,7 +470,7 @@ func (client *ManagedNamespacesClient) updateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managednamespaces_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/managednamespaces_client_example_test.go index 80445b8fe7e5..1b62d43fda77 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managednamespaces_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/managednamespaces_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedNamespacesList.json func ExampleManagedNamespacesClient_NewListByManagedClusterPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -76,7 +76,7 @@ func ExampleManagedNamespacesClient_NewListByManagedClusterPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedNamespacesGet.json func ExampleManagedNamespacesClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -126,7 +126,7 @@ func ExampleManagedNamespacesClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesCreate_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedNamespacesCreate_Update.json func ExampleManagedNamespacesClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -204,7 +204,7 @@ func ExampleManagedNamespacesClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedNamespacesDelete.json func ExampleManagedNamespacesClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -225,7 +225,7 @@ func ExampleManagedNamespacesClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesUpdateTags.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedNamespacesUpdateTags.json func ExampleManagedNamespacesClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -278,7 +278,7 @@ func ExampleManagedNamespacesClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ManagedNamespacesListCredentialResult.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedNamespacesListCredentialResult.json func ExampleManagedNamespacesClient_ListCredential() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/meshmemberships_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/meshmemberships_client.go deleted file mode 100644 index 383127c79419..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/meshmemberships_client.go +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armcontainerservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// MeshMembershipsClient contains the methods for the MeshMemberships group. -// Don't use this type directly, use NewMeshMembershipsClient() instead. -type MeshMembershipsClient struct { - internal *arm.Client - subscriptionID string -} - -// NewMeshMembershipsClient creates a new instance of MeshMembershipsClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - Contains optional client configuration. Pass nil to accept the default values. -func NewMeshMembershipsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MeshMembershipsClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &MeshMembershipsClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// BeginCreateOrUpdate - Creates or updates the mesh membership of a managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - meshMembershipName - The name of the mesh membership. -// - parameters - The mesh membership to create or update. -// - options - MeshMembershipsClientBeginCreateOrUpdateOptions contains the optional parameters for the MeshMembershipsClient.BeginCreateOrUpdate -// method. -func (client *MeshMembershipsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, meshMembershipName string, parameters MeshMembership, options *MeshMembershipsClientBeginCreateOrUpdateOptions) (*runtime.Poller[MeshMembershipsClientCreateOrUpdateResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.createOrUpdate(ctx, resourceGroupName, resourceName, meshMembershipName, parameters, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MeshMembershipsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MeshMembershipsClientCreateOrUpdateResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// CreateOrUpdate - Creates or updates the mesh membership of a managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -func (client *MeshMembershipsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, meshMembershipName string, parameters MeshMembership, options *MeshMembershipsClientBeginCreateOrUpdateOptions) (*http.Response, error) { - var err error - const operationName = "MeshMembershipsClient.BeginCreateOrUpdate" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, meshMembershipName, parameters, 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.StatusCreated) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// createOrUpdateCreateRequest creates the CreateOrUpdate request. -func (client *MeshMembershipsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, meshMembershipName string, parameters MeshMembership, _ *MeshMembershipsClientBeginCreateOrUpdateOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if meshMembershipName == "" { - return nil, errors.New("parameter meshMembershipName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{meshMembershipName}", url.PathEscape(meshMembershipName)) - req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, parameters); err != nil { - return nil, err - } - return req, nil -} - -// BeginDelete - Deletes the mesh membership of a managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - meshMembershipName - The name of the mesh membership. -// - options - MeshMembershipsClientBeginDeleteOptions contains the optional parameters for the MeshMembershipsClient.BeginDelete -// method. -func (client *MeshMembershipsClient) BeginDelete(ctx context.Context, resourceGroupName string, resourceName string, meshMembershipName string, options *MeshMembershipsClientBeginDeleteOptions) (*runtime.Poller[MeshMembershipsClientDeleteResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteOperation(ctx, resourceGroupName, resourceName, meshMembershipName, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[MeshMembershipsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[MeshMembershipsClientDeleteResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// Delete - Deletes the mesh membership of a managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -func (client *MeshMembershipsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, meshMembershipName string, options *MeshMembershipsClientBeginDeleteOptions) (*http.Response, error) { - var err error - const operationName = "MeshMembershipsClient.BeginDelete" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, meshMembershipName, 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.StatusAccepted, http.StatusNoContent) { - err = runtime.NewResponseError(httpResp) - return nil, err - } - return httpResp, nil -} - -// deleteCreateRequest creates the Delete request. -func (client *MeshMembershipsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, meshMembershipName string, _ *MeshMembershipsClientBeginDeleteOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if meshMembershipName == "" { - return nil, errors.New("parameter meshMembershipName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{meshMembershipName}", url.PathEscape(meshMembershipName)) - req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// Get - Gets the mesh membership of a managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - meshMembershipName - The name of the mesh membership. -// - options - MeshMembershipsClientGetOptions contains the optional parameters for the MeshMembershipsClient.Get method. -func (client *MeshMembershipsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, meshMembershipName string, options *MeshMembershipsClientGetOptions) (MeshMembershipsClientGetResponse, error) { - var err error - const operationName = "MeshMembershipsClient.Get" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, meshMembershipName, options) - if err != nil { - return MeshMembershipsClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return MeshMembershipsClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return MeshMembershipsClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *MeshMembershipsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, meshMembershipName string, _ *MeshMembershipsClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if meshMembershipName == "" { - return nil, errors.New("parameter meshMembershipName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{meshMembershipName}", url.PathEscape(meshMembershipName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *MeshMembershipsClient) getHandleResponse(resp *http.Response) (MeshMembershipsClientGetResponse, error) { - result := MeshMembershipsClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MeshMembership); err != nil { - return MeshMembershipsClientGetResponse{}, err - } - return result, nil -} - -// NewListByManagedClusterPager - Lists mesh memberships in a managed cluster. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - options - MeshMembershipsClientListByManagedClusterOptions contains the optional parameters for the MeshMembershipsClient.NewListByManagedClusterPager -// method. -func (client *MeshMembershipsClient) NewListByManagedClusterPager(resourceGroupName string, resourceName string, options *MeshMembershipsClientListByManagedClusterOptions) *runtime.Pager[MeshMembershipsClientListByManagedClusterResponse] { - return runtime.NewPager(runtime.PagingHandler[MeshMembershipsClientListByManagedClusterResponse]{ - More: func(page MeshMembershipsClientListByManagedClusterResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *MeshMembershipsClientListByManagedClusterResponse) (MeshMembershipsClientListByManagedClusterResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MeshMembershipsClient.NewListByManagedClusterPager") - 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.listByManagedClusterCreateRequest(ctx, resourceGroupName, resourceName, options) - }, nil) - if err != nil { - return MeshMembershipsClientListByManagedClusterResponse{}, err - } - return client.listByManagedClusterHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listByManagedClusterCreateRequest creates the ListByManagedCluster request. -func (client *MeshMembershipsClient) listByManagedClusterCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *MeshMembershipsClientListByManagedClusterOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listByManagedClusterHandleResponse handles the ListByManagedCluster response. -func (client *MeshMembershipsClient) listByManagedClusterHandleResponse(resp *http.Response) (MeshMembershipsClientListByManagedClusterResponse, error) { - result := MeshMembershipsClientListByManagedClusterResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MeshMembershipsListResult); err != nil { - return MeshMembershipsClientListByManagedClusterResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/meshmemberships_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/meshmemberships_client_example_test.go deleted file mode 100644 index da6b02dfc59d..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/meshmemberships_client_example_test.go +++ /dev/null @@ -1,140 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcontainerservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MeshMemberships_ListByManagedCluster.json -func ExampleMeshMembershipsClient_NewListByManagedClusterPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewMeshMembershipsClient().NewListByManagedClusterPager("rg1", "clustername1", 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.MeshMembershipsListResult = armcontainerservice.MeshMembershipsListResult{ - // Value: []*armcontainerservice.MeshMembership{ - // { - // Name: to.Ptr("meshmembership1"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/meshMemberships"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/meshMemberships/meshmembership1"), - // Properties: &armcontainerservice.MeshMembershipProperties{ - // ManagedMeshID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.AppLink/applinks/applink1/appLinkMembers/member1"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MeshMemberships_Get.json -func ExampleMeshMembershipsClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewMeshMembershipsClient().Get(ctx, "rg1", "clustername1", "meshmembership1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.MeshMembership = armcontainerservice.MeshMembership{ - // Name: to.Ptr("meshmembership1"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/meshMemberships"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/meshMemberships/meshmembership1"), - // Properties: &armcontainerservice.MeshMembershipProperties{ - // ManagedMeshID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.AppLink/applinks/applink1/appLinkMembers/member1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MeshMemberships_CreateOrUpdate.json -func ExampleMeshMembershipsClient_BeginCreateOrUpdate() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMeshMembershipsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "meshmembership1", armcontainerservice.MeshMembership{ - Properties: &armcontainerservice.MeshMembershipProperties{ - ManagedMeshID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.AppLink/applinks/applink1/appLinkMembers/member1"), - }, - }, 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.MeshMembership = armcontainerservice.MeshMembership{ - // Name: to.Ptr("meshmembership1"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/meshMemberships"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/meshMemberships/meshmembership1"), - // Properties: &armcontainerservice.MeshMembershipProperties{ - // ManagedMeshID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.AppLink/applinks/applink1/appLinkMembers/member1"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/MeshMemberships_Delete.json -func ExampleMeshMembershipsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewMeshMembershipsClient().BeginDelete(ctx, "rg1", "clustername1", "meshmembership1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/models.go b/sdk/resourcemanager/containerservice/armcontainerservice/models.go index f8aaa8fed2bd..23a2b3c0f7db 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/models.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/models.go @@ -33,10 +33,7 @@ type AdvancedNetworking struct { // Observability profile to enable advanced network metrics and flow logs with historical contexts. Observability *AdvancedNetworkingObservability - // Profile to enable performance-enhancing features on clusters that use Azure CNI powered by Cilium. - Performance *AdvancedNetworkingPerformance - - // Security profile to enable security features on cilium-based cluster. + // Security profile to enable security features on cilium based cluster. Security *AdvancedNetworkingSecurity } @@ -47,17 +44,7 @@ type AdvancedNetworkingObservability struct { Enabled *bool } -// AdvancedNetworkingPerformance - Profile to enable performance-enhancing features on clusters that use Azure CNI powered -// by Cilium. -type AdvancedNetworkingPerformance struct { - // Enable advanced network acceleration options. This allows users to configure acceleration using BPF host routing. This - // can be enabled only with Cilium dataplane. If not specified, the default value is - // None (no acceleration). The acceleration mode can be changed on a pre-existing cluster. See https://aka.ms/acnsperformance - // for a detailed explanation - AccelerationMode *AccelerationMode -} - -// AdvancedNetworkingSecurity - Security profile to enable security features on cilium-based cluster. +// AdvancedNetworkingSecurity - Security profile to enable security features on cilium based cluster. type AdvancedNetworkingSecurity struct { // Enable advanced network policies. This allows users to configure Layer 7 network policies (FQDN, HTTP, Kafka). Policies // themselves must be configured via the Cilium Network Policy resources, see @@ -65,20 +52,9 @@ type AdvancedNetworkingSecurity struct { // specified, the default value is FQDN if security.enabled is set to true. AdvancedNetworkPolicies *AdvancedNetworkPolicies - // Configure Advanced Networking Security features on Cilium clusters. See individual fields for their default values. + // This feature allows user to configure network policy based on DNS (FQDN) names. It can be enabled only on cilium based + // clusters. If not specified, the default is false. Enabled *bool - - // Encryption configuration for Cilium-based clusters. Once enabled all traffic between Cilium managed pods will be encrypted - // when it leaves the node boundary. - TransitEncryption *AdvancedNetworkingSecurityTransitEncryption -} - -// AdvancedNetworkingSecurityTransitEncryption - Encryption configuration for Cilium-based clusters. Once enabled all traffic -// between Cilium managed pods will be encrypted when it leaves the node boundary. -type AdvancedNetworkingSecurityTransitEncryption struct { - // Configures pod-to-pod encryption. This can be enabled only on Cilium-based clusters. If not specified, the default value - // is None. - Type *TransitEncryptionType } // AgentPool - Agent Pool. @@ -96,13 +72,6 @@ type AgentPool struct { Type *string } -type AgentPoolArtifactStreamingProfile struct { - // Artifact streaming speeds up the cold-start of containers on a node through on-demand image loading. To use this feature, - // container images must also enable artifact streaming on ACR. If not specified, - // the default is false. - Enabled *bool -} - // AgentPoolAvailableVersions - The list of available versions for an agent pool. type AgentPoolAvailableVersions struct { // REQUIRED; Properties of agent pool available versions. @@ -135,31 +104,6 @@ type AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem struct { KubernetesVersion *string } -// AgentPoolBlueGreenUpgradeSettings - Settings for blue-green upgrade on an agentpool -type AgentPoolBlueGreenUpgradeSettings struct { - // The soak duration after draining a batch of nodes, i.e., the amount of time (in minutes) to wait after draining a batch - // of nodes before moving on the next batch. If not specified, the default is 15 - // minutes. - BatchSoakDurationInMinutes *int32 - - // The number or percentage of nodes to drain in batch during blue-green upgrade. Must be a non-zero number. This can either - // be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage - // is specified, it is the percentage of the total number of blue nodes of the initial upgrade operation. For percentages, - // fractional nodes are rounded up. If not specified, the default is 10%. For more - // information, including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster - DrainBatchSize *string - - // The drain timeout for a node, i.e., the amount of time (in minutes) to wait on eviction of pods and graceful termination - // per node. This eviction wait time honors waiting on pod disruption budgets. If - // this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. - DrainTimeoutInMinutes *int32 - - // The soak duration for a node pool, i.e., the amount of time (in minutes) to wait after all old nodes are drained before - // we remove the old nodes. If not specified, the default is 60 minutes. Only - // applicable for blue-green upgrade strategy. - FinalSoakDurationInMinutes *int32 -} - // AgentPoolDeleteMachinesParameter - Specifies a list of machine names from the agent pool to be deleted. type AgentPoolDeleteMachinesParameter struct { // REQUIRED; The agent pool machine names. @@ -197,18 +141,6 @@ type AgentPoolNetworkProfile struct { NodePublicIPTags []*IPTag } -// AgentPoolRecentlyUsedVersion - A historical version that can be used for rollback operations. -type AgentPoolRecentlyUsedVersion struct { - // The node image version available for rollback. - NodeImageVersion *string - - // The Kubernetes version (major.minor.patch) available for rollback. - OrchestratorVersion *string - - // The timestamp when this version was last used. - Timestamp *time.Time -} - // AgentPoolSecurityProfile - The security settings of an agent pool. type AgentPoolSecurityProfile struct { // Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. For more @@ -255,23 +187,14 @@ type AgentPoolUpgradeProfileProperties struct { // REQUIRED; The operating system type. The default is Linux. OSType *OSType - // List of components grouped by kubernetes major.minor version. - ComponentsByReleases []*ComponentsByRelease - // The latest AKS supported node image version. LatestNodeImageVersion *string // List of orchestrator types and versions available for upgrade. Upgrades []*AgentPoolUpgradeProfilePropertiesUpgradesItem - - // READ-ONLY; List of historical good versions for rollback operations. - RecentlyUsedVersions []*AgentPoolRecentlyUsedVersion } type AgentPoolUpgradeProfilePropertiesUpgradesItem struct { - // Whether the Kubernetes version is out of support. - IsOutOfSupport *bool - // Whether the Kubernetes version is currently in preview. IsPreview *bool @@ -279,22 +202,13 @@ type AgentPoolUpgradeProfilePropertiesUpgradesItem struct { KubernetesVersion *string } -// AgentPoolUpgradeSettings - Settings for rolling upgrade on an agentpool +// AgentPoolUpgradeSettings - Settings for upgrading an agentpool type AgentPoolUpgradeSettings struct { // The drain timeout for a node. The amount of time (in minutes) to wait on eviction of pods and graceful termination per // node. This eviction wait time honors waiting on pod disruption budgets. If this // time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. DrainTimeoutInMinutes *int32 - // The maximum number or percentage of extra nodes that are allowed to be blocked in the agent pool during an upgrade when - // undrainable node behavior is Cordon. This can either be set to an integer (e.g. - // '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the - // time of the upgrade. For percentages, fractional nodes are rounded up. If not - // specified, the default is maxSurge. This must always be greater than or equal to maxSurge. For more information, including - // best practices, see: - // https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster - MaxBlockedNodes *string - // The maximum number or percentage of nodes that are surged during upgrade. This can either be set to an integer (e.g. '5') // or a percentage (e.g. '50%'). If a percentage is specified, it is the // percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If @@ -309,15 +223,6 @@ type AgentPoolUpgradeSettings struct { // including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster MaxUnavailable *string - // This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage - // of the total agent pool size at the time of the upgrade. For - // percentages, fractional nodes are rounded up. If node capacity constraints prevent full surging, AKS would attempt a slower - // upgrade with fewer surge nodes. The upgrade will proceed only if the - // available surge capacity meets or exceeds minSurge. If minSurge not specified, the default is 50% of the maxSurge, for - // example, if maxSurge = 10%, the default is 5%, if maxSurge = 10, the default is - // 5. - MinSurge *string - // The soak duration for a node. The amount of time (in minutes) to wait after draining a node and before reimaging it and // moving on to next node. If not specified, the default is 0 minutes. NodeSoakDurationInMinutes *int32 @@ -336,18 +241,6 @@ type AgentPoolWindowsProfile struct { DisableOutboundNat *bool } -// AutoScaleProfile - Specifications on auto-scaling. -type AutoScaleProfile struct { - // The maximum number of nodes of the specified sizes. - MaxCount *int32 - - // The minimum number of nodes of the specified sizes. - MinCount *int32 - - // VM size that AKS will use when creating and scaling e.g. 'StandardE4sv3', 'StandardE16sv3' or 'StandardD16sv5'. - Size *string -} - // AzureKeyVaultKms - Azure Key Vault key management service settings for the security profile. type AzureKeyVaultKms struct { // Whether to enable Azure Key Vault key management service. The default is false. @@ -405,28 +298,6 @@ type CompatibleVersions struct { Versions []*string } -type Component struct { - // If upgraded component version contains breaking changes from the current version. To see a detailed description of what - // the breaking changes are, visit - // https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version. - HasBreakingChanges *bool - - // Component name. - Name *string - - // Component version. - Version *string -} - -// ComponentsByRelease - components of given Kubernetes version. -type ComponentsByRelease struct { - // components of current or upgraded Kubernetes version in the cluster. - Components []*Component - - // The Kubernetes version (major.minor). - KubernetesVersion *string -} - // CreationData - Data used when creating a target resource from a source resource. type CreationData struct { // This is the ARM ID of the source object to be used to create the target object. @@ -538,50 +409,10 @@ type ExtendedLocation struct { Type *ExtendedLocationTypes } +// GPUProfile - GPU settings for the Agent Pool. type GPUProfile struct { // Whether to install GPU drivers. When it's not specified, default is Install. Driver *GPUDriver - - // Specify the type of GPU driver to install when creating Windows agent pools. If not provided, AKS selects the driver based - // on system compatibility. This cannot be changed once the AgentPool has been - // created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is selected based on system compatibility. - DriverType *DriverType -} - -// GuardrailsAvailableVersion - Available Guardrails Version -type GuardrailsAvailableVersion struct { - // REQUIRED; Whether the version is default or not and support info. - Properties *GuardrailsAvailableVersionsProperties - - // 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 -} - -// GuardrailsAvailableVersionsList - Hold values properties, which is array of GuardrailsVersions -type GuardrailsAvailableVersionsList struct { - // Array of AKS supported Guardrails versions. - Value []*GuardrailsAvailableVersion - - // READ-ONLY; The URL to get the next Guardrails available version. - NextLink *string -} - -// GuardrailsAvailableVersionsProperties - Whether the version is default or not and support info. -type GuardrailsAvailableVersionsProperties struct { - // READ-ONLY - IsDefaultVersion *bool - - // READ-ONLY; Whether the version is preview or stable. - Support *GuardrailsSupport } // IPTag - Contains the IPTag associated with the object. @@ -593,71 +424,6 @@ type IPTag struct { Tag *string } -// IdentityBinding - The IdentityBinding resource. -type IdentityBinding struct { - // The resource-specific properties for this resource. - Properties *IdentityBindingProperties - - // READ-ONLY; Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource - // is updated. Specify an if-match or if-none-match header with the eTag value for a - // subsequent request to enable optimistic concurrency per the normal eTag convention. - ETag *string - - // 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 -} - -// IdentityBindingListResult - The response of a IdentityBinding list operation. -type IdentityBindingListResult struct { - // REQUIRED; The IdentityBinding items on this page - Value []*IdentityBinding - - // The link to the next page of items - NextLink *string -} - -// IdentityBindingManagedIdentityProfile - Managed identity profile for the identity binding. -type IdentityBindingManagedIdentityProfile struct { - // REQUIRED; The resource ID of the managed identity. - ResourceID *string - - // READ-ONLY; The client ID of the managed identity. - ClientID *string - - // READ-ONLY; The object ID of the managed identity. - ObjectID *string - - // READ-ONLY; The tenant ID of the managed identity. - TenantID *string -} - -// IdentityBindingOidcIssuerProfile - IdentityBinding OIDC issuer profile. -type IdentityBindingOidcIssuerProfile struct { - // READ-ONLY; The OIDC issuer URL of the IdentityBinding. - OidcIssuerURL *string -} - -// IdentityBindingProperties - IdentityBinding properties. -type IdentityBindingProperties struct { - // REQUIRED; Managed identity profile for the identity binding. - ManagedIdentity *IdentityBindingManagedIdentityProfile - - // READ-ONLY; The OIDC issuer URL of the IdentityBinding. - OidcIssuer *IdentityBindingOidcIssuerProfile - - // READ-ONLY; The status of the last operation. - ProvisioningState *IdentityBindingProvisioningState -} - // IstioCertificateAuthority - Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin // certificates as described here https://aka.ms/asm-plugin-ca type IstioCertificateAuthority struct { @@ -672,9 +438,6 @@ type IstioComponents struct { // Istio ingress gateways. IngressGateways []*IstioIngressGateway - - // Mode of traffic redirection. - ProxyRedirectionMechanism *ProxyRedirectionMechanism } // IstioEgressGateway - Istio egress gateway configuration. @@ -738,113 +501,6 @@ type IstioServiceMesh struct { Revisions []*string } -// JWTAuthenticator - Configuration for JWT authenticator in the managed cluster. -type JWTAuthenticator struct { - // REQUIRED; The properties of JWTAuthenticator. For details on how to configure the properties of a JWT authenticator, please - // refer to the Kubernetes documentation: - // https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. Please note - // that not all fields available in the Kubernetes documentation are supported by - // AKS. For troubleshooting, please see https://aka.ms/aks-external-issuers-docs. - Properties *JWTAuthenticatorProperties - - // 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 -} - -// JWTAuthenticatorClaimMappingExpression - The claim mapping expression for JWTAuthenticator. -type JWTAuthenticatorClaimMappingExpression struct { - // REQUIRED; The CEL expression used to access token claims. - Expression *string -} - -// JWTAuthenticatorClaimMappings - The claim mappings for JWTAuthenticator. -type JWTAuthenticatorClaimMappings struct { - // REQUIRED; The expression to extract username attribute from the token claims. - Username *JWTAuthenticatorClaimMappingExpression - - // The expression to extract extra attribute from the token claims. When not provided, no extra attributes are extracted from - // the token claims. - Extra []*JWTAuthenticatorExtraClaimMappingExpression - - // The expression to extract groups attribute from the token claims. When not provided, no groups are extracted from the token - // claims. - Groups *JWTAuthenticatorClaimMappingExpression - - // The expression to extract uid attribute from the token claims. When not provided, no uid is extracted from the token claims. - UID *JWTAuthenticatorClaimMappingExpression -} - -// JWTAuthenticatorExtraClaimMappingExpression - The extra claim mapping expression for JWTAuthenticator. -type JWTAuthenticatorExtraClaimMappingExpression struct { - // REQUIRED; The key of the extra attribute. - Key *string - - // REQUIRED; The CEL expression used to extract the value of the extra attribute. - ValueExpression *string -} - -// JWTAuthenticatorIssuer - The OIDC issuer details for JWTAuthenticator. -type JWTAuthenticatorIssuer struct { - // REQUIRED; The set of acceptable audiences the JWT must be issued to. At least one is required. When multiple is set, AudienceMatchPolicy - // is used in API Server configuration. - Audiences []*string - - // REQUIRED; The issuer URL. The URL must begin with the scheme https and cannot contain a query string or fragment. This - // must match the "iss" claim in the presented JWT, and the issuer returned from discovery. - URL *string -} - -// JWTAuthenticatorListResult - The response from the List JWT authenticator operation. -type JWTAuthenticatorListResult struct { - // REQUIRED; The list of JWT authenticators. - Value []*JWTAuthenticator - - // READ-ONLY; The URL to get the next set of JWT authenticator results. - NextLink *string -} - -// JWTAuthenticatorProperties - The properties of JWTAuthenticator. For details on how to configure the properties of a JWT -// authenticator, please refer to the Kubernetes documentation: -// https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. Please note -// that not all fields available in the Kubernetes documentation are supported by -// AKS. For troubleshooting, please see https://aka.ms/aks-external-issuers-docs. -type JWTAuthenticatorProperties struct { - // REQUIRED; The mappings that define how user attributes are extracted from the token claims. - ClaimMappings *JWTAuthenticatorClaimMappings - - // REQUIRED; The JWT OIDC issuer details. - Issuer *JWTAuthenticatorIssuer - - // The rules that are applied to validate token claims to authenticate users. All the expressions must evaluate to true for - // validation to succeed. - ClaimValidationRules []*JWTAuthenticatorValidationRule - - // The rules that are applied to the mapped user before completing authentication. All the expressions must evaluate to true - // for validation to succeed. - UserValidationRules []*JWTAuthenticatorValidationRule - - // READ-ONLY; The current provisioning state of the JWT authenticator. - ProvisioningState *JWTAuthenticatorProvisioningState -} - -// JWTAuthenticatorValidationRule - The validation rule for JWTAuthenticator. -type JWTAuthenticatorValidationRule struct { - // REQUIRED; The CEL expression used to validate the claim or attribute. - Expression *string - - // The validation error message. - Message *string -} - // KubeletConfig - Kubelet configurations of agent nodes. See AKS custom node configuration [https://docs.microsoft.com/azure/aks/custom-node-configuration] // for more details. type KubeletConfig struct { @@ -884,9 +540,6 @@ type KubeletConfig struct { // The maximum number of processes per pod. PodMaxPids *int32 - // Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' will be used by default. - SeccompDefault *SeccompDefault - // The Topology Manager policy to use. For more information see Kubernetes Topology Manager [https://kubernetes.io/docs/tasks/administer-cluster/topology-manager]. // The default is 'none'. Allowed values // are 'none', 'best-effort', 'restricted', and 'single-numa-node'. @@ -899,14 +552,6 @@ type KubernetesPatchVersion struct { Upgrades []*string } -// KubernetesResourceObjectEncryptionProfile - Encryption at rest of Kubernetes resource objects using service-managed keys. -// More information on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. -type KubernetesResourceObjectEncryptionProfile struct { - // Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. More information on this - // can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. - InfrastructureEncryption *InfrastructureEncryption -} - // KubernetesVersion - Kubernetes version profile for given major.minor release. type KubernetesVersion struct { // Capabilities on this Kubernetes version. @@ -936,32 +581,6 @@ type KubernetesVersionListResult struct { Values []*KubernetesVersion } -// LabelSelector - A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions -// are ANDed. An empty label selector matches all objects. A null label selector matches no -// objects. -type LabelSelector struct { - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - MatchExpressions []*LabelSelectorRequirement - - // matchLabels is an array of {key=value} pairs. A single {key=value} in the matchLabels map is equivalent to an element of - // matchExpressions, whose key field is key, the operator is In, and the values - // array contains only value. The requirements are ANDed. - MatchLabels []*string -} - -// LabelSelectorRequirement - A label selector requirement is a selector that contains values, a key, and an operator that -// relates the key and values. -type LabelSelectorRequirement struct { - // key is the label key that the selector applies to. - Key *string - - // operator represents a key's relationship to a set of values. Valid operators are In and NotIn - Operator *Operator - - // values is an array of string values, the values array must be non-empty. - Values []*string -} - // LinuxOSConfig - OS configurations of Linux agent nodes. See AKS custom node configuration [https://docs.microsoft.com/azure/aks/custom-node-configuration] // for more details. type LinuxOSConfig struct { @@ -991,62 +610,6 @@ type LinuxProfile struct { SSH *SSHConfiguration } -// LoadBalancer - The configurations regarding multiple standard load balancers. If not supplied, single load balancer mode -// will be used. Multiple standard load balancers mode will be used if at lease one configuration -// is supplied. There has to be a configuration named kubernetes. The name field will be the name of the corresponding public -// load balancer. There will be an internal load balancer created if needed, and -// the name will be -internal. The internal lb shares the same configurations as the external one. The internal lbs -// are not needed to be included in LoadBalancer list. -type LoadBalancer struct { - // The properties of the load balancer. - Properties *LoadBalancerProperties - - // 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 -} - -// LoadBalancerListResult - The response from the List Load Balancers operation. -type LoadBalancerListResult struct { - // The list of Load Balancers. - Value []*LoadBalancer - - // READ-ONLY; The URL to get the next set of load balancer results. - NextLink *string -} - -type LoadBalancerProperties struct { - // REQUIRED; Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool - // will always be added to this load balancer. This agent pool must have at least one node - // and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer. - PrimaryAgentPoolName *string - - // Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false - // manually, both of the external and the internal load balancer will not be - // selected for services unless they explicitly target it. - AllowServicePlacement *bool - - // Nodes that match this selector will be possible members of this load balancer. - NodeSelector *LabelSelector - - // Only services that must match this selector can be placed on this load balancer. - ServiceLabelSelector *LabelSelector - - // Services created in namespaces that match the selector can be placed on this load balancer. - ServiceNamespaceSelector *LabelSelector - - // READ-ONLY; The current provisioning state. - ProvisioningState *string -} - // LocalDNSOverride - Overrides for localDNS profile. type LocalDNSOverride struct { // Cache max TTL in seconds. See cache plugin [https://coredns.io/plugins/cache] for more information. @@ -1090,38 +653,24 @@ type LocalDNSProfile struct { State *LocalDNSState } -// Machine - A machine provides detailed information about its configuration and status. A machine may be visible here but -// not in kubectl get nodes; if so, it may be because the machine has not been registered -// with the Kubernetes API Server yet. +// Machine - A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl +// get nodes; if so it may be because the machine has not been registered with the +// Kubernetes API Server yet. type Machine struct { - // The properties of the machine - Properties *MachineProperties - - // The Availability zone in which machine is located. - Zones []*string - // READ-ONLY; Resource ID. ID *string // READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. Name *string + // READ-ONLY; The properties of the machine + Properties *MachineProperties + // READ-ONLY; Resource type Type *string -} - -// MachineHardwareProfile - The hardware and GPU settings of the machine. -type MachineHardwareProfile struct { - // GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. - GpuInstanceProfile *GPUInstanceProfile - // The GPU settings of the machine. - GpuProfile *GPUProfile - - // The size of the VM. VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, - // etc) pods might fail to run correctly. For more details on restricted VM - // sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions - VMSize *string + // READ-ONLY; The Availability zone in which machine is located. + Zones []*string } // MachineIPAddress - The machine IP address details. @@ -1133,190 +682,28 @@ type MachineIPAddress struct { IP *string } -// MachineKubernetesProfile - The Kubernetes configurations used by the machine. -type MachineKubernetesProfile struct { - // Configuration for using artifact streaming on AKS. - ArtifactStreamingProfile *AgentPoolArtifactStreamingProfile - - // The Kubelet configuration on the machine. - KubeletConfig *KubeletConfig - - // Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. - KubeletDiskType *KubeletDiskType - - // The maximum number of pods that can run on a node. - MaxPods *int32 - - // Taints added on the node during creation that will not be reconciled by AKS. These taints will not be reconciled by AKS - // and can be removed with a kubectl call. These taints allow for required - // configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be - // removed with kubectl taint nodes node1 key1=value1:NoSchedule- - NodeInitializationTaints []*string - - // The node labels on the machine. - NodeLabels map[string]*string - - // The taints added to new node during machine create. For example, key=value:NoSchedule. - NodeTaints []*string - - // The version of Kubernetes specified by the user. Both patch version and are supported. When is specified, the latest supported - // patch version is chosen automatically. - OrchestratorVersion *string - - // Determines the type of workload a node can run. - WorkloadRuntime *WorkloadRuntime - - // READ-ONLY; The version of Kubernetes running on the machine. If orchestratorVersion was a fully specified version , this - // field will be exactly equal to it. If orchestratorVersion was , this field will contain - // the full version being used. - CurrentOrchestratorVersion *string - - // READ-ONLY; The node name in the Kubernetes cluster. - NodeName *string -} - // MachineListResult - The response from the List Machines operation. type MachineListResult struct { // The list of Machines in cluster. Value []*Machine - // READ-ONLY; The URL to get the next set of machine results. - NextLink *string -} - -// MachineNetworkProperties - The network properties of the machine -type MachineNetworkProperties struct { - // Whether the machine is allocated its own public IP. Some scenarios may require the machine to receive their own dedicated - // public IP addresses. A common scenario is for gaming workloads, where a - // console needs to make a direct connection to a cloud virtual machine to minimize hops. The default is false. - EnableNodePublicIP *bool - - // The public IP prefix ID which VM node should use IPs from. This is of the form: - // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} - NodePublicIPPrefixID *string - - // IPTags of instance-level public IPs. - NodePublicIPTags []*IPTag - - // The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node subnet - // (see vnetSubnetID for more details). This is of the form: - // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} - PodSubnetID *string - - // The ID of the subnet which node and optionally pods will join on startup. If this is not specified, a VNET and subnet will - // be generated and used. If no podSubnetID is specified, this applies to nodes - // and pods, otherwise it applies to just nodes. This is of the form: - // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} - VnetSubnetID *string - - // READ-ONLY; IPv4, IPv6 addresses of the machine - IPAddresses []*MachineIPAddress -} - -// MachineOSProfile - The operating system and disk used by the machine. -type MachineOSProfile struct { - // Whether to use a FIPS-enabled OS. - EnableFIPS *bool - - // The Linux machine's specific profile. - LinuxProfile *MachineOSProfileLinuxProfile - - // OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it - // will apply the default osDisk size according to the vmSize specified. - OSDiskSizeGB *int32 - - // The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and has a - // cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to - // 'Managed'. May not be changed after creation. For more information see Ephemeral OS [https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os]. - OSDiskType *OSDiskType - - // Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if - // OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 - // after Windows2019 is deprecated. - OSSKU *OSSKU - - // The operating system type. The default is Linux. - OSType *OSType - - // The Windows machine's specific profile. - WindowsProfile *AgentPoolWindowsProfile -} - -// MachineOSProfileLinuxProfile - The Linux machine's specific profile. -type MachineOSProfileLinuxProfile struct { - // The OS configuration of Linux machine. - LinuxOSConfig *LinuxOSConfig - - // Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd after decoding. - // This allows customization of the message of the day for Linux nodes. It - // must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a - // script). - MessageOfTheDay *string -} - -// MachineProperties - The properties of the machine -type MachineProperties struct { - // The hardware and GPU settings of the machine. - Hardware *MachineHardwareProfile - - // The Kubernetes configurations used by the machine. - Kubernetes *MachineKubernetesProfile - - // Machine only allows 'System' and 'User' mode. - Mode *AgentPoolMode - - // The network properties of the machine - Network *MachineNetworkProperties - - // The operating system and disk used by the machine. - OperatingSystem *MachineOSProfile - - // The priority for the machine. If not specified, the default is 'Regular'. - Priority *ScaleSetPriority - - // The security settings of the machine. - Security *AgentPoolSecurityProfile - - // The tags to be persisted on the machine. - Tags map[string]*string - - // READ-ONLY; Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource - // is updated. Specify an if-match or if-none-match header with the eTag value for a - // subsequent request to enable optimistic concurrency per the normal eTag convention. - ETag *string - - // READ-ONLY; The version of node image. - NodeImageVersion *string - - // READ-ONLY; The current deployment or provisioning state. - ProvisioningState *string - - // READ-ONLY; Arm resource id of the machine. It can be used to GET underlying VM Instance - ResourceID *string - - // READ-ONLY; Contains read-only information about the machine. - Status *MachineStatus + // READ-ONLY; The URL to get the next set of machine results. + NextLink *string } -// MachineStatus - Contains read-only information about the machine. -type MachineStatus struct { - // READ-ONLY; Specifies the time at which the machine was created. - CreationTimestamp *time.Time - - // READ-ONLY; The drift action of the machine. Indicates whether a machine has deviated from its expected state due to changes - // in managed cluster properties, requiring corrective action. - DriftAction *DriftAction - - // READ-ONLY; Reason for machine drift. Provides detailed information on why the machine has drifted. This field is omitted - // if the machine is up to date. - DriftReason *string +// MachineNetworkProperties - network properties of the machine +type MachineNetworkProperties struct { + // READ-ONLY; IPv4, IPv6 addresses of the machine + IPAddresses []*MachineIPAddress +} - // READ-ONLY; The error details information of the machine. Preserves the detailed info of failure. If there was no error, - // this field is omitted. - ProvisioningError *ErrorDetail +// MachineProperties - The properties of the machine +type MachineProperties struct { + // READ-ONLY; network properties of the machine + Network *MachineNetworkProperties - // READ-ONLY; Virtual machine state. Indicates the current state of the underlying virtual machine. - VMState *VMState + // READ-ONLY; Azure resource id of the machine. It can be used to GET underlying VM Instance + ResourceID *string } // MaintenanceConfiguration - Planned maintenance configuration, used to configure when updates can be deployed to a Managed @@ -1478,15 +865,15 @@ type ManagedClusterAPIServerAccessProfile struct { // Whether to create additional public FQDN for private cluster or not. EnablePrivateClusterPublicFQDN *bool - // Whether to enable apiserver vnet integration for the cluster or not. + // Whether to enable apiserver vnet integration for the cluster or not. See aka.ms/AksVnetIntegration for more details. EnableVnetIntegration *bool // The private DNS zone mode for the cluster. The default is System. For more details see configure private DNS zone [https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone]. // Allowed values are 'system' and 'none'. PrivateDNSZone *string - // The subnet to be used when apiserver vnet integration is enabled. It is required when: 1. creating a new cluster with BYO - // Vnet; 2. updating an existing cluster to enable apiserver vnet integration. + // The subnet to be used when apiserver vnet integration is enabled. It is required when creating a new cluster with BYO Vnet, + // or when updating an existing cluster to enable apiserver vnet integration. SubnetID *string } @@ -1544,9 +931,6 @@ type ManagedClusterAgentPoolProfile struct { // names must be 6 characters or less. Name *string - // Configuration for using artifact streaming on AKS. - ArtifactStreamingProfile *AgentPoolArtifactStreamingProfile - // The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. AvailabilityZones []*string @@ -1590,7 +974,7 @@ type ManagedClusterAgentPoolProfile struct { // GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. GpuInstanceProfile *GPUInstanceProfile - // The GPU settings of an agent pool. + // GPU settings for the Agent Pool. GpuProfile *GPUProfile // The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in creation scenario @@ -1636,20 +1020,6 @@ type ManagedClusterAgentPoolProfile struct { // Network-related settings of an agent pool. NetworkProfile *AgentPoolNetworkProfile - // Settings to determine the node customization used to provision nodes in a pool. - NodeCustomizationProfile *NodeCustomizationProfile - - // The version of node image - NodeImageVersion *string - - // Taints added on the nodes during creation that will not be reconciled by AKS. These taints will not be reconciled by AKS - // and can be removed with a kubectl call. This field can be modified after node - // pool is created, but nodes will not be recreated with new taints until another operation that requires recreation (e.g. - // node image upgrade) happens. These taints allow for required configuration to - // run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with kubectl - // taint nodes node1 key1=value1:NoSchedule- - NodeInitializationTaints []*string - // The node labels to be persisted across all nodes in agent pool. NodeLabels map[string]*string @@ -1669,21 +1039,22 @@ type ManagedClusterAgentPoolProfile struct { // 'Managed'. May not be changed after creation. For more information see Ephemeral OS [https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os]. OSDiskType *OSDiskType - // Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if - // OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 - // after Windows2019 is deprecated. + // Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + // Kubernetes = 1.25 if OSType is Windows. OSSKU *OSSKU // The operating system type. The default is Linux. OSType *OSType - // The version of Kubernetes specified by the user. Both patch version and are supported. When is specified, the latest supported - // patch version is chosen automatically. Updating the agent pool with the - // same once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best practice, - // you should upgrade all node pools in an AKS cluster to the same Kubernetes - // version. The node pool version must have the same major version as the control plane. The node pool minor version must - // be within two minor versions of the control plane version. The node pool version - // cannot be greater than the control plane version. For more information see upgrading a node pool [https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool]. + // The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When + // is specified, the latest supported GA patch version is chosen automatically. + // Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if + // a newer patch version is available. As a best practice, you should upgrade all + // node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as + // the control plane. The node pool minor version must be within two minor versions + // of the control plane version. The node pool version cannot be greater than the control plane version. For more information + // see upgrading a node pool + // [https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool]. OrchestratorVersion *string // Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is @@ -1734,15 +1105,9 @@ type ManagedClusterAgentPoolProfile struct { // The type of Agent Pool. Type *AgentPoolType - // Settings for upgrading the agentpool. Applies when upgrade strategy is set to Rolling. + // Settings for upgrading the agentpool UpgradeSettings *AgentPoolUpgradeSettings - // Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to BlueGreen. - UpgradeSettingsBlueGreen *AgentPoolBlueGreenUpgradeSettings - - // Defines the upgrade strategy for the agent pool. The default is Rolling. - UpgradeStrategy *UpgradeStrategy - // The size of the agent pool VMs. VM size availability varies by region. If a node contains insufficient compute resources // (memory, cpu, etc) pods might fail to run correctly. For more details on // restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions @@ -1766,8 +1131,8 @@ type ManagedClusterAgentPoolProfile struct { // Determines the type of workload a node can run. WorkloadRuntime *WorkloadRuntime - // READ-ONLY; The version of Kubernetes running on the Agent Pool. If orchestratorVersion was a fully specified version , - // this field will be exactly equal to it. If orchestratorVersion was , this field will contain + // READ-ONLY; The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version , this + // field will be exactly equal to it. If orchestratorVersion is , this field will contain // the full version being used. CurrentOrchestratorVersion *string @@ -1776,15 +1141,15 @@ type ManagedClusterAgentPoolProfile struct { // subsequent request to enable optimistic concurrency per the normal eTag convention. ETag *string + // READ-ONLY; The version of node image + NodeImageVersion *string + // READ-ONLY; The current deployment or provisioning state. ProvisioningState *string } // ManagedClusterAgentPoolProfileProperties - Properties for the container service agent pool profile. type ManagedClusterAgentPoolProfileProperties struct { - // Configuration for using artifact streaming on AKS. - ArtifactStreamingProfile *AgentPoolArtifactStreamingProfile - // The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. AvailabilityZones []*string @@ -1828,7 +1193,7 @@ type ManagedClusterAgentPoolProfileProperties struct { // GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. GpuInstanceProfile *GPUInstanceProfile - // The GPU settings of an agent pool. + // GPU settings for the Agent Pool. GpuProfile *GPUProfile // The fully qualified resource ID of the Dedicated Host Group to provision virtual machines from, used only in creation scenario @@ -1874,20 +1239,6 @@ type ManagedClusterAgentPoolProfileProperties struct { // Network-related settings of an agent pool. NetworkProfile *AgentPoolNetworkProfile - // Settings to determine the node customization used to provision nodes in a pool. - NodeCustomizationProfile *NodeCustomizationProfile - - // The version of node image - NodeImageVersion *string - - // Taints added on the nodes during creation that will not be reconciled by AKS. These taints will not be reconciled by AKS - // and can be removed with a kubectl call. This field can be modified after node - // pool is created, but nodes will not be recreated with new taints until another operation that requires recreation (e.g. - // node image upgrade) happens. These taints allow for required configuration to - // run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with kubectl - // taint nodes node1 key1=value1:NoSchedule- - NodeInitializationTaints []*string - // The node labels to be persisted across all nodes in agent pool. NodeLabels map[string]*string @@ -1907,21 +1258,22 @@ type ManagedClusterAgentPoolProfileProperties struct { // 'Managed'. May not be changed after creation. For more information see Ephemeral OS [https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os]. OSDiskType *OSDiskType - // Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if - // OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 - // after Windows2019 is deprecated. + // Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + // Kubernetes = 1.25 if OSType is Windows. OSSKU *OSSKU // The operating system type. The default is Linux. OSType *OSType - // The version of Kubernetes specified by the user. Both patch version and are supported. When is specified, the latest supported - // patch version is chosen automatically. Updating the agent pool with the - // same once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best practice, - // you should upgrade all node pools in an AKS cluster to the same Kubernetes - // version. The node pool version must have the same major version as the control plane. The node pool minor version must - // be within two minor versions of the control plane version. The node pool version - // cannot be greater than the control plane version. For more information see upgrading a node pool [https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool]. + // The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When + // is specified, the latest supported GA patch version is chosen automatically. + // Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if + // a newer patch version is available. As a best practice, you should upgrade all + // node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as + // the control plane. The node pool minor version must be within two minor versions + // of the control plane version. The node pool version cannot be greater than the control plane version. For more information + // see upgrading a node pool + // [https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool]. OrchestratorVersion *string // Pod IP Allocation Mode. The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is @@ -1972,15 +1324,9 @@ type ManagedClusterAgentPoolProfileProperties struct { // The type of Agent Pool. Type *AgentPoolType - // Settings for upgrading the agentpool. Applies when upgrade strategy is set to Rolling. + // Settings for upgrading the agentpool UpgradeSettings *AgentPoolUpgradeSettings - // Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to BlueGreen. - UpgradeSettingsBlueGreen *AgentPoolBlueGreenUpgradeSettings - - // Defines the upgrade strategy for the agent pool. The default is Rolling. - UpgradeStrategy *UpgradeStrategy - // The size of the agent pool VMs. VM size availability varies by region. If a node contains insufficient compute resources // (memory, cpu, etc) pods might fail to run correctly. For more details on // restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions @@ -2004,8 +1350,8 @@ type ManagedClusterAgentPoolProfileProperties struct { // Determines the type of workload a node can run. WorkloadRuntime *WorkloadRuntime - // READ-ONLY; The version of Kubernetes running on the Agent Pool. If orchestratorVersion was a fully specified version , - // this field will be exactly equal to it. If orchestratorVersion was , this field will contain + // READ-ONLY; The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version , this + // field will be exactly equal to it. If orchestratorVersion is , this field will contain // the full version being used. CurrentOrchestratorVersion *string @@ -2014,14 +1360,16 @@ type ManagedClusterAgentPoolProfileProperties struct { // subsequent request to enable optimistic concurrency per the normal eTag convention. ETag *string + // READ-ONLY; The version of node image + NodeImageVersion *string + // READ-ONLY; The current deployment or provisioning state. ProvisioningState *string } // ManagedClusterAutoUpgradeProfile - Auto upgrade profile for a managed cluster. type ManagedClusterAutoUpgradeProfile struct { - // Manner in which the OS on your nodes is updated. The default is Unmanaged, but may change to either NodeImage or SecurityPatch - // at GA. + // Node OS Upgrade Channel. Manner in which the OS on your nodes is updated. The default is NodeImage. NodeOSUpgradeChannel *NodeOSUpgradeChannel // The upgrade channel for auto upgrade. The default is 'none'. For more information see setting the AKS cluster auto-upgrade @@ -2030,113 +1378,40 @@ type ManagedClusterAutoUpgradeProfile struct { UpgradeChannel *UpgradeChannel } -// ManagedClusterAzureMonitorProfile - Prometheus addon profile for the container service cluster +// ManagedClusterAzureMonitorProfile - Azure Monitor addon profiles for monitoring the managed cluster. type ManagedClusterAzureMonitorProfile struct { - // Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and traces through - // auto-instrumentation of the application using Azure Monitor OpenTelemetry - // based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - AppMonitoring *ManagedClusterAzureMonitorProfileAppMonitoring - - // Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights - // for an overview. - ContainerInsights *ManagedClusterAzureMonitorProfileContainerInsights - - // Metrics profile for the prometheus service addon + // Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure + // metrics to send to an Azure Monitor Workspace and configure additional + // scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. Metrics *ManagedClusterAzureMonitorProfileMetrics } -// ManagedClusterAzureMonitorProfileAppMonitoring - Application Monitoring Profile for Kubernetes Application Container. Collects -// application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor OpenTelemetry -// based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. -type ManagedClusterAzureMonitorProfileAppMonitoring struct { - // Application Monitoring Auto Instrumentation for Kubernetes Application Container. Deploys web hook to auto-instrument Azure - // Monitor OpenTelemetry based SDKs to collect OpenTelemetry metrics, logs and - // traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - AutoInstrumentation *ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation - - // Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Logs and Traces. Collects OpenTelemetry - // logs and traces of the application using Azure Monitor OpenTelemetry - // based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - OpenTelemetryLogs *ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs - - // Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects OpenTelemetry - // metrics of the application using Azure Monitor OpenTelemetry based SDKs. See - // aka.ms/AzureMonitorApplicationMonitoring for an overview. - OpenTelemetryMetrics *ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics -} - -// ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation - Application Monitoring Auto Instrumentation for Kubernetes -// Application Container. Deploys web hook to auto-instrument Azure Monitor OpenTelemetry based SDKs to collect OpenTelemetry -// metrics, logs and -// traces of the application. See aka.ms/AzureMonitorApplicationMonitoring for an overview. -type ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation struct { - // Indicates if Application Monitoring Auto Instrumentation is enabled or not. - Enabled *bool -} - -// ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs - Application Monitoring Open Telemetry Metrics Profile -// for Kubernetes Application Container Logs and Traces. Collects OpenTelemetry logs and traces of the application using Azure -// Monitor OpenTelemetry -// based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. -type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs struct { - // Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. - Enabled *bool - - // The Open Telemetry host port for Open Telemetry logs and traces. If not specified, the default port is 28331. - Port *int64 -} - -// ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics - Application Monitoring Open Telemetry Metrics Profile -// for Kubernetes Application Container Metrics. Collects OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry -// based SDKs. See -// aka.ms/AzureMonitorApplicationMonitoring for an overview. -type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics struct { - // Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. - Enabled *bool - - // The Open Telemetry host port for Open Telemetry metrics. If not specified, the default port is 28333. - Port *int64 -} - -// ManagedClusterAzureMonitorProfileContainerInsights - Azure Monitor Container Insights Profile for Kubernetes Events, Inventory -// and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. -type ManagedClusterAzureMonitorProfileContainerInsights struct { - // Indicates whether custom metrics collection has to be disabled or not. If not specified the default is false. No custom - // metrics will be emitted if this field is false but the container insights - // enabled field is false - DisableCustomMetrics *bool - - // Indicates whether prometheus metrics scraping is disabled or not. If not specified the default is false. No prometheus - // metrics will be emitted if this field is false but the container insights enabled - // field is false - DisablePrometheusMetricsScraping *bool - - // Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. - Enabled *bool - - // Fully Qualified ARM Resource Id of Azure Log Analytics Workspace for storing Azure Monitor Container Insights Logs. - LogAnalyticsWorkspaceResourceID *string - - // The syslog host port. If not specified, the default port is 28330. - SyslogPort *int64 -} - -// ManagedClusterAzureMonitorProfileKubeStateMetrics - Kube State Metrics for prometheus addon profile for the container service -// cluster +// ManagedClusterAzureMonitorProfileKubeStateMetrics - Kube State Metrics profile for the Azure Managed Prometheus addon. +// These optional settings are for the kube-state-metrics pod that is deployed with the addon. See +// aka.ms/AzureManagedPrometheus-optional-parameters for details. type ManagedClusterAzureMonitorProfileKubeStateMetrics struct { - // Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric. + // Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,…],pods=[kubernetes.io/team],…'). + // By default the metric + // contains only resource name and namespace labels. MetricAnnotationsAllowList *string - // Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. + // Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,…],pods=[app],…'). + // By default the metric + // contains only resource name and namespace labels. MetricLabelsAllowlist *string } -// ManagedClusterAzureMonitorProfileMetrics - Metrics profile for the prometheus service addon +// ManagedClusterAzureMonitorProfileMetrics - Metrics profile for the Azure Monitor managed service for Prometheus addon. +// Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional +// scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. type ManagedClusterAzureMonitorProfileMetrics struct { - // REQUIRED; Whether to enable the Prometheus collector + // REQUIRED; Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + // for details on enabling and disabling. Enabled *bool - // Kube State Metrics for prometheus addon profile for the container service cluster + // Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + // pod that is deployed with the addon. See + // aka.ms/AzureManagedPrometheus-optional-parameters for details. KubeStateMetrics *ManagedClusterAzureMonitorProfileKubeStateMetrics } @@ -2159,9 +1434,6 @@ type ManagedClusterCostAnalysis struct { // ManagedClusterHTTPProxyConfig - Cluster HTTP proxy configuration. type ManagedClusterHTTPProxyConfig struct { - // Whether to enable HTTP proxy. When disabled, the specified proxy configuration will be not be set on pods and nodes. - Enabled *bool - // The HTTP proxy server endpoint to use. HTTPProxy *string @@ -2173,16 +1445,6 @@ type ManagedClusterHTTPProxyConfig struct { // Alternative CA cert to use for connecting to proxy servers. TrustedCa *string - - // READ-ONLY; A read-only list of all endpoints for which traffic should not be sent to the proxy. This list is a superset - // of noProxy and values injected by AKS. - EffectiveNoProxy []*string -} - -// ManagedClusterHostedSystemProfile - Settings for hosted system addons. -type ManagedClusterHostedSystemProfile struct { - // Whether to enable hosted system addons for the cluster. - Enabled *bool } // ManagedClusterIdentity - Identity for the managed cluster. @@ -2207,68 +1469,35 @@ type ManagedClusterIdentity struct { TenantID *string } -type ManagedClusterIngressDefaultDomainProfile struct { - // Whether to enable Default Domain. - Enabled *bool - - // READ-ONLY; The unique fully qualified domain name assigned to the cluster. This will not change even if disabled then reenabled. - DomainName *string -} - // ManagedClusterIngressProfile - Ingress profile for the container service cluster. type ManagedClusterIngressProfile struct { - // Settings for the managed Application Load Balancer installation - ApplicationLoadBalancer *ManagedClusterIngressProfileApplicationLoadBalancer - - // Settings for the managed Gateway API installation - GatewayAPI *ManagedClusterIngressProfileGatewayConfiguration - - // Web App Routing settings for the ingress profile. + // App Routing settings for the ingress profile. You can find an overview and onboarding guide for this feature at + // https://learn.microsoft.com/en-us/azure/aks/app-routing?tabs=default%2Cdeploy-app-default. WebAppRouting *ManagedClusterIngressProfileWebAppRouting } -// ManagedClusterIngressProfileApplicationLoadBalancer - Application Load Balancer settings for the ingress profile. -type ManagedClusterIngressProfileApplicationLoadBalancer struct { - // Whether to enable Application Load Balancer. - Enabled *bool - - // READ-ONLY; Managed identity of the Application Load Balancer add-on. This is the identity that should be granted permissions - // to manage the associated Application Gateway for Containers resource. - Identity *UserAssignedIdentity -} - -type ManagedClusterIngressProfileGatewayConfiguration struct { - // Configuration for the managed Gateway API installation. If not specified, the default is 'Disabled'. See https://aka.ms/k8s-gateway-api - // for more details. - Installation *ManagedGatewayType -} - type ManagedClusterIngressProfileNginx struct { // Ingress type for the default NginxIngressController custom resource DefaultIngressControllerType *NginxIngressControllerType } -// ManagedClusterIngressProfileWebAppRouting - Web App Routing settings for the ingress profile. +// ManagedClusterIngressProfileWebAppRouting - Application Routing add-on settings for the ingress profile. type ManagedClusterIngressProfileWebAppRouting struct { - // Resource IDs of the DNS zones to be associated with the Web App Routing add-on. Used only when Web App Routing is enabled. - // Public and private DNS zones can be in different resource groups, but all - // public DNS zones must be in the same resource group and all private DNS zones must be in the same resource group. + // Resource IDs of the DNS zones to be associated with the Application Routing add-on. Used only when Application Routing + // add-on is enabled. Public and private DNS zones can be in different resource + // groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same resource + // group. DNSZoneResourceIDs []*string - // Configuration for the Default Domain. This is a unique, autogenerated domain that comes with a signed TLS Certificate allowing - // for secure HTTPS. See the Default Domain documentation - // [https://aka.ms/aks/defaultdomain] for more instructions. - DefaultDomain *ManagedClusterIngressDefaultDomainProfile - - // Whether to enable Web App Routing. + // Whether to enable the Application Routing add-on. Enabled *bool // Configuration for the default NginxIngressController. See more at https://learn.microsoft.com/en-us/azure/aks/app-routing-nginx-configuration#the-default-nginx-ingress-controller. Nginx *ManagedClusterIngressProfileNginx - // READ-ONLY; Managed identity of the Web Application Routing add-on. This is the identity that should be granted permissions, - // for example, to manage the associated Azure DNS resource and get certificates from - // Azure Key Vault. See this overview of the add-on [https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm] + // READ-ONLY; Managed identity of the Application Routing add-on. This is the identity that should be granted permissions, + // for example, to manage the associated Azure DNS resource and get certificates from Azure + // Key Vault. See this overview of the add-on [https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm] // for more instructions. Identity *UserAssignedIdentity } @@ -2291,9 +1520,6 @@ type ManagedClusterLoadBalancerProfile struct { // The type of the managed inbound Load Balancer BackendPool. BackendPoolType *BackendPoolType - // The health probing behavior for External Traffic Policy Cluster services. - ClusterServiceLoadBalancerHealthProbeMode *ClusterServiceLoadBalancerHealthProbeMode - // Enable multiple standard load balancers per AKS cluster or not. EnableMultipleStandardLoadBalancers *bool @@ -2378,7 +1604,7 @@ type ManagedClusterNodeProvisioningProfile struct { // ManagedClusterNodeResourceGroupProfile - Node resource group lockdown profile for a managed cluster. type ManagedClusterNodeResourceGroupProfile struct { - // The restriction level applied to the cluster's node resource group + // The restriction level applied to the cluster's node resource group. If not specified, the default is 'Unrestricted' RestrictionLevel *RestrictionLevel } @@ -2481,9 +1707,6 @@ type ManagedClusterPoolUpgradeProfile struct { // REQUIRED; The operating system type. The default is Linux. OSType *OSType - // List of components grouped by kubernetes major.minor version. - ComponentsByReleases []*ComponentsByRelease - // The Agent Pool name. Name *string @@ -2492,9 +1715,6 @@ type ManagedClusterPoolUpgradeProfile struct { } type ManagedClusterPoolUpgradeProfileUpgradesItem struct { - // Whether the Kubernetes version is out of support. - IsOutOfSupport *bool - // Whether the Kubernetes version is currently in preview. IsPreview *bool @@ -2525,15 +1745,12 @@ type ManagedClusterProperties struct { // The auto upgrade configuration. AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile - // Prometheus addon profile for the container service cluster + // Azure Monitor addon profiles for monitoring the managed cluster. AzureMonitorProfile *ManagedClusterAzureMonitorProfile // Profile of the cluster bootstrap configuration. BootstrapProfile *ManagedClusterBootstrapProfile - // CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot. - CreationData *CreationData - // The DNS prefix of the Managed Cluster. This cannot be updated once the Managed Cluster has been created. DNSPrefix *string @@ -2546,11 +1763,6 @@ type ManagedClusterProperties struct { // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' DiskEncryptionSetID *string - // Enable namespace as Azure resource. The default value is false. It can be enabled/disabled on creation and updating of - // the managed cluster. See https://aka.ms/NamespaceARMResource - // [https://aka.ms/NamespaceARMResource] for more details on Namespace as a ARM Resource. - EnableNamespaceResources *bool - // Whether to enable Kubernetes Role-Based Access Control. EnableRBAC *bool @@ -2561,9 +1773,6 @@ type ManagedClusterProperties struct { // Configurations for provisioning the cluster with HTTP proxy servers. HTTPProxyConfig *ManagedClusterHTTPProxyConfig - // Settings for hosted system addons. For more information, see https://aka.ms/aks/automatic/systemcomponents. - HostedSystemProfile *ManagedClusterHostedSystemProfile - // The user identity associated with the managed cluster. This identity will be used by the kubelet. Only one user assigned // identity is allowed. The only accepted key is "kubeletidentity", with value of // "resourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}". @@ -2572,11 +1781,14 @@ type ManagedClusterProperties struct { // Ingress profile for the managed cluster. IngressProfile *ManagedClusterIngressProfile - // The version of Kubernetes the Managed Cluster is requested to run. When you upgrade a supported AKS cluster, Kubernetes - // minor versions cannot be skipped. All upgrades must be performed sequentially by - // major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> - // 1.16.x is not allowed. See upgrading an AKS cluster - // [https://docs.microsoft.com/azure/aks/upgrade-cluster] for more details. + // The version of Kubernetes specified by the user. Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When + // is specified, the latest supported GA patch version is chosen automatically. + // Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if + // a newer patch version is available. When you upgrade a supported AKS cluster, + // Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, + // upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, + // however 1.14.x -> 1.16.x is not allowed. See upgrading an AKS cluster [https://docs.microsoft.com/azure/aks/upgrade-cluster] + // for more details. KubernetesVersion *string // The profile for Linux VMs in the Managed Cluster. @@ -2594,7 +1806,7 @@ type ManagedClusterProperties struct { // The name of the resource group containing agent pool nodes. NodeResourceGroup *string - // The node resource group configuration profile. + // Profile of the node resource group configuration. NodeResourceGroupProfile *ManagedClusterNodeResourceGroupProfile // The OIDC issuer profile of the Managed Cluster. @@ -2610,9 +1822,6 @@ type ManagedClusterProperties struct { // PublicNetworkAccess of the managedCluster. Allow or deny public network access for AKS PublicNetworkAccess *PublicNetworkAccess - // Profile of the pod scheduler configuration. - SchedulerProfile *SchedulerProfile - // Security profile for the managed cluster. SecurityProfile *ManagedClusterSecurityProfile @@ -2647,7 +1856,9 @@ type ManagedClusterProperties struct { // properly. AzurePortalFQDN *string - // READ-ONLY; The version of Kubernetes the Managed Cluster is running. + // READ-ONLY; The version of Kubernetes the Managed Cluster is running. If kubernetesVersion was a fully specified version + // , this field will be exactly equal to it. If kubernetesVersion was , this field will + // contain the full version being used. CurrentKubernetesVersion *string // READ-ONLY; The FQDN of the master pool. @@ -2687,8 +1898,9 @@ type ManagedClusterPropertiesAutoScalerProfile struct { // pods are deleted or evicted. DaemonsetEvictionForOccupiedNodes *bool - // Type of node group expander to be used in scale up. Set to be deprecated, please use 'expanders' flag in the future. Available - // values are: 'least-waste', 'most-pods', 'priority', 'random'. + // The expander to use when scaling up. 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 // Should CA ignore DaemonSet pods when calculating resource utilization for scaling down. If set to true, the resources used @@ -2758,21 +1970,6 @@ type ManagedClusterPropertiesAutoScalerProfile struct { SkipNodesWithSystemPods *string } -// ManagedClusterPropertiesForSnapshot - managed cluster properties for snapshot, these properties are read only. -type ManagedClusterPropertiesForSnapshot struct { - // Whether the cluster has enabled Kubernetes Role-Based Access Control or not. - EnableRbac *bool - - // The current kubernetes version. - KubernetesVersion *string - - // The current managed cluster sku. - SKU *ManagedClusterSKU - - // READ-ONLY; The current network profile. - NetworkProfile *NetworkProfileForSnapshot -} - // ManagedClusterSKU - The SKU of a Managed Cluster. type ManagedClusterSKU struct { // The name of a managed cluster SKU. @@ -2800,18 +1997,6 @@ type ManagedClusterSecurityProfile struct { // Image Cleaner settings for the security profile. ImageCleaner *ManagedClusterSecurityProfileImageCleaner - // Image integrity is a feature that works with Azure Policy to verify image integrity by signature. This will not have any - // effect unless Azure Policy is applied to enforce image signatures. See - // https://aka.ms/aks/image-integrity for how to use this feature via policy. - ImageIntegrity *ManagedClusterSecurityProfileImageIntegrity - - // Encryption at rest of Kubernetes resource objects. More information on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption - KubernetesResourceObjectEncryptionProfile *KubernetesResourceObjectEncryptionProfile - - // Node Restriction [https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction] settings - // for the security profile. - NodeRestriction *ManagedClusterSecurityProfileNodeRestriction - // Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access Azure // cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more // details. @@ -2825,46 +2010,10 @@ type ManagedClusterSecurityProfileDefender struct { // Microsoft Defender is disabled, leave the field empty. LogAnalyticsWorkspaceResourceID *string - // Microsoft Defender settings for security gating, validates container images eligibility for deployment based on Defender - // for Containers security findings. Using Admission Controller, it either audits - // or prevents the deployment of images that do not meet security standards. - SecurityGating *ManagedClusterSecurityProfileDefenderSecurityGating - // Microsoft Defender threat detection for Cloud settings for the security profile. SecurityMonitoring *ManagedClusterSecurityProfileDefenderSecurityMonitoring } -// ManagedClusterSecurityProfileDefenderSecurityGating - Microsoft Defender settings for security gating, validates container -// images eligibility for deployment based on Defender for Containers security findings. Using Admission Controller, it either -// audits -// or prevents the deployment of images that do not meet security standards. -type ManagedClusterSecurityProfileDefenderSecurityGating struct { - // In use only while registry access granted by secret rather than managed identity. Set whether to grant the Defender gating - // agent access to the cluster's secrets for pulling images from registries. If - // secret access is denied and the registry requires pull secrets, the add-on will not perform any image validation. Default - // value is false. - AllowSecretAccess *bool - - // Whether to enable Defender security gating. When enabled, the gating feature will scan container images and audit or block - // the deployment of images that do not meet security standards according to the - // configured security rules. - Enabled *bool - - // List of identities that the admission controller will make use of in order to pull security artifacts from the registry. - // These are the same identities used by the cluster to pull container images. - // Each identity provided should have federated identity credential attached to it. - Identities []*ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem -} - -type ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem struct { - // The container registry for which the identity will be used; the identity specified here should have a federated identity - // credential attached to it. - AzureContainerRegistry *string - - // The identity object used to access the registry - Identity *UserAssignedIdentity -} - // ManagedClusterSecurityProfileDefenderSecurityMonitoring - Microsoft Defender settings for the security profile threat detection. type ManagedClusterSecurityProfileDefenderSecurityMonitoring struct { // Whether to enable Defender threat detection @@ -2881,18 +2030,6 @@ type ManagedClusterSecurityProfileImageCleaner struct { IntervalHours *int32 } -// ManagedClusterSecurityProfileImageIntegrity - Image integrity related settings for the security profile. -type ManagedClusterSecurityProfileImageIntegrity struct { - // Whether to enable image integrity. The default value is false. - Enabled *bool -} - -// ManagedClusterSecurityProfileNodeRestriction - Node Restriction settings for the security profile. -type ManagedClusterSecurityProfileNodeRestriction struct { - // Whether to enable Node Restriction - Enabled *bool -} - // ManagedClusterSecurityProfileWorkloadIdentity - Workload identity settings for the security profile. type ManagedClusterSecurityProfileWorkloadIdentity struct { // Whether to enable workload identity. @@ -2909,51 +2046,6 @@ type ManagedClusterServicePrincipalProfile struct { Secret *string } -// ManagedClusterSnapshot - A managed cluster snapshot resource. -type ManagedClusterSnapshot struct { - // REQUIRED; The geo-location where the resource lives - Location *string - - // Properties of a managed cluster snapshot. - Properties *ManagedClusterSnapshotProperties - - // Resource tags. - Tags map[string]*string - - // 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 -} - -// ManagedClusterSnapshotListResult - The response from the List Managed Cluster Snapshots operation. -type ManagedClusterSnapshotListResult struct { - // The list of managed cluster snapshots. - Value []*ManagedClusterSnapshot - - // READ-ONLY; The URL to get the next set of managed cluster snapshot results. - NextLink *string -} - -// ManagedClusterSnapshotProperties - Properties for a managed cluster snapshot. -type ManagedClusterSnapshotProperties struct { - // CreationData to be used to specify the source resource ID to create this snapshot. - CreationData *CreationData - - // The type of a snapshot. The default is NodePool. - SnapshotType *SnapshotType - - // READ-ONLY; What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. - ManagedClusterPropertiesReadOnly *ManagedClusterPropertiesForSnapshot -} - // ManagedClusterStaticEgressGatewayProfile - The Static Egress Gateway addon configuration for the cluster. type ManagedClusterStaticEgressGatewayProfile struct { // Enable Static Egress Gateway addon. Indicates if Static Egress Gateway addon is enabled or not. @@ -2992,9 +2084,6 @@ type ManagedClusterStorageProfileBlobCSIDriver struct { type ManagedClusterStorageProfileDiskCSIDriver struct { // Whether to enable AzureDisk CSI Driver. The default value is true. Enabled *bool - - // The version of AzureDisk CSI Driver. The default value is v1. - Version *string } // ManagedClusterStorageProfileFileCSIDriver - AzureFile CSI Driver settings for the storage profile. @@ -3070,7 +2159,9 @@ type ManagedClusterWindowsProfile struct { // ManagedClusterWorkloadAutoScalerProfile - Workload Auto-scaler profile for the managed cluster. type ManagedClusterWorkloadAutoScalerProfile struct { // KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. - Keda *ManagedClusterWorkloadAutoScalerProfileKeda + Keda *ManagedClusterWorkloadAutoScalerProfileKeda + + // VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. VerticalPodAutoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler } @@ -3081,12 +2172,11 @@ type ManagedClusterWorkloadAutoScalerProfileKeda struct { Enabled *bool } +// ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler - VPA (Vertical Pod Autoscaler) settings for the workload +// auto-scaler profile. type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler struct { - // REQUIRED; Whether to enable VPA add-on in cluster. Default value is false. + // REQUIRED; Whether to enable VPA. Default value is false. Enabled *bool - - // Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. - AddonAutoscaling *AddonAutoscaling } // ManagedNamespace - Namespace managed by ARM. @@ -3144,55 +2234,6 @@ type ManualScaleProfile struct { Size *string } -// MeshMembership - Mesh membership of a managed cluster. -type MeshMembership struct { - // The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another - // Azure resource. If this is present, complete mode deployment will not - // delete the resource if it is removed from the template since it is managed by another resource. - ManagedBy *string - - // Mesh membership properties of a managed cluster. - Properties *MeshMembershipProperties - - // READ-ONLY; Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource - // is updated. Specify an if-match or if-none-match header with the eTag value for a - // subsequent request to enable optimistic concurrency per the normal eTag convention. - ETag *string - - // 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 -} - -// MeshMembershipProperties - Mesh membership properties of a managed cluster. -type MeshMembershipProperties struct { - // REQUIRED; The ARM resource id for the managed mesh member. This is of the form: - // '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. - // Visit https://aka.ms/applink for more - // information. - ManagedMeshID *string - - // READ-ONLY; The current provisioning state of the Mesh Membership. - ProvisioningState *MeshMembershipProvisioningState -} - -// MeshMembershipsListResult - The result of a request to list mesh memberships in a managed cluster. -type MeshMembershipsListResult struct { - // The list of mesh memberships. - Value []*MeshMembership - - // READ-ONLY; The URL to get the next set of mesh membership results. - NextLink *string -} - // MeshRevision - Holds information on upgrades and compatibility for given major.minor mesh release. type MeshRevision struct { // List of items this revision of service mesh is compatible with, and their associated versions. @@ -3336,12 +2377,6 @@ type NetworkProfile struct { // dual-stack, the expected values are IPv4 and IPv6. IPFamilies []*IPFamily - // Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. - // See https://v - // .docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where is represented by a - string. Kubernetes - // version 1.23 would be '1-23'. - KubeProxyConfig *NetworkProfileKubeProxyConfig - // Profile of the cluster load balancer. LoadBalancerProfile *ManagedClusterLoadBalancerProfile @@ -3362,7 +2397,7 @@ type NetworkProfile struct { // Network plugin used for building the Kubernetes network. NetworkPlugin *NetworkPlugin - // Network plugin mode used for building the Kubernetes network. + // The mode the network plugin should use. NetworkPluginMode *NetworkPluginMode // Network policy used for building the Kubernetes network. @@ -3380,10 +2415,6 @@ type NetworkProfile struct { // one for each IP family (IPv4/IPv6), is expected for dual-stack networking. PodCidrs []*string - // Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods with hostNetwork=false. - // if not specified, the default is 'IMDS'. - PodLinkLocalAccess *PodLinkLocalAccess - // A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. ServiceCidr *string @@ -3396,132 +2427,12 @@ type NetworkProfile struct { StaticEgressGatewayProfile *ManagedClusterStaticEgressGatewayProfile } -// NetworkProfileForSnapshot - network profile for managed cluster snapshot, these properties are read only. -type NetworkProfileForSnapshot struct { - // loadBalancerSku for managed cluster snapshot. - LoadBalancerSKU *LoadBalancerSKU - - // networkMode for managed cluster snapshot. - NetworkMode *NetworkMode - - // networkPlugin for managed cluster snapshot. - NetworkPlugin *NetworkPlugin - - // NetworkPluginMode for managed cluster snapshot. - NetworkPluginMode *NetworkPluginMode - - // networkPolicy for managed cluster snapshot. - NetworkPolicy *NetworkPolicy -} - -// NetworkProfileKubeProxyConfig - Holds configuration customizations for kube-proxy. Any values not defined will use the -// kube-proxy defaulting behavior. See https://v -// .docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where is represented by a - string. Kubernetes -// version 1.23 would be '1-23'. -type NetworkProfileKubeProxyConfig struct { - // Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default - // without these customizations). - Enabled *bool - - // Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. - IpvsConfig *NetworkProfileKubeProxyConfigIpvsConfig - - // Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES') - Mode *Mode -} - -// NetworkProfileKubeProxyConfigIpvsConfig - Holds configuration customizations for IPVS. May only be specified if 'mode' -// is set to 'IPVS'. -type NetworkProfileKubeProxyConfigIpvsConfig struct { - // IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. - Scheduler *IpvsScheduler - - // The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a positive integer value. - TCPFinTimeoutSeconds *int32 - - // The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. - TCPTimeoutSeconds *int32 - - // The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value. - UDPTimeoutSeconds *int32 -} - -// NodeCustomizationProfile - Settings to determine the node customization used to provision nodes in a pool. -type NodeCustomizationProfile struct { - // The resource ID of the node customization resource to use. This can be a version. Omitting the version will use the latest - // version of the node customization. - NodeCustomizationID *string -} - -// NodeImageVersion - node image version profile for given major.minor.patch release. -type NodeImageVersion struct { - // The OS + SKU + version of the node image. Example: AKSUbuntu-1804gen2containerd-2024.02.02 - FullName *string - - // The operating system of the node image. Example: AKSUbuntu - OS *string - - // The SKU or flavor of the node image. Example: 2004gen2containerd - SKU *string - - // major.minor.patch version of the node image version release. Example: 2024.02.02 - Version *string -} - -// NodeImageVersionsListResult - Holds an array NodeImageVersions -type NodeImageVersionsListResult struct { - // Array of AKS Node Image versions. - Value []*NodeImageVersion - - // READ-ONLY; The URL to get the next set of machine results. - NextLink *string -} - // OperationListResult - The List Operation response. type OperationListResult struct { // READ-ONLY; The list of operations Value []*OperationValue } -// OperationStatusResult - The current status of an async operation. -type OperationStatusResult struct { - // REQUIRED; Operation status. - Status *string - - // The end time of the operation. - EndTime *time.Time - - // If present, details of the operation error. - Error *ErrorDetail - - // Fully qualified ID for the async operation. - ID *string - - // Name of the async operation. - Name *string - - // The operations list. - Operations []*OperationStatusResult - - // Percent of the operation that is complete. - PercentComplete *float32 - - // The start time of the operation. - StartTime *time.Time - - // READ-ONLY; Fully qualified ID of the resource against which the original async operation was started. - ResourceID *string -} - -// OperationStatusResultList - The operations list. It contains an URL link to get the next set of results. -type OperationStatusResultList struct { - // READ-ONLY; URL to get the next set of operation list results (if there are any). - NextLink *string - - // READ-ONLY; List of operations - Value []*OperationStatusResult -} - // OperationValue - Describes the properties of a Operation value. type OperationValue struct { // Describes the properties of a Operation Value Display. @@ -3660,13 +2571,6 @@ type PrivateLinkServiceConnectionState struct { Status *ConnectionStatus } -// RebalanceLoadBalancersRequestBody - The names of the load balancers to rebalance. If set to empty, all load balancers will -// be rebalanced. -type RebalanceLoadBalancersRequestBody struct { - // The load balancer names list. - LoadBalancerNames []*string -} - // RelativeMonthlySchedule - For schedules like: 'recur every month on the first Monday' or 'recur every 3 months on last // Friday'. type RelativeMonthlySchedule struct { @@ -3676,7 +2580,7 @@ type RelativeMonthlySchedule struct { // REQUIRED; Specifies the number of months between each set of occurrences. IntervalMonths *int32 - // REQUIRED; The week index. Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. + // REQUIRED; The week index. Specifies on which week of the month the dayOfWeek applies. WeekIndex *Type } @@ -3739,47 +2643,8 @@ type SSHPublicKey struct { KeyData *string } -// SafeguardsAvailableVersion - Available Safeguards Version -type SafeguardsAvailableVersion struct { - // REQUIRED; Whether the version is default or not and support info. - Properties *SafeguardsAvailableVersionsProperties - - // 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 -} - -// SafeguardsAvailableVersionsList - Hold values properties, which is array of SafeguardsVersions -type SafeguardsAvailableVersionsList struct { - // Array of AKS supported Safeguards versions. - Value []*SafeguardsAvailableVersion - - // READ-ONLY; The URL to get the next Safeguards available version. - NextLink *string -} - -// SafeguardsAvailableVersionsProperties - Whether the version is default or not and support info. -type SafeguardsAvailableVersionsProperties struct { - // READ-ONLY - IsDefaultVersion *bool - - // READ-ONLY; Whether the version is preview or stable. - Support *SafeguardsSupport -} - // ScaleProfile - Specifications on how to scale a VirtualMachines agent pool. type ScaleProfile struct { - // Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size range. - Autoscale *AutoScaleProfile - // Specifications on how to scale the VirtualMachines agent pool to a fixed size. Manual []*ManualScaleProfile } @@ -3800,24 +2665,6 @@ type Schedule struct { Weekly *WeeklySchedule } -// SchedulerInstanceProfile - The scheduler profile for a single scheduler instance. -type SchedulerInstanceProfile struct { - // The config customization mode for this scheduler instance. - SchedulerConfigMode *SchedulerConfigMode -} - -// SchedulerProfile - The pod scheduler profile for the cluster. -type SchedulerProfile struct { - // Mapping of each scheduler instance to its profile. - SchedulerInstanceProfiles *SchedulerProfileSchedulerInstanceProfiles -} - -// SchedulerProfileSchedulerInstanceProfiles - Mapping of each scheduler instance to its profile. -type SchedulerProfileSchedulerInstanceProfiles struct { - // The scheduler profile for the upstream scheduler instance. - Upstream *SchedulerInstanceProfile -} - // ServiceMeshProfile - Service mesh profile for a managed cluster. type ServiceMeshProfile struct { // REQUIRED; Mode of the service mesh. @@ -3877,9 +2724,8 @@ type SnapshotProperties struct { // READ-ONLY; The version of node image. NodeImageVersion *string - // READ-ONLY; Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 - // if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 - // after Windows2019 is deprecated. + // READ-ONLY; Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 + // when Kubernetes = 1.25 if OSType is Windows. OSSKU *OSSKU // READ-ONLY; The operating system type. The default is Linux. diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go b/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go index f69580b66209..50c4055ef739 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go @@ -80,7 +80,6 @@ func (a AdvancedNetworking) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "enabled", a.Enabled) populate(objectMap, "observability", a.Observability) - populate(objectMap, "performance", a.Performance) populate(objectMap, "security", a.Security) return json.Marshal(objectMap) } @@ -100,9 +99,6 @@ func (a *AdvancedNetworking) UnmarshalJSON(data []byte) error { case "observability": err = unpopulate(val, "Observability", &a.Observability) delete(rawMsg, key) - case "performance": - err = unpopulate(val, "Performance", &a.Performance) - delete(rawMsg, key) case "security": err = unpopulate(val, "Security", &a.Security) delete(rawMsg, key) @@ -141,39 +137,11 @@ func (a *AdvancedNetworkingObservability) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AdvancedNetworkingPerformance. -func (a AdvancedNetworkingPerformance) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "accelerationMode", a.AccelerationMode) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedNetworkingPerformance. -func (a *AdvancedNetworkingPerformance) 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 "accelerationMode": - err = unpopulate(val, "AccelerationMode", &a.AccelerationMode) - 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 AdvancedNetworkingSecurity. func (a AdvancedNetworkingSecurity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "advancedNetworkPolicies", a.AdvancedNetworkPolicies) populate(objectMap, "enabled", a.Enabled) - populate(objectMap, "transitEncryption", a.TransitEncryption) return json.Marshal(objectMap) } @@ -192,36 +160,6 @@ func (a *AdvancedNetworkingSecurity) UnmarshalJSON(data []byte) error { case "enabled": err = unpopulate(val, "Enabled", &a.Enabled) delete(rawMsg, key) - case "transitEncryption": - err = unpopulate(val, "TransitEncryption", &a.TransitEncryption) - 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 AdvancedNetworkingSecurityTransitEncryption. -func (a AdvancedNetworkingSecurityTransitEncryption) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "type", a.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AdvancedNetworkingSecurityTransitEncryption. -func (a *AdvancedNetworkingSecurityTransitEncryption) 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 "type": - err = unpopulate(val, "Type", &a.Type) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", a, err) @@ -269,33 +207,6 @@ func (a *AgentPool) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AgentPoolArtifactStreamingProfile. -func (a AgentPoolArtifactStreamingProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", a.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolArtifactStreamingProfile. -func (a *AgentPoolArtifactStreamingProfile) 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 "enabled": - err = unpopulate(val, "Enabled", &a.Enabled) - 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 AgentPoolAvailableVersions. func (a AgentPoolAvailableVersions) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -397,45 +308,6 @@ func (a *AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem) UnmarshalJSO return nil } -// MarshalJSON implements the json.Marshaller interface for type AgentPoolBlueGreenUpgradeSettings. -func (a AgentPoolBlueGreenUpgradeSettings) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "batchSoakDurationInMinutes", a.BatchSoakDurationInMinutes) - populate(objectMap, "drainBatchSize", a.DrainBatchSize) - populate(objectMap, "drainTimeoutInMinutes", a.DrainTimeoutInMinutes) - populate(objectMap, "finalSoakDurationInMinutes", a.FinalSoakDurationInMinutes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolBlueGreenUpgradeSettings. -func (a *AgentPoolBlueGreenUpgradeSettings) 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 "batchSoakDurationInMinutes": - err = unpopulate(val, "BatchSoakDurationInMinutes", &a.BatchSoakDurationInMinutes) - delete(rawMsg, key) - case "drainBatchSize": - err = unpopulate(val, "DrainBatchSize", &a.DrainBatchSize) - delete(rawMsg, key) - case "drainTimeoutInMinutes": - err = unpopulate(val, "DrainTimeoutInMinutes", &a.DrainTimeoutInMinutes) - delete(rawMsg, key) - case "finalSoakDurationInMinutes": - err = unpopulate(val, "FinalSoakDurationInMinutes", &a.FinalSoakDurationInMinutes) - 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 AgentPoolDeleteMachinesParameter. func (a AgentPoolDeleteMachinesParameter) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -556,41 +428,6 @@ func (a *AgentPoolNetworkProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AgentPoolRecentlyUsedVersion. -func (a AgentPoolRecentlyUsedVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nodeImageVersion", a.NodeImageVersion) - populate(objectMap, "orchestratorVersion", a.OrchestratorVersion) - populateDateTimeRFC3339(objectMap, "timestamp", a.Timestamp) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolRecentlyUsedVersion. -func (a *AgentPoolRecentlyUsedVersion) 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 "nodeImageVersion": - err = unpopulate(val, "NodeImageVersion", &a.NodeImageVersion) - delete(rawMsg, key) - case "orchestratorVersion": - err = unpopulate(val, "OrchestratorVersion", &a.OrchestratorVersion) - delete(rawMsg, key) - case "timestamp": - err = unpopulateDateTimeRFC3339(val, "Timestamp", &a.Timestamp) - 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 AgentPoolSecurityProfile. func (a AgentPoolSecurityProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -695,11 +532,9 @@ func (a *AgentPoolUpgradeProfile) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AgentPoolUpgradeProfileProperties. func (a AgentPoolUpgradeProfileProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "componentsByReleases", a.ComponentsByReleases) populate(objectMap, "kubernetesVersion", a.KubernetesVersion) populate(objectMap, "latestNodeImageVersion", a.LatestNodeImageVersion) populate(objectMap, "osType", a.OSType) - populate(objectMap, "recentlyUsedVersions", a.RecentlyUsedVersions) populate(objectMap, "upgrades", a.Upgrades) return json.Marshal(objectMap) } @@ -713,9 +548,6 @@ func (a *AgentPoolUpgradeProfileProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "componentsByReleases": - err = unpopulate(val, "ComponentsByReleases", &a.ComponentsByReleases) - delete(rawMsg, key) case "kubernetesVersion": err = unpopulate(val, "KubernetesVersion", &a.KubernetesVersion) delete(rawMsg, key) @@ -725,9 +557,6 @@ func (a *AgentPoolUpgradeProfileProperties) UnmarshalJSON(data []byte) error { case "osType": err = unpopulate(val, "OSType", &a.OSType) delete(rawMsg, key) - case "recentlyUsedVersions": - err = unpopulate(val, "RecentlyUsedVersions", &a.RecentlyUsedVersions) - delete(rawMsg, key) case "upgrades": err = unpopulate(val, "Upgrades", &a.Upgrades) delete(rawMsg, key) @@ -742,7 +571,6 @@ func (a *AgentPoolUpgradeProfileProperties) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type AgentPoolUpgradeProfilePropertiesUpgradesItem. func (a AgentPoolUpgradeProfilePropertiesUpgradesItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "isOutOfSupport", a.IsOutOfSupport) populate(objectMap, "isPreview", a.IsPreview) populate(objectMap, "kubernetesVersion", a.KubernetesVersion) return json.Marshal(objectMap) @@ -757,9 +585,6 @@ func (a *AgentPoolUpgradeProfilePropertiesUpgradesItem) UnmarshalJSON(data []byt for key, val := range rawMsg { var err error switch key { - case "isOutOfSupport": - err = unpopulate(val, "IsOutOfSupport", &a.IsOutOfSupport) - delete(rawMsg, key) case "isPreview": err = unpopulate(val, "IsPreview", &a.IsPreview) delete(rawMsg, key) @@ -778,10 +603,8 @@ func (a *AgentPoolUpgradeProfilePropertiesUpgradesItem) UnmarshalJSON(data []byt func (a AgentPoolUpgradeSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "drainTimeoutInMinutes", a.DrainTimeoutInMinutes) - populate(objectMap, "maxBlockedNodes", a.MaxBlockedNodes) populate(objectMap, "maxSurge", a.MaxSurge) populate(objectMap, "maxUnavailable", a.MaxUnavailable) - populate(objectMap, "minSurge", a.MinSurge) populate(objectMap, "nodeSoakDurationInMinutes", a.NodeSoakDurationInMinutes) populate(objectMap, "undrainableNodeBehavior", a.UndrainableNodeBehavior) return json.Marshal(objectMap) @@ -799,18 +622,12 @@ func (a *AgentPoolUpgradeSettings) UnmarshalJSON(data []byte) error { case "drainTimeoutInMinutes": err = unpopulate(val, "DrainTimeoutInMinutes", &a.DrainTimeoutInMinutes) delete(rawMsg, key) - case "maxBlockedNodes": - err = unpopulate(val, "MaxBlockedNodes", &a.MaxBlockedNodes) - delete(rawMsg, key) case "maxSurge": err = unpopulate(val, "MaxSurge", &a.MaxSurge) delete(rawMsg, key) case "maxUnavailable": err = unpopulate(val, "MaxUnavailable", &a.MaxUnavailable) delete(rawMsg, key) - case "minSurge": - err = unpopulate(val, "MinSurge", &a.MinSurge) - delete(rawMsg, key) case "nodeSoakDurationInMinutes": err = unpopulate(val, "NodeSoakDurationInMinutes", &a.NodeSoakDurationInMinutes) delete(rawMsg, key) @@ -852,41 +669,6 @@ func (a *AgentPoolWindowsProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AutoScaleProfile. -func (a AutoScaleProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "maxCount", a.MaxCount) - populate(objectMap, "minCount", a.MinCount) - populate(objectMap, "size", a.Size) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AutoScaleProfile. -func (a *AutoScaleProfile) 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 "maxCount": - err = unpopulate(val, "MaxCount", &a.MaxCount) - delete(rawMsg, key) - case "minCount": - err = unpopulate(val, "MinCount", &a.MinCount) - delete(rawMsg, key) - case "size": - err = unpopulate(val, "Size", &a.Size) - 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 AzureKeyVaultKms. func (a AzureKeyVaultKms) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1031,72 +813,6 @@ func (c *CompatibleVersions) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Component. -func (c Component) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "hasBreakingChanges", c.HasBreakingChanges) - populate(objectMap, "name", c.Name) - populate(objectMap, "version", c.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Component. -func (c *Component) 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 "hasBreakingChanges": - err = unpopulate(val, "HasBreakingChanges", &c.HasBreakingChanges) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &c.Name) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &c.Version) - 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 ComponentsByRelease. -func (c ComponentsByRelease) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "components", c.Components) - populate(objectMap, "kubernetesVersion", c.KubernetesVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ComponentsByRelease. -func (c *ComponentsByRelease) 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 "components": - err = unpopulate(val, "Components", &c.Components) - delete(rawMsg, key) - case "kubernetesVersion": - err = unpopulate(val, "KubernetesVersion", &c.KubernetesVersion) - 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 CreationData. func (c CreationData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1462,7 +1178,6 @@ func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { func (g GPUProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "driver", g.Driver) - populate(objectMap, "driverType", g.DriverType) return json.Marshal(objectMap) } @@ -1478,9 +1193,6 @@ func (g *GPUProfile) UnmarshalJSON(data []byte) error { case "driver": err = unpopulate(val, "Driver", &g.Driver) delete(rawMsg, key) - case "driverType": - err = unpopulate(val, "DriverType", &g.DriverType) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", g, err) @@ -1489,156 +1201,107 @@ func (g *GPUProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GuardrailsAvailableVersion. -func (g GuardrailsAvailableVersion) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IPTag. +func (i IPTag) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", g.ID) - populate(objectMap, "name", g.Name) - populate(objectMap, "properties", g.Properties) - populate(objectMap, "systemData", g.SystemData) - populate(objectMap, "type", g.Type) + populate(objectMap, "ipTagType", i.IPTagType) + populate(objectMap, "tag", i.Tag) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GuardrailsAvailableVersion. -func (g *GuardrailsAvailableVersion) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IPTag. +func (i *IPTag) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &g.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &g.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &g.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &g.SystemData) + case "ipTagType": + err = unpopulate(val, "IPTagType", &i.IPTagType) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) + case "tag": + err = unpopulate(val, "Tag", &i.Tag) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GuardrailsAvailableVersionsList. -func (g GuardrailsAvailableVersionsList) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IstioCertificateAuthority. +func (i IstioCertificateAuthority) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", g.NextLink) - populate(objectMap, "value", g.Value) + populate(objectMap, "plugin", i.Plugin) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GuardrailsAvailableVersionsList. -func (g *GuardrailsAvailableVersionsList) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioCertificateAuthority. +func (i *IstioCertificateAuthority) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &g.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &g.Value) + case "plugin": + err = unpopulate(val, "Plugin", &i.Plugin) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type GuardrailsAvailableVersionsProperties. -func (g GuardrailsAvailableVersionsProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IstioComponents. +func (i IstioComponents) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "isDefaultVersion", g.IsDefaultVersion) - populate(objectMap, "support", g.Support) + populate(objectMap, "egressGateways", i.EgressGateways) + populate(objectMap, "ingressGateways", i.IngressGateways) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type GuardrailsAvailableVersionsProperties. -func (g *GuardrailsAvailableVersionsProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioComponents. +func (i *IstioComponents) 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", g, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "isDefaultVersion": - err = unpopulate(val, "IsDefaultVersion", &g.IsDefaultVersion) + case "egressGateways": + err = unpopulate(val, "EgressGateways", &i.EgressGateways) delete(rawMsg, key) - case "support": - err = unpopulate(val, "Support", &g.Support) + case "ingressGateways": + err = unpopulate(val, "IngressGateways", &i.IngressGateways) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IPTag. -func (i IPTag) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IstioEgressGateway. +func (i IstioEgressGateway) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "ipTagType", i.IPTagType) - populate(objectMap, "tag", i.Tag) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type IPTag. -func (i *IPTag) 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", i, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ipTagType": - err = unpopulate(val, "IPTagType", &i.IPTagType) - delete(rawMsg, key) - case "tag": - err = unpopulate(val, "Tag", &i.Tag) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type IdentityBinding. -func (i IdentityBinding) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "eTag", i.ETag) - populate(objectMap, "id", i.ID) + populate(objectMap, "enabled", i.Enabled) + populate(objectMap, "gatewayConfigurationName", i.GatewayConfigurationName) populate(objectMap, "name", i.Name) - populate(objectMap, "properties", i.Properties) - populate(objectMap, "systemData", i.SystemData) - populate(objectMap, "type", i.Type) + populate(objectMap, "namespace", i.Namespace) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityBinding. -func (i *IdentityBinding) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioEgressGateway. +func (i *IstioEgressGateway) 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", i, err) @@ -1646,23 +1309,17 @@ func (i *IdentityBinding) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "eTag": - err = unpopulate(val, "ETag", &i.ETag) + case "enabled": + err = unpopulate(val, "Enabled", &i.Enabled) delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &i.ID) + case "gatewayConfigurationName": + err = unpopulate(val, "GatewayConfigurationName", &i.GatewayConfigurationName) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &i.Name) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &i.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &i.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &i.Type) + case "namespace": + err = unpopulate(val, "Namespace", &i.Namespace) delete(rawMsg, key) } if err != nil { @@ -1672,16 +1329,16 @@ func (i *IdentityBinding) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type IdentityBindingListResult. -func (i IdentityBindingListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IstioIngressGateway. +func (i IstioIngressGateway) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", i.NextLink) - populate(objectMap, "value", i.Value) + populate(objectMap, "enabled", i.Enabled) + populate(objectMap, "mode", i.Mode) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityBindingListResult. -func (i *IdentityBindingListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioIngressGateway. +func (i *IstioIngressGateway) 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", i, err) @@ -1689,11 +1346,11 @@ func (i *IdentityBindingListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &i.NextLink) + case "enabled": + err = unpopulate(val, "Enabled", &i.Enabled) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &i.Value) + case "mode": + err = unpopulate(val, "Mode", &i.Mode) delete(rawMsg, key) } if err != nil { @@ -1703,18 +1360,19 @@ func (i *IdentityBindingListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type IdentityBindingManagedIdentityProfile. -func (i IdentityBindingManagedIdentityProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IstioPluginCertificateAuthority. +func (i IstioPluginCertificateAuthority) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientId", i.ClientID) - populate(objectMap, "objectId", i.ObjectID) - populate(objectMap, "resourceId", i.ResourceID) - populate(objectMap, "tenantId", i.TenantID) + populate(objectMap, "certChainObjectName", i.CertChainObjectName) + populate(objectMap, "certObjectName", i.CertObjectName) + populate(objectMap, "keyObjectName", i.KeyObjectName) + populate(objectMap, "keyVaultId", i.KeyVaultID) + populate(objectMap, "rootCertObjectName", i.RootCertObjectName) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityBindingManagedIdentityProfile. -func (i *IdentityBindingManagedIdentityProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioPluginCertificateAuthority. +func (i *IstioPluginCertificateAuthority) 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", i, err) @@ -1722,17 +1380,20 @@ func (i *IdentityBindingManagedIdentityProfile) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &i.ClientID) + case "certChainObjectName": + err = unpopulate(val, "CertChainObjectName", &i.CertChainObjectName) delete(rawMsg, key) - case "objectId": - err = unpopulate(val, "ObjectID", &i.ObjectID) + case "certObjectName": + err = unpopulate(val, "CertObjectName", &i.CertObjectName) delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &i.ResourceID) + case "keyObjectName": + err = unpopulate(val, "KeyObjectName", &i.KeyObjectName) delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &i.TenantID) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &i.KeyVaultID) + delete(rawMsg, key) + case "rootCertObjectName": + err = unpopulate(val, "RootCertObjectName", &i.RootCertObjectName) delete(rawMsg, key) } if err != nil { @@ -1742,15 +1403,17 @@ func (i *IdentityBindingManagedIdentityProfile) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type IdentityBindingOidcIssuerProfile. -func (i IdentityBindingOidcIssuerProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IstioServiceMesh. +func (i IstioServiceMesh) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "oidcIssuerUrl", i.OidcIssuerURL) + populate(objectMap, "certificateAuthority", i.CertificateAuthority) + populate(objectMap, "components", i.Components) + populate(objectMap, "revisions", i.Revisions) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityBindingOidcIssuerProfile. -func (i *IdentityBindingOidcIssuerProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioServiceMesh. +func (i *IstioServiceMesh) 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", i, err) @@ -1758,8 +1421,14 @@ func (i *IdentityBindingOidcIssuerProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "oidcIssuerUrl": - err = unpopulate(val, "OidcIssuerURL", &i.OidcIssuerURL) + case "certificateAuthority": + err = unpopulate(val, "CertificateAuthority", &i.CertificateAuthority) + delete(rawMsg, key) + case "components": + err = unpopulate(val, "Components", &i.Components) + delete(rawMsg, key) + case "revisions": + err = unpopulate(val, "Revisions", &i.Revisions) delete(rawMsg, key) } if err != nil { @@ -1769,1134 +1438,1235 @@ func (i *IdentityBindingOidcIssuerProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type IdentityBindingProperties. -func (i IdentityBindingProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubeletConfig. +func (k KubeletConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "managedIdentity", i.ManagedIdentity) - populate(objectMap, "oidcIssuer", i.OidcIssuer) - populate(objectMap, "provisioningState", i.ProvisioningState) + populate(objectMap, "allowedUnsafeSysctls", k.AllowedUnsafeSysctls) + populate(objectMap, "cpuCfsQuota", k.CPUCfsQuota) + populate(objectMap, "cpuCfsQuotaPeriod", k.CPUCfsQuotaPeriod) + populate(objectMap, "cpuManagerPolicy", k.CPUManagerPolicy) + populate(objectMap, "containerLogMaxFiles", k.ContainerLogMaxFiles) + populate(objectMap, "containerLogMaxSizeMB", k.ContainerLogMaxSizeMB) + populate(objectMap, "failSwapOn", k.FailSwapOn) + populate(objectMap, "imageGcHighThreshold", k.ImageGcHighThreshold) + populate(objectMap, "imageGcLowThreshold", k.ImageGcLowThreshold) + populate(objectMap, "podMaxPids", k.PodMaxPids) + populate(objectMap, "topologyManagerPolicy", k.TopologyManagerPolicy) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IdentityBindingProperties. -func (i *IdentityBindingProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeletConfig. +func (k *KubeletConfig) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { - case "managedIdentity": - err = unpopulate(val, "ManagedIdentity", &i.ManagedIdentity) + case "allowedUnsafeSysctls": + err = unpopulate(val, "AllowedUnsafeSysctls", &k.AllowedUnsafeSysctls) delete(rawMsg, key) - case "oidcIssuer": - err = unpopulate(val, "OidcIssuer", &i.OidcIssuer) + case "cpuCfsQuota": + err = unpopulate(val, "CPUCfsQuota", &k.CPUCfsQuota) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &i.ProvisioningState) + case "cpuCfsQuotaPeriod": + err = unpopulate(val, "CPUCfsQuotaPeriod", &k.CPUCfsQuotaPeriod) + delete(rawMsg, key) + case "cpuManagerPolicy": + err = unpopulate(val, "CPUManagerPolicy", &k.CPUManagerPolicy) + delete(rawMsg, key) + case "containerLogMaxFiles": + err = unpopulate(val, "ContainerLogMaxFiles", &k.ContainerLogMaxFiles) + delete(rawMsg, key) + case "containerLogMaxSizeMB": + err = unpopulate(val, "ContainerLogMaxSizeMB", &k.ContainerLogMaxSizeMB) + delete(rawMsg, key) + case "failSwapOn": + err = unpopulate(val, "FailSwapOn", &k.FailSwapOn) + delete(rawMsg, key) + case "imageGcHighThreshold": + err = unpopulate(val, "ImageGcHighThreshold", &k.ImageGcHighThreshold) + delete(rawMsg, key) + case "imageGcLowThreshold": + err = unpopulate(val, "ImageGcLowThreshold", &k.ImageGcLowThreshold) + delete(rawMsg, key) + case "podMaxPids": + err = unpopulate(val, "PodMaxPids", &k.PodMaxPids) + delete(rawMsg, key) + case "topologyManagerPolicy": + err = unpopulate(val, "TopologyManagerPolicy", &k.TopologyManagerPolicy) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IstioCertificateAuthority. -func (i IstioCertificateAuthority) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubernetesPatchVersion. +func (k KubernetesPatchVersion) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "plugin", i.Plugin) + populate(objectMap, "upgrades", k.Upgrades) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IstioCertificateAuthority. -func (i *IstioCertificateAuthority) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesPatchVersion. +func (k *KubernetesPatchVersion) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { - case "plugin": - err = unpopulate(val, "Plugin", &i.Plugin) + case "upgrades": + err = unpopulate(val, "Upgrades", &k.Upgrades) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IstioComponents. -func (i IstioComponents) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubernetesVersion. +func (k KubernetesVersion) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "egressGateways", i.EgressGateways) - populate(objectMap, "ingressGateways", i.IngressGateways) - populate(objectMap, "proxyRedirectionMechanism", i.ProxyRedirectionMechanism) + populate(objectMap, "capabilities", k.Capabilities) + populate(objectMap, "isDefault", k.IsDefault) + populate(objectMap, "isPreview", k.IsPreview) + populate(objectMap, "patchVersions", k.PatchVersions) + populate(objectMap, "version", k.Version) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IstioComponents. -func (i *IstioComponents) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersion. +func (k *KubernetesVersion) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { - case "egressGateways": - err = unpopulate(val, "EgressGateways", &i.EgressGateways) + case "capabilities": + err = unpopulate(val, "Capabilities", &k.Capabilities) delete(rawMsg, key) - case "ingressGateways": - err = unpopulate(val, "IngressGateways", &i.IngressGateways) + case "isDefault": + err = unpopulate(val, "IsDefault", &k.IsDefault) + delete(rawMsg, key) + case "isPreview": + err = unpopulate(val, "IsPreview", &k.IsPreview) + delete(rawMsg, key) + case "patchVersions": + err = unpopulate(val, "PatchVersions", &k.PatchVersions) delete(rawMsg, key) - case "proxyRedirectionMechanism": - err = unpopulate(val, "ProxyRedirectionMechanism", &i.ProxyRedirectionMechanism) + case "version": + err = unpopulate(val, "Version", &k.Version) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IstioEgressGateway. -func (i IstioEgressGateway) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubernetesVersionCapabilities. +func (k KubernetesVersionCapabilities) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", i.Enabled) - populate(objectMap, "gatewayConfigurationName", i.GatewayConfigurationName) - populate(objectMap, "name", i.Name) - populate(objectMap, "namespace", i.Namespace) + populate(objectMap, "supportPlan", k.SupportPlan) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IstioEgressGateway. -func (i *IstioEgressGateway) UnmarshalJSON(data []byte) error { +// 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &i.Enabled) - delete(rawMsg, key) - case "gatewayConfigurationName": - err = unpopulate(val, "GatewayConfigurationName", &i.GatewayConfigurationName) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &i.Name) - delete(rawMsg, key) - case "namespace": - err = unpopulate(val, "Namespace", &i.Namespace) + case "supportPlan": + err = unpopulate(val, "SupportPlan", &k.SupportPlan) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IstioIngressGateway. -func (i IstioIngressGateway) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubernetesVersionListResult. +func (k KubernetesVersionListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", i.Enabled) - populate(objectMap, "mode", i.Mode) + populate(objectMap, "values", k.Values) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IstioIngressGateway. -func (i *IstioIngressGateway) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionListResult. +func (k *KubernetesVersionListResult) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &i.Enabled) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &i.Mode) + case "values": + err = unpopulate(val, "Values", &k.Values) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IstioPluginCertificateAuthority. -func (i IstioPluginCertificateAuthority) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type LinuxOSConfig. +func (l LinuxOSConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "certChainObjectName", i.CertChainObjectName) - populate(objectMap, "certObjectName", i.CertObjectName) - populate(objectMap, "keyObjectName", i.KeyObjectName) - populate(objectMap, "keyVaultId", i.KeyVaultID) - populate(objectMap, "rootCertObjectName", i.RootCertObjectName) + populate(objectMap, "swapFileSizeMB", l.SwapFileSizeMB) + populate(objectMap, "sysctls", l.Sysctls) + populate(objectMap, "transparentHugePageDefrag", l.TransparentHugePageDefrag) + populate(objectMap, "transparentHugePageEnabled", l.TransparentHugePageEnabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IstioPluginCertificateAuthority. -func (i *IstioPluginCertificateAuthority) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxOSConfig. +func (l *LinuxOSConfig) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } for key, val := range rawMsg { var err error switch key { - case "certChainObjectName": - err = unpopulate(val, "CertChainObjectName", &i.CertChainObjectName) - delete(rawMsg, key) - case "certObjectName": - err = unpopulate(val, "CertObjectName", &i.CertObjectName) + case "swapFileSizeMB": + err = unpopulate(val, "SwapFileSizeMB", &l.SwapFileSizeMB) delete(rawMsg, key) - case "keyObjectName": - err = unpopulate(val, "KeyObjectName", &i.KeyObjectName) + case "sysctls": + err = unpopulate(val, "Sysctls", &l.Sysctls) delete(rawMsg, key) - case "keyVaultId": - err = unpopulate(val, "KeyVaultID", &i.KeyVaultID) + case "transparentHugePageDefrag": + err = unpopulate(val, "TransparentHugePageDefrag", &l.TransparentHugePageDefrag) delete(rawMsg, key) - case "rootCertObjectName": - err = unpopulate(val, "RootCertObjectName", &i.RootCertObjectName) + case "transparentHugePageEnabled": + err = unpopulate(val, "TransparentHugePageEnabled", &l.TransparentHugePageEnabled) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type IstioServiceMesh. -func (i IstioServiceMesh) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type LinuxProfile. +func (l LinuxProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "certificateAuthority", i.CertificateAuthority) - populate(objectMap, "components", i.Components) - populate(objectMap, "revisions", i.Revisions) + populate(objectMap, "adminUsername", l.AdminUsername) + populate(objectMap, "ssh", l.SSH) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type IstioServiceMesh. -func (i *IstioServiceMesh) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxProfile. +func (l *LinuxProfile) 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", i, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } for key, val := range rawMsg { var err error switch key { - case "certificateAuthority": - err = unpopulate(val, "CertificateAuthority", &i.CertificateAuthority) - delete(rawMsg, key) - case "components": - err = unpopulate(val, "Components", &i.Components) + case "adminUsername": + err = unpopulate(val, "AdminUsername", &l.AdminUsername) delete(rawMsg, key) - case "revisions": - err = unpopulate(val, "Revisions", &i.Revisions) + case "ssh": + err = unpopulate(val, "SSH", &l.SSH) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", i, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JWTAuthenticator. -func (j JWTAuthenticator) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type LocalDNSOverride. +func (l LocalDNSOverride) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", j.ID) - populate(objectMap, "name", j.Name) - populate(objectMap, "properties", j.Properties) - populate(objectMap, "systemData", j.SystemData) - populate(objectMap, "type", j.Type) + populate(objectMap, "cacheDurationInSeconds", l.CacheDurationInSeconds) + populate(objectMap, "forwardDestination", l.ForwardDestination) + populate(objectMap, "forwardPolicy", l.ForwardPolicy) + populate(objectMap, "maxConcurrent", l.MaxConcurrent) + populate(objectMap, "protocol", l.Protocol) + populate(objectMap, "queryLogging", l.QueryLogging) + populate(objectMap, "serveStale", l.ServeStale) + populate(objectMap, "serveStaleDurationInSeconds", l.ServeStaleDurationInSeconds) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JWTAuthenticator. -func (j *JWTAuthenticator) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type LocalDNSOverride. +func (l *LocalDNSOverride) 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", j, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &j.ID) + case "cacheDurationInSeconds": + err = unpopulate(val, "CacheDurationInSeconds", &l.CacheDurationInSeconds) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &j.Name) + case "forwardDestination": + err = unpopulate(val, "ForwardDestination", &l.ForwardDestination) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &j.Properties) + case "forwardPolicy": + err = unpopulate(val, "ForwardPolicy", &l.ForwardPolicy) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &j.SystemData) + case "maxConcurrent": + err = unpopulate(val, "MaxConcurrent", &l.MaxConcurrent) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &j.Type) + case "protocol": + err = unpopulate(val, "Protocol", &l.Protocol) + delete(rawMsg, key) + case "queryLogging": + err = unpopulate(val, "QueryLogging", &l.QueryLogging) + delete(rawMsg, key) + case "serveStale": + err = unpopulate(val, "ServeStale", &l.ServeStale) + delete(rawMsg, key) + case "serveStaleDurationInSeconds": + err = unpopulate(val, "ServeStaleDurationInSeconds", &l.ServeStaleDurationInSeconds) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JWTAuthenticatorClaimMappingExpression. -func (j JWTAuthenticatorClaimMappingExpression) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type LocalDNSProfile. +func (l LocalDNSProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "expression", j.Expression) + populate(objectMap, "kubeDNSOverrides", l.KubeDNSOverrides) + populate(objectMap, "mode", l.Mode) + populate(objectMap, "state", l.State) + populate(objectMap, "vnetDNSOverrides", l.VnetDNSOverrides) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JWTAuthenticatorClaimMappingExpression. -func (j *JWTAuthenticatorClaimMappingExpression) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type LocalDNSProfile. +func (l *LocalDNSProfile) 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", j, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } for key, val := range rawMsg { var err error switch key { - case "expression": - err = unpopulate(val, "Expression", &j.Expression) + case "kubeDNSOverrides": + err = unpopulate(val, "KubeDNSOverrides", &l.KubeDNSOverrides) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &l.Mode) + delete(rawMsg, key) + case "state": + err = unpopulate(val, "State", &l.State) + delete(rawMsg, key) + case "vnetDNSOverrides": + err = unpopulate(val, "VnetDNSOverrides", &l.VnetDNSOverrides) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", l, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JWTAuthenticatorClaimMappings. -func (j JWTAuthenticatorClaimMappings) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type Machine. +func (m Machine) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "extra", j.Extra) - populate(objectMap, "groups", j.Groups) - populate(objectMap, "uid", j.UID) - populate(objectMap, "username", j.Username) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) + populate(objectMap, "zones", m.Zones) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JWTAuthenticatorClaimMappings. -func (j *JWTAuthenticatorClaimMappings) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Machine. +func (m *Machine) 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", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "extra": - err = unpopulate(val, "Extra", &j.Extra) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "groups": - err = unpopulate(val, "Groups", &j.Groups) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) - case "uid": - err = unpopulate(val, "UID", &j.UID) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) - case "username": - err = unpopulate(val, "Username", &j.Username) + case "zones": + err = unpopulate(val, "Zones", &m.Zones) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JWTAuthenticatorExtraClaimMappingExpression. -func (j JWTAuthenticatorExtraClaimMappingExpression) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MachineIPAddress. +func (m MachineIPAddress) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "key", j.Key) - populate(objectMap, "valueExpression", j.ValueExpression) + populate(objectMap, "family", m.Family) + populate(objectMap, "ip", m.IP) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JWTAuthenticatorExtraClaimMappingExpression. -func (j *JWTAuthenticatorExtraClaimMappingExpression) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MachineIPAddress. +func (m *MachineIPAddress) 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", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "key": - err = unpopulate(val, "Key", &j.Key) + case "family": + err = unpopulate(val, "Family", &m.Family) delete(rawMsg, key) - case "valueExpression": - err = unpopulate(val, "ValueExpression", &j.ValueExpression) + case "ip": + err = unpopulate(val, "IP", &m.IP) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JWTAuthenticatorIssuer. -func (j JWTAuthenticatorIssuer) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MachineListResult. +func (m MachineListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "audiences", j.Audiences) - populate(objectMap, "url", j.URL) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JWTAuthenticatorIssuer. -func (j *JWTAuthenticatorIssuer) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MachineListResult. +func (m *MachineListResult) 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", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "audiences": - err = unpopulate(val, "Audiences", &j.Audiences) + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) delete(rawMsg, key) - case "url": - err = unpopulate(val, "URL", &j.URL) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JWTAuthenticatorListResult. -func (j JWTAuthenticatorListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MachineNetworkProperties. +func (m MachineNetworkProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", j.NextLink) - populate(objectMap, "value", j.Value) + populate(objectMap, "ipAddresses", m.IPAddresses) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JWTAuthenticatorListResult. -func (j *JWTAuthenticatorListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MachineNetworkProperties. +func (m *MachineNetworkProperties) 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", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &j.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &j.Value) + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &m.IPAddresses) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JWTAuthenticatorProperties. -func (j JWTAuthenticatorProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MachineProperties. +func (m MachineProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "claimMappings", j.ClaimMappings) - populate(objectMap, "claimValidationRules", j.ClaimValidationRules) - populate(objectMap, "issuer", j.Issuer) - populate(objectMap, "provisioningState", j.ProvisioningState) - populate(objectMap, "userValidationRules", j.UserValidationRules) + populate(objectMap, "network", m.Network) + populate(objectMap, "resourceId", m.ResourceID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JWTAuthenticatorProperties. -func (j *JWTAuthenticatorProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MachineProperties. +func (m *MachineProperties) 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", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "claimMappings": - err = unpopulate(val, "ClaimMappings", &j.ClaimMappings) - delete(rawMsg, key) - case "claimValidationRules": - err = unpopulate(val, "ClaimValidationRules", &j.ClaimValidationRules) - delete(rawMsg, key) - case "issuer": - err = unpopulate(val, "Issuer", &j.Issuer) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &j.ProvisioningState) + case "network": + err = unpopulate(val, "Network", &m.Network) delete(rawMsg, key) - case "userValidationRules": - err = unpopulate(val, "UserValidationRules", &j.UserValidationRules) + case "resourceId": + err = unpopulate(val, "ResourceID", &m.ResourceID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type JWTAuthenticatorValidationRule. -func (j JWTAuthenticatorValidationRule) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfiguration. +func (m MaintenanceConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "expression", j.Expression) - populate(objectMap, "message", j.Message) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type JWTAuthenticatorValidationRule. -func (j *JWTAuthenticatorValidationRule) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfiguration. +func (m *MaintenanceConfiguration) 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", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "expression": - err = unpopulate(val, "Expression", &j.Expression) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &j.Message) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", j, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubeletConfig. -func (k KubeletConfig) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfigurationListResult. +func (m MaintenanceConfigurationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allowedUnsafeSysctls", k.AllowedUnsafeSysctls) - populate(objectMap, "cpuCfsQuota", k.CPUCfsQuota) - populate(objectMap, "cpuCfsQuotaPeriod", k.CPUCfsQuotaPeriod) - populate(objectMap, "cpuManagerPolicy", k.CPUManagerPolicy) - populate(objectMap, "containerLogMaxFiles", k.ContainerLogMaxFiles) - populate(objectMap, "containerLogMaxSizeMB", k.ContainerLogMaxSizeMB) - populate(objectMap, "failSwapOn", k.FailSwapOn) - populate(objectMap, "imageGcHighThreshold", k.ImageGcHighThreshold) - populate(objectMap, "imageGcLowThreshold", k.ImageGcLowThreshold) - populate(objectMap, "podMaxPids", k.PodMaxPids) - populate(objectMap, "seccompDefault", k.SeccompDefault) - populate(objectMap, "topologyManagerPolicy", k.TopologyManagerPolicy) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubeletConfig. -func (k *KubeletConfig) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfigurationListResult. +func (m *MaintenanceConfigurationListResult) 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) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "allowedUnsafeSysctls": - err = unpopulate(val, "AllowedUnsafeSysctls", &k.AllowedUnsafeSysctls) - delete(rawMsg, key) - case "cpuCfsQuota": - err = unpopulate(val, "CPUCfsQuota", &k.CPUCfsQuota) - delete(rawMsg, key) - case "cpuCfsQuotaPeriod": - err = unpopulate(val, "CPUCfsQuotaPeriod", &k.CPUCfsQuotaPeriod) + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) delete(rawMsg, key) - case "cpuManagerPolicy": - err = unpopulate(val, "CPUManagerPolicy", &k.CPUManagerPolicy) - delete(rawMsg, key) - case "containerLogMaxFiles": - err = unpopulate(val, "ContainerLogMaxFiles", &k.ContainerLogMaxFiles) - delete(rawMsg, key) - case "containerLogMaxSizeMB": - err = unpopulate(val, "ContainerLogMaxSizeMB", &k.ContainerLogMaxSizeMB) - delete(rawMsg, key) - case "failSwapOn": - err = unpopulate(val, "FailSwapOn", &k.FailSwapOn) - delete(rawMsg, key) - case "imageGcHighThreshold": - err = unpopulate(val, "ImageGcHighThreshold", &k.ImageGcHighThreshold) - delete(rawMsg, key) - case "imageGcLowThreshold": - err = unpopulate(val, "ImageGcLowThreshold", &k.ImageGcLowThreshold) - delete(rawMsg, key) - case "podMaxPids": - err = unpopulate(val, "PodMaxPids", &k.PodMaxPids) - delete(rawMsg, key) - case "seccompDefault": - err = unpopulate(val, "SeccompDefault", &k.SeccompDefault) - delete(rawMsg, key) - case "topologyManagerPolicy": - err = unpopulate(val, "TopologyManagerPolicy", &k.TopologyManagerPolicy) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesPatchVersion. -func (k KubernetesPatchVersion) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfigurationProperties. +func (m MaintenanceConfigurationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "upgrades", k.Upgrades) + populate(objectMap, "maintenanceWindow", m.MaintenanceWindow) + populate(objectMap, "notAllowedTime", m.NotAllowedTime) + populate(objectMap, "timeInWeek", m.TimeInWeek) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesPatchVersion. -func (k *KubernetesPatchVersion) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfigurationProperties. +func (m *MaintenanceConfigurationProperties) 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) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "upgrades": - err = unpopulate(val, "Upgrades", &k.Upgrades) + case "maintenanceWindow": + err = unpopulate(val, "MaintenanceWindow", &m.MaintenanceWindow) + delete(rawMsg, key) + case "notAllowedTime": + err = unpopulate(val, "NotAllowedTime", &m.NotAllowedTime) + delete(rawMsg, key) + case "timeInWeek": + err = unpopulate(val, "TimeInWeek", &m.TimeInWeek) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesResourceObjectEncryptionProfile. -func (k KubernetesResourceObjectEncryptionProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindow. +func (m MaintenanceWindow) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "infrastructureEncryption", k.InfrastructureEncryption) + populate(objectMap, "durationHours", m.DurationHours) + populate(objectMap, "notAllowedDates", m.NotAllowedDates) + populate(objectMap, "schedule", m.Schedule) + populateDateType(objectMap, "startDate", m.StartDate) + populate(objectMap, "startTime", m.StartTime) + populate(objectMap, "utcOffset", m.UTCOffset) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesResourceObjectEncryptionProfile. -func (k *KubernetesResourceObjectEncryptionProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindow. +func (m *MaintenanceWindow) 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) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "infrastructureEncryption": - err = unpopulate(val, "InfrastructureEncryption", &k.InfrastructureEncryption) + case "durationHours": + err = unpopulate(val, "DurationHours", &m.DurationHours) + delete(rawMsg, key) + case "notAllowedDates": + err = unpopulate(val, "NotAllowedDates", &m.NotAllowedDates) + delete(rawMsg, key) + case "schedule": + err = unpopulate(val, "Schedule", &m.Schedule) + delete(rawMsg, key) + case "startDate": + err = unpopulateDateType(val, "StartDate", &m.StartDate) + delete(rawMsg, key) + case "startTime": + err = unpopulate(val, "StartTime", &m.StartTime) + delete(rawMsg, key) + case "utcOffset": + err = unpopulate(val, "UTCOffset", &m.UTCOffset) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesVersion. -func (k KubernetesVersion) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedCluster. +func (m ManagedCluster) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "capabilities", k.Capabilities) - populate(objectMap, "isDefault", k.IsDefault) - populate(objectMap, "isPreview", k.IsPreview) - populate(objectMap, "patchVersions", k.PatchVersions) - populate(objectMap, "version", k.Version) + populate(objectMap, "eTag", m.ETag) + populate(objectMap, "extendedLocation", m.ExtendedLocation) + populate(objectMap, "id", m.ID) + populate(objectMap, "identity", m.Identity) + populate(objectMap, "kind", m.Kind) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersion. -func (k *KubernetesVersion) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCluster. +func (m *ManagedCluster) 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) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "capabilities": - err = unpopulate(val, "Capabilities", &k.Capabilities) + case "eTag": + err = unpopulate(val, "ETag", &m.ETag) delete(rawMsg, key) - case "isDefault": - err = unpopulate(val, "IsDefault", &k.IsDefault) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &m.ExtendedLocation) delete(rawMsg, key) - case "isPreview": - err = unpopulate(val, "IsPreview", &k.IsPreview) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "patchVersions": - err = unpopulate(val, "PatchVersions", &k.PatchVersions) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &k.Version) + case "kind": + err = unpopulate(val, "Kind", &m.Kind) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesVersionCapabilities. -func (k KubernetesVersionCapabilities) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAADProfile. +func (m ManagedClusterAADProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "supportPlan", k.SupportPlan) + populate(objectMap, "adminGroupObjectIDs", m.AdminGroupObjectIDs) + populate(objectMap, "clientAppID", m.ClientAppID) + populate(objectMap, "enableAzureRBAC", m.EnableAzureRBAC) + populate(objectMap, "managed", m.Managed) + populate(objectMap, "serverAppID", m.ServerAppID) + populate(objectMap, "serverAppSecret", m.ServerAppSecret) + populate(objectMap, "tenantID", m.TenantID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionCapabilities. -func (k *KubernetesVersionCapabilities) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAADProfile. +func (m *ManagedClusterAADProfile) 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) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "supportPlan": - err = unpopulate(val, "SupportPlan", &k.SupportPlan) + case "adminGroupObjectIDs": + err = unpopulate(val, "AdminGroupObjectIDs", &m.AdminGroupObjectIDs) + delete(rawMsg, key) + case "clientAppID": + err = unpopulate(val, "ClientAppID", &m.ClientAppID) + delete(rawMsg, key) + case "enableAzureRBAC": + err = unpopulate(val, "EnableAzureRBAC", &m.EnableAzureRBAC) + delete(rawMsg, key) + case "managed": + err = unpopulate(val, "Managed", &m.Managed) + delete(rawMsg, key) + case "serverAppID": + err = unpopulate(val, "ServerAppID", &m.ServerAppID) + delete(rawMsg, key) + case "serverAppSecret": + err = unpopulate(val, "ServerAppSecret", &m.ServerAppSecret) + delete(rawMsg, key) + case "tenantID": + err = unpopulate(val, "TenantID", &m.TenantID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesVersionListResult. -func (k KubernetesVersionListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAIToolchainOperatorProfile. +func (m ManagedClusterAIToolchainOperatorProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "values", k.Values) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionListResult. -func (k *KubernetesVersionListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAIToolchainOperatorProfile. +func (m *ManagedClusterAIToolchainOperatorProfile) 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) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "values": - err = unpopulate(val, "Values", &k.Values) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LabelSelector. -func (l LabelSelector) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAPIServerAccessProfile. +func (m ManagedClusterAPIServerAccessProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "matchExpressions", l.MatchExpressions) - populate(objectMap, "matchLabels", l.MatchLabels) + populate(objectMap, "authorizedIPRanges", m.AuthorizedIPRanges) + populate(objectMap, "disableRunCommand", m.DisableRunCommand) + populate(objectMap, "enablePrivateCluster", m.EnablePrivateCluster) + populate(objectMap, "enablePrivateClusterPublicFQDN", m.EnablePrivateClusterPublicFQDN) + populate(objectMap, "enableVnetIntegration", m.EnableVnetIntegration) + populate(objectMap, "privateDNSZone", m.PrivateDNSZone) + populate(objectMap, "subnetId", m.SubnetID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LabelSelector. -func (l *LabelSelector) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAPIServerAccessProfile. +func (m *ManagedClusterAPIServerAccessProfile) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "matchExpressions": - err = unpopulate(val, "MatchExpressions", &l.MatchExpressions) + case "authorizedIPRanges": + err = unpopulate(val, "AuthorizedIPRanges", &m.AuthorizedIPRanges) + delete(rawMsg, key) + case "disableRunCommand": + err = unpopulate(val, "DisableRunCommand", &m.DisableRunCommand) + delete(rawMsg, key) + case "enablePrivateCluster": + err = unpopulate(val, "EnablePrivateCluster", &m.EnablePrivateCluster) + delete(rawMsg, key) + case "enablePrivateClusterPublicFQDN": + err = unpopulate(val, "EnablePrivateClusterPublicFQDN", &m.EnablePrivateClusterPublicFQDN) + delete(rawMsg, key) + case "enableVnetIntegration": + err = unpopulate(val, "EnableVnetIntegration", &m.EnableVnetIntegration) + delete(rawMsg, key) + case "privateDNSZone": + err = unpopulate(val, "PrivateDNSZone", &m.PrivateDNSZone) delete(rawMsg, key) - case "matchLabels": - err = unpopulate(val, "MatchLabels", &l.MatchLabels) + case "subnetId": + err = unpopulate(val, "SubnetID", &m.SubnetID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LabelSelectorRequirement. -func (l LabelSelectorRequirement) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAccessProfile. +func (m ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "key", l.Key) - populate(objectMap, "operator", l.Operator) - populate(objectMap, "values", l.Values) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LabelSelectorRequirement. -func (l *LabelSelectorRequirement) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAccessProfile. +func (m *ManagedClusterAccessProfile) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "key": - err = unpopulate(val, "Key", &l.Key) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "operator": - err = unpopulate(val, "Operator", &l.Operator) + case "location": + err = unpopulate(val, "Location", &m.Location) delete(rawMsg, key) - case "values": - err = unpopulate(val, "Values", &l.Values) + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LinuxOSConfig. -func (l LinuxOSConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "swapFileSizeMB", l.SwapFileSizeMB) - populate(objectMap, "sysctls", l.Sysctls) - populate(objectMap, "transparentHugePageDefrag", l.TransparentHugePageDefrag) - populate(objectMap, "transparentHugePageEnabled", l.TransparentHugePageEnabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxOSConfig. -func (l *LinuxOSConfig) 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", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "swapFileSizeMB": - err = unpopulate(val, "SwapFileSizeMB", &l.SwapFileSizeMB) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) - case "sysctls": - err = unpopulate(val, "Sysctls", &l.Sysctls) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) delete(rawMsg, key) - case "transparentHugePageDefrag": - err = unpopulate(val, "TransparentHugePageDefrag", &l.TransparentHugePageDefrag) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) delete(rawMsg, key) - case "transparentHugePageEnabled": - err = unpopulate(val, "TransparentHugePageEnabled", &l.TransparentHugePageEnabled) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LinuxProfile. -func (l LinuxProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAddonProfile. +func (m ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "adminUsername", l.AdminUsername) - populate(objectMap, "ssh", l.SSH) + populate(objectMap, "config", m.Config) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "identity", m.Identity) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxProfile. -func (l *LinuxProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAddonProfile. +func (m *ManagedClusterAddonProfile) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "adminUsername": - err = unpopulate(val, "AdminUsername", &l.AdminUsername) + case "config": + err = unpopulate(val, "Config", &m.Config) delete(rawMsg, key) - case "ssh": - err = unpopulate(val, "SSH", &l.SSH) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancer. -func (l LoadBalancer) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAddonProfileIdentity. +func (m ManagedClusterAddonProfileIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", l.ID) - populate(objectMap, "name", l.Name) - populate(objectMap, "properties", l.Properties) - populate(objectMap, "systemData", l.SystemData) - populate(objectMap, "type", l.Type) + populate(objectMap, "clientId", m.ClientID) + populate(objectMap, "objectId", m.ObjectID) + populate(objectMap, "resourceId", m.ResourceID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancer. -func (l *LoadBalancer) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAddonProfileIdentity. +func (m *ManagedClusterAddonProfileIdentity) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &l.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &l.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &l.Properties) + case "clientId": + err = unpopulate(val, "ClientID", &m.ClientID) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &l.SystemData) + case "objectId": + err = unpopulate(val, "ObjectID", &m.ObjectID) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &l.Type) + case "resourceId": + err = unpopulate(val, "ResourceID", &m.ResourceID) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerListResult. -func (l LoadBalancerListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAgentPoolProfile. +func (m ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", l.NextLink) - populate(objectMap, "value", l.Value) + populate(objectMap, "availabilityZones", m.AvailabilityZones) + populate(objectMap, "capacityReservationGroupID", m.CapacityReservationGroupID) + populate(objectMap, "count", m.Count) + populate(objectMap, "creationData", m.CreationData) + populate(objectMap, "currentOrchestratorVersion", m.CurrentOrchestratorVersion) + populate(objectMap, "eTag", m.ETag) + populate(objectMap, "enableAutoScaling", m.EnableAutoScaling) + populate(objectMap, "enableEncryptionAtHost", m.EnableEncryptionAtHost) + populate(objectMap, "enableFIPS", m.EnableFIPS) + populate(objectMap, "enableNodePublicIP", m.EnableNodePublicIP) + populate(objectMap, "enableUltraSSD", m.EnableUltraSSD) + populate(objectMap, "gatewayProfile", m.GatewayProfile) + populate(objectMap, "gpuInstanceProfile", m.GpuInstanceProfile) + populate(objectMap, "gpuProfile", m.GpuProfile) + populate(objectMap, "hostGroupID", m.HostGroupID) + populate(objectMap, "kubeletConfig", m.KubeletConfig) + populate(objectMap, "kubeletDiskType", m.KubeletDiskType) + populate(objectMap, "linuxOSConfig", m.LinuxOSConfig) + populate(objectMap, "localDNSProfile", m.LocalDNSProfile) + populate(objectMap, "maxCount", m.MaxCount) + populate(objectMap, "maxPods", m.MaxPods) + populate(objectMap, "messageOfTheDay", m.MessageOfTheDay) + populate(objectMap, "minCount", m.MinCount) + populate(objectMap, "mode", m.Mode) + populate(objectMap, "name", m.Name) + populate(objectMap, "networkProfile", m.NetworkProfile) + populate(objectMap, "nodeImageVersion", m.NodeImageVersion) + populate(objectMap, "nodeLabels", m.NodeLabels) + populate(objectMap, "nodePublicIPPrefixID", m.NodePublicIPPrefixID) + populate(objectMap, "nodeTaints", m.NodeTaints) + populate(objectMap, "osDiskSizeGB", m.OSDiskSizeGB) + populate(objectMap, "osDiskType", m.OSDiskType) + populate(objectMap, "osSKU", m.OSSKU) + populate(objectMap, "osType", m.OSType) + populate(objectMap, "orchestratorVersion", m.OrchestratorVersion) + populate(objectMap, "podIPAllocationMode", m.PodIPAllocationMode) + populate(objectMap, "podSubnetID", m.PodSubnetID) + populate(objectMap, "powerState", m.PowerState) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "proximityPlacementGroupID", m.ProximityPlacementGroupID) + populate(objectMap, "scaleDownMode", m.ScaleDownMode) + populate(objectMap, "scaleSetEvictionPolicy", m.ScaleSetEvictionPolicy) + populate(objectMap, "scaleSetPriority", m.ScaleSetPriority) + populate(objectMap, "securityProfile", m.SecurityProfile) + populate(objectMap, "spotMaxPrice", m.SpotMaxPrice) + populate(objectMap, "status", m.Status) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + populate(objectMap, "upgradeSettings", m.UpgradeSettings) + populate(objectMap, "vmSize", m.VMSize) + populate(objectMap, "virtualMachineNodesStatus", m.VirtualMachineNodesStatus) + populate(objectMap, "virtualMachinesProfile", m.VirtualMachinesProfile) + populate(objectMap, "vnetSubnetID", m.VnetSubnetID) + populate(objectMap, "windowsProfile", m.WindowsProfile) + populate(objectMap, "workloadRuntime", m.WorkloadRuntime) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerListResult. -func (l *LoadBalancerListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAgentPoolProfile. +func (m *ManagedClusterAgentPoolProfile) 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &l.NextLink) + case "availabilityZones": + err = unpopulate(val, "AvailabilityZones", &m.AvailabilityZones) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &l.Value) + case "capacityReservationGroupID": + err = unpopulate(val, "CapacityReservationGroupID", &m.CapacityReservationGroupID) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LoadBalancerProperties. -func (l LoadBalancerProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allowServicePlacement", l.AllowServicePlacement) - populate(objectMap, "nodeSelector", l.NodeSelector) - populate(objectMap, "primaryAgentPoolName", l.PrimaryAgentPoolName) - populate(objectMap, "provisioningState", l.ProvisioningState) - populate(objectMap, "serviceLabelSelector", l.ServiceLabelSelector) - populate(objectMap, "serviceNamespaceSelector", l.ServiceNamespaceSelector) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LoadBalancerProperties. -func (l *LoadBalancerProperties) 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", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowServicePlacement": - err = unpopulate(val, "AllowServicePlacement", &l.AllowServicePlacement) + case "count": + err = unpopulate(val, "Count", &m.Count) delete(rawMsg, key) - case "nodeSelector": - err = unpopulate(val, "NodeSelector", &l.NodeSelector) + case "creationData": + err = unpopulate(val, "CreationData", &m.CreationData) delete(rawMsg, key) - case "primaryAgentPoolName": - err = unpopulate(val, "PrimaryAgentPoolName", &l.PrimaryAgentPoolName) + case "currentOrchestratorVersion": + err = unpopulate(val, "CurrentOrchestratorVersion", &m.CurrentOrchestratorVersion) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &l.ProvisioningState) + case "eTag": + err = unpopulate(val, "ETag", &m.ETag) delete(rawMsg, key) - case "serviceLabelSelector": - err = unpopulate(val, "ServiceLabelSelector", &l.ServiceLabelSelector) + case "enableAutoScaling": + err = unpopulate(val, "EnableAutoScaling", &m.EnableAutoScaling) delete(rawMsg, key) - case "serviceNamespaceSelector": - err = unpopulate(val, "ServiceNamespaceSelector", &l.ServiceNamespaceSelector) + case "enableEncryptionAtHost": + err = unpopulate(val, "EnableEncryptionAtHost", &m.EnableEncryptionAtHost) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LocalDNSOverride. -func (l LocalDNSOverride) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "cacheDurationInSeconds", l.CacheDurationInSeconds) - populate(objectMap, "forwardDestination", l.ForwardDestination) - populate(objectMap, "forwardPolicy", l.ForwardPolicy) - populate(objectMap, "maxConcurrent", l.MaxConcurrent) - populate(objectMap, "protocol", l.Protocol) - populate(objectMap, "queryLogging", l.QueryLogging) - populate(objectMap, "serveStale", l.ServeStale) - populate(objectMap, "serveStaleDurationInSeconds", l.ServeStaleDurationInSeconds) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LocalDNSOverride. -func (l *LocalDNSOverride) 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", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "cacheDurationInSeconds": - err = unpopulate(val, "CacheDurationInSeconds", &l.CacheDurationInSeconds) + case "enableFIPS": + err = unpopulate(val, "EnableFIPS", &m.EnableFIPS) delete(rawMsg, key) - case "forwardDestination": - err = unpopulate(val, "ForwardDestination", &l.ForwardDestination) + case "enableNodePublicIP": + err = unpopulate(val, "EnableNodePublicIP", &m.EnableNodePublicIP) delete(rawMsg, key) - case "forwardPolicy": - err = unpopulate(val, "ForwardPolicy", &l.ForwardPolicy) + case "enableUltraSSD": + err = unpopulate(val, "EnableUltraSSD", &m.EnableUltraSSD) delete(rawMsg, key) - case "maxConcurrent": - err = unpopulate(val, "MaxConcurrent", &l.MaxConcurrent) + case "gatewayProfile": + err = unpopulate(val, "GatewayProfile", &m.GatewayProfile) delete(rawMsg, key) - case "protocol": - err = unpopulate(val, "Protocol", &l.Protocol) + case "gpuInstanceProfile": + err = unpopulate(val, "GpuInstanceProfile", &m.GpuInstanceProfile) delete(rawMsg, key) - case "queryLogging": - err = unpopulate(val, "QueryLogging", &l.QueryLogging) + case "gpuProfile": + err = unpopulate(val, "GpuProfile", &m.GpuProfile) delete(rawMsg, key) - case "serveStale": - err = unpopulate(val, "ServeStale", &l.ServeStale) + case "hostGroupID": + err = unpopulate(val, "HostGroupID", &m.HostGroupID) delete(rawMsg, key) - case "serveStaleDurationInSeconds": - err = unpopulate(val, "ServeStaleDurationInSeconds", &l.ServeStaleDurationInSeconds) + case "kubeletConfig": + err = unpopulate(val, "KubeletConfig", &m.KubeletConfig) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type LocalDNSProfile. -func (l LocalDNSProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "kubeDNSOverrides", l.KubeDNSOverrides) - populate(objectMap, "mode", l.Mode) - populate(objectMap, "state", l.State) - populate(objectMap, "vnetDNSOverrides", l.VnetDNSOverrides) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type LocalDNSProfile. -func (l *LocalDNSProfile) 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", l, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "kubeDNSOverrides": - err = unpopulate(val, "KubeDNSOverrides", &l.KubeDNSOverrides) + case "kubeletDiskType": + err = unpopulate(val, "KubeletDiskType", &m.KubeletDiskType) delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &l.Mode) + case "linuxOSConfig": + err = unpopulate(val, "LinuxOSConfig", &m.LinuxOSConfig) delete(rawMsg, key) - case "state": - err = unpopulate(val, "State", &l.State) + case "localDNSProfile": + err = unpopulate(val, "LocalDNSProfile", &m.LocalDNSProfile) delete(rawMsg, key) - case "vnetDNSOverrides": - err = unpopulate(val, "VnetDNSOverrides", &l.VnetDNSOverrides) + case "maxCount": + err = unpopulate(val, "MaxCount", &m.MaxCount) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type Machine. -func (m Machine) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "type", m.Type) - populate(objectMap, "zones", m.Zones) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type Machine. -func (m *Machine) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) + case "maxPods": + err = unpopulate(val, "MaxPods", &m.MaxPods) + delete(rawMsg, key) + case "messageOfTheDay": + err = unpopulate(val, "MessageOfTheDay", &m.MessageOfTheDay) + delete(rawMsg, key) + case "minCount": + err = unpopulate(val, "MinCount", &m.MinCount) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "networkProfile": + err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) + delete(rawMsg, key) + case "nodeImageVersion": + err = unpopulate(val, "NodeImageVersion", &m.NodeImageVersion) + delete(rawMsg, key) + case "nodeLabels": + err = unpopulate(val, "NodeLabels", &m.NodeLabels) + delete(rawMsg, key) + case "nodePublicIPPrefixID": + err = unpopulate(val, "NodePublicIPPrefixID", &m.NodePublicIPPrefixID) + delete(rawMsg, key) + case "nodeTaints": + err = unpopulate(val, "NodeTaints", &m.NodeTaints) + delete(rawMsg, key) + case "osDiskSizeGB": + err = unpopulate(val, "OSDiskSizeGB", &m.OSDiskSizeGB) + delete(rawMsg, key) + case "osDiskType": + err = unpopulate(val, "OSDiskType", &m.OSDiskType) + delete(rawMsg, key) + case "osSKU": + err = unpopulate(val, "OSSKU", &m.OSSKU) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &m.OSType) + delete(rawMsg, key) + case "orchestratorVersion": + err = unpopulate(val, "OrchestratorVersion", &m.OrchestratorVersion) + delete(rawMsg, key) + case "podIPAllocationMode": + err = unpopulate(val, "PodIPAllocationMode", &m.PodIPAllocationMode) + delete(rawMsg, key) + case "podSubnetID": + err = unpopulate(val, "PodSubnetID", &m.PodSubnetID) + delete(rawMsg, key) + case "powerState": + err = unpopulate(val, "PowerState", &m.PowerState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "proximityPlacementGroupID": + err = unpopulate(val, "ProximityPlacementGroupID", &m.ProximityPlacementGroupID) + delete(rawMsg, key) + case "scaleDownMode": + err = unpopulate(val, "ScaleDownMode", &m.ScaleDownMode) + delete(rawMsg, key) + case "scaleSetEvictionPolicy": + err = unpopulate(val, "ScaleSetEvictionPolicy", &m.ScaleSetEvictionPolicy) + delete(rawMsg, key) + case "scaleSetPriority": + err = unpopulate(val, "ScaleSetPriority", &m.ScaleSetPriority) + delete(rawMsg, key) + case "securityProfile": + err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) + delete(rawMsg, key) + case "spotMaxPrice": + err = unpopulate(val, "SpotMaxPrice", &m.SpotMaxPrice) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) - case "zones": - err = unpopulate(val, "Zones", &m.Zones) + case "upgradeSettings": + err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) + delete(rawMsg, key) + case "vmSize": + err = unpopulate(val, "VMSize", &m.VMSize) + delete(rawMsg, key) + case "virtualMachineNodesStatus": + err = unpopulate(val, "VirtualMachineNodesStatus", &m.VirtualMachineNodesStatus) + delete(rawMsg, key) + case "virtualMachinesProfile": + err = unpopulate(val, "VirtualMachinesProfile", &m.VirtualMachinesProfile) + delete(rawMsg, key) + case "vnetSubnetID": + err = unpopulate(val, "VnetSubnetID", &m.VnetSubnetID) + delete(rawMsg, key) + case "windowsProfile": + err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) + delete(rawMsg, key) + case "workloadRuntime": + err = unpopulate(val, "WorkloadRuntime", &m.WorkloadRuntime) delete(rawMsg, key) } if err != nil { @@ -2906,17 +2676,68 @@ func (m *Machine) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MachineHardwareProfile. -func (m MachineHardwareProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAgentPoolProfileProperties. +func (m ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "availabilityZones", m.AvailabilityZones) + populate(objectMap, "capacityReservationGroupID", m.CapacityReservationGroupID) + populate(objectMap, "count", m.Count) + populate(objectMap, "creationData", m.CreationData) + populate(objectMap, "currentOrchestratorVersion", m.CurrentOrchestratorVersion) + populate(objectMap, "eTag", m.ETag) + populate(objectMap, "enableAutoScaling", m.EnableAutoScaling) + populate(objectMap, "enableEncryptionAtHost", m.EnableEncryptionAtHost) + populate(objectMap, "enableFIPS", m.EnableFIPS) + populate(objectMap, "enableNodePublicIP", m.EnableNodePublicIP) + populate(objectMap, "enableUltraSSD", m.EnableUltraSSD) + populate(objectMap, "gatewayProfile", m.GatewayProfile) populate(objectMap, "gpuInstanceProfile", m.GpuInstanceProfile) populate(objectMap, "gpuProfile", m.GpuProfile) + populate(objectMap, "hostGroupID", m.HostGroupID) + populate(objectMap, "kubeletConfig", m.KubeletConfig) + populate(objectMap, "kubeletDiskType", m.KubeletDiskType) + populate(objectMap, "linuxOSConfig", m.LinuxOSConfig) + populate(objectMap, "localDNSProfile", m.LocalDNSProfile) + populate(objectMap, "maxCount", m.MaxCount) + populate(objectMap, "maxPods", m.MaxPods) + populate(objectMap, "messageOfTheDay", m.MessageOfTheDay) + populate(objectMap, "minCount", m.MinCount) + populate(objectMap, "mode", m.Mode) + populate(objectMap, "networkProfile", m.NetworkProfile) + populate(objectMap, "nodeImageVersion", m.NodeImageVersion) + populate(objectMap, "nodeLabels", m.NodeLabels) + populate(objectMap, "nodePublicIPPrefixID", m.NodePublicIPPrefixID) + populate(objectMap, "nodeTaints", m.NodeTaints) + populate(objectMap, "osDiskSizeGB", m.OSDiskSizeGB) + populate(objectMap, "osDiskType", m.OSDiskType) + populate(objectMap, "osSKU", m.OSSKU) + populate(objectMap, "osType", m.OSType) + populate(objectMap, "orchestratorVersion", m.OrchestratorVersion) + populate(objectMap, "podIPAllocationMode", m.PodIPAllocationMode) + populate(objectMap, "podSubnetID", m.PodSubnetID) + populate(objectMap, "powerState", m.PowerState) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "proximityPlacementGroupID", m.ProximityPlacementGroupID) + populate(objectMap, "scaleDownMode", m.ScaleDownMode) + populate(objectMap, "scaleSetEvictionPolicy", m.ScaleSetEvictionPolicy) + populate(objectMap, "scaleSetPriority", m.ScaleSetPriority) + populate(objectMap, "securityProfile", m.SecurityProfile) + populate(objectMap, "spotMaxPrice", m.SpotMaxPrice) + populate(objectMap, "status", m.Status) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + populate(objectMap, "upgradeSettings", m.UpgradeSettings) populate(objectMap, "vmSize", m.VMSize) + populate(objectMap, "virtualMachineNodesStatus", m.VirtualMachineNodesStatus) + populate(objectMap, "virtualMachinesProfile", m.VirtualMachinesProfile) + populate(objectMap, "vnetSubnetID", m.VnetSubnetID) + populate(objectMap, "windowsProfile", m.WindowsProfile) + populate(objectMap, "workloadRuntime", m.WorkloadRuntime) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MachineHardwareProfile. -func (m *MachineHardwareProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAgentPoolProfileProperties. +func (m *ManagedClusterAgentPoolProfileProperties) 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", m, err) @@ -2924,110 +2745,165 @@ func (m *MachineHardwareProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "gpuInstanceProfile": - err = unpopulate(val, "GpuInstanceProfile", &m.GpuInstanceProfile) + case "availabilityZones": + err = unpopulate(val, "AvailabilityZones", &m.AvailabilityZones) delete(rawMsg, key) - case "gpuProfile": - err = unpopulate(val, "GpuProfile", &m.GpuProfile) + case "capacityReservationGroupID": + err = unpopulate(val, "CapacityReservationGroupID", &m.CapacityReservationGroupID) delete(rawMsg, key) - case "vmSize": - err = unpopulate(val, "VMSize", &m.VMSize) + case "count": + err = unpopulate(val, "Count", &m.Count) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MachineIPAddress. -func (m MachineIPAddress) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "family", m.Family) - populate(objectMap, "ip", m.IP) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MachineIPAddress. -func (m *MachineIPAddress) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "family": - err = unpopulate(val, "Family", &m.Family) - delete(rawMsg, key) - case "ip": - err = unpopulate(val, "IP", &m.IP) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type MachineKubernetesProfile. -func (m MachineKubernetesProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "artifactStreamingProfile", m.ArtifactStreamingProfile) - populate(objectMap, "currentOrchestratorVersion", m.CurrentOrchestratorVersion) - populate(objectMap, "kubeletConfig", m.KubeletConfig) - populate(objectMap, "kubeletDiskType", m.KubeletDiskType) - populate(objectMap, "maxPods", m.MaxPods) - populate(objectMap, "nodeInitializationTaints", m.NodeInitializationTaints) - populate(objectMap, "nodeLabels", m.NodeLabels) - populate(objectMap, "nodeName", m.NodeName) - populate(objectMap, "nodeTaints", m.NodeTaints) - populate(objectMap, "orchestratorVersion", m.OrchestratorVersion) - populate(objectMap, "workloadRuntime", m.WorkloadRuntime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type MachineKubernetesProfile. -func (m *MachineKubernetesProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "artifactStreamingProfile": - err = unpopulate(val, "ArtifactStreamingProfile", &m.ArtifactStreamingProfile) + case "creationData": + err = unpopulate(val, "CreationData", &m.CreationData) delete(rawMsg, key) case "currentOrchestratorVersion": err = unpopulate(val, "CurrentOrchestratorVersion", &m.CurrentOrchestratorVersion) delete(rawMsg, key) + case "eTag": + err = unpopulate(val, "ETag", &m.ETag) + delete(rawMsg, key) + case "enableAutoScaling": + err = unpopulate(val, "EnableAutoScaling", &m.EnableAutoScaling) + delete(rawMsg, key) + case "enableEncryptionAtHost": + err = unpopulate(val, "EnableEncryptionAtHost", &m.EnableEncryptionAtHost) + delete(rawMsg, key) + case "enableFIPS": + err = unpopulate(val, "EnableFIPS", &m.EnableFIPS) + delete(rawMsg, key) + case "enableNodePublicIP": + err = unpopulate(val, "EnableNodePublicIP", &m.EnableNodePublicIP) + delete(rawMsg, key) + case "enableUltraSSD": + err = unpopulate(val, "EnableUltraSSD", &m.EnableUltraSSD) + delete(rawMsg, key) + case "gatewayProfile": + err = unpopulate(val, "GatewayProfile", &m.GatewayProfile) + delete(rawMsg, key) + case "gpuInstanceProfile": + err = unpopulate(val, "GpuInstanceProfile", &m.GpuInstanceProfile) + delete(rawMsg, key) + case "gpuProfile": + err = unpopulate(val, "GpuProfile", &m.GpuProfile) + delete(rawMsg, key) + case "hostGroupID": + err = unpopulate(val, "HostGroupID", &m.HostGroupID) + delete(rawMsg, key) case "kubeletConfig": err = unpopulate(val, "KubeletConfig", &m.KubeletConfig) delete(rawMsg, key) case "kubeletDiskType": err = unpopulate(val, "KubeletDiskType", &m.KubeletDiskType) delete(rawMsg, key) + case "linuxOSConfig": + err = unpopulate(val, "LinuxOSConfig", &m.LinuxOSConfig) + delete(rawMsg, key) + case "localDNSProfile": + err = unpopulate(val, "LocalDNSProfile", &m.LocalDNSProfile) + delete(rawMsg, key) + case "maxCount": + err = unpopulate(val, "MaxCount", &m.MaxCount) + delete(rawMsg, key) case "maxPods": err = unpopulate(val, "MaxPods", &m.MaxPods) delete(rawMsg, key) - case "nodeInitializationTaints": - err = unpopulate(val, "NodeInitializationTaints", &m.NodeInitializationTaints) + case "messageOfTheDay": + err = unpopulate(val, "MessageOfTheDay", &m.MessageOfTheDay) + delete(rawMsg, key) + case "minCount": + err = unpopulate(val, "MinCount", &m.MinCount) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "networkProfile": + err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) + delete(rawMsg, key) + case "nodeImageVersion": + err = unpopulate(val, "NodeImageVersion", &m.NodeImageVersion) delete(rawMsg, key) case "nodeLabels": err = unpopulate(val, "NodeLabels", &m.NodeLabels) delete(rawMsg, key) - case "nodeName": - err = unpopulate(val, "NodeName", &m.NodeName) + case "nodePublicIPPrefixID": + err = unpopulate(val, "NodePublicIPPrefixID", &m.NodePublicIPPrefixID) delete(rawMsg, key) case "nodeTaints": err = unpopulate(val, "NodeTaints", &m.NodeTaints) delete(rawMsg, key) + case "osDiskSizeGB": + err = unpopulate(val, "OSDiskSizeGB", &m.OSDiskSizeGB) + delete(rawMsg, key) + case "osDiskType": + err = unpopulate(val, "OSDiskType", &m.OSDiskType) + delete(rawMsg, key) + case "osSKU": + err = unpopulate(val, "OSSKU", &m.OSSKU) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &m.OSType) + delete(rawMsg, key) case "orchestratorVersion": err = unpopulate(val, "OrchestratorVersion", &m.OrchestratorVersion) delete(rawMsg, key) + case "podIPAllocationMode": + err = unpopulate(val, "PodIPAllocationMode", &m.PodIPAllocationMode) + delete(rawMsg, key) + case "podSubnetID": + err = unpopulate(val, "PodSubnetID", &m.PodSubnetID) + delete(rawMsg, key) + case "powerState": + err = unpopulate(val, "PowerState", &m.PowerState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "proximityPlacementGroupID": + err = unpopulate(val, "ProximityPlacementGroupID", &m.ProximityPlacementGroupID) + delete(rawMsg, key) + case "scaleDownMode": + err = unpopulate(val, "ScaleDownMode", &m.ScaleDownMode) + delete(rawMsg, key) + case "scaleSetEvictionPolicy": + err = unpopulate(val, "ScaleSetEvictionPolicy", &m.ScaleSetEvictionPolicy) + delete(rawMsg, key) + case "scaleSetPriority": + err = unpopulate(val, "ScaleSetPriority", &m.ScaleSetPriority) + delete(rawMsg, key) + case "securityProfile": + err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) + delete(rawMsg, key) + case "spotMaxPrice": + err = unpopulate(val, "SpotMaxPrice", &m.SpotMaxPrice) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "upgradeSettings": + err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) + delete(rawMsg, key) + case "vmSize": + err = unpopulate(val, "VMSize", &m.VMSize) + delete(rawMsg, key) + case "virtualMachineNodesStatus": + err = unpopulate(val, "VirtualMachineNodesStatus", &m.VirtualMachineNodesStatus) + delete(rawMsg, key) + case "virtualMachinesProfile": + err = unpopulate(val, "VirtualMachinesProfile", &m.VirtualMachinesProfile) + delete(rawMsg, key) + case "vnetSubnetID": + err = unpopulate(val, "VnetSubnetID", &m.VnetSubnetID) + delete(rawMsg, key) + case "windowsProfile": + err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) + delete(rawMsg, key) case "workloadRuntime": err = unpopulate(val, "WorkloadRuntime", &m.WorkloadRuntime) delete(rawMsg, key) @@ -3039,16 +2915,16 @@ func (m *MachineKubernetesProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MachineListResult. -func (m MachineListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAutoUpgradeProfile. +func (m ManagedClusterAutoUpgradeProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) + populate(objectMap, "nodeOSUpgradeChannel", m.NodeOSUpgradeChannel) + populate(objectMap, "upgradeChannel", m.UpgradeChannel) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MachineListResult. -func (m *MachineListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAutoUpgradeProfile. +func (m *ManagedClusterAutoUpgradeProfile) 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", m, err) @@ -3056,11 +2932,11 @@ func (m *MachineListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) + case "nodeOSUpgradeChannel": + err = unpopulate(val, "NodeOSUpgradeChannel", &m.NodeOSUpgradeChannel) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + case "upgradeChannel": + err = unpopulate(val, "UpgradeChannel", &m.UpgradeChannel) delete(rawMsg, key) } if err != nil { @@ -3070,20 +2946,15 @@ func (m *MachineListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MachineNetworkProperties. -func (m MachineNetworkProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfile. +func (m ManagedClusterAzureMonitorProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enableNodePublicIP", m.EnableNodePublicIP) - populate(objectMap, "ipAddresses", m.IPAddresses) - populate(objectMap, "nodePublicIPPrefixID", m.NodePublicIPPrefixID) - populate(objectMap, "nodePublicIPTags", m.NodePublicIPTags) - populate(objectMap, "podSubnetID", m.PodSubnetID) - populate(objectMap, "vnetSubnetID", m.VnetSubnetID) + populate(objectMap, "metrics", m.Metrics) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MachineNetworkProperties. -func (m *MachineNetworkProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfile. +func (m *ManagedClusterAzureMonitorProfile) 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", m, err) @@ -3091,23 +2962,8 @@ func (m *MachineNetworkProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "enableNodePublicIP": - err = unpopulate(val, "EnableNodePublicIP", &m.EnableNodePublicIP) - delete(rawMsg, key) - case "ipAddresses": - err = unpopulate(val, "IPAddresses", &m.IPAddresses) - delete(rawMsg, key) - case "nodePublicIPPrefixID": - err = unpopulate(val, "NodePublicIPPrefixID", &m.NodePublicIPPrefixID) - delete(rawMsg, key) - case "nodePublicIPTags": - err = unpopulate(val, "NodePublicIPTags", &m.NodePublicIPTags) - delete(rawMsg, key) - case "podSubnetID": - err = unpopulate(val, "PodSubnetID", &m.PodSubnetID) - delete(rawMsg, key) - case "vnetSubnetID": - err = unpopulate(val, "VnetSubnetID", &m.VnetSubnetID) + case "metrics": + err = unpopulate(val, "Metrics", &m.Metrics) delete(rawMsg, key) } if err != nil { @@ -3117,21 +2973,16 @@ func (m *MachineNetworkProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MachineOSProfile. -func (m MachineOSProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileKubeStateMetrics. +func (m ManagedClusterAzureMonitorProfileKubeStateMetrics) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enableFIPS", m.EnableFIPS) - populate(objectMap, "linuxProfile", m.LinuxProfile) - populate(objectMap, "osDiskSizeGB", m.OSDiskSizeGB) - populate(objectMap, "osDiskType", m.OSDiskType) - populate(objectMap, "osSKU", m.OSSKU) - populate(objectMap, "osType", m.OSType) - populate(objectMap, "windowsProfile", m.WindowsProfile) + populate(objectMap, "metricAnnotationsAllowList", m.MetricAnnotationsAllowList) + populate(objectMap, "metricLabelsAllowlist", m.MetricLabelsAllowlist) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MachineOSProfile. -func (m *MachineOSProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileKubeStateMetrics. +func (m *ManagedClusterAzureMonitorProfileKubeStateMetrics) 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", m, err) @@ -3139,26 +2990,11 @@ func (m *MachineOSProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "enableFIPS": - err = unpopulate(val, "EnableFIPS", &m.EnableFIPS) - delete(rawMsg, key) - case "linuxProfile": - err = unpopulate(val, "LinuxProfile", &m.LinuxProfile) + case "metricAnnotationsAllowList": + err = unpopulate(val, "MetricAnnotationsAllowList", &m.MetricAnnotationsAllowList) delete(rawMsg, key) - case "osDiskSizeGB": - err = unpopulate(val, "OSDiskSizeGB", &m.OSDiskSizeGB) - delete(rawMsg, key) - case "osDiskType": - err = unpopulate(val, "OSDiskType", &m.OSDiskType) - delete(rawMsg, key) - case "osSKU": - err = unpopulate(val, "OSSKU", &m.OSSKU) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &m.OSType) - delete(rawMsg, key) - case "windowsProfile": - err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) + case "metricLabelsAllowlist": + err = unpopulate(val, "MetricLabelsAllowlist", &m.MetricLabelsAllowlist) delete(rawMsg, key) } if err != nil { @@ -3168,16 +3004,16 @@ func (m *MachineOSProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MachineOSProfileLinuxProfile. -func (m MachineOSProfileLinuxProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileMetrics. +func (m ManagedClusterAzureMonitorProfileMetrics) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "linuxOSConfig", m.LinuxOSConfig) - populate(objectMap, "messageOfTheDay", m.MessageOfTheDay) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "kubeStateMetrics", m.KubeStateMetrics) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MachineOSProfileLinuxProfile. -func (m *MachineOSProfileLinuxProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileMetrics. +func (m *ManagedClusterAzureMonitorProfileMetrics) 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", m, err) @@ -3185,11 +3021,11 @@ func (m *MachineOSProfileLinuxProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "linuxOSConfig": - err = unpopulate(val, "LinuxOSConfig", &m.LinuxOSConfig) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) - case "messageOfTheDay": - err = unpopulate(val, "MessageOfTheDay", &m.MessageOfTheDay) + case "kubeStateMetrics": + err = unpopulate(val, "KubeStateMetrics", &m.KubeStateMetrics) delete(rawMsg, key) } if err != nil { @@ -3199,27 +3035,16 @@ func (m *MachineOSProfileLinuxProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MachineProperties. -func (m MachineProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterBootstrapProfile. +func (m ManagedClusterBootstrapProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "eTag", m.ETag) - populate(objectMap, "hardware", m.Hardware) - populate(objectMap, "kubernetes", m.Kubernetes) - populate(objectMap, "mode", m.Mode) - populate(objectMap, "network", m.Network) - populate(objectMap, "nodeImageVersion", m.NodeImageVersion) - populate(objectMap, "operatingSystem", m.OperatingSystem) - populate(objectMap, "priority", m.Priority) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "resourceId", m.ResourceID) - populate(objectMap, "security", m.Security) - populate(objectMap, "status", m.Status) - populate(objectMap, "tags", m.Tags) + populate(objectMap, "artifactSource", m.ArtifactSource) + populate(objectMap, "containerRegistryId", m.ContainerRegistryID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MachineProperties. -func (m *MachineProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterBootstrapProfile. +func (m *ManagedClusterBootstrapProfile) 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", m, err) @@ -3227,44 +3052,11 @@ func (m *MachineProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "eTag": - err = unpopulate(val, "ETag", &m.ETag) - delete(rawMsg, key) - case "hardware": - err = unpopulate(val, "Hardware", &m.Hardware) - delete(rawMsg, key) - case "kubernetes": - err = unpopulate(val, "Kubernetes", &m.Kubernetes) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) - delete(rawMsg, key) - case "network": - err = unpopulate(val, "Network", &m.Network) - delete(rawMsg, key) - case "nodeImageVersion": - err = unpopulate(val, "NodeImageVersion", &m.NodeImageVersion) - delete(rawMsg, key) - case "operatingSystem": - err = unpopulate(val, "OperatingSystem", &m.OperatingSystem) - delete(rawMsg, key) - case "priority": - err = unpopulate(val, "Priority", &m.Priority) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &m.ResourceID) - delete(rawMsg, key) - case "security": - err = unpopulate(val, "Security", &m.Security) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &m.Status) + case "artifactSource": + err = unpopulate(val, "ArtifactSource", &m.ArtifactSource) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) + case "containerRegistryId": + err = unpopulate(val, "ContainerRegistryID", &m.ContainerRegistryID) delete(rawMsg, key) } if err != nil { @@ -3274,19 +3066,15 @@ func (m *MachineProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MachineStatus. -func (m MachineStatus) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterCostAnalysis. +func (m ManagedClusterCostAnalysis) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "creationTimestamp", m.CreationTimestamp) - populate(objectMap, "driftAction", m.DriftAction) - populate(objectMap, "driftReason", m.DriftReason) - populate(objectMap, "provisioningError", m.ProvisioningError) - populate(objectMap, "vmState", m.VMState) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MachineStatus. -func (m *MachineStatus) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterCostAnalysis. +func (m *ManagedClusterCostAnalysis) 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", m, err) @@ -3294,20 +3082,8 @@ func (m *MachineStatus) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "creationTimestamp": - err = unpopulateDateTimeRFC3339(val, "CreationTimestamp", &m.CreationTimestamp) - delete(rawMsg, key) - case "driftAction": - err = unpopulate(val, "DriftAction", &m.DriftAction) - delete(rawMsg, key) - case "driftReason": - err = unpopulate(val, "DriftReason", &m.DriftReason) - delete(rawMsg, key) - case "provisioningError": - err = unpopulate(val, "ProvisioningError", &m.ProvisioningError) - delete(rawMsg, key) - case "vmState": - err = unpopulate(val, "VMState", &m.VMState) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -3317,19 +3093,18 @@ func (m *MachineStatus) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfiguration. -func (m MaintenanceConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterHTTPProxyConfig. +func (m ManagedClusterHTTPProxyConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "type", m.Type) + populate(objectMap, "httpProxy", m.HTTPProxy) + populate(objectMap, "httpsProxy", m.HTTPSProxy) + populate(objectMap, "noProxy", m.NoProxy) + populate(objectMap, "trustedCa", m.TrustedCa) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfiguration. -func (m *MaintenanceConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterHTTPProxyConfig. +func (m *ManagedClusterHTTPProxyConfig) 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", m, err) @@ -3337,20 +3112,17 @@ func (m *MaintenanceConfiguration) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) + case "httpProxy": + err = unpopulate(val, "HTTPProxy", &m.HTTPProxy) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "httpsProxy": + err = unpopulate(val, "HTTPSProxy", &m.HTTPSProxy) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) + case "noProxy": + err = unpopulate(val, "NoProxy", &m.NoProxy) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "trustedCa": + err = unpopulate(val, "TrustedCa", &m.TrustedCa) delete(rawMsg, key) } if err != nil { @@ -3360,16 +3132,19 @@ func (m *MaintenanceConfiguration) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfigurationListResult. -func (m MaintenanceConfigurationListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIdentity. +func (m ManagedClusterIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) + populate(objectMap, "delegatedResources", m.DelegatedResources) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfigurationListResult. -func (m *MaintenanceConfigurationListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIdentity. +func (m *ManagedClusterIdentity) 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", m, err) @@ -3377,11 +3152,20 @@ func (m *MaintenanceConfigurationListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) + case "delegatedResources": + err = unpopulate(val, "DelegatedResources", &m.DelegatedResources) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) delete(rawMsg, key) } if err != nil { @@ -3391,17 +3175,15 @@ func (m *MaintenanceConfigurationListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfigurationProperties. -func (m MaintenanceConfigurationProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIngressProfile. +func (m ManagedClusterIngressProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "maintenanceWindow", m.MaintenanceWindow) - populate(objectMap, "notAllowedTime", m.NotAllowedTime) - populate(objectMap, "timeInWeek", m.TimeInWeek) + populate(objectMap, "webAppRouting", m.WebAppRouting) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfigurationProperties. -func (m *MaintenanceConfigurationProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIngressProfile. +func (m *ManagedClusterIngressProfile) 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", m, err) @@ -3409,14 +3191,8 @@ func (m *MaintenanceConfigurationProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "maintenanceWindow": - err = unpopulate(val, "MaintenanceWindow", &m.MaintenanceWindow) - delete(rawMsg, key) - case "notAllowedTime": - err = unpopulate(val, "NotAllowedTime", &m.NotAllowedTime) - delete(rawMsg, key) - case "timeInWeek": - err = unpopulate(val, "TimeInWeek", &m.TimeInWeek) + case "webAppRouting": + err = unpopulate(val, "WebAppRouting", &m.WebAppRouting) delete(rawMsg, key) } if err != nil { @@ -3426,20 +3202,15 @@ func (m *MaintenanceConfigurationProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindow. -func (m MaintenanceWindow) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIngressProfileNginx. +func (m ManagedClusterIngressProfileNginx) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "durationHours", m.DurationHours) - populate(objectMap, "notAllowedDates", m.NotAllowedDates) - populate(objectMap, "schedule", m.Schedule) - populateDateType(objectMap, "startDate", m.StartDate) - populate(objectMap, "startTime", m.StartTime) - populate(objectMap, "utcOffset", m.UTCOffset) + populate(objectMap, "defaultIngressControllerType", m.DefaultIngressControllerType) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindow. -func (m *MaintenanceWindow) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIngressProfileNginx. +func (m *ManagedClusterIngressProfileNginx) 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", m, err) @@ -3447,23 +3218,8 @@ func (m *MaintenanceWindow) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "durationHours": - err = unpopulate(val, "DurationHours", &m.DurationHours) - delete(rawMsg, key) - case "notAllowedDates": - err = unpopulate(val, "NotAllowedDates", &m.NotAllowedDates) - delete(rawMsg, key) - case "schedule": - err = unpopulate(val, "Schedule", &m.Schedule) - delete(rawMsg, key) - case "startDate": - err = unpopulateDateType(val, "StartDate", &m.StartDate) - delete(rawMsg, key) - case "startTime": - err = unpopulate(val, "StartTime", &m.StartTime) - delete(rawMsg, key) - case "utcOffset": - err = unpopulate(val, "UTCOffset", &m.UTCOffset) + case "defaultIngressControllerType": + err = unpopulate(val, "DefaultIngressControllerType", &m.DefaultIngressControllerType) delete(rawMsg, key) } if err != nil { @@ -3473,26 +3229,18 @@ func (m *MaintenanceWindow) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedCluster. -func (m ManagedCluster) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIngressProfileWebAppRouting. +func (m ManagedClusterIngressProfileWebAppRouting) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "eTag", m.ETag) - populate(objectMap, "extendedLocation", m.ExtendedLocation) - populate(objectMap, "id", m.ID) + populate(objectMap, "dnsZoneResourceIds", m.DNSZoneResourceIDs) + populate(objectMap, "enabled", m.Enabled) populate(objectMap, "identity", m.Identity) - populate(objectMap, "kind", m.Kind) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) + populate(objectMap, "nginx", m.Nginx) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCluster. -func (m *ManagedCluster) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIngressProfileWebAppRouting. +func (m *ManagedClusterIngressProfileWebAppRouting) 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", m, err) @@ -3500,41 +3248,17 @@ func (m *ManagedCluster) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "eTag": - err = unpopulate(val, "ETag", &m.ETag) - delete(rawMsg, key) - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &m.ExtendedLocation) + case "dnsZoneResourceIds": + err = unpopulate(val, "DNSZoneResourceIDs", &m.DNSZoneResourceIDs) delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &m.ID) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) case "identity": err = unpopulate(val, "Identity", &m.Identity) delete(rawMsg, key) - case "kind": - err = unpopulate(val, "Kind", &m.Kind) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &m.SKU) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "nginx": + err = unpopulate(val, "Nginx", &m.Nginx) delete(rawMsg, key) } if err != nil { @@ -3544,21 +3268,16 @@ func (m *ManagedCluster) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAADProfile. -func (m ManagedClusterAADProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterListResult. +func (m ManagedClusterListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "adminGroupObjectIDs", m.AdminGroupObjectIDs) - populate(objectMap, "clientAppID", m.ClientAppID) - populate(objectMap, "enableAzureRBAC", m.EnableAzureRBAC) - populate(objectMap, "managed", m.Managed) - populate(objectMap, "serverAppID", m.ServerAppID) - populate(objectMap, "serverAppSecret", m.ServerAppSecret) - populate(objectMap, "tenantID", m.TenantID) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAADProfile. -func (m *ManagedClusterAADProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterListResult. +func (m *ManagedClusterListResult) 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", m, err) @@ -3566,53 +3285,11 @@ func (m *ManagedClusterAADProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "adminGroupObjectIDs": - err = unpopulate(val, "AdminGroupObjectIDs", &m.AdminGroupObjectIDs) - delete(rawMsg, key) - case "clientAppID": - err = unpopulate(val, "ClientAppID", &m.ClientAppID) - delete(rawMsg, key) - case "enableAzureRBAC": - err = unpopulate(val, "EnableAzureRBAC", &m.EnableAzureRBAC) - delete(rawMsg, key) - case "managed": - err = unpopulate(val, "Managed", &m.Managed) - delete(rawMsg, key) - case "serverAppID": - err = unpopulate(val, "ServerAppID", &m.ServerAppID) - delete(rawMsg, key) - case "serverAppSecret": - err = unpopulate(val, "ServerAppSecret", &m.ServerAppSecret) - delete(rawMsg, key) - case "tenantID": - err = unpopulate(val, "TenantID", &m.TenantID) + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAIToolchainOperatorProfile. -func (m ManagedClusterAIToolchainOperatorProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAIToolchainOperatorProfile. -func (m *ManagedClusterAIToolchainOperatorProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { @@ -3622,21 +3299,22 @@ func (m *ManagedClusterAIToolchainOperatorProfile) UnmarshalJSON(data []byte) er return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAPIServerAccessProfile. -func (m ManagedClusterAPIServerAccessProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfile. +func (m ManagedClusterLoadBalancerProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "authorizedIPRanges", m.AuthorizedIPRanges) - populate(objectMap, "disableRunCommand", m.DisableRunCommand) - populate(objectMap, "enablePrivateCluster", m.EnablePrivateCluster) - populate(objectMap, "enablePrivateClusterPublicFQDN", m.EnablePrivateClusterPublicFQDN) - populate(objectMap, "enableVnetIntegration", m.EnableVnetIntegration) - populate(objectMap, "privateDNSZone", m.PrivateDNSZone) - populate(objectMap, "subnetId", m.SubnetID) + populate(objectMap, "allocatedOutboundPorts", m.AllocatedOutboundPorts) + populate(objectMap, "backendPoolType", m.BackendPoolType) + populate(objectMap, "effectiveOutboundIPs", m.EffectiveOutboundIPs) + populate(objectMap, "enableMultipleStandardLoadBalancers", m.EnableMultipleStandardLoadBalancers) + populate(objectMap, "idleTimeoutInMinutes", m.IdleTimeoutInMinutes) + populate(objectMap, "managedOutboundIPs", m.ManagedOutboundIPs) + populate(objectMap, "outboundIPPrefixes", m.OutboundIPPrefixes) + populate(objectMap, "outboundIPs", m.OutboundIPs) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAPIServerAccessProfile. -func (m *ManagedClusterAPIServerAccessProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfile. +func (m *ManagedClusterLoadBalancerProfile) 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", m, err) @@ -3644,77 +3322,29 @@ func (m *ManagedClusterAPIServerAccessProfile) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "authorizedIPRanges": - err = unpopulate(val, "AuthorizedIPRanges", &m.AuthorizedIPRanges) - delete(rawMsg, key) - case "disableRunCommand": - err = unpopulate(val, "DisableRunCommand", &m.DisableRunCommand) - delete(rawMsg, key) - case "enablePrivateCluster": - err = unpopulate(val, "EnablePrivateCluster", &m.EnablePrivateCluster) - delete(rawMsg, key) - case "enablePrivateClusterPublicFQDN": - err = unpopulate(val, "EnablePrivateClusterPublicFQDN", &m.EnablePrivateClusterPublicFQDN) - delete(rawMsg, key) - case "enableVnetIntegration": - err = unpopulate(val, "EnableVnetIntegration", &m.EnableVnetIntegration) - delete(rawMsg, key) - case "privateDNSZone": - err = unpopulate(val, "PrivateDNSZone", &m.PrivateDNSZone) - delete(rawMsg, key) - case "subnetId": - err = unpopulate(val, "SubnetID", &m.SubnetID) + case "allocatedOutboundPorts": + err = unpopulate(val, "AllocatedOutboundPorts", &m.AllocatedOutboundPorts) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAccessProfile. -func (m ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAccessProfile. -func (m *ManagedClusterAccessProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) + case "backendPoolType": + err = unpopulate(val, "BackendPoolType", &m.BackendPoolType) delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) + case "effectiveOutboundIPs": + err = unpopulate(val, "EffectiveOutboundIPs", &m.EffectiveOutboundIPs) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) + case "enableMultipleStandardLoadBalancers": + err = unpopulate(val, "EnableMultipleStandardLoadBalancers", &m.EnableMultipleStandardLoadBalancers) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "idleTimeoutInMinutes": + err = unpopulate(val, "IdleTimeoutInMinutes", &m.IdleTimeoutInMinutes) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) + case "managedOutboundIPs": + err = unpopulate(val, "ManagedOutboundIPs", &m.ManagedOutboundIPs) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) + case "outboundIPPrefixes": + err = unpopulate(val, "OutboundIPPrefixes", &m.OutboundIPPrefixes) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "outboundIPs": + err = unpopulate(val, "OutboundIPs", &m.OutboundIPs) delete(rawMsg, key) } if err != nil { @@ -3724,17 +3354,16 @@ func (m *ManagedClusterAccessProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAddonProfile. -func (m ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileManagedOutboundIPs. +func (m ManagedClusterLoadBalancerProfileManagedOutboundIPs) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "config", m.Config) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "identity", m.Identity) + populate(objectMap, "count", m.Count) + populate(objectMap, "countIPv6", m.CountIPv6) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAddonProfile. -func (m *ManagedClusterAddonProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileManagedOutboundIPs. +func (m *ManagedClusterLoadBalancerProfileManagedOutboundIPs) 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", m, err) @@ -3742,14 +3371,11 @@ func (m *ManagedClusterAddonProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "config": - err = unpopulate(val, "Config", &m.Config) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "count": + err = unpopulate(val, "Count", &m.Count) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) + case "countIPv6": + err = unpopulate(val, "CountIPv6", &m.CountIPv6) delete(rawMsg, key) } if err != nil { @@ -3759,17 +3385,15 @@ func (m *ManagedClusterAddonProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAddonProfileIdentity. -func (m ManagedClusterAddonProfileIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPPrefixes. +func (m ManagedClusterLoadBalancerProfileOutboundIPPrefixes) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientId", m.ClientID) - populate(objectMap, "objectId", m.ObjectID) - populate(objectMap, "resourceId", m.ResourceID) + populate(objectMap, "publicIPPrefixes", m.PublicIPPrefixes) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAddonProfileIdentity. -func (m *ManagedClusterAddonProfileIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPPrefixes. +func (m *ManagedClusterLoadBalancerProfileOutboundIPPrefixes) 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", m, err) @@ -3777,2167 +3401,8 @@ func (m *ManagedClusterAddonProfileIdentity) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &m.ClientID) - delete(rawMsg, key) - case "objectId": - err = unpopulate(val, "ObjectID", &m.ObjectID) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &m.ResourceID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAgentPoolProfile. -func (m ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "artifactStreamingProfile", m.ArtifactStreamingProfile) - populate(objectMap, "availabilityZones", m.AvailabilityZones) - populate(objectMap, "capacityReservationGroupID", m.CapacityReservationGroupID) - populate(objectMap, "count", m.Count) - populate(objectMap, "creationData", m.CreationData) - populate(objectMap, "currentOrchestratorVersion", m.CurrentOrchestratorVersion) - populate(objectMap, "eTag", m.ETag) - populate(objectMap, "enableAutoScaling", m.EnableAutoScaling) - populate(objectMap, "enableEncryptionAtHost", m.EnableEncryptionAtHost) - populate(objectMap, "enableFIPS", m.EnableFIPS) - populate(objectMap, "enableNodePublicIP", m.EnableNodePublicIP) - populate(objectMap, "enableUltraSSD", m.EnableUltraSSD) - populate(objectMap, "gatewayProfile", m.GatewayProfile) - populate(objectMap, "gpuInstanceProfile", m.GpuInstanceProfile) - populate(objectMap, "gpuProfile", m.GpuProfile) - populate(objectMap, "hostGroupID", m.HostGroupID) - populate(objectMap, "kubeletConfig", m.KubeletConfig) - populate(objectMap, "kubeletDiskType", m.KubeletDiskType) - populate(objectMap, "linuxOSConfig", m.LinuxOSConfig) - populate(objectMap, "localDNSProfile", m.LocalDNSProfile) - populate(objectMap, "maxCount", m.MaxCount) - populate(objectMap, "maxPods", m.MaxPods) - populate(objectMap, "messageOfTheDay", m.MessageOfTheDay) - populate(objectMap, "minCount", m.MinCount) - populate(objectMap, "mode", m.Mode) - populate(objectMap, "name", m.Name) - populate(objectMap, "networkProfile", m.NetworkProfile) - populate(objectMap, "nodeCustomizationProfile", m.NodeCustomizationProfile) - populate(objectMap, "nodeImageVersion", m.NodeImageVersion) - populate(objectMap, "nodeInitializationTaints", m.NodeInitializationTaints) - populate(objectMap, "nodeLabels", m.NodeLabels) - populate(objectMap, "nodePublicIPPrefixID", m.NodePublicIPPrefixID) - populate(objectMap, "nodeTaints", m.NodeTaints) - populate(objectMap, "osDiskSizeGB", m.OSDiskSizeGB) - populate(objectMap, "osDiskType", m.OSDiskType) - populate(objectMap, "osSKU", m.OSSKU) - populate(objectMap, "osType", m.OSType) - populate(objectMap, "orchestratorVersion", m.OrchestratorVersion) - populate(objectMap, "podIPAllocationMode", m.PodIPAllocationMode) - populate(objectMap, "podSubnetID", m.PodSubnetID) - populate(objectMap, "powerState", m.PowerState) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "proximityPlacementGroupID", m.ProximityPlacementGroupID) - populate(objectMap, "scaleDownMode", m.ScaleDownMode) - populate(objectMap, "scaleSetEvictionPolicy", m.ScaleSetEvictionPolicy) - populate(objectMap, "scaleSetPriority", m.ScaleSetPriority) - populate(objectMap, "securityProfile", m.SecurityProfile) - populate(objectMap, "spotMaxPrice", m.SpotMaxPrice) - populate(objectMap, "status", m.Status) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - populate(objectMap, "upgradeSettings", m.UpgradeSettings) - populate(objectMap, "upgradeSettingsBlueGreen", m.UpgradeSettingsBlueGreen) - populate(objectMap, "upgradeStrategy", m.UpgradeStrategy) - populate(objectMap, "vmSize", m.VMSize) - populate(objectMap, "virtualMachineNodesStatus", m.VirtualMachineNodesStatus) - populate(objectMap, "virtualMachinesProfile", m.VirtualMachinesProfile) - populate(objectMap, "vnetSubnetID", m.VnetSubnetID) - populate(objectMap, "windowsProfile", m.WindowsProfile) - populate(objectMap, "workloadRuntime", m.WorkloadRuntime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAgentPoolProfile. -func (m *ManagedClusterAgentPoolProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "artifactStreamingProfile": - err = unpopulate(val, "ArtifactStreamingProfile", &m.ArtifactStreamingProfile) - delete(rawMsg, key) - case "availabilityZones": - err = unpopulate(val, "AvailabilityZones", &m.AvailabilityZones) - delete(rawMsg, key) - case "capacityReservationGroupID": - err = unpopulate(val, "CapacityReservationGroupID", &m.CapacityReservationGroupID) - delete(rawMsg, key) - case "count": - err = unpopulate(val, "Count", &m.Count) - delete(rawMsg, key) - case "creationData": - err = unpopulate(val, "CreationData", &m.CreationData) - delete(rawMsg, key) - case "currentOrchestratorVersion": - err = unpopulate(val, "CurrentOrchestratorVersion", &m.CurrentOrchestratorVersion) - delete(rawMsg, key) - case "eTag": - err = unpopulate(val, "ETag", &m.ETag) - delete(rawMsg, key) - case "enableAutoScaling": - err = unpopulate(val, "EnableAutoScaling", &m.EnableAutoScaling) - delete(rawMsg, key) - case "enableEncryptionAtHost": - err = unpopulate(val, "EnableEncryptionAtHost", &m.EnableEncryptionAtHost) - delete(rawMsg, key) - case "enableFIPS": - err = unpopulate(val, "EnableFIPS", &m.EnableFIPS) - delete(rawMsg, key) - case "enableNodePublicIP": - err = unpopulate(val, "EnableNodePublicIP", &m.EnableNodePublicIP) - delete(rawMsg, key) - case "enableUltraSSD": - err = unpopulate(val, "EnableUltraSSD", &m.EnableUltraSSD) - delete(rawMsg, key) - case "gatewayProfile": - err = unpopulate(val, "GatewayProfile", &m.GatewayProfile) - delete(rawMsg, key) - case "gpuInstanceProfile": - err = unpopulate(val, "GpuInstanceProfile", &m.GpuInstanceProfile) - delete(rawMsg, key) - case "gpuProfile": - err = unpopulate(val, "GpuProfile", &m.GpuProfile) - delete(rawMsg, key) - case "hostGroupID": - err = unpopulate(val, "HostGroupID", &m.HostGroupID) - delete(rawMsg, key) - case "kubeletConfig": - err = unpopulate(val, "KubeletConfig", &m.KubeletConfig) - delete(rawMsg, key) - case "kubeletDiskType": - err = unpopulate(val, "KubeletDiskType", &m.KubeletDiskType) - delete(rawMsg, key) - case "linuxOSConfig": - err = unpopulate(val, "LinuxOSConfig", &m.LinuxOSConfig) - delete(rawMsg, key) - case "localDNSProfile": - err = unpopulate(val, "LocalDNSProfile", &m.LocalDNSProfile) - delete(rawMsg, key) - case "maxCount": - err = unpopulate(val, "MaxCount", &m.MaxCount) - delete(rawMsg, key) - case "maxPods": - err = unpopulate(val, "MaxPods", &m.MaxPods) - delete(rawMsg, key) - case "messageOfTheDay": - err = unpopulate(val, "MessageOfTheDay", &m.MessageOfTheDay) - delete(rawMsg, key) - case "minCount": - err = unpopulate(val, "MinCount", &m.MinCount) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "networkProfile": - err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) - delete(rawMsg, key) - case "nodeCustomizationProfile": - err = unpopulate(val, "NodeCustomizationProfile", &m.NodeCustomizationProfile) - delete(rawMsg, key) - case "nodeImageVersion": - err = unpopulate(val, "NodeImageVersion", &m.NodeImageVersion) - delete(rawMsg, key) - case "nodeInitializationTaints": - err = unpopulate(val, "NodeInitializationTaints", &m.NodeInitializationTaints) - delete(rawMsg, key) - case "nodeLabels": - err = unpopulate(val, "NodeLabels", &m.NodeLabels) - delete(rawMsg, key) - case "nodePublicIPPrefixID": - err = unpopulate(val, "NodePublicIPPrefixID", &m.NodePublicIPPrefixID) - delete(rawMsg, key) - case "nodeTaints": - err = unpopulate(val, "NodeTaints", &m.NodeTaints) - delete(rawMsg, key) - case "osDiskSizeGB": - err = unpopulate(val, "OSDiskSizeGB", &m.OSDiskSizeGB) - delete(rawMsg, key) - case "osDiskType": - err = unpopulate(val, "OSDiskType", &m.OSDiskType) - delete(rawMsg, key) - case "osSKU": - err = unpopulate(val, "OSSKU", &m.OSSKU) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &m.OSType) - delete(rawMsg, key) - case "orchestratorVersion": - err = unpopulate(val, "OrchestratorVersion", &m.OrchestratorVersion) - delete(rawMsg, key) - case "podIPAllocationMode": - err = unpopulate(val, "PodIPAllocationMode", &m.PodIPAllocationMode) - delete(rawMsg, key) - case "podSubnetID": - err = unpopulate(val, "PodSubnetID", &m.PodSubnetID) - delete(rawMsg, key) - case "powerState": - err = unpopulate(val, "PowerState", &m.PowerState) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "proximityPlacementGroupID": - err = unpopulate(val, "ProximityPlacementGroupID", &m.ProximityPlacementGroupID) - delete(rawMsg, key) - case "scaleDownMode": - err = unpopulate(val, "ScaleDownMode", &m.ScaleDownMode) - delete(rawMsg, key) - case "scaleSetEvictionPolicy": - err = unpopulate(val, "ScaleSetEvictionPolicy", &m.ScaleSetEvictionPolicy) - delete(rawMsg, key) - case "scaleSetPriority": - err = unpopulate(val, "ScaleSetPriority", &m.ScaleSetPriority) - delete(rawMsg, key) - case "securityProfile": - err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) - delete(rawMsg, key) - case "spotMaxPrice": - err = unpopulate(val, "SpotMaxPrice", &m.SpotMaxPrice) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &m.Status) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - case "upgradeSettings": - err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) - delete(rawMsg, key) - case "upgradeSettingsBlueGreen": - err = unpopulate(val, "UpgradeSettingsBlueGreen", &m.UpgradeSettingsBlueGreen) - delete(rawMsg, key) - case "upgradeStrategy": - err = unpopulate(val, "UpgradeStrategy", &m.UpgradeStrategy) - delete(rawMsg, key) - case "vmSize": - err = unpopulate(val, "VMSize", &m.VMSize) - delete(rawMsg, key) - case "virtualMachineNodesStatus": - err = unpopulate(val, "VirtualMachineNodesStatus", &m.VirtualMachineNodesStatus) - delete(rawMsg, key) - case "virtualMachinesProfile": - err = unpopulate(val, "VirtualMachinesProfile", &m.VirtualMachinesProfile) - delete(rawMsg, key) - case "vnetSubnetID": - err = unpopulate(val, "VnetSubnetID", &m.VnetSubnetID) - delete(rawMsg, key) - case "windowsProfile": - err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) - delete(rawMsg, key) - case "workloadRuntime": - err = unpopulate(val, "WorkloadRuntime", &m.WorkloadRuntime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAgentPoolProfileProperties. -func (m ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "artifactStreamingProfile", m.ArtifactStreamingProfile) - populate(objectMap, "availabilityZones", m.AvailabilityZones) - populate(objectMap, "capacityReservationGroupID", m.CapacityReservationGroupID) - populate(objectMap, "count", m.Count) - populate(objectMap, "creationData", m.CreationData) - populate(objectMap, "currentOrchestratorVersion", m.CurrentOrchestratorVersion) - populate(objectMap, "eTag", m.ETag) - populate(objectMap, "enableAutoScaling", m.EnableAutoScaling) - populate(objectMap, "enableEncryptionAtHost", m.EnableEncryptionAtHost) - populate(objectMap, "enableFIPS", m.EnableFIPS) - populate(objectMap, "enableNodePublicIP", m.EnableNodePublicIP) - populate(objectMap, "enableUltraSSD", m.EnableUltraSSD) - populate(objectMap, "gatewayProfile", m.GatewayProfile) - populate(objectMap, "gpuInstanceProfile", m.GpuInstanceProfile) - populate(objectMap, "gpuProfile", m.GpuProfile) - populate(objectMap, "hostGroupID", m.HostGroupID) - populate(objectMap, "kubeletConfig", m.KubeletConfig) - populate(objectMap, "kubeletDiskType", m.KubeletDiskType) - populate(objectMap, "linuxOSConfig", m.LinuxOSConfig) - populate(objectMap, "localDNSProfile", m.LocalDNSProfile) - populate(objectMap, "maxCount", m.MaxCount) - populate(objectMap, "maxPods", m.MaxPods) - populate(objectMap, "messageOfTheDay", m.MessageOfTheDay) - populate(objectMap, "minCount", m.MinCount) - populate(objectMap, "mode", m.Mode) - populate(objectMap, "networkProfile", m.NetworkProfile) - populate(objectMap, "nodeCustomizationProfile", m.NodeCustomizationProfile) - populate(objectMap, "nodeImageVersion", m.NodeImageVersion) - populate(objectMap, "nodeInitializationTaints", m.NodeInitializationTaints) - populate(objectMap, "nodeLabels", m.NodeLabels) - populate(objectMap, "nodePublicIPPrefixID", m.NodePublicIPPrefixID) - populate(objectMap, "nodeTaints", m.NodeTaints) - populate(objectMap, "osDiskSizeGB", m.OSDiskSizeGB) - populate(objectMap, "osDiskType", m.OSDiskType) - populate(objectMap, "osSKU", m.OSSKU) - populate(objectMap, "osType", m.OSType) - populate(objectMap, "orchestratorVersion", m.OrchestratorVersion) - populate(objectMap, "podIPAllocationMode", m.PodIPAllocationMode) - populate(objectMap, "podSubnetID", m.PodSubnetID) - populate(objectMap, "powerState", m.PowerState) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "proximityPlacementGroupID", m.ProximityPlacementGroupID) - populate(objectMap, "scaleDownMode", m.ScaleDownMode) - populate(objectMap, "scaleSetEvictionPolicy", m.ScaleSetEvictionPolicy) - populate(objectMap, "scaleSetPriority", m.ScaleSetPriority) - populate(objectMap, "securityProfile", m.SecurityProfile) - populate(objectMap, "spotMaxPrice", m.SpotMaxPrice) - populate(objectMap, "status", m.Status) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) - populate(objectMap, "upgradeSettings", m.UpgradeSettings) - populate(objectMap, "upgradeSettingsBlueGreen", m.UpgradeSettingsBlueGreen) - populate(objectMap, "upgradeStrategy", m.UpgradeStrategy) - populate(objectMap, "vmSize", m.VMSize) - populate(objectMap, "virtualMachineNodesStatus", m.VirtualMachineNodesStatus) - populate(objectMap, "virtualMachinesProfile", m.VirtualMachinesProfile) - populate(objectMap, "vnetSubnetID", m.VnetSubnetID) - populate(objectMap, "windowsProfile", m.WindowsProfile) - populate(objectMap, "workloadRuntime", m.WorkloadRuntime) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAgentPoolProfileProperties. -func (m *ManagedClusterAgentPoolProfileProperties) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "artifactStreamingProfile": - err = unpopulate(val, "ArtifactStreamingProfile", &m.ArtifactStreamingProfile) - delete(rawMsg, key) - case "availabilityZones": - err = unpopulate(val, "AvailabilityZones", &m.AvailabilityZones) - delete(rawMsg, key) - case "capacityReservationGroupID": - err = unpopulate(val, "CapacityReservationGroupID", &m.CapacityReservationGroupID) - delete(rawMsg, key) - case "count": - err = unpopulate(val, "Count", &m.Count) - delete(rawMsg, key) - case "creationData": - err = unpopulate(val, "CreationData", &m.CreationData) - delete(rawMsg, key) - case "currentOrchestratorVersion": - err = unpopulate(val, "CurrentOrchestratorVersion", &m.CurrentOrchestratorVersion) - delete(rawMsg, key) - case "eTag": - err = unpopulate(val, "ETag", &m.ETag) - delete(rawMsg, key) - case "enableAutoScaling": - err = unpopulate(val, "EnableAutoScaling", &m.EnableAutoScaling) - delete(rawMsg, key) - case "enableEncryptionAtHost": - err = unpopulate(val, "EnableEncryptionAtHost", &m.EnableEncryptionAtHost) - delete(rawMsg, key) - case "enableFIPS": - err = unpopulate(val, "EnableFIPS", &m.EnableFIPS) - delete(rawMsg, key) - case "enableNodePublicIP": - err = unpopulate(val, "EnableNodePublicIP", &m.EnableNodePublicIP) - delete(rawMsg, key) - case "enableUltraSSD": - err = unpopulate(val, "EnableUltraSSD", &m.EnableUltraSSD) - delete(rawMsg, key) - case "gatewayProfile": - err = unpopulate(val, "GatewayProfile", &m.GatewayProfile) - delete(rawMsg, key) - case "gpuInstanceProfile": - err = unpopulate(val, "GpuInstanceProfile", &m.GpuInstanceProfile) - delete(rawMsg, key) - case "gpuProfile": - err = unpopulate(val, "GpuProfile", &m.GpuProfile) - delete(rawMsg, key) - case "hostGroupID": - err = unpopulate(val, "HostGroupID", &m.HostGroupID) - delete(rawMsg, key) - case "kubeletConfig": - err = unpopulate(val, "KubeletConfig", &m.KubeletConfig) - delete(rawMsg, key) - case "kubeletDiskType": - err = unpopulate(val, "KubeletDiskType", &m.KubeletDiskType) - delete(rawMsg, key) - case "linuxOSConfig": - err = unpopulate(val, "LinuxOSConfig", &m.LinuxOSConfig) - delete(rawMsg, key) - case "localDNSProfile": - err = unpopulate(val, "LocalDNSProfile", &m.LocalDNSProfile) - delete(rawMsg, key) - case "maxCount": - err = unpopulate(val, "MaxCount", &m.MaxCount) - delete(rawMsg, key) - case "maxPods": - err = unpopulate(val, "MaxPods", &m.MaxPods) - delete(rawMsg, key) - case "messageOfTheDay": - err = unpopulate(val, "MessageOfTheDay", &m.MessageOfTheDay) - delete(rawMsg, key) - case "minCount": - err = unpopulate(val, "MinCount", &m.MinCount) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) - delete(rawMsg, key) - case "networkProfile": - err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) - delete(rawMsg, key) - case "nodeCustomizationProfile": - err = unpopulate(val, "NodeCustomizationProfile", &m.NodeCustomizationProfile) - delete(rawMsg, key) - case "nodeImageVersion": - err = unpopulate(val, "NodeImageVersion", &m.NodeImageVersion) - delete(rawMsg, key) - case "nodeInitializationTaints": - err = unpopulate(val, "NodeInitializationTaints", &m.NodeInitializationTaints) - delete(rawMsg, key) - case "nodeLabels": - err = unpopulate(val, "NodeLabels", &m.NodeLabels) - delete(rawMsg, key) - case "nodePublicIPPrefixID": - err = unpopulate(val, "NodePublicIPPrefixID", &m.NodePublicIPPrefixID) - delete(rawMsg, key) - case "nodeTaints": - err = unpopulate(val, "NodeTaints", &m.NodeTaints) - delete(rawMsg, key) - case "osDiskSizeGB": - err = unpopulate(val, "OSDiskSizeGB", &m.OSDiskSizeGB) - delete(rawMsg, key) - case "osDiskType": - err = unpopulate(val, "OSDiskType", &m.OSDiskType) - delete(rawMsg, key) - case "osSKU": - err = unpopulate(val, "OSSKU", &m.OSSKU) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &m.OSType) - delete(rawMsg, key) - case "orchestratorVersion": - err = unpopulate(val, "OrchestratorVersion", &m.OrchestratorVersion) - delete(rawMsg, key) - case "podIPAllocationMode": - err = unpopulate(val, "PodIPAllocationMode", &m.PodIPAllocationMode) - delete(rawMsg, key) - case "podSubnetID": - err = unpopulate(val, "PodSubnetID", &m.PodSubnetID) - delete(rawMsg, key) - case "powerState": - err = unpopulate(val, "PowerState", &m.PowerState) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "proximityPlacementGroupID": - err = unpopulate(val, "ProximityPlacementGroupID", &m.ProximityPlacementGroupID) - delete(rawMsg, key) - case "scaleDownMode": - err = unpopulate(val, "ScaleDownMode", &m.ScaleDownMode) - delete(rawMsg, key) - case "scaleSetEvictionPolicy": - err = unpopulate(val, "ScaleSetEvictionPolicy", &m.ScaleSetEvictionPolicy) - delete(rawMsg, key) - case "scaleSetPriority": - err = unpopulate(val, "ScaleSetPriority", &m.ScaleSetPriority) - delete(rawMsg, key) - case "securityProfile": - err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) - delete(rawMsg, key) - case "spotMaxPrice": - err = unpopulate(val, "SpotMaxPrice", &m.SpotMaxPrice) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &m.Status) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - case "upgradeSettings": - err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) - delete(rawMsg, key) - case "upgradeSettingsBlueGreen": - err = unpopulate(val, "UpgradeSettingsBlueGreen", &m.UpgradeSettingsBlueGreen) - delete(rawMsg, key) - case "upgradeStrategy": - err = unpopulate(val, "UpgradeStrategy", &m.UpgradeStrategy) - delete(rawMsg, key) - case "vmSize": - err = unpopulate(val, "VMSize", &m.VMSize) - delete(rawMsg, key) - case "virtualMachineNodesStatus": - err = unpopulate(val, "VirtualMachineNodesStatus", &m.VirtualMachineNodesStatus) - delete(rawMsg, key) - case "virtualMachinesProfile": - err = unpopulate(val, "VirtualMachinesProfile", &m.VirtualMachinesProfile) - delete(rawMsg, key) - case "vnetSubnetID": - err = unpopulate(val, "VnetSubnetID", &m.VnetSubnetID) - delete(rawMsg, key) - case "windowsProfile": - err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) - delete(rawMsg, key) - case "workloadRuntime": - err = unpopulate(val, "WorkloadRuntime", &m.WorkloadRuntime) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAutoUpgradeProfile. -func (m ManagedClusterAutoUpgradeProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nodeOSUpgradeChannel", m.NodeOSUpgradeChannel) - populate(objectMap, "upgradeChannel", m.UpgradeChannel) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAutoUpgradeProfile. -func (m *ManagedClusterAutoUpgradeProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nodeOSUpgradeChannel": - err = unpopulate(val, "NodeOSUpgradeChannel", &m.NodeOSUpgradeChannel) - delete(rawMsg, key) - case "upgradeChannel": - err = unpopulate(val, "UpgradeChannel", &m.UpgradeChannel) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfile. -func (m ManagedClusterAzureMonitorProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "appMonitoring", m.AppMonitoring) - populate(objectMap, "containerInsights", m.ContainerInsights) - populate(objectMap, "metrics", m.Metrics) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfile. -func (m *ManagedClusterAzureMonitorProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "appMonitoring": - err = unpopulate(val, "AppMonitoring", &m.AppMonitoring) - delete(rawMsg, key) - case "containerInsights": - err = unpopulate(val, "ContainerInsights", &m.ContainerInsights) - delete(rawMsg, key) - case "metrics": - err = unpopulate(val, "Metrics", &m.Metrics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoring. -func (m ManagedClusterAzureMonitorProfileAppMonitoring) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "autoInstrumentation", m.AutoInstrumentation) - populate(objectMap, "openTelemetryLogs", m.OpenTelemetryLogs) - populate(objectMap, "openTelemetryMetrics", m.OpenTelemetryMetrics) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoring. -func (m *ManagedClusterAzureMonitorProfileAppMonitoring) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "autoInstrumentation": - err = unpopulate(val, "AutoInstrumentation", &m.AutoInstrumentation) - delete(rawMsg, key) - case "openTelemetryLogs": - err = unpopulate(val, "OpenTelemetryLogs", &m.OpenTelemetryLogs) - delete(rawMsg, key) - case "openTelemetryMetrics": - err = unpopulate(val, "OpenTelemetryMetrics", &m.OpenTelemetryMetrics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation. -func (m ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation. -func (m *ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs. -func (m ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "port", m.Port) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs. -func (m *ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogs) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &m.Port) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics. -func (m ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "port", m.Port) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics. -func (m *ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "port": - err = unpopulate(val, "Port", &m.Port) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileContainerInsights. -func (m ManagedClusterAzureMonitorProfileContainerInsights) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "disableCustomMetrics", m.DisableCustomMetrics) - populate(objectMap, "disablePrometheusMetricsScraping", m.DisablePrometheusMetricsScraping) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "logAnalyticsWorkspaceResourceId", m.LogAnalyticsWorkspaceResourceID) - populate(objectMap, "syslogPort", m.SyslogPort) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileContainerInsights. -func (m *ManagedClusterAzureMonitorProfileContainerInsights) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "disableCustomMetrics": - err = unpopulate(val, "DisableCustomMetrics", &m.DisableCustomMetrics) - delete(rawMsg, key) - case "disablePrometheusMetricsScraping": - err = unpopulate(val, "DisablePrometheusMetricsScraping", &m.DisablePrometheusMetricsScraping) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "logAnalyticsWorkspaceResourceId": - err = unpopulate(val, "LogAnalyticsWorkspaceResourceID", &m.LogAnalyticsWorkspaceResourceID) - delete(rawMsg, key) - case "syslogPort": - err = unpopulate(val, "SyslogPort", &m.SyslogPort) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileKubeStateMetrics. -func (m ManagedClusterAzureMonitorProfileKubeStateMetrics) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "metricAnnotationsAllowList", m.MetricAnnotationsAllowList) - populate(objectMap, "metricLabelsAllowlist", m.MetricLabelsAllowlist) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileKubeStateMetrics. -func (m *ManagedClusterAzureMonitorProfileKubeStateMetrics) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "metricAnnotationsAllowList": - err = unpopulate(val, "MetricAnnotationsAllowList", &m.MetricAnnotationsAllowList) - delete(rawMsg, key) - case "metricLabelsAllowlist": - err = unpopulate(val, "MetricLabelsAllowlist", &m.MetricLabelsAllowlist) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileMetrics. -func (m ManagedClusterAzureMonitorProfileMetrics) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "kubeStateMetrics", m.KubeStateMetrics) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileMetrics. -func (m *ManagedClusterAzureMonitorProfileMetrics) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "kubeStateMetrics": - err = unpopulate(val, "KubeStateMetrics", &m.KubeStateMetrics) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterBootstrapProfile. -func (m ManagedClusterBootstrapProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "artifactSource", m.ArtifactSource) - populate(objectMap, "containerRegistryId", m.ContainerRegistryID) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterBootstrapProfile. -func (m *ManagedClusterBootstrapProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "artifactSource": - err = unpopulate(val, "ArtifactSource", &m.ArtifactSource) - delete(rawMsg, key) - case "containerRegistryId": - err = unpopulate(val, "ContainerRegistryID", &m.ContainerRegistryID) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterCostAnalysis. -func (m ManagedClusterCostAnalysis) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterCostAnalysis. -func (m *ManagedClusterCostAnalysis) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterHTTPProxyConfig. -func (m ManagedClusterHTTPProxyConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "effectiveNoProxy", m.EffectiveNoProxy) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "httpProxy", m.HTTPProxy) - populate(objectMap, "httpsProxy", m.HTTPSProxy) - populate(objectMap, "noProxy", m.NoProxy) - populate(objectMap, "trustedCa", m.TrustedCa) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterHTTPProxyConfig. -func (m *ManagedClusterHTTPProxyConfig) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "effectiveNoProxy": - err = unpopulate(val, "EffectiveNoProxy", &m.EffectiveNoProxy) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "httpProxy": - err = unpopulate(val, "HTTPProxy", &m.HTTPProxy) - delete(rawMsg, key) - case "httpsProxy": - err = unpopulate(val, "HTTPSProxy", &m.HTTPSProxy) - delete(rawMsg, key) - case "noProxy": - err = unpopulate(val, "NoProxy", &m.NoProxy) - delete(rawMsg, key) - case "trustedCa": - err = unpopulate(val, "TrustedCa", &m.TrustedCa) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterHostedSystemProfile. -func (m ManagedClusterHostedSystemProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterHostedSystemProfile. -func (m *ManagedClusterHostedSystemProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIdentity. -func (m ManagedClusterIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "delegatedResources", m.DelegatedResources) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIdentity. -func (m *ManagedClusterIdentity) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "delegatedResources": - err = unpopulate(val, "DelegatedResources", &m.DelegatedResources) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &m.PrincipalID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &m.TenantID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIngressDefaultDomainProfile. -func (m ManagedClusterIngressDefaultDomainProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "domainName", m.DomainName) - populate(objectMap, "enabled", m.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIngressDefaultDomainProfile. -func (m *ManagedClusterIngressDefaultDomainProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "domainName": - err = unpopulate(val, "DomainName", &m.DomainName) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIngressProfile. -func (m ManagedClusterIngressProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "applicationLoadBalancer", m.ApplicationLoadBalancer) - populate(objectMap, "gatewayAPI", m.GatewayAPI) - populate(objectMap, "webAppRouting", m.WebAppRouting) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIngressProfile. -func (m *ManagedClusterIngressProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "applicationLoadBalancer": - err = unpopulate(val, "ApplicationLoadBalancer", &m.ApplicationLoadBalancer) - delete(rawMsg, key) - case "gatewayAPI": - err = unpopulate(val, "GatewayAPI", &m.GatewayAPI) - delete(rawMsg, key) - case "webAppRouting": - err = unpopulate(val, "WebAppRouting", &m.WebAppRouting) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIngressProfileApplicationLoadBalancer. -func (m ManagedClusterIngressProfileApplicationLoadBalancer) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "identity", m.Identity) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIngressProfileApplicationLoadBalancer. -func (m *ManagedClusterIngressProfileApplicationLoadBalancer) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIngressProfileGatewayConfiguration. -func (m ManagedClusterIngressProfileGatewayConfiguration) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "installation", m.Installation) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIngressProfileGatewayConfiguration. -func (m *ManagedClusterIngressProfileGatewayConfiguration) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "installation": - err = unpopulate(val, "Installation", &m.Installation) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIngressProfileNginx. -func (m ManagedClusterIngressProfileNginx) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "defaultIngressControllerType", m.DefaultIngressControllerType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIngressProfileNginx. -func (m *ManagedClusterIngressProfileNginx) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "defaultIngressControllerType": - err = unpopulate(val, "DefaultIngressControllerType", &m.DefaultIngressControllerType) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIngressProfileWebAppRouting. -func (m ManagedClusterIngressProfileWebAppRouting) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "dnsZoneResourceIds", m.DNSZoneResourceIDs) - populate(objectMap, "defaultDomain", m.DefaultDomain) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "identity", m.Identity) - populate(objectMap, "nginx", m.Nginx) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIngressProfileWebAppRouting. -func (m *ManagedClusterIngressProfileWebAppRouting) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "dnsZoneResourceIds": - err = unpopulate(val, "DNSZoneResourceIDs", &m.DNSZoneResourceIDs) - delete(rawMsg, key) - case "defaultDomain": - err = unpopulate(val, "DefaultDomain", &m.DefaultDomain) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) - case "nginx": - err = unpopulate(val, "Nginx", &m.Nginx) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterListResult. -func (m ManagedClusterListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterListResult. -func (m *ManagedClusterListResult) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfile. -func (m ManagedClusterLoadBalancerProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allocatedOutboundPorts", m.AllocatedOutboundPorts) - populate(objectMap, "backendPoolType", m.BackendPoolType) - populate(objectMap, "clusterServiceLoadBalancerHealthProbeMode", m.ClusterServiceLoadBalancerHealthProbeMode) - populate(objectMap, "effectiveOutboundIPs", m.EffectiveOutboundIPs) - populate(objectMap, "enableMultipleStandardLoadBalancers", m.EnableMultipleStandardLoadBalancers) - populate(objectMap, "idleTimeoutInMinutes", m.IdleTimeoutInMinutes) - populate(objectMap, "managedOutboundIPs", m.ManagedOutboundIPs) - populate(objectMap, "outboundIPPrefixes", m.OutboundIPPrefixes) - populate(objectMap, "outboundIPs", m.OutboundIPs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfile. -func (m *ManagedClusterLoadBalancerProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allocatedOutboundPorts": - err = unpopulate(val, "AllocatedOutboundPorts", &m.AllocatedOutboundPorts) - delete(rawMsg, key) - case "backendPoolType": - err = unpopulate(val, "BackendPoolType", &m.BackendPoolType) - delete(rawMsg, key) - case "clusterServiceLoadBalancerHealthProbeMode": - err = unpopulate(val, "ClusterServiceLoadBalancerHealthProbeMode", &m.ClusterServiceLoadBalancerHealthProbeMode) - delete(rawMsg, key) - case "effectiveOutboundIPs": - err = unpopulate(val, "EffectiveOutboundIPs", &m.EffectiveOutboundIPs) - delete(rawMsg, key) - case "enableMultipleStandardLoadBalancers": - err = unpopulate(val, "EnableMultipleStandardLoadBalancers", &m.EnableMultipleStandardLoadBalancers) - delete(rawMsg, key) - case "idleTimeoutInMinutes": - err = unpopulate(val, "IdleTimeoutInMinutes", &m.IdleTimeoutInMinutes) - delete(rawMsg, key) - case "managedOutboundIPs": - err = unpopulate(val, "ManagedOutboundIPs", &m.ManagedOutboundIPs) - delete(rawMsg, key) - case "outboundIPPrefixes": - err = unpopulate(val, "OutboundIPPrefixes", &m.OutboundIPPrefixes) - delete(rawMsg, key) - case "outboundIPs": - err = unpopulate(val, "OutboundIPs", &m.OutboundIPs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileManagedOutboundIPs. -func (m ManagedClusterLoadBalancerProfileManagedOutboundIPs) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", m.Count) - populate(objectMap, "countIPv6", m.CountIPv6) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileManagedOutboundIPs. -func (m *ManagedClusterLoadBalancerProfileManagedOutboundIPs) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &m.Count) - delete(rawMsg, key) - case "countIPv6": - err = unpopulate(val, "CountIPv6", &m.CountIPv6) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPPrefixes. -func (m ManagedClusterLoadBalancerProfileOutboundIPPrefixes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "publicIPPrefixes", m.PublicIPPrefixes) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPPrefixes. -func (m *ManagedClusterLoadBalancerProfileOutboundIPPrefixes) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "publicIPPrefixes": - err = unpopulate(val, "PublicIPPrefixes", &m.PublicIPPrefixes) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPs. -func (m ManagedClusterLoadBalancerProfileOutboundIPs) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "publicIPs", m.PublicIPs) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPs. -func (m *ManagedClusterLoadBalancerProfileOutboundIPs) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "publicIPs": - err = unpopulate(val, "PublicIPs", &m.PublicIPs) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterManagedOutboundIPProfile. -func (m ManagedClusterManagedOutboundIPProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", m.Count) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterManagedOutboundIPProfile. -func (m *ManagedClusterManagedOutboundIPProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &m.Count) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterMetricsProfile. -func (m ManagedClusterMetricsProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "costAnalysis", m.CostAnalysis) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterMetricsProfile. -func (m *ManagedClusterMetricsProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "costAnalysis": - err = unpopulate(val, "CostAnalysis", &m.CostAnalysis) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterNATGatewayProfile. -func (m ManagedClusterNATGatewayProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "effectiveOutboundIPs", m.EffectiveOutboundIPs) - populate(objectMap, "idleTimeoutInMinutes", m.IdleTimeoutInMinutes) - populate(objectMap, "managedOutboundIPProfile", m.ManagedOutboundIPProfile) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterNATGatewayProfile. -func (m *ManagedClusterNATGatewayProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "effectiveOutboundIPs": - err = unpopulate(val, "EffectiveOutboundIPs", &m.EffectiveOutboundIPs) - delete(rawMsg, key) - case "idleTimeoutInMinutes": - err = unpopulate(val, "IdleTimeoutInMinutes", &m.IdleTimeoutInMinutes) - delete(rawMsg, key) - case "managedOutboundIPProfile": - err = unpopulate(val, "ManagedOutboundIPProfile", &m.ManagedOutboundIPProfile) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterNodeProvisioningProfile. -func (m ManagedClusterNodeProvisioningProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "defaultNodePools", m.DefaultNodePools) - populate(objectMap, "mode", m.Mode) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterNodeProvisioningProfile. -func (m *ManagedClusterNodeProvisioningProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "defaultNodePools": - err = unpopulate(val, "DefaultNodePools", &m.DefaultNodePools) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterNodeResourceGroupProfile. -func (m ManagedClusterNodeResourceGroupProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "restrictionLevel", m.RestrictionLevel) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterNodeResourceGroupProfile. -func (m *ManagedClusterNodeResourceGroupProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "restrictionLevel": - err = unpopulate(val, "RestrictionLevel", &m.RestrictionLevel) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterOIDCIssuerProfile. -func (m ManagedClusterOIDCIssuerProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "issuerURL", m.IssuerURL) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterOIDCIssuerProfile. -func (m *ManagedClusterOIDCIssuerProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "issuerURL": - err = unpopulate(val, "IssuerURL", &m.IssuerURL) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentity. -func (m ManagedClusterPodIdentity) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "bindingSelector", m.BindingSelector) - populate(objectMap, "identity", m.Identity) - populate(objectMap, "name", m.Name) - populate(objectMap, "namespace", m.Namespace) - populate(objectMap, "provisioningInfo", m.ProvisioningInfo) - populate(objectMap, "provisioningState", m.ProvisioningState) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentity. -func (m *ManagedClusterPodIdentity) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "bindingSelector": - err = unpopulate(val, "BindingSelector", &m.BindingSelector) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "namespace": - err = unpopulate(val, "Namespace", &m.Namespace) - delete(rawMsg, key) - case "provisioningInfo": - err = unpopulate(val, "ProvisioningInfo", &m.ProvisioningInfo) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityException. -func (m ManagedClusterPodIdentityException) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", m.Name) - populate(objectMap, "namespace", m.Namespace) - populate(objectMap, "podLabels", m.PodLabels) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityException. -func (m *ManagedClusterPodIdentityException) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "namespace": - err = unpopulate(val, "Namespace", &m.Namespace) - delete(rawMsg, key) - case "podLabels": - err = unpopulate(val, "PodLabels", &m.PodLabels) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProfile. -func (m ManagedClusterPodIdentityProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "allowNetworkPluginKubenet", m.AllowNetworkPluginKubenet) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - populate(objectMap, "userAssignedIdentityExceptions", m.UserAssignedIdentityExceptions) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProfile. -func (m *ManagedClusterPodIdentityProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "allowNetworkPluginKubenet": - err = unpopulate(val, "AllowNetworkPluginKubenet", &m.AllowNetworkPluginKubenet) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) - delete(rawMsg, key) - case "userAssignedIdentityExceptions": - err = unpopulate(val, "UserAssignedIdentityExceptions", &m.UserAssignedIdentityExceptions) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningError. -func (m ManagedClusterPodIdentityProvisioningError) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", m.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningError. -func (m *ManagedClusterPodIdentityProvisioningError) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &m.Error) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningErrorBody. -func (m ManagedClusterPodIdentityProvisioningErrorBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "code", m.Code) - populate(objectMap, "details", m.Details) - populate(objectMap, "message", m.Message) - populate(objectMap, "target", m.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningErrorBody. -func (m *ManagedClusterPodIdentityProvisioningErrorBody) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "code": - err = unpopulate(val, "Code", &m.Code) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &m.Details) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &m.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &m.Target) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningInfo. -func (m ManagedClusterPodIdentityProvisioningInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "error", m.Error) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningInfo. -func (m *ManagedClusterPodIdentityProvisioningInfo) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "error": - err = unpopulate(val, "Error", &m.Error) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPoolUpgradeProfile. -func (m ManagedClusterPoolUpgradeProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "componentsByReleases", m.ComponentsByReleases) - populate(objectMap, "kubernetesVersion", m.KubernetesVersion) - populate(objectMap, "name", m.Name) - populate(objectMap, "osType", m.OSType) - populate(objectMap, "upgrades", m.Upgrades) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPoolUpgradeProfile. -func (m *ManagedClusterPoolUpgradeProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "componentsByReleases": - err = unpopulate(val, "ComponentsByReleases", &m.ComponentsByReleases) - delete(rawMsg, key) - case "kubernetesVersion": - err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &m.OSType) - delete(rawMsg, key) - case "upgrades": - err = unpopulate(val, "Upgrades", &m.Upgrades) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPoolUpgradeProfileUpgradesItem. -func (m ManagedClusterPoolUpgradeProfileUpgradesItem) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "isOutOfSupport", m.IsOutOfSupport) - populate(objectMap, "isPreview", m.IsPreview) - populate(objectMap, "kubernetesVersion", m.KubernetesVersion) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPoolUpgradeProfileUpgradesItem. -func (m *ManagedClusterPoolUpgradeProfileUpgradesItem) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "isOutOfSupport": - err = unpopulate(val, "IsOutOfSupport", &m.IsOutOfSupport) - delete(rawMsg, key) - case "isPreview": - err = unpopulate(val, "IsPreview", &m.IsPreview) - delete(rawMsg, key) - case "kubernetesVersion": - err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterProperties. -func (m ManagedClusterProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "aadProfile", m.AADProfile) - populate(objectMap, "apiServerAccessProfile", m.APIServerAccessProfile) - populate(objectMap, "addonProfiles", m.AddonProfiles) - populate(objectMap, "agentPoolProfiles", m.AgentPoolProfiles) - populate(objectMap, "aiToolchainOperatorProfile", m.AiToolchainOperatorProfile) - populate(objectMap, "autoScalerProfile", m.AutoScalerProfile) - populate(objectMap, "autoUpgradeProfile", m.AutoUpgradeProfile) - populate(objectMap, "azureMonitorProfile", m.AzureMonitorProfile) - populate(objectMap, "azurePortalFQDN", m.AzurePortalFQDN) - populate(objectMap, "bootstrapProfile", m.BootstrapProfile) - populate(objectMap, "creationData", m.CreationData) - populate(objectMap, "currentKubernetesVersion", m.CurrentKubernetesVersion) - populate(objectMap, "dnsPrefix", m.DNSPrefix) - populate(objectMap, "disableLocalAccounts", m.DisableLocalAccounts) - populate(objectMap, "diskEncryptionSetID", m.DiskEncryptionSetID) - populate(objectMap, "enableNamespaceResources", m.EnableNamespaceResources) - populate(objectMap, "enableRBAC", m.EnableRBAC) - populate(objectMap, "fqdn", m.Fqdn) - populate(objectMap, "fqdnSubdomain", m.FqdnSubdomain) - populate(objectMap, "httpProxyConfig", m.HTTPProxyConfig) - populate(objectMap, "hostedSystemProfile", m.HostedSystemProfile) - populate(objectMap, "identityProfile", m.IdentityProfile) - populate(objectMap, "ingressProfile", m.IngressProfile) - populate(objectMap, "kubernetesVersion", m.KubernetesVersion) - populate(objectMap, "linuxProfile", m.LinuxProfile) - populate(objectMap, "maxAgentPools", m.MaxAgentPools) - populate(objectMap, "metricsProfile", m.MetricsProfile) - populate(objectMap, "networkProfile", m.NetworkProfile) - populate(objectMap, "nodeProvisioningProfile", m.NodeProvisioningProfile) - populate(objectMap, "nodeResourceGroup", m.NodeResourceGroup) - populate(objectMap, "nodeResourceGroupProfile", m.NodeResourceGroupProfile) - populate(objectMap, "oidcIssuerProfile", m.OidcIssuerProfile) - populate(objectMap, "podIdentityProfile", m.PodIdentityProfile) - populate(objectMap, "powerState", m.PowerState) - populate(objectMap, "privateFQDN", m.PrivateFQDN) - populate(objectMap, "privateLinkResources", m.PrivateLinkResources) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "publicNetworkAccess", m.PublicNetworkAccess) - populate(objectMap, "resourceUID", m.ResourceUID) - populate(objectMap, "schedulerProfile", m.SchedulerProfile) - populate(objectMap, "securityProfile", m.SecurityProfile) - populate(objectMap, "serviceMeshProfile", m.ServiceMeshProfile) - populate(objectMap, "servicePrincipalProfile", m.ServicePrincipalProfile) - populate(objectMap, "status", m.Status) - populate(objectMap, "storageProfile", m.StorageProfile) - populate(objectMap, "supportPlan", m.SupportPlan) - populate(objectMap, "upgradeSettings", m.UpgradeSettings) - populate(objectMap, "windowsProfile", m.WindowsProfile) - populate(objectMap, "workloadAutoScalerProfile", m.WorkloadAutoScalerProfile) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterProperties. -func (m *ManagedClusterProperties) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "aadProfile": - err = unpopulate(val, "AADProfile", &m.AADProfile) - delete(rawMsg, key) - case "apiServerAccessProfile": - err = unpopulate(val, "APIServerAccessProfile", &m.APIServerAccessProfile) - delete(rawMsg, key) - case "addonProfiles": - err = unpopulate(val, "AddonProfiles", &m.AddonProfiles) - delete(rawMsg, key) - case "agentPoolProfiles": - err = unpopulate(val, "AgentPoolProfiles", &m.AgentPoolProfiles) - delete(rawMsg, key) - case "aiToolchainOperatorProfile": - err = unpopulate(val, "AiToolchainOperatorProfile", &m.AiToolchainOperatorProfile) - delete(rawMsg, key) - case "autoScalerProfile": - err = unpopulate(val, "AutoScalerProfile", &m.AutoScalerProfile) - delete(rawMsg, key) - case "autoUpgradeProfile": - err = unpopulate(val, "AutoUpgradeProfile", &m.AutoUpgradeProfile) - delete(rawMsg, key) - case "azureMonitorProfile": - err = unpopulate(val, "AzureMonitorProfile", &m.AzureMonitorProfile) - delete(rawMsg, key) - case "azurePortalFQDN": - err = unpopulate(val, "AzurePortalFQDN", &m.AzurePortalFQDN) - delete(rawMsg, key) - case "bootstrapProfile": - err = unpopulate(val, "BootstrapProfile", &m.BootstrapProfile) - delete(rawMsg, key) - case "creationData": - err = unpopulate(val, "CreationData", &m.CreationData) - delete(rawMsg, key) - case "currentKubernetesVersion": - err = unpopulate(val, "CurrentKubernetesVersion", &m.CurrentKubernetesVersion) - delete(rawMsg, key) - case "dnsPrefix": - err = unpopulate(val, "DNSPrefix", &m.DNSPrefix) - delete(rawMsg, key) - case "disableLocalAccounts": - err = unpopulate(val, "DisableLocalAccounts", &m.DisableLocalAccounts) - delete(rawMsg, key) - case "diskEncryptionSetID": - err = unpopulate(val, "DiskEncryptionSetID", &m.DiskEncryptionSetID) - delete(rawMsg, key) - case "enableNamespaceResources": - err = unpopulate(val, "EnableNamespaceResources", &m.EnableNamespaceResources) - delete(rawMsg, key) - case "enableRBAC": - err = unpopulate(val, "EnableRBAC", &m.EnableRBAC) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &m.Fqdn) - delete(rawMsg, key) - case "fqdnSubdomain": - err = unpopulate(val, "FqdnSubdomain", &m.FqdnSubdomain) - delete(rawMsg, key) - case "httpProxyConfig": - err = unpopulate(val, "HTTPProxyConfig", &m.HTTPProxyConfig) - delete(rawMsg, key) - case "hostedSystemProfile": - err = unpopulate(val, "HostedSystemProfile", &m.HostedSystemProfile) - delete(rawMsg, key) - case "identityProfile": - err = unpopulate(val, "IdentityProfile", &m.IdentityProfile) - delete(rawMsg, key) - case "ingressProfile": - err = unpopulate(val, "IngressProfile", &m.IngressProfile) - delete(rawMsg, key) - case "kubernetesVersion": - err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) - delete(rawMsg, key) - case "linuxProfile": - err = unpopulate(val, "LinuxProfile", &m.LinuxProfile) - delete(rawMsg, key) - case "maxAgentPools": - err = unpopulate(val, "MaxAgentPools", &m.MaxAgentPools) - delete(rawMsg, key) - case "metricsProfile": - err = unpopulate(val, "MetricsProfile", &m.MetricsProfile) - delete(rawMsg, key) - case "networkProfile": - err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) - delete(rawMsg, key) - case "nodeProvisioningProfile": - err = unpopulate(val, "NodeProvisioningProfile", &m.NodeProvisioningProfile) - delete(rawMsg, key) - case "nodeResourceGroup": - err = unpopulate(val, "NodeResourceGroup", &m.NodeResourceGroup) - delete(rawMsg, key) - case "nodeResourceGroupProfile": - err = unpopulate(val, "NodeResourceGroupProfile", &m.NodeResourceGroupProfile) - delete(rawMsg, key) - case "oidcIssuerProfile": - err = unpopulate(val, "OidcIssuerProfile", &m.OidcIssuerProfile) - delete(rawMsg, key) - case "podIdentityProfile": - err = unpopulate(val, "PodIdentityProfile", &m.PodIdentityProfile) - delete(rawMsg, key) - case "powerState": - err = unpopulate(val, "PowerState", &m.PowerState) - delete(rawMsg, key) - case "privateFQDN": - err = unpopulate(val, "PrivateFQDN", &m.PrivateFQDN) - delete(rawMsg, key) - case "privateLinkResources": - err = unpopulate(val, "PrivateLinkResources", &m.PrivateLinkResources) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &m.PublicNetworkAccess) - delete(rawMsg, key) - case "resourceUID": - err = unpopulate(val, "ResourceUID", &m.ResourceUID) - delete(rawMsg, key) - case "schedulerProfile": - err = unpopulate(val, "SchedulerProfile", &m.SchedulerProfile) - delete(rawMsg, key) - case "securityProfile": - err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) - delete(rawMsg, key) - case "serviceMeshProfile": - err = unpopulate(val, "ServiceMeshProfile", &m.ServiceMeshProfile) - delete(rawMsg, key) - case "servicePrincipalProfile": - err = unpopulate(val, "ServicePrincipalProfile", &m.ServicePrincipalProfile) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &m.Status) - delete(rawMsg, key) - case "storageProfile": - err = unpopulate(val, "StorageProfile", &m.StorageProfile) - delete(rawMsg, key) - case "supportPlan": - err = unpopulate(val, "SupportPlan", &m.SupportPlan) - delete(rawMsg, key) - case "upgradeSettings": - err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) - delete(rawMsg, key) - case "windowsProfile": - err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) - delete(rawMsg, key) - case "workloadAutoScalerProfile": - err = unpopulate(val, "WorkloadAutoScalerProfile", &m.WorkloadAutoScalerProfile) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPropertiesAutoScalerProfile. -func (m ManagedClusterPropertiesAutoScalerProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "balance-similar-node-groups", m.BalanceSimilarNodeGroups) - populate(objectMap, "daemonset-eviction-for-empty-nodes", m.DaemonsetEvictionForEmptyNodes) - populate(objectMap, "daemonset-eviction-for-occupied-nodes", m.DaemonsetEvictionForOccupiedNodes) - populate(objectMap, "expander", m.Expander) - populate(objectMap, "ignore-daemonsets-utilization", m.IgnoreDaemonsetsUtilization) - populate(objectMap, "max-empty-bulk-delete", m.MaxEmptyBulkDelete) - populate(objectMap, "max-graceful-termination-sec", m.MaxGracefulTerminationSec) - populate(objectMap, "max-node-provision-time", m.MaxNodeProvisionTime) - populate(objectMap, "max-total-unready-percentage", m.MaxTotalUnreadyPercentage) - populate(objectMap, "new-pod-scale-up-delay", m.NewPodScaleUpDelay) - populate(objectMap, "ok-total-unready-count", m.OkTotalUnreadyCount) - populate(objectMap, "scale-down-delay-after-add", m.ScaleDownDelayAfterAdd) - populate(objectMap, "scale-down-delay-after-delete", m.ScaleDownDelayAfterDelete) - populate(objectMap, "scale-down-delay-after-failure", m.ScaleDownDelayAfterFailure) - populate(objectMap, "scale-down-unneeded-time", m.ScaleDownUnneededTime) - populate(objectMap, "scale-down-unready-time", m.ScaleDownUnreadyTime) - populate(objectMap, "scale-down-utilization-threshold", m.ScaleDownUtilizationThreshold) - populate(objectMap, "scan-interval", m.ScanInterval) - populate(objectMap, "skip-nodes-with-local-storage", m.SkipNodesWithLocalStorage) - populate(objectMap, "skip-nodes-with-system-pods", m.SkipNodesWithSystemPods) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPropertiesAutoScalerProfile. -func (m *ManagedClusterPropertiesAutoScalerProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "balance-similar-node-groups": - err = unpopulate(val, "BalanceSimilarNodeGroups", &m.BalanceSimilarNodeGroups) - delete(rawMsg, key) - case "daemonset-eviction-for-empty-nodes": - err = unpopulate(val, "DaemonsetEvictionForEmptyNodes", &m.DaemonsetEvictionForEmptyNodes) - delete(rawMsg, key) - case "daemonset-eviction-for-occupied-nodes": - err = unpopulate(val, "DaemonsetEvictionForOccupiedNodes", &m.DaemonsetEvictionForOccupiedNodes) - delete(rawMsg, key) - case "expander": - err = unpopulate(val, "Expander", &m.Expander) - delete(rawMsg, key) - case "ignore-daemonsets-utilization": - err = unpopulate(val, "IgnoreDaemonsetsUtilization", &m.IgnoreDaemonsetsUtilization) - delete(rawMsg, key) - case "max-empty-bulk-delete": - err = unpopulate(val, "MaxEmptyBulkDelete", &m.MaxEmptyBulkDelete) - delete(rawMsg, key) - case "max-graceful-termination-sec": - err = unpopulate(val, "MaxGracefulTerminationSec", &m.MaxGracefulTerminationSec) - delete(rawMsg, key) - case "max-node-provision-time": - err = unpopulate(val, "MaxNodeProvisionTime", &m.MaxNodeProvisionTime) - delete(rawMsg, key) - case "max-total-unready-percentage": - err = unpopulate(val, "MaxTotalUnreadyPercentage", &m.MaxTotalUnreadyPercentage) - delete(rawMsg, key) - case "new-pod-scale-up-delay": - err = unpopulate(val, "NewPodScaleUpDelay", &m.NewPodScaleUpDelay) - delete(rawMsg, key) - case "ok-total-unready-count": - err = unpopulate(val, "OkTotalUnreadyCount", &m.OkTotalUnreadyCount) - delete(rawMsg, key) - case "scale-down-delay-after-add": - err = unpopulate(val, "ScaleDownDelayAfterAdd", &m.ScaleDownDelayAfterAdd) - delete(rawMsg, key) - case "scale-down-delay-after-delete": - err = unpopulate(val, "ScaleDownDelayAfterDelete", &m.ScaleDownDelayAfterDelete) - delete(rawMsg, key) - case "scale-down-delay-after-failure": - err = unpopulate(val, "ScaleDownDelayAfterFailure", &m.ScaleDownDelayAfterFailure) - delete(rawMsg, key) - case "scale-down-unneeded-time": - err = unpopulate(val, "ScaleDownUnneededTime", &m.ScaleDownUnneededTime) - delete(rawMsg, key) - case "scale-down-unready-time": - err = unpopulate(val, "ScaleDownUnreadyTime", &m.ScaleDownUnreadyTime) - delete(rawMsg, key) - case "scale-down-utilization-threshold": - err = unpopulate(val, "ScaleDownUtilizationThreshold", &m.ScaleDownUtilizationThreshold) - delete(rawMsg, key) - case "scan-interval": - err = unpopulate(val, "ScanInterval", &m.ScanInterval) - delete(rawMsg, key) - case "skip-nodes-with-local-storage": - err = unpopulate(val, "SkipNodesWithLocalStorage", &m.SkipNodesWithLocalStorage) - delete(rawMsg, key) - case "skip-nodes-with-system-pods": - err = unpopulate(val, "SkipNodesWithSystemPods", &m.SkipNodesWithSystemPods) + case "publicIPPrefixes": + err = unpopulate(val, "PublicIPPrefixes", &m.PublicIPPrefixes) delete(rawMsg, key) } if err != nil { @@ -5947,18 +3412,15 @@ func (m *ManagedClusterPropertiesAutoScalerProfile) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPropertiesForSnapshot. -func (m ManagedClusterPropertiesForSnapshot) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPs. +func (m ManagedClusterLoadBalancerProfileOutboundIPs) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enableRbac", m.EnableRbac) - populate(objectMap, "kubernetesVersion", m.KubernetesVersion) - populate(objectMap, "networkProfile", m.NetworkProfile) - populate(objectMap, "sku", m.SKU) + populate(objectMap, "publicIPs", m.PublicIPs) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPropertiesForSnapshot. -func (m *ManagedClusterPropertiesForSnapshot) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPs. +func (m *ManagedClusterLoadBalancerProfileOutboundIPs) 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", m, err) @@ -5966,17 +3428,8 @@ func (m *ManagedClusterPropertiesForSnapshot) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "enableRbac": - err = unpopulate(val, "EnableRbac", &m.EnableRbac) - delete(rawMsg, key) - case "kubernetesVersion": - err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) - delete(rawMsg, key) - case "networkProfile": - err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &m.SKU) + case "publicIPs": + err = unpopulate(val, "PublicIPs", &m.PublicIPs) delete(rawMsg, key) } if err != nil { @@ -5986,16 +3439,15 @@ func (m *ManagedClusterPropertiesForSnapshot) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSKU. -func (m ManagedClusterSKU) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterManagedOutboundIPProfile. +func (m ManagedClusterManagedOutboundIPProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", m.Name) - populate(objectMap, "tier", m.Tier) + populate(objectMap, "count", m.Count) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSKU. -func (m *ManagedClusterSKU) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterManagedOutboundIPProfile. +func (m *ManagedClusterManagedOutboundIPProfile) 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", m, err) @@ -6003,11 +3455,8 @@ func (m *ManagedClusterSKU) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &m.Tier) + case "count": + err = unpopulate(val, "Count", &m.Count) delete(rawMsg, key) } if err != nil { @@ -6017,28 +3466,15 @@ func (m *ManagedClusterSKU) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfile. -func (m ManagedClusterSecurityProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterMetricsProfile. +func (m ManagedClusterMetricsProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "azureKeyVaultKms", m.AzureKeyVaultKms) - populateByteArray(objectMap, "customCATrustCertificates", m.CustomCATrustCertificates, func() any { - encodedValue := make([]string, len(m.CustomCATrustCertificates)) - for i := 0; i < len(m.CustomCATrustCertificates); i++ { - encodedValue[i] = runtime.EncodeByteArray(m.CustomCATrustCertificates[i], runtime.Base64StdFormat) - } - return encodedValue - }) - populate(objectMap, "defender", m.Defender) - populate(objectMap, "imageCleaner", m.ImageCleaner) - populate(objectMap, "imageIntegrity", m.ImageIntegrity) - populate(objectMap, "kubernetesResourceObjectEncryptionProfile", m.KubernetesResourceObjectEncryptionProfile) - populate(objectMap, "nodeRestriction", m.NodeRestriction) - populate(objectMap, "workloadIdentity", m.WorkloadIdentity) + populate(objectMap, "costAnalysis", m.CostAnalysis) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfile. -func (m *ManagedClusterSecurityProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterMetricsProfile. +func (m *ManagedClusterMetricsProfile) 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", m, err) @@ -6046,36 +3482,8 @@ func (m *ManagedClusterSecurityProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "azureKeyVaultKms": - err = unpopulate(val, "AzureKeyVaultKms", &m.AzureKeyVaultKms) - delete(rawMsg, key) - case "customCATrustCertificates": - var encodedValue []string - err = unpopulate(val, "CustomCATrustCertificates", &encodedValue) - if err == nil && len(encodedValue) > 0 { - m.CustomCATrustCertificates = make([][]byte, len(encodedValue)) - for i := 0; i < len(encodedValue) && err == nil; i++ { - err = runtime.DecodeByteArray(encodedValue[i], &m.CustomCATrustCertificates[i], runtime.Base64StdFormat) - } - } - delete(rawMsg, key) - case "defender": - err = unpopulate(val, "Defender", &m.Defender) - delete(rawMsg, key) - case "imageCleaner": - err = unpopulate(val, "ImageCleaner", &m.ImageCleaner) - delete(rawMsg, key) - case "imageIntegrity": - err = unpopulate(val, "ImageIntegrity", &m.ImageIntegrity) - delete(rawMsg, key) - case "kubernetesResourceObjectEncryptionProfile": - err = unpopulate(val, "KubernetesResourceObjectEncryptionProfile", &m.KubernetesResourceObjectEncryptionProfile) - delete(rawMsg, key) - case "nodeRestriction": - err = unpopulate(val, "NodeRestriction", &m.NodeRestriction) - delete(rawMsg, key) - case "workloadIdentity": - err = unpopulate(val, "WorkloadIdentity", &m.WorkloadIdentity) + case "costAnalysis": + err = unpopulate(val, "CostAnalysis", &m.CostAnalysis) delete(rawMsg, key) } if err != nil { @@ -6085,17 +3493,17 @@ func (m *ManagedClusterSecurityProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileDefender. -func (m ManagedClusterSecurityProfileDefender) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterNATGatewayProfile. +func (m ManagedClusterNATGatewayProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "logAnalyticsWorkspaceResourceId", m.LogAnalyticsWorkspaceResourceID) - populate(objectMap, "securityGating", m.SecurityGating) - populate(objectMap, "securityMonitoring", m.SecurityMonitoring) + populate(objectMap, "effectiveOutboundIPs", m.EffectiveOutboundIPs) + populate(objectMap, "idleTimeoutInMinutes", m.IdleTimeoutInMinutes) + populate(objectMap, "managedOutboundIPProfile", m.ManagedOutboundIPProfile) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileDefender. -func (m *ManagedClusterSecurityProfileDefender) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterNATGatewayProfile. +func (m *ManagedClusterNATGatewayProfile) 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", m, err) @@ -6103,14 +3511,14 @@ func (m *ManagedClusterSecurityProfileDefender) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "logAnalyticsWorkspaceResourceId": - err = unpopulate(val, "LogAnalyticsWorkspaceResourceID", &m.LogAnalyticsWorkspaceResourceID) + case "effectiveOutboundIPs": + err = unpopulate(val, "EffectiveOutboundIPs", &m.EffectiveOutboundIPs) delete(rawMsg, key) - case "securityGating": - err = unpopulate(val, "SecurityGating", &m.SecurityGating) + case "idleTimeoutInMinutes": + err = unpopulate(val, "IdleTimeoutInMinutes", &m.IdleTimeoutInMinutes) delete(rawMsg, key) - case "securityMonitoring": - err = unpopulate(val, "SecurityMonitoring", &m.SecurityMonitoring) + case "managedOutboundIPProfile": + err = unpopulate(val, "ManagedOutboundIPProfile", &m.ManagedOutboundIPProfile) delete(rawMsg, key) } if err != nil { @@ -6120,17 +3528,16 @@ func (m *ManagedClusterSecurityProfileDefender) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileDefenderSecurityGating. -func (m ManagedClusterSecurityProfileDefenderSecurityGating) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterNodeProvisioningProfile. +func (m ManagedClusterNodeProvisioningProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allowSecretAccess", m.AllowSecretAccess) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "identities", m.Identities) + populate(objectMap, "defaultNodePools", m.DefaultNodePools) + populate(objectMap, "mode", m.Mode) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileDefenderSecurityGating. -func (m *ManagedClusterSecurityProfileDefenderSecurityGating) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterNodeProvisioningProfile. +func (m *ManagedClusterNodeProvisioningProfile) 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", m, err) @@ -6138,14 +3545,11 @@ func (m *ManagedClusterSecurityProfileDefenderSecurityGating) UnmarshalJSON(data for key, val := range rawMsg { var err error switch key { - case "allowSecretAccess": - err = unpopulate(val, "AllowSecretAccess", &m.AllowSecretAccess) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "defaultNodePools": + err = unpopulate(val, "DefaultNodePools", &m.DefaultNodePools) delete(rawMsg, key) - case "identities": - err = unpopulate(val, "Identities", &m.Identities) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) delete(rawMsg, key) } if err != nil { @@ -6155,16 +3559,15 @@ func (m *ManagedClusterSecurityProfileDefenderSecurityGating) UnmarshalJSON(data return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem. -func (m ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterNodeResourceGroupProfile. +func (m ManagedClusterNodeResourceGroupProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "azureContainerRegistry", m.AzureContainerRegistry) - populate(objectMap, "identity", m.Identity) + populate(objectMap, "restrictionLevel", m.RestrictionLevel) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem. -func (m *ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterNodeResourceGroupProfile. +func (m *ManagedClusterNodeResourceGroupProfile) 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", m, err) @@ -6172,11 +3575,8 @@ func (m *ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem) Unma for key, val := range rawMsg { var err error switch key { - case "azureContainerRegistry": - err = unpopulate(val, "AzureContainerRegistry", &m.AzureContainerRegistry) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) + case "restrictionLevel": + err = unpopulate(val, "RestrictionLevel", &m.RestrictionLevel) delete(rawMsg, key) } if err != nil { @@ -6186,15 +3586,16 @@ func (m *ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem) Unma return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileDefenderSecurityMonitoring. -func (m ManagedClusterSecurityProfileDefenderSecurityMonitoring) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterOIDCIssuerProfile. +func (m ManagedClusterOIDCIssuerProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "issuerURL", m.IssuerURL) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileDefenderSecurityMonitoring. -func (m *ManagedClusterSecurityProfileDefenderSecurityMonitoring) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterOIDCIssuerProfile. +func (m *ManagedClusterOIDCIssuerProfile) 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", m, err) @@ -6205,6 +3606,9 @@ func (m *ManagedClusterSecurityProfileDefenderSecurityMonitoring) UnmarshalJSON( case "enabled": err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) + case "issuerURL": + err = unpopulate(val, "IssuerURL", &m.IssuerURL) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -6213,16 +3617,20 @@ func (m *ManagedClusterSecurityProfileDefenderSecurityMonitoring) UnmarshalJSON( return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileImageCleaner. -func (m ManagedClusterSecurityProfileImageCleaner) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentity. +func (m ManagedClusterPodIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "intervalHours", m.IntervalHours) + populate(objectMap, "bindingSelector", m.BindingSelector) + populate(objectMap, "identity", m.Identity) + populate(objectMap, "name", m.Name) + populate(objectMap, "namespace", m.Namespace) + populate(objectMap, "provisioningInfo", m.ProvisioningInfo) + populate(objectMap, "provisioningState", m.ProvisioningState) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileImageCleaner. -func (m *ManagedClusterSecurityProfileImageCleaner) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentity. +func (m *ManagedClusterPodIdentity) 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", m, err) @@ -6230,11 +3638,23 @@ func (m *ManagedClusterSecurityProfileImageCleaner) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "bindingSelector": + err = unpopulate(val, "BindingSelector", &m.BindingSelector) delete(rawMsg, key) - case "intervalHours": - err = unpopulate(val, "IntervalHours", &m.IntervalHours) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "namespace": + err = unpopulate(val, "Namespace", &m.Namespace) + delete(rawMsg, key) + case "provisioningInfo": + err = unpopulate(val, "ProvisioningInfo", &m.ProvisioningInfo) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) delete(rawMsg, key) } if err != nil { @@ -6244,15 +3664,17 @@ func (m *ManagedClusterSecurityProfileImageCleaner) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileImageIntegrity. -func (m ManagedClusterSecurityProfileImageIntegrity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityException. +func (m ManagedClusterPodIdentityException) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "name", m.Name) + populate(objectMap, "namespace", m.Namespace) + populate(objectMap, "podLabels", m.PodLabels) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileImageIntegrity. -func (m *ManagedClusterSecurityProfileImageIntegrity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityException. +func (m *ManagedClusterPodIdentityException) 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", m, err) @@ -6260,8 +3682,14 @@ func (m *ManagedClusterSecurityProfileImageIntegrity) UnmarshalJSON(data []byte) for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "namespace": + err = unpopulate(val, "Namespace", &m.Namespace) + delete(rawMsg, key) + case "podLabels": + err = unpopulate(val, "PodLabels", &m.PodLabels) delete(rawMsg, key) } if err != nil { @@ -6271,15 +3699,18 @@ func (m *ManagedClusterSecurityProfileImageIntegrity) UnmarshalJSON(data []byte) return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileNodeRestriction. -func (m ManagedClusterSecurityProfileNodeRestriction) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProfile. +func (m ManagedClusterPodIdentityProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "allowNetworkPluginKubenet", m.AllowNetworkPluginKubenet) populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + populate(objectMap, "userAssignedIdentityExceptions", m.UserAssignedIdentityExceptions) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileNodeRestriction. -func (m *ManagedClusterSecurityProfileNodeRestriction) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProfile. +func (m *ManagedClusterPodIdentityProfile) 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", m, err) @@ -6287,9 +3718,18 @@ func (m *ManagedClusterSecurityProfileNodeRestriction) UnmarshalJSON(data []byte for key, val := range rawMsg { var err error switch key { + case "allowNetworkPluginKubenet": + err = unpopulate(val, "AllowNetworkPluginKubenet", &m.AllowNetworkPluginKubenet) + delete(rawMsg, key) case "enabled": err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + case "userAssignedIdentityExceptions": + err = unpopulate(val, "UserAssignedIdentityExceptions", &m.UserAssignedIdentityExceptions) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -6298,15 +3738,15 @@ func (m *ManagedClusterSecurityProfileNodeRestriction) UnmarshalJSON(data []byte return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileWorkloadIdentity. -func (m ManagedClusterSecurityProfileWorkloadIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningError. +func (m ManagedClusterPodIdentityProvisioningError) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "error", m.Error) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileWorkloadIdentity. -func (m *ManagedClusterSecurityProfileWorkloadIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningError. +func (m *ManagedClusterPodIdentityProvisioningError) 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", m, err) @@ -6314,8 +3754,47 @@ func (m *ManagedClusterSecurityProfileWorkloadIdentity) UnmarshalJSON(data []byt for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "error": + err = unpopulate(val, "Error", &m.Error) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningErrorBody. +func (m ManagedClusterPodIdentityProvisioningErrorBody) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "code", m.Code) + populate(objectMap, "details", m.Details) + populate(objectMap, "message", m.Message) + populate(objectMap, "target", m.Target) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningErrorBody. +func (m *ManagedClusterPodIdentityProvisioningErrorBody) 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", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "code": + err = unpopulate(val, "Code", &m.Code) + delete(rawMsg, key) + case "details": + err = unpopulate(val, "Details", &m.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &m.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &m.Target) delete(rawMsg, key) } if err != nil { @@ -6325,16 +3804,15 @@ func (m *ManagedClusterSecurityProfileWorkloadIdentity) UnmarshalJSON(data []byt return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterServicePrincipalProfile. -func (m ManagedClusterServicePrincipalProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningInfo. +func (m ManagedClusterPodIdentityProvisioningInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientId", m.ClientID) - populate(objectMap, "secret", m.Secret) + populate(objectMap, "error", m.Error) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterServicePrincipalProfile. -func (m *ManagedClusterServicePrincipalProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningInfo. +func (m *ManagedClusterPodIdentityProvisioningInfo) 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", m, err) @@ -6342,11 +3820,8 @@ func (m *ManagedClusterServicePrincipalProfile) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &m.ClientID) - delete(rawMsg, key) - case "secret": - err = unpopulate(val, "Secret", &m.Secret) + case "error": + err = unpopulate(val, "Error", &m.Error) delete(rawMsg, key) } if err != nil { @@ -6356,21 +3831,18 @@ func (m *ManagedClusterServicePrincipalProfile) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSnapshot. -func (m ManagedClusterSnapshot) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPoolUpgradeProfile. +func (m ManagedClusterPoolUpgradeProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) + populate(objectMap, "kubernetesVersion", m.KubernetesVersion) populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) + populate(objectMap, "osType", m.OSType) + populate(objectMap, "upgrades", m.Upgrades) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSnapshot. -func (m *ManagedClusterSnapshot) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPoolUpgradeProfile. +func (m *ManagedClusterPoolUpgradeProfile) 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", m, err) @@ -6378,26 +3850,17 @@ func (m *ManagedClusterSnapshot) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) + case "kubernetesVersion": + err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) + case "osType": + err = unpopulate(val, "OSType", &m.OSType) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "upgrades": + err = unpopulate(val, "Upgrades", &m.Upgrades) delete(rawMsg, key) } if err != nil { @@ -6407,16 +3870,16 @@ func (m *ManagedClusterSnapshot) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSnapshotListResult. -func (m ManagedClusterSnapshotListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPoolUpgradeProfileUpgradesItem. +func (m ManagedClusterPoolUpgradeProfileUpgradesItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) + populate(objectMap, "isPreview", m.IsPreview) + populate(objectMap, "kubernetesVersion", m.KubernetesVersion) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSnapshotListResult. -func (m *ManagedClusterSnapshotListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPoolUpgradeProfileUpgradesItem. +func (m *ManagedClusterPoolUpgradeProfileUpgradesItem) 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", m, err) @@ -6424,11 +3887,11 @@ func (m *ManagedClusterSnapshotListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) + case "isPreview": + err = unpopulate(val, "IsPreview", &m.IsPreview) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + case "kubernetesVersion": + err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) delete(rawMsg, key) } if err != nil { @@ -6438,17 +3901,59 @@ func (m *ManagedClusterSnapshotListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSnapshotProperties. -func (m ManagedClusterSnapshotProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterProperties. +func (m ManagedClusterProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "creationData", m.CreationData) - populate(objectMap, "managedClusterPropertiesReadOnly", m.ManagedClusterPropertiesReadOnly) - populate(objectMap, "snapshotType", m.SnapshotType) + populate(objectMap, "aadProfile", m.AADProfile) + populate(objectMap, "apiServerAccessProfile", m.APIServerAccessProfile) + populate(objectMap, "addonProfiles", m.AddonProfiles) + populate(objectMap, "agentPoolProfiles", m.AgentPoolProfiles) + populate(objectMap, "aiToolchainOperatorProfile", m.AiToolchainOperatorProfile) + populate(objectMap, "autoScalerProfile", m.AutoScalerProfile) + populate(objectMap, "autoUpgradeProfile", m.AutoUpgradeProfile) + populate(objectMap, "azureMonitorProfile", m.AzureMonitorProfile) + populate(objectMap, "azurePortalFQDN", m.AzurePortalFQDN) + populate(objectMap, "bootstrapProfile", m.BootstrapProfile) + populate(objectMap, "currentKubernetesVersion", m.CurrentKubernetesVersion) + populate(objectMap, "dnsPrefix", m.DNSPrefix) + populate(objectMap, "disableLocalAccounts", m.DisableLocalAccounts) + populate(objectMap, "diskEncryptionSetID", m.DiskEncryptionSetID) + populate(objectMap, "enableRBAC", m.EnableRBAC) + populate(objectMap, "fqdn", m.Fqdn) + populate(objectMap, "fqdnSubdomain", m.FqdnSubdomain) + populate(objectMap, "httpProxyConfig", m.HTTPProxyConfig) + populate(objectMap, "identityProfile", m.IdentityProfile) + populate(objectMap, "ingressProfile", m.IngressProfile) + populate(objectMap, "kubernetesVersion", m.KubernetesVersion) + populate(objectMap, "linuxProfile", m.LinuxProfile) + populate(objectMap, "maxAgentPools", m.MaxAgentPools) + populate(objectMap, "metricsProfile", m.MetricsProfile) + populate(objectMap, "networkProfile", m.NetworkProfile) + populate(objectMap, "nodeProvisioningProfile", m.NodeProvisioningProfile) + populate(objectMap, "nodeResourceGroup", m.NodeResourceGroup) + populate(objectMap, "nodeResourceGroupProfile", m.NodeResourceGroupProfile) + populate(objectMap, "oidcIssuerProfile", m.OidcIssuerProfile) + populate(objectMap, "podIdentityProfile", m.PodIdentityProfile) + populate(objectMap, "powerState", m.PowerState) + populate(objectMap, "privateFQDN", m.PrivateFQDN) + populate(objectMap, "privateLinkResources", m.PrivateLinkResources) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "publicNetworkAccess", m.PublicNetworkAccess) + populate(objectMap, "resourceUID", m.ResourceUID) + populate(objectMap, "securityProfile", m.SecurityProfile) + populate(objectMap, "serviceMeshProfile", m.ServiceMeshProfile) + populate(objectMap, "servicePrincipalProfile", m.ServicePrincipalProfile) + populate(objectMap, "status", m.Status) + populate(objectMap, "storageProfile", m.StorageProfile) + populate(objectMap, "supportPlan", m.SupportPlan) + populate(objectMap, "upgradeSettings", m.UpgradeSettings) + populate(objectMap, "windowsProfile", m.WindowsProfile) + populate(objectMap, "workloadAutoScalerProfile", m.WorkloadAutoScalerProfile) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSnapshotProperties. -func (m *ManagedClusterSnapshotProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterProperties. +func (m *ManagedClusterProperties) 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", m, err) @@ -6456,41 +3961,140 @@ func (m *ManagedClusterSnapshotProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "creationData": - err = unpopulate(val, "CreationData", &m.CreationData) + case "aadProfile": + err = unpopulate(val, "AADProfile", &m.AADProfile) + delete(rawMsg, key) + case "apiServerAccessProfile": + err = unpopulate(val, "APIServerAccessProfile", &m.APIServerAccessProfile) + delete(rawMsg, key) + case "addonProfiles": + err = unpopulate(val, "AddonProfiles", &m.AddonProfiles) + delete(rawMsg, key) + case "agentPoolProfiles": + err = unpopulate(val, "AgentPoolProfiles", &m.AgentPoolProfiles) + delete(rawMsg, key) + case "aiToolchainOperatorProfile": + err = unpopulate(val, "AiToolchainOperatorProfile", &m.AiToolchainOperatorProfile) + delete(rawMsg, key) + case "autoScalerProfile": + err = unpopulate(val, "AutoScalerProfile", &m.AutoScalerProfile) + delete(rawMsg, key) + case "autoUpgradeProfile": + err = unpopulate(val, "AutoUpgradeProfile", &m.AutoUpgradeProfile) + delete(rawMsg, key) + case "azureMonitorProfile": + err = unpopulate(val, "AzureMonitorProfile", &m.AzureMonitorProfile) + delete(rawMsg, key) + case "azurePortalFQDN": + err = unpopulate(val, "AzurePortalFQDN", &m.AzurePortalFQDN) + delete(rawMsg, key) + case "bootstrapProfile": + err = unpopulate(val, "BootstrapProfile", &m.BootstrapProfile) + delete(rawMsg, key) + case "currentKubernetesVersion": + err = unpopulate(val, "CurrentKubernetesVersion", &m.CurrentKubernetesVersion) + delete(rawMsg, key) + case "dnsPrefix": + err = unpopulate(val, "DNSPrefix", &m.DNSPrefix) + delete(rawMsg, key) + case "disableLocalAccounts": + err = unpopulate(val, "DisableLocalAccounts", &m.DisableLocalAccounts) + delete(rawMsg, key) + case "diskEncryptionSetID": + err = unpopulate(val, "DiskEncryptionSetID", &m.DiskEncryptionSetID) + delete(rawMsg, key) + case "enableRBAC": + err = unpopulate(val, "EnableRBAC", &m.EnableRBAC) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &m.Fqdn) + delete(rawMsg, key) + case "fqdnSubdomain": + err = unpopulate(val, "FqdnSubdomain", &m.FqdnSubdomain) + delete(rawMsg, key) + case "httpProxyConfig": + err = unpopulate(val, "HTTPProxyConfig", &m.HTTPProxyConfig) + delete(rawMsg, key) + case "identityProfile": + err = unpopulate(val, "IdentityProfile", &m.IdentityProfile) + delete(rawMsg, key) + case "ingressProfile": + err = unpopulate(val, "IngressProfile", &m.IngressProfile) + delete(rawMsg, key) + case "kubernetesVersion": + err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) + delete(rawMsg, key) + case "linuxProfile": + err = unpopulate(val, "LinuxProfile", &m.LinuxProfile) + delete(rawMsg, key) + case "maxAgentPools": + err = unpopulate(val, "MaxAgentPools", &m.MaxAgentPools) + delete(rawMsg, key) + case "metricsProfile": + err = unpopulate(val, "MetricsProfile", &m.MetricsProfile) + delete(rawMsg, key) + case "networkProfile": + err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) + delete(rawMsg, key) + case "nodeProvisioningProfile": + err = unpopulate(val, "NodeProvisioningProfile", &m.NodeProvisioningProfile) + delete(rawMsg, key) + case "nodeResourceGroup": + err = unpopulate(val, "NodeResourceGroup", &m.NodeResourceGroup) + delete(rawMsg, key) + case "nodeResourceGroupProfile": + err = unpopulate(val, "NodeResourceGroupProfile", &m.NodeResourceGroupProfile) + delete(rawMsg, key) + case "oidcIssuerProfile": + err = unpopulate(val, "OidcIssuerProfile", &m.OidcIssuerProfile) + delete(rawMsg, key) + case "podIdentityProfile": + err = unpopulate(val, "PodIdentityProfile", &m.PodIdentityProfile) + delete(rawMsg, key) + case "powerState": + err = unpopulate(val, "PowerState", &m.PowerState) + delete(rawMsg, key) + case "privateFQDN": + err = unpopulate(val, "PrivateFQDN", &m.PrivateFQDN) + delete(rawMsg, key) + case "privateLinkResources": + err = unpopulate(val, "PrivateLinkResources", &m.PrivateLinkResources) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &m.PublicNetworkAccess) + delete(rawMsg, key) + case "resourceUID": + err = unpopulate(val, "ResourceUID", &m.ResourceUID) + delete(rawMsg, key) + case "securityProfile": + err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) + delete(rawMsg, key) + case "serviceMeshProfile": + err = unpopulate(val, "ServiceMeshProfile", &m.ServiceMeshProfile) + delete(rawMsg, key) + case "servicePrincipalProfile": + err = unpopulate(val, "ServicePrincipalProfile", &m.ServicePrincipalProfile) + delete(rawMsg, key) + case "status": + err = unpopulate(val, "Status", &m.Status) + delete(rawMsg, key) + case "storageProfile": + err = unpopulate(val, "StorageProfile", &m.StorageProfile) + delete(rawMsg, key) + case "supportPlan": + err = unpopulate(val, "SupportPlan", &m.SupportPlan) delete(rawMsg, key) - case "managedClusterPropertiesReadOnly": - err = unpopulate(val, "ManagedClusterPropertiesReadOnly", &m.ManagedClusterPropertiesReadOnly) + case "upgradeSettings": + err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) delete(rawMsg, key) - case "snapshotType": - err = unpopulate(val, "SnapshotType", &m.SnapshotType) + case "windowsProfile": + err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStaticEgressGatewayProfile. -func (m ManagedClusterStaticEgressGatewayProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStaticEgressGatewayProfile. -func (m *ManagedClusterStaticEgressGatewayProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "workloadAutoScalerProfile": + err = unpopulate(val, "WorkloadAutoScalerProfile", &m.WorkloadAutoScalerProfile) delete(rawMsg, key) } if err != nil { @@ -6500,15 +4104,34 @@ func (m *ManagedClusterStaticEgressGatewayProfile) UnmarshalJSON(data []byte) er return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStatus. -func (m ManagedClusterStatus) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPropertiesAutoScalerProfile. +func (m ManagedClusterPropertiesAutoScalerProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "provisioningError", m.ProvisioningError) + populate(objectMap, "balance-similar-node-groups", m.BalanceSimilarNodeGroups) + populate(objectMap, "daemonset-eviction-for-empty-nodes", m.DaemonsetEvictionForEmptyNodes) + populate(objectMap, "daemonset-eviction-for-occupied-nodes", m.DaemonsetEvictionForOccupiedNodes) + populate(objectMap, "expander", m.Expander) + populate(objectMap, "ignore-daemonsets-utilization", m.IgnoreDaemonsetsUtilization) + populate(objectMap, "max-empty-bulk-delete", m.MaxEmptyBulkDelete) + populate(objectMap, "max-graceful-termination-sec", m.MaxGracefulTerminationSec) + populate(objectMap, "max-node-provision-time", m.MaxNodeProvisionTime) + populate(objectMap, "max-total-unready-percentage", m.MaxTotalUnreadyPercentage) + populate(objectMap, "new-pod-scale-up-delay", m.NewPodScaleUpDelay) + populate(objectMap, "ok-total-unready-count", m.OkTotalUnreadyCount) + populate(objectMap, "scale-down-delay-after-add", m.ScaleDownDelayAfterAdd) + populate(objectMap, "scale-down-delay-after-delete", m.ScaleDownDelayAfterDelete) + populate(objectMap, "scale-down-delay-after-failure", m.ScaleDownDelayAfterFailure) + populate(objectMap, "scale-down-unneeded-time", m.ScaleDownUnneededTime) + populate(objectMap, "scale-down-unready-time", m.ScaleDownUnreadyTime) + populate(objectMap, "scale-down-utilization-threshold", m.ScaleDownUtilizationThreshold) + populate(objectMap, "scan-interval", m.ScanInterval) + populate(objectMap, "skip-nodes-with-local-storage", m.SkipNodesWithLocalStorage) + populate(objectMap, "skip-nodes-with-system-pods", m.SkipNodesWithSystemPods) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStatus. -func (m *ManagedClusterStatus) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPropertiesAutoScalerProfile. +func (m *ManagedClusterPropertiesAutoScalerProfile) 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", m, err) @@ -6516,74 +4139,65 @@ func (m *ManagedClusterStatus) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "provisioningError": - err = unpopulate(val, "ProvisioningError", &m.ProvisioningError) + case "balance-similar-node-groups": + err = unpopulate(val, "BalanceSimilarNodeGroups", &m.BalanceSimilarNodeGroups) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfile. -func (m ManagedClusterStorageProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "blobCSIDriver", m.BlobCSIDriver) - populate(objectMap, "diskCSIDriver", m.DiskCSIDriver) - populate(objectMap, "fileCSIDriver", m.FileCSIDriver) - populate(objectMap, "snapshotController", m.SnapshotController) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfile. -func (m *ManagedClusterStorageProfile) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "blobCSIDriver": - err = unpopulate(val, "BlobCSIDriver", &m.BlobCSIDriver) + case "daemonset-eviction-for-empty-nodes": + err = unpopulate(val, "DaemonsetEvictionForEmptyNodes", &m.DaemonsetEvictionForEmptyNodes) delete(rawMsg, key) - case "diskCSIDriver": - err = unpopulate(val, "DiskCSIDriver", &m.DiskCSIDriver) + case "daemonset-eviction-for-occupied-nodes": + err = unpopulate(val, "DaemonsetEvictionForOccupiedNodes", &m.DaemonsetEvictionForOccupiedNodes) delete(rawMsg, key) - case "fileCSIDriver": - err = unpopulate(val, "FileCSIDriver", &m.FileCSIDriver) + case "expander": + err = unpopulate(val, "Expander", &m.Expander) delete(rawMsg, key) - case "snapshotController": - err = unpopulate(val, "SnapshotController", &m.SnapshotController) + case "ignore-daemonsets-utilization": + err = unpopulate(val, "IgnoreDaemonsetsUtilization", &m.IgnoreDaemonsetsUtilization) delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileBlobCSIDriver. -func (m ManagedClusterStorageProfileBlobCSIDriver) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileBlobCSIDriver. -func (m *ManagedClusterStorageProfileBlobCSIDriver) 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "max-empty-bulk-delete": + err = unpopulate(val, "MaxEmptyBulkDelete", &m.MaxEmptyBulkDelete) + delete(rawMsg, key) + case "max-graceful-termination-sec": + err = unpopulate(val, "MaxGracefulTerminationSec", &m.MaxGracefulTerminationSec) + delete(rawMsg, key) + case "max-node-provision-time": + err = unpopulate(val, "MaxNodeProvisionTime", &m.MaxNodeProvisionTime) + delete(rawMsg, key) + case "max-total-unready-percentage": + err = unpopulate(val, "MaxTotalUnreadyPercentage", &m.MaxTotalUnreadyPercentage) + delete(rawMsg, key) + case "new-pod-scale-up-delay": + err = unpopulate(val, "NewPodScaleUpDelay", &m.NewPodScaleUpDelay) + delete(rawMsg, key) + case "ok-total-unready-count": + err = unpopulate(val, "OkTotalUnreadyCount", &m.OkTotalUnreadyCount) + delete(rawMsg, key) + case "scale-down-delay-after-add": + err = unpopulate(val, "ScaleDownDelayAfterAdd", &m.ScaleDownDelayAfterAdd) + delete(rawMsg, key) + case "scale-down-delay-after-delete": + err = unpopulate(val, "ScaleDownDelayAfterDelete", &m.ScaleDownDelayAfterDelete) + delete(rawMsg, key) + case "scale-down-delay-after-failure": + err = unpopulate(val, "ScaleDownDelayAfterFailure", &m.ScaleDownDelayAfterFailure) + delete(rawMsg, key) + case "scale-down-unneeded-time": + err = unpopulate(val, "ScaleDownUnneededTime", &m.ScaleDownUnneededTime) + delete(rawMsg, key) + case "scale-down-unready-time": + err = unpopulate(val, "ScaleDownUnreadyTime", &m.ScaleDownUnreadyTime) + delete(rawMsg, key) + case "scale-down-utilization-threshold": + err = unpopulate(val, "ScaleDownUtilizationThreshold", &m.ScaleDownUtilizationThreshold) + delete(rawMsg, key) + case "scan-interval": + err = unpopulate(val, "ScanInterval", &m.ScanInterval) + delete(rawMsg, key) + case "skip-nodes-with-local-storage": + err = unpopulate(val, "SkipNodesWithLocalStorage", &m.SkipNodesWithLocalStorage) + delete(rawMsg, key) + case "skip-nodes-with-system-pods": + err = unpopulate(val, "SkipNodesWithSystemPods", &m.SkipNodesWithSystemPods) delete(rawMsg, key) } if err != nil { @@ -6593,16 +4207,16 @@ func (m *ManagedClusterStorageProfileBlobCSIDriver) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileDiskCSIDriver. -func (m ManagedClusterStorageProfileDiskCSIDriver) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSKU. +func (m ManagedClusterSKU) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "version", m.Version) + populate(objectMap, "name", m.Name) + populate(objectMap, "tier", m.Tier) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileDiskCSIDriver. -func (m *ManagedClusterStorageProfileDiskCSIDriver) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSKU. +func (m *ManagedClusterSKU) 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", m, err) @@ -6610,11 +4224,11 @@ func (m *ManagedClusterStorageProfileDiskCSIDriver) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &m.Version) + case "tier": + err = unpopulate(val, "Tier", &m.Tier) delete(rawMsg, key) } if err != nil { @@ -6624,15 +4238,25 @@ func (m *ManagedClusterStorageProfileDiskCSIDriver) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileFileCSIDriver. -func (m ManagedClusterStorageProfileFileCSIDriver) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfile. +func (m ManagedClusterSecurityProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "azureKeyVaultKms", m.AzureKeyVaultKms) + populateByteArray(objectMap, "customCATrustCertificates", m.CustomCATrustCertificates, func() any { + encodedValue := make([]string, len(m.CustomCATrustCertificates)) + for i := 0; i < len(m.CustomCATrustCertificates); i++ { + encodedValue[i] = runtime.EncodeByteArray(m.CustomCATrustCertificates[i], runtime.Base64StdFormat) + } + return encodedValue + }) + populate(objectMap, "defender", m.Defender) + populate(objectMap, "imageCleaner", m.ImageCleaner) + populate(objectMap, "workloadIdentity", m.WorkloadIdentity) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileFileCSIDriver. -func (m *ManagedClusterStorageProfileFileCSIDriver) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfile. +func (m *ManagedClusterSecurityProfile) 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", m, err) @@ -6640,8 +4264,27 @@ func (m *ManagedClusterStorageProfileFileCSIDriver) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "azureKeyVaultKms": + err = unpopulate(val, "AzureKeyVaultKms", &m.AzureKeyVaultKms) + delete(rawMsg, key) + case "customCATrustCertificates": + var encodedValue []string + err = unpopulate(val, "CustomCATrustCertificates", &encodedValue) + if err == nil && len(encodedValue) > 0 { + m.CustomCATrustCertificates = make([][]byte, len(encodedValue)) + for i := 0; i < len(encodedValue) && err == nil; i++ { + err = runtime.DecodeByteArray(encodedValue[i], &m.CustomCATrustCertificates[i], runtime.Base64StdFormat) + } + } + delete(rawMsg, key) + case "defender": + err = unpopulate(val, "Defender", &m.Defender) + delete(rawMsg, key) + case "imageCleaner": + err = unpopulate(val, "ImageCleaner", &m.ImageCleaner) + delete(rawMsg, key) + case "workloadIdentity": + err = unpopulate(val, "WorkloadIdentity", &m.WorkloadIdentity) delete(rawMsg, key) } if err != nil { @@ -6651,15 +4294,16 @@ func (m *ManagedClusterStorageProfileFileCSIDriver) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileSnapshotController. -func (m ManagedClusterStorageProfileSnapshotController) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileDefender. +func (m ManagedClusterSecurityProfileDefender) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "logAnalyticsWorkspaceResourceId", m.LogAnalyticsWorkspaceResourceID) + populate(objectMap, "securityMonitoring", m.SecurityMonitoring) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileSnapshotController. -func (m *ManagedClusterStorageProfileSnapshotController) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileDefender. +func (m *ManagedClusterSecurityProfileDefender) 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", m, err) @@ -6667,8 +4311,11 @@ func (m *ManagedClusterStorageProfileSnapshotController) UnmarshalJSON(data []by for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "logAnalyticsWorkspaceResourceId": + err = unpopulate(val, "LogAnalyticsWorkspaceResourceID", &m.LogAnalyticsWorkspaceResourceID) + delete(rawMsg, key) + case "securityMonitoring": + err = unpopulate(val, "SecurityMonitoring", &m.SecurityMonitoring) delete(rawMsg, key) } if err != nil { @@ -6678,18 +4325,15 @@ func (m *ManagedClusterStorageProfileSnapshotController) UnmarshalJSON(data []by return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterUpgradeProfile. -func (m ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileDefenderSecurityMonitoring. +func (m ManagedClusterSecurityProfileDefenderSecurityMonitoring) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "type", m.Type) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterUpgradeProfile. -func (m *ManagedClusterUpgradeProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileDefenderSecurityMonitoring. +func (m *ManagedClusterSecurityProfileDefenderSecurityMonitoring) 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", m, err) @@ -6697,17 +4341,8 @@ func (m *ManagedClusterUpgradeProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -6717,16 +4352,16 @@ func (m *ManagedClusterUpgradeProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterUpgradeProfileProperties. -func (m ManagedClusterUpgradeProfileProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileImageCleaner. +func (m ManagedClusterSecurityProfileImageCleaner) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "agentPoolProfiles", m.AgentPoolProfiles) - populate(objectMap, "controlPlaneProfile", m.ControlPlaneProfile) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "intervalHours", m.IntervalHours) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterUpgradeProfileProperties. -func (m *ManagedClusterUpgradeProfileProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileImageCleaner. +func (m *ManagedClusterSecurityProfileImageCleaner) 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", m, err) @@ -6734,11 +4369,11 @@ func (m *ManagedClusterUpgradeProfileProperties) UnmarshalJSON(data []byte) erro for key, val := range rawMsg { var err error switch key { - case "agentPoolProfiles": - err = unpopulate(val, "AgentPoolProfiles", &m.AgentPoolProfiles) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) - case "controlPlaneProfile": - err = unpopulate(val, "ControlPlaneProfile", &m.ControlPlaneProfile) + case "intervalHours": + err = unpopulate(val, "IntervalHours", &m.IntervalHours) delete(rawMsg, key) } if err != nil { @@ -6748,19 +4383,15 @@ func (m *ManagedClusterUpgradeProfileProperties) UnmarshalJSON(data []byte) erro return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWindowsProfile. -func (m ManagedClusterWindowsProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileWorkloadIdentity. +func (m ManagedClusterSecurityProfileWorkloadIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "adminPassword", m.AdminPassword) - populate(objectMap, "adminUsername", m.AdminUsername) - populate(objectMap, "enableCSIProxy", m.EnableCSIProxy) - populate(objectMap, "gmsaProfile", m.GmsaProfile) - populate(objectMap, "licenseType", m.LicenseType) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWindowsProfile. -func (m *ManagedClusterWindowsProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileWorkloadIdentity. +func (m *ManagedClusterSecurityProfileWorkloadIdentity) 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", m, err) @@ -6768,20 +4399,8 @@ func (m *ManagedClusterWindowsProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "adminPassword": - err = unpopulate(val, "AdminPassword", &m.AdminPassword) - delete(rawMsg, key) - case "adminUsername": - err = unpopulate(val, "AdminUsername", &m.AdminUsername) - delete(rawMsg, key) - case "enableCSIProxy": - err = unpopulate(val, "EnableCSIProxy", &m.EnableCSIProxy) - delete(rawMsg, key) - case "gmsaProfile": - err = unpopulate(val, "GmsaProfile", &m.GmsaProfile) - delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &m.LicenseType) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -6791,16 +4410,16 @@ func (m *ManagedClusterWindowsProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfile. -func (m ManagedClusterWorkloadAutoScalerProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterServicePrincipalProfile. +func (m ManagedClusterServicePrincipalProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "keda", m.Keda) - populate(objectMap, "verticalPodAutoscaler", m.VerticalPodAutoscaler) + populate(objectMap, "clientId", m.ClientID) + populate(objectMap, "secret", m.Secret) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfile. -func (m *ManagedClusterWorkloadAutoScalerProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterServicePrincipalProfile. +func (m *ManagedClusterServicePrincipalProfile) 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", m, err) @@ -6808,11 +4427,11 @@ func (m *ManagedClusterWorkloadAutoScalerProfile) UnmarshalJSON(data []byte) err for key, val := range rawMsg { var err error switch key { - case "keda": - err = unpopulate(val, "Keda", &m.Keda) + case "clientId": + err = unpopulate(val, "ClientID", &m.ClientID) delete(rawMsg, key) - case "verticalPodAutoscaler": - err = unpopulate(val, "VerticalPodAutoscaler", &m.VerticalPodAutoscaler) + case "secret": + err = unpopulate(val, "Secret", &m.Secret) delete(rawMsg, key) } if err != nil { @@ -6822,15 +4441,15 @@ func (m *ManagedClusterWorkloadAutoScalerProfile) UnmarshalJSON(data []byte) err return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfileKeda. -func (m ManagedClusterWorkloadAutoScalerProfileKeda) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStaticEgressGatewayProfile. +func (m ManagedClusterStaticEgressGatewayProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfileKeda. -func (m *ManagedClusterWorkloadAutoScalerProfileKeda) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStaticEgressGatewayProfile. +func (m *ManagedClusterStaticEgressGatewayProfile) 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", m, err) @@ -6849,16 +4468,15 @@ func (m *ManagedClusterWorkloadAutoScalerProfileKeda) UnmarshalJSON(data []byte) return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. -func (m ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStatus. +func (m ManagedClusterStatus) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "addonAutoscaling", m.AddonAutoscaling) - populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "provisioningError", m.ProvisioningError) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. -func (m *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStatus. +func (m *ManagedClusterStatus) 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", m, err) @@ -6866,11 +4484,8 @@ func (m *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) Unmarshal for key, val := range rawMsg { var err error switch key { - case "addonAutoscaling": - err = unpopulate(val, "AddonAutoscaling", &m.AddonAutoscaling) - delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "provisioningError": + err = unpopulate(val, "ProvisioningError", &m.ProvisioningError) delete(rawMsg, key) } if err != nil { @@ -6880,22 +4495,18 @@ func (m *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) Unmarshal return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedNamespace. -func (m ManagedNamespace) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfile. +func (m ManagedClusterStorageProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "eTag", m.ETag) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) + populate(objectMap, "blobCSIDriver", m.BlobCSIDriver) + populate(objectMap, "diskCSIDriver", m.DiskCSIDriver) + populate(objectMap, "fileCSIDriver", m.FileCSIDriver) + populate(objectMap, "snapshotController", m.SnapshotController) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedNamespace. -func (m *ManagedNamespace) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfile. +func (m *ManagedClusterStorageProfile) 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", m, err) @@ -6903,29 +4514,17 @@ func (m *ManagedNamespace) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "eTag": - err = unpopulate(val, "ETag", &m.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "blobCSIDriver": + err = unpopulate(val, "BlobCSIDriver", &m.BlobCSIDriver) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) + case "diskCSIDriver": + err = unpopulate(val, "DiskCSIDriver", &m.DiskCSIDriver) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) + case "fileCSIDriver": + err = unpopulate(val, "FileCSIDriver", &m.FileCSIDriver) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "snapshotController": + err = unpopulate(val, "SnapshotController", &m.SnapshotController) delete(rawMsg, key) } if err != nil { @@ -6935,16 +4534,15 @@ func (m *ManagedNamespace) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedNamespaceListResult. -func (m ManagedNamespaceListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileBlobCSIDriver. +func (m ManagedClusterStorageProfileBlobCSIDriver) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedNamespaceListResult. -func (m *ManagedNamespaceListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileBlobCSIDriver. +func (m *ManagedClusterStorageProfileBlobCSIDriver) 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", m, err) @@ -6952,11 +4550,8 @@ func (m *ManagedNamespaceListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -6966,16 +4561,15 @@ func (m *ManagedNamespaceListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentityUserAssignedIdentitiesValue. -func (m ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileDiskCSIDriver. +func (m ManagedClusterStorageProfileDiskCSIDriver) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientId", m.ClientID) - populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentityUserAssignedIdentitiesValue. -func (m *ManagedServiceIdentityUserAssignedIdentitiesValue) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileDiskCSIDriver. +func (m *ManagedClusterStorageProfileDiskCSIDriver) 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", m, err) @@ -6983,11 +4577,8 @@ func (m *ManagedServiceIdentityUserAssignedIdentitiesValue) UnmarshalJSON(data [ for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &m.ClientID) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &m.PrincipalID) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -6997,16 +4588,15 @@ func (m *ManagedServiceIdentityUserAssignedIdentitiesValue) UnmarshalJSON(data [ return nil } -// MarshalJSON implements the json.Marshaller interface for type ManualScaleProfile. -func (m ManualScaleProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileFileCSIDriver. +func (m ManagedClusterStorageProfileFileCSIDriver) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "count", m.Count) - populate(objectMap, "size", m.Size) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManualScaleProfile. -func (m *ManualScaleProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileFileCSIDriver. +func (m *ManagedClusterStorageProfileFileCSIDriver) 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", m, err) @@ -7014,11 +4604,8 @@ func (m *ManualScaleProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "count": - err = unpopulate(val, "Count", &m.Count) - delete(rawMsg, key) - case "size": - err = unpopulate(val, "Size", &m.Size) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -7028,21 +4615,15 @@ func (m *ManualScaleProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MeshMembership. -func (m MeshMembership) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileSnapshotController. +func (m ManagedClusterStorageProfileSnapshotController) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "eTag", m.ETag) - populate(objectMap, "id", m.ID) - populate(objectMap, "managedBy", m.ManagedBy) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "type", m.Type) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MeshMembership. -func (m *MeshMembership) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileSnapshotController. +func (m *ManagedClusterStorageProfileSnapshotController) 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", m, err) @@ -7050,26 +4631,8 @@ func (m *MeshMembership) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "eTag": - err = unpopulate(val, "ETag", &m.ETag) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "managedBy": - err = unpopulate(val, "ManagedBy", &m.ManagedBy) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -7079,16 +4642,18 @@ func (m *MeshMembership) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MeshMembershipProperties. -func (m MeshMembershipProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterUpgradeProfile. +func (m ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "managedMeshID", m.ManagedMeshID) - populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MeshMembershipProperties. -func (m *MeshMembershipProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterUpgradeProfile. +func (m *ManagedClusterUpgradeProfile) 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", m, err) @@ -7096,11 +4661,17 @@ func (m *MeshMembershipProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "managedMeshID": - err = unpopulate(val, "ManagedMeshID", &m.ManagedMeshID) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { @@ -7110,16 +4681,16 @@ func (m *MeshMembershipProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MeshMembershipsListResult. -func (m MeshMembershipsListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterUpgradeProfileProperties. +func (m ManagedClusterUpgradeProfileProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) + populate(objectMap, "agentPoolProfiles", m.AgentPoolProfiles) + populate(objectMap, "controlPlaneProfile", m.ControlPlaneProfile) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MeshMembershipsListResult. -func (m *MeshMembershipsListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterUpgradeProfileProperties. +func (m *ManagedClusterUpgradeProfileProperties) 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", m, err) @@ -7127,11 +4698,11 @@ func (m *MeshMembershipsListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) + case "agentPoolProfiles": + err = unpopulate(val, "AgentPoolProfiles", &m.AgentPoolProfiles) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + case "controlPlaneProfile": + err = unpopulate(val, "ControlPlaneProfile", &m.ControlPlaneProfile) delete(rawMsg, key) } if err != nil { @@ -7141,17 +4712,19 @@ func (m *MeshMembershipsListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MeshRevision. -func (m MeshRevision) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWindowsProfile. +func (m ManagedClusterWindowsProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "compatibleWith", m.CompatibleWith) - populate(objectMap, "revision", m.Revision) - populate(objectMap, "upgrades", m.Upgrades) + populate(objectMap, "adminPassword", m.AdminPassword) + populate(objectMap, "adminUsername", m.AdminUsername) + populate(objectMap, "enableCSIProxy", m.EnableCSIProxy) + populate(objectMap, "gmsaProfile", m.GmsaProfile) + populate(objectMap, "licenseType", m.LicenseType) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevision. -func (m *MeshRevision) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWindowsProfile. +func (m *ManagedClusterWindowsProfile) 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", m, err) @@ -7159,14 +4732,20 @@ func (m *MeshRevision) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "compatibleWith": - err = unpopulate(val, "CompatibleWith", &m.CompatibleWith) + case "adminPassword": + err = unpopulate(val, "AdminPassword", &m.AdminPassword) delete(rawMsg, key) - case "revision": - err = unpopulate(val, "Revision", &m.Revision) + case "adminUsername": + err = unpopulate(val, "AdminUsername", &m.AdminUsername) delete(rawMsg, key) - case "upgrades": - err = unpopulate(val, "Upgrades", &m.Upgrades) + case "enableCSIProxy": + err = unpopulate(val, "EnableCSIProxy", &m.EnableCSIProxy) + delete(rawMsg, key) + case "gmsaProfile": + err = unpopulate(val, "GmsaProfile", &m.GmsaProfile) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &m.LicenseType) delete(rawMsg, key) } if err != nil { @@ -7176,19 +4755,16 @@ func (m *MeshRevision) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfile. -func (m MeshRevisionProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfile. +func (m ManagedClusterWorkloadAutoScalerProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "type", m.Type) + populate(objectMap, "keda", m.Keda) + populate(objectMap, "verticalPodAutoscaler", m.VerticalPodAutoscaler) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevisionProfile. -func (m *MeshRevisionProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfile. +func (m *ManagedClusterWorkloadAutoScalerProfile) 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", m, err) @@ -7196,20 +4772,11 @@ func (m *MeshRevisionProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) + case "keda": + err = unpopulate(val, "Keda", &m.Keda) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "verticalPodAutoscaler": + err = unpopulate(val, "VerticalPodAutoscaler", &m.VerticalPodAutoscaler) delete(rawMsg, key) } if err != nil { @@ -7219,16 +4786,15 @@ func (m *MeshRevisionProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfileList. -func (m MeshRevisionProfileList) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfileKeda. +func (m ManagedClusterWorkloadAutoScalerProfileKeda) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevisionProfileList. -func (m *MeshRevisionProfileList) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfileKeda. +func (m *ManagedClusterWorkloadAutoScalerProfileKeda) 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", m, err) @@ -7236,11 +4802,8 @@ func (m *MeshRevisionProfileList) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -7250,15 +4813,15 @@ func (m *MeshRevisionProfileList) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfileProperties. -func (m MeshRevisionProfileProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. +func (m ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "meshRevisions", m.MeshRevisions) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevisionProfileProperties. -func (m *MeshRevisionProfileProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. +func (m *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) 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", m, err) @@ -7266,8 +4829,8 @@ func (m *MeshRevisionProfileProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "meshRevisions": - err = unpopulate(val, "MeshRevisions", &m.MeshRevisions) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -7277,19 +4840,22 @@ func (m *MeshRevisionProfileProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MeshUpgradeProfile. -func (m MeshUpgradeProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedNamespace. +func (m ManagedNamespace) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "eTag", m.ETag) populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) populate(objectMap, "name", m.Name) populate(objectMap, "properties", m.Properties) populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MeshUpgradeProfile. -func (m *MeshUpgradeProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedNamespace. +func (m *ManagedNamespace) 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", m, err) @@ -7297,9 +4863,15 @@ func (m *MeshUpgradeProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "eTag": + err = unpopulate(val, "ETag", &m.ETag) + delete(rawMsg, key) case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) @@ -7309,6 +4881,9 @@ func (m *MeshUpgradeProfile) UnmarshalJSON(data []byte) error { case "systemData": err = unpopulate(val, "SystemData", &m.SystemData) delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) @@ -7320,16 +4895,16 @@ func (m *MeshUpgradeProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MeshUpgradeProfileList. -func (m MeshUpgradeProfileList) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedNamespaceListResult. +func (m ManagedNamespaceListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "nextLink", m.NextLink) populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MeshUpgradeProfileList. -func (m *MeshUpgradeProfileList) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedNamespaceListResult. +func (m *ManagedNamespaceListResult) 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", m, err) @@ -7351,17 +4926,16 @@ func (m *MeshUpgradeProfileList) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MeshUpgradeProfileProperties. -func (m MeshUpgradeProfileProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentityUserAssignedIdentitiesValue. +func (m ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "compatibleWith", m.CompatibleWith) - populate(objectMap, "revision", m.Revision) - populate(objectMap, "upgrades", m.Upgrades) + populate(objectMap, "clientId", m.ClientID) + populate(objectMap, "principalId", m.PrincipalID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MeshUpgradeProfileProperties. -func (m *MeshUpgradeProfileProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentityUserAssignedIdentitiesValue. +func (m *ManagedServiceIdentityUserAssignedIdentitiesValue) 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", m, err) @@ -7369,14 +4943,11 @@ func (m *MeshUpgradeProfileProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "compatibleWith": - err = unpopulate(val, "CompatibleWith", &m.CompatibleWith) - delete(rawMsg, key) - case "revision": - err = unpopulate(val, "Revision", &m.Revision) + case "clientId": + err = unpopulate(val, "ClientID", &m.ClientID) delete(rawMsg, key) - case "upgrades": - err = unpopulate(val, "Upgrades", &m.Upgrades) + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) delete(rawMsg, key) } if err != nil { @@ -7386,384 +4957,298 @@ func (m *MeshUpgradeProfileProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type NamespaceProperties. -func (n NamespaceProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManualScaleProfile. +func (m ManualScaleProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "adoptionPolicy", n.AdoptionPolicy) - populate(objectMap, "annotations", n.Annotations) - populate(objectMap, "defaultNetworkPolicy", n.DefaultNetworkPolicy) - populate(objectMap, "defaultResourceQuota", n.DefaultResourceQuota) - populate(objectMap, "deletePolicy", n.DeletePolicy) - populate(objectMap, "labels", n.Labels) - populate(objectMap, "portalFqdn", n.PortalFqdn) - populate(objectMap, "provisioningState", n.ProvisioningState) + populate(objectMap, "count", m.Count) + populate(objectMap, "size", m.Size) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceProperties. -func (n *NamespaceProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManualScaleProfile. +func (m *ManualScaleProfile) 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", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "adoptionPolicy": - err = unpopulate(val, "AdoptionPolicy", &n.AdoptionPolicy) - delete(rawMsg, key) - case "annotations": - err = unpopulate(val, "Annotations", &n.Annotations) - delete(rawMsg, key) - case "defaultNetworkPolicy": - err = unpopulate(val, "DefaultNetworkPolicy", &n.DefaultNetworkPolicy) - delete(rawMsg, key) - case "defaultResourceQuota": - err = unpopulate(val, "DefaultResourceQuota", &n.DefaultResourceQuota) - delete(rawMsg, key) - case "deletePolicy": - err = unpopulate(val, "DeletePolicy", &n.DeletePolicy) - delete(rawMsg, key) - case "labels": - err = unpopulate(val, "Labels", &n.Labels) - delete(rawMsg, key) - case "portalFqdn": - err = unpopulate(val, "PortalFqdn", &n.PortalFqdn) + case "count": + err = unpopulate(val, "Count", &m.Count) delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) + case "size": + err = unpopulate(val, "Size", &m.Size) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NetworkPolicies. -func (n NetworkPolicies) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshRevision. +func (m MeshRevision) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "egress", n.Egress) - populate(objectMap, "ingress", n.Ingress) + populate(objectMap, "compatibleWith", m.CompatibleWith) + populate(objectMap, "revision", m.Revision) + populate(objectMap, "upgrades", m.Upgrades) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkPolicies. -func (n *NetworkPolicies) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevision. +func (m *MeshRevision) 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", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "egress": - err = unpopulate(val, "Egress", &n.Egress) + case "compatibleWith": + err = unpopulate(val, "CompatibleWith", &m.CompatibleWith) delete(rawMsg, key) - case "ingress": - err = unpopulate(val, "Ingress", &n.Ingress) + case "revision": + err = unpopulate(val, "Revision", &m.Revision) + delete(rawMsg, key) + case "upgrades": + err = unpopulate(val, "Upgrades", &m.Upgrades) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NetworkProfile. -func (n NetworkProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfile. +func (m MeshRevisionProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "advancedNetworking", n.AdvancedNetworking) - populate(objectMap, "dnsServiceIP", n.DNSServiceIP) - populate(objectMap, "ipFamilies", n.IPFamilies) - populate(objectMap, "kubeProxyConfig", n.KubeProxyConfig) - populate(objectMap, "loadBalancerProfile", n.LoadBalancerProfile) - populate(objectMap, "loadBalancerSku", n.LoadBalancerSKU) - populate(objectMap, "natGatewayProfile", n.NatGatewayProfile) - populate(objectMap, "networkDataplane", n.NetworkDataplane) - populate(objectMap, "networkMode", n.NetworkMode) - populate(objectMap, "networkPlugin", n.NetworkPlugin) - populate(objectMap, "networkPluginMode", n.NetworkPluginMode) - populate(objectMap, "networkPolicy", n.NetworkPolicy) - populate(objectMap, "outboundType", n.OutboundType) - populate(objectMap, "podCidr", n.PodCidr) - populate(objectMap, "podCidrs", n.PodCidrs) - populate(objectMap, "podLinkLocalAccess", n.PodLinkLocalAccess) - populate(objectMap, "serviceCidr", n.ServiceCidr) - populate(objectMap, "serviceCidrs", n.ServiceCidrs) - populate(objectMap, "staticEgressGatewayProfile", n.StaticEgressGatewayProfile) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile. -func (n *NetworkProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevisionProfile. +func (m *MeshRevisionProfile) 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", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "advancedNetworking": - err = unpopulate(val, "AdvancedNetworking", &n.AdvancedNetworking) - delete(rawMsg, key) - case "dnsServiceIP": - err = unpopulate(val, "DNSServiceIP", &n.DNSServiceIP) - delete(rawMsg, key) - case "ipFamilies": - err = unpopulate(val, "IPFamilies", &n.IPFamilies) - delete(rawMsg, key) - case "kubeProxyConfig": - err = unpopulate(val, "KubeProxyConfig", &n.KubeProxyConfig) - delete(rawMsg, key) - case "loadBalancerProfile": - err = unpopulate(val, "LoadBalancerProfile", &n.LoadBalancerProfile) - delete(rawMsg, key) - case "loadBalancerSku": - err = unpopulate(val, "LoadBalancerSKU", &n.LoadBalancerSKU) - delete(rawMsg, key) - case "natGatewayProfile": - err = unpopulate(val, "NatGatewayProfile", &n.NatGatewayProfile) - delete(rawMsg, key) - case "networkDataplane": - err = unpopulate(val, "NetworkDataplane", &n.NetworkDataplane) - delete(rawMsg, key) - case "networkMode": - err = unpopulate(val, "NetworkMode", &n.NetworkMode) - delete(rawMsg, key) - case "networkPlugin": - err = unpopulate(val, "NetworkPlugin", &n.NetworkPlugin) - delete(rawMsg, key) - case "networkPluginMode": - err = unpopulate(val, "NetworkPluginMode", &n.NetworkPluginMode) - delete(rawMsg, key) - case "networkPolicy": - err = unpopulate(val, "NetworkPolicy", &n.NetworkPolicy) - delete(rawMsg, key) - case "outboundType": - err = unpopulate(val, "OutboundType", &n.OutboundType) - delete(rawMsg, key) - case "podCidr": - err = unpopulate(val, "PodCidr", &n.PodCidr) - delete(rawMsg, key) - case "podCidrs": - err = unpopulate(val, "PodCidrs", &n.PodCidrs) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "podLinkLocalAccess": - err = unpopulate(val, "PodLinkLocalAccess", &n.PodLinkLocalAccess) + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "serviceCidr": - err = unpopulate(val, "ServiceCidr", &n.ServiceCidr) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) - case "serviceCidrs": - err = unpopulate(val, "ServiceCidrs", &n.ServiceCidrs) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) delete(rawMsg, key) - case "staticEgressGatewayProfile": - err = unpopulate(val, "StaticEgressGatewayProfile", &n.StaticEgressGatewayProfile) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NetworkProfileForSnapshot. -func (n NetworkProfileForSnapshot) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfileList. +func (m MeshRevisionProfileList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "loadBalancerSku", n.LoadBalancerSKU) - populate(objectMap, "networkMode", n.NetworkMode) - populate(objectMap, "networkPlugin", n.NetworkPlugin) - populate(objectMap, "networkPluginMode", n.NetworkPluginMode) - populate(objectMap, "networkPolicy", n.NetworkPolicy) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileForSnapshot. -func (n *NetworkProfileForSnapshot) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevisionProfileList. +func (m *MeshRevisionProfileList) 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", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "loadBalancerSku": - err = unpopulate(val, "LoadBalancerSKU", &n.LoadBalancerSKU) - delete(rawMsg, key) - case "networkMode": - err = unpopulate(val, "NetworkMode", &n.NetworkMode) - delete(rawMsg, key) - case "networkPlugin": - err = unpopulate(val, "NetworkPlugin", &n.NetworkPlugin) - delete(rawMsg, key) - case "networkPluginMode": - err = unpopulate(val, "NetworkPluginMode", &n.NetworkPluginMode) + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) delete(rawMsg, key) - case "networkPolicy": - err = unpopulate(val, "NetworkPolicy", &n.NetworkPolicy) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NetworkProfileKubeProxyConfig. -func (n NetworkProfileKubeProxyConfig) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfileProperties. +func (m MeshRevisionProfileProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", n.Enabled) - populate(objectMap, "ipvsConfig", n.IpvsConfig) - populate(objectMap, "mode", n.Mode) + populate(objectMap, "meshRevisions", m.MeshRevisions) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileKubeProxyConfig. -func (n *NetworkProfileKubeProxyConfig) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevisionProfileProperties. +func (m *MeshRevisionProfileProperties) 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", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &n.Enabled) - delete(rawMsg, key) - case "ipvsConfig": - err = unpopulate(val, "IpvsConfig", &n.IpvsConfig) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &n.Mode) + case "meshRevisions": + err = unpopulate(val, "MeshRevisions", &m.MeshRevisions) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NetworkProfileKubeProxyConfigIpvsConfig. -func (n NetworkProfileKubeProxyConfigIpvsConfig) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshUpgradeProfile. +func (m MeshUpgradeProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "scheduler", n.Scheduler) - populate(objectMap, "tcpFinTimeoutSeconds", n.TCPFinTimeoutSeconds) - populate(objectMap, "tcpTimeoutSeconds", n.TCPTimeoutSeconds) - populate(objectMap, "udpTimeoutSeconds", n.UDPTimeoutSeconds) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileKubeProxyConfigIpvsConfig. -func (n *NetworkProfileKubeProxyConfigIpvsConfig) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshUpgradeProfile. +func (m *MeshUpgradeProfile) 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", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "scheduler": - err = unpopulate(val, "Scheduler", &n.Scheduler) + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "tcpFinTimeoutSeconds": - err = unpopulate(val, "TCPFinTimeoutSeconds", &n.TCPFinTimeoutSeconds) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) - case "tcpTimeoutSeconds": - err = unpopulate(val, "TCPTimeoutSeconds", &n.TCPTimeoutSeconds) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) delete(rawMsg, key) - case "udpTimeoutSeconds": - err = unpopulate(val, "UDPTimeoutSeconds", &n.UDPTimeoutSeconds) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NodeCustomizationProfile. -func (n NodeCustomizationProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshUpgradeProfileList. +func (m MeshUpgradeProfileList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nodeCustomizationId", n.NodeCustomizationID) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NodeCustomizationProfile. -func (n *NodeCustomizationProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshUpgradeProfileList. +func (m *MeshUpgradeProfileList) 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", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "nodeCustomizationId": - err = unpopulate(val, "NodeCustomizationID", &n.NodeCustomizationID) + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NodeImageVersion. -func (n NodeImageVersion) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshUpgradeProfileProperties. +func (m MeshUpgradeProfileProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "fullName", n.FullName) - populate(objectMap, "os", n.OS) - populate(objectMap, "sku", n.SKU) - populate(objectMap, "version", n.Version) + populate(objectMap, "compatibleWith", m.CompatibleWith) + populate(objectMap, "revision", m.Revision) + populate(objectMap, "upgrades", m.Upgrades) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NodeImageVersion. -func (n *NodeImageVersion) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshUpgradeProfileProperties. +func (m *MeshUpgradeProfileProperties) 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", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } for key, val := range rawMsg { var err error switch key { - case "fullName": - err = unpopulate(val, "FullName", &n.FullName) - delete(rawMsg, key) - case "os": - err = unpopulate(val, "OS", &n.OS) + case "compatibleWith": + err = unpopulate(val, "CompatibleWith", &m.CompatibleWith) delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &n.SKU) + case "revision": + err = unpopulate(val, "Revision", &m.Revision) delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &n.Version) + case "upgrades": + err = unpopulate(val, "Upgrades", &m.Upgrades) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) + return fmt.Errorf("unmarshalling type %T: %v", m, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NodeImageVersionsListResult. -func (n NodeImageVersionsListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NamespaceProperties. +func (n NamespaceProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", n.NextLink) - populate(objectMap, "value", n.Value) + populate(objectMap, "adoptionPolicy", n.AdoptionPolicy) + populate(objectMap, "annotations", n.Annotations) + populate(objectMap, "defaultNetworkPolicy", n.DefaultNetworkPolicy) + populate(objectMap, "defaultResourceQuota", n.DefaultResourceQuota) + populate(objectMap, "deletePolicy", n.DeletePolicy) + populate(objectMap, "labels", n.Labels) + populate(objectMap, "portalFqdn", n.PortalFqdn) + populate(objectMap, "provisioningState", n.ProvisioningState) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NodeImageVersionsListResult. -func (n *NodeImageVersionsListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NamespaceProperties. +func (n *NamespaceProperties) 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", n, err) @@ -7771,11 +5256,29 @@ func (n *NodeImageVersionsListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &n.NextLink) + case "adoptionPolicy": + err = unpopulate(val, "AdoptionPolicy", &n.AdoptionPolicy) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &n.Value) + case "annotations": + err = unpopulate(val, "Annotations", &n.Annotations) + delete(rawMsg, key) + case "defaultNetworkPolicy": + err = unpopulate(val, "DefaultNetworkPolicy", &n.DefaultNetworkPolicy) + delete(rawMsg, key) + case "defaultResourceQuota": + err = unpopulate(val, "DefaultResourceQuota", &n.DefaultResourceQuota) + delete(rawMsg, key) + case "deletePolicy": + err = unpopulate(val, "DeletePolicy", &n.DeletePolicy) + delete(rawMsg, key) + case "labels": + err = unpopulate(val, "Labels", &n.Labels) + delete(rawMsg, key) + case "portalFqdn": + err = unpopulate(val, "PortalFqdn", &n.PortalFqdn) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &n.ProvisioningState) delete(rawMsg, key) } if err != nil { @@ -7785,102 +5288,137 @@ func (n *NodeImageVersionsListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type OperationListResult. -func (o OperationListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkPolicies. +func (n NetworkPolicies) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "value", o.Value) + populate(objectMap, "egress", n.Egress) + populate(objectMap, "ingress", n.Ingress) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. -func (o *OperationListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkPolicies. +func (n *NetworkPolicies) 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", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "value": - err = unpopulate(val, "Value", &o.Value) + case "egress": + err = unpopulate(val, "Egress", &n.Egress) + delete(rawMsg, key) + case "ingress": + err = unpopulate(val, "Ingress", &n.Ingress) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OperationStatusResult. -func (o OperationStatusResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkProfile. +func (n NetworkProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populateDateTimeRFC3339(objectMap, "endTime", o.EndTime) - populate(objectMap, "error", o.Error) - populate(objectMap, "id", o.ID) - populate(objectMap, "name", o.Name) - populate(objectMap, "operations", o.Operations) - populate(objectMap, "percentComplete", o.PercentComplete) - populate(objectMap, "resourceId", o.ResourceID) - populateDateTimeRFC3339(objectMap, "startTime", o.StartTime) - populate(objectMap, "status", o.Status) + populate(objectMap, "advancedNetworking", n.AdvancedNetworking) + populate(objectMap, "dnsServiceIP", n.DNSServiceIP) + populate(objectMap, "ipFamilies", n.IPFamilies) + populate(objectMap, "loadBalancerProfile", n.LoadBalancerProfile) + populate(objectMap, "loadBalancerSku", n.LoadBalancerSKU) + populate(objectMap, "natGatewayProfile", n.NatGatewayProfile) + populate(objectMap, "networkDataplane", n.NetworkDataplane) + populate(objectMap, "networkMode", n.NetworkMode) + populate(objectMap, "networkPlugin", n.NetworkPlugin) + populate(objectMap, "networkPluginMode", n.NetworkPluginMode) + populate(objectMap, "networkPolicy", n.NetworkPolicy) + populate(objectMap, "outboundType", n.OutboundType) + populate(objectMap, "podCidr", n.PodCidr) + populate(objectMap, "podCidrs", n.PodCidrs) + populate(objectMap, "serviceCidr", n.ServiceCidr) + populate(objectMap, "serviceCidrs", n.ServiceCidrs) + populate(objectMap, "staticEgressGatewayProfile", n.StaticEgressGatewayProfile) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResult. -func (o *OperationStatusResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile. +func (n *NetworkProfile) 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", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "endTime": - err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) + case "advancedNetworking": + err = unpopulate(val, "AdvancedNetworking", &n.AdvancedNetworking) delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &o.Error) + case "dnsServiceIP": + err = unpopulate(val, "DNSServiceIP", &n.DNSServiceIP) delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) + case "ipFamilies": + err = unpopulate(val, "IPFamilies", &n.IPFamilies) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) + case "loadBalancerProfile": + err = unpopulate(val, "LoadBalancerProfile", &n.LoadBalancerProfile) delete(rawMsg, key) - case "operations": - err = unpopulate(val, "Operations", &o.Operations) + case "loadBalancerSku": + err = unpopulate(val, "LoadBalancerSKU", &n.LoadBalancerSKU) delete(rawMsg, key) - case "percentComplete": - err = unpopulate(val, "PercentComplete", &o.PercentComplete) + case "natGatewayProfile": + err = unpopulate(val, "NatGatewayProfile", &n.NatGatewayProfile) delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &o.ResourceID) + case "networkDataplane": + err = unpopulate(val, "NetworkDataplane", &n.NetworkDataplane) delete(rawMsg, key) - case "startTime": - err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) + case "networkMode": + err = unpopulate(val, "NetworkMode", &n.NetworkMode) delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &o.Status) + case "networkPlugin": + err = unpopulate(val, "NetworkPlugin", &n.NetworkPlugin) + delete(rawMsg, key) + case "networkPluginMode": + err = unpopulate(val, "NetworkPluginMode", &n.NetworkPluginMode) + delete(rawMsg, key) + case "networkPolicy": + err = unpopulate(val, "NetworkPolicy", &n.NetworkPolicy) + delete(rawMsg, key) + case "outboundType": + err = unpopulate(val, "OutboundType", &n.OutboundType) + delete(rawMsg, key) + case "podCidr": + err = unpopulate(val, "PodCidr", &n.PodCidr) + delete(rawMsg, key) + case "podCidrs": + err = unpopulate(val, "PodCidrs", &n.PodCidrs) + delete(rawMsg, key) + case "serviceCidr": + err = unpopulate(val, "ServiceCidr", &n.ServiceCidr) + delete(rawMsg, key) + case "serviceCidrs": + err = unpopulate(val, "ServiceCidrs", &n.ServiceCidrs) + delete(rawMsg, key) + case "staticEgressGatewayProfile": + err = unpopulate(val, "StaticEgressGatewayProfile", &n.StaticEgressGatewayProfile) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type OperationStatusResultList. -func (o OperationStatusResultList) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type OperationListResult. +func (o OperationListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", o.NextLink) populate(objectMap, "value", o.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResultList. -func (o *OperationStatusResultList) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult. +func (o *OperationListResult) 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", o, err) @@ -7888,9 +5426,6 @@ func (o *OperationStatusResultList) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &o.NextLink) - delete(rawMsg, key) case "value": err = unpopulate(val, "Value", &o.Value) delete(rawMsg, key) @@ -8333,33 +5868,6 @@ func (p *PrivateLinkServiceConnectionState) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type RebalanceLoadBalancersRequestBody. -func (r RebalanceLoadBalancersRequestBody) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "loadBalancerNames", r.LoadBalancerNames) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type RebalanceLoadBalancersRequestBody. -func (r *RebalanceLoadBalancersRequestBody) 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", r, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "loadBalancerNames": - err = unpopulate(val, "LoadBalancerNames", &r.LoadBalancerNames) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", r, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type RelativeMonthlySchedule. func (r RelativeMonthlySchedule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -8581,115 +6089,9 @@ func (s *SSHPublicKey) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SafeguardsAvailableVersion. -func (s SafeguardsAvailableVersion) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "id", s.ID) - populate(objectMap, "name", s.Name) - populate(objectMap, "properties", s.Properties) - populate(objectMap, "systemData", s.SystemData) - populate(objectMap, "type", s.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SafeguardsAvailableVersion. -func (s *SafeguardsAvailableVersion) 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 "id": - err = unpopulate(val, "ID", &s.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &s.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &s.Properties) - delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &s.SystemData) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &s.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SafeguardsAvailableVersionsList. -func (s SafeguardsAvailableVersionsList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", s.NextLink) - populate(objectMap, "value", s.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SafeguardsAvailableVersionsList. -func (s *SafeguardsAvailableVersionsList) 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 "nextLink": - err = unpopulate(val, "NextLink", &s.NextLink) - delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &s.Value) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SafeguardsAvailableVersionsProperties. -func (s SafeguardsAvailableVersionsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "isDefaultVersion", s.IsDefaultVersion) - populate(objectMap, "support", s.Support) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SafeguardsAvailableVersionsProperties. -func (s *SafeguardsAvailableVersionsProperties) 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 "isDefaultVersion": - err = unpopulate(val, "IsDefaultVersion", &s.IsDefaultVersion) - delete(rawMsg, key) - case "support": - err = unpopulate(val, "Support", &s.Support) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ScaleProfile. func (s ScaleProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "autoscale", s.Autoscale) populate(objectMap, "manual", s.Manual) return json.Marshal(objectMap) } @@ -8703,9 +6105,6 @@ func (s *ScaleProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "autoscale": - err = unpopulate(val, "Autoscale", &s.Autoscale) - delete(rawMsg, key) case "manual": err = unpopulate(val, "Manual", &s.Manual) delete(rawMsg, key) @@ -8756,87 +6155,6 @@ func (s *Schedule) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type SchedulerInstanceProfile. -func (s SchedulerInstanceProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "schedulerConfigMode", s.SchedulerConfigMode) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SchedulerInstanceProfile. -func (s *SchedulerInstanceProfile) 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 "schedulerConfigMode": - err = unpopulate(val, "SchedulerConfigMode", &s.SchedulerConfigMode) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SchedulerProfile. -func (s SchedulerProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "schedulerInstanceProfiles", s.SchedulerInstanceProfiles) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SchedulerProfile. -func (s *SchedulerProfile) 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 "schedulerInstanceProfiles": - err = unpopulate(val, "SchedulerInstanceProfiles", &s.SchedulerInstanceProfiles) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type SchedulerProfileSchedulerInstanceProfiles. -func (s SchedulerProfileSchedulerInstanceProfiles) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "upstream", s.Upstream) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SchedulerProfileSchedulerInstanceProfiles. -func (s *SchedulerProfileSchedulerInstanceProfiles) 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 "upstream": - err = unpopulate(val, "Upstream", &s.Upstream) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", s, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ServiceMeshProfile. func (s ServiceMeshProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/operations_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/operations_client.go index ff5665e32ec2..c19cae65e46f 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/operations_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/operations_client.go @@ -36,7 +36,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Gets a list of operations. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-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]{ @@ -70,7 +70,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, _ *Operat return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go index 0a072c702b87..6db6a65e4d90 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/Operation_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/Operation_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/operationstatusresult_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/operationstatusresult_client.go deleted file mode 100644 index b59414f168af..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/operationstatusresult_client.go +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -package armcontainerservice - -import ( - "context" - "errors" - "github.com/Azure/azure-sdk-for-go/sdk/azcore" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" - "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" - "net/http" - "net/url" - "strings" -) - -// OperationStatusResultClient contains the methods for the OperationStatusResult group. -// Don't use this type directly, use NewOperationStatusResultClient() instead. -type OperationStatusResultClient struct { - internal *arm.Client - subscriptionID string -} - -// NewOperationStatusResultClient creates a new instance of OperationStatusResultClient with the specified values. -// - subscriptionID - The ID of the target subscription. The value must be an UUID. -// - credential - used to authorize requests. Usually a credential from azidentity. -// - options - Contains optional client configuration. Pass nil to accept the default values. -func NewOperationStatusResultClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationStatusResultClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &OperationStatusResultClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, nil -} - -// Get - Get the status of a specific operation in the specified managed cluster. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - operationID - The ID of an ongoing async operation. -// - options - OperationStatusResultClientGetOptions contains the optional parameters for the OperationStatusResultClient.Get -// method. -func (client *OperationStatusResultClient) Get(ctx context.Context, resourceGroupName string, resourceName string, operationID string, options *OperationStatusResultClientGetOptions) (OperationStatusResultClientGetResponse, error) { - var err error - const operationName = "OperationStatusResultClient.Get" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, operationID, options) - if err != nil { - return OperationStatusResultClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationStatusResultClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return OperationStatusResultClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *OperationStatusResultClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, operationID string, _ *OperationStatusResultClientGetOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations/{operationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getHandleResponse handles the Get response. -func (client *OperationStatusResultClient) getHandleResponse(resp *http.Response) (OperationStatusResultClientGetResponse, error) { - result := OperationStatusResultClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatusResult); err != nil { - return OperationStatusResultClientGetResponse{}, err - } - return result, nil -} - -// GetByAgentPool - Get the status of a specific operation in the specified agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - agentPoolName - The name of the agent pool. -// - operationID - The ID of an ongoing async operation. -// - options - OperationStatusResultClientGetByAgentPoolOptions contains the optional parameters for the OperationStatusResultClient.GetByAgentPool -// method. -func (client *OperationStatusResultClient) GetByAgentPool(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, operationID string, options *OperationStatusResultClientGetByAgentPoolOptions) (OperationStatusResultClientGetByAgentPoolResponse, error) { - var err error - const operationName = "OperationStatusResultClient.GetByAgentPool" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.getByAgentPoolCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, operationID, options) - if err != nil { - return OperationStatusResultClientGetByAgentPoolResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return OperationStatusResultClientGetByAgentPoolResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return OperationStatusResultClientGetByAgentPoolResponse{}, err - } - resp, err := client.getByAgentPoolHandleResponse(httpResp) - return resp, err -} - -// getByAgentPoolCreateRequest creates the GetByAgentPool request. -func (client *OperationStatusResultClient) getByAgentPoolCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, operationID string, _ *OperationStatusResultClientGetByAgentPoolOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - if agentPoolName == "" { - return nil, errors.New("parameter agentPoolName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) - if operationID == "" { - return nil, errors.New("parameter operationID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{operationId}", url.PathEscape(operationID)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// getByAgentPoolHandleResponse handles the GetByAgentPool response. -func (client *OperationStatusResultClient) getByAgentPoolHandleResponse(resp *http.Response) (OperationStatusResultClientGetByAgentPoolResponse, error) { - result := OperationStatusResultClientGetByAgentPoolResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatusResult); err != nil { - return OperationStatusResultClientGetByAgentPoolResponse{}, err - } - return result, nil -} - -// NewListPager - Gets a list of operations in the specified managedCluster -// -// Generated from API version 2025-09-02-preview -// - resourceGroupName - The name of the resource group. The name is case insensitive. -// - resourceName - The name of the managed cluster resource. -// - options - OperationStatusResultClientListOptions contains the optional parameters for the OperationStatusResultClient.NewListPager -// method. -func (client *OperationStatusResultClient) NewListPager(resourceGroupName string, resourceName string, options *OperationStatusResultClientListOptions) *runtime.Pager[OperationStatusResultClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[OperationStatusResultClientListResponse]{ - More: func(page OperationStatusResultClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *OperationStatusResultClientListResponse) (OperationStatusResultClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "OperationStatusResultClient.NewListPager") - 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.listCreateRequest(ctx, resourceGroupName, resourceName, options) - }, nil) - if err != nil { - return OperationStatusResultClientListResponse{}, err - } - return client.listHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listCreateRequest creates the List request. -func (client *OperationStatusResultClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, _ *OperationStatusResultClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations" - if client.subscriptionID == "" { - return nil, errors.New("parameter client.subscriptionID cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) - if resourceGroupName == "" { - return nil, errors.New("parameter resourceGroupName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) - if resourceName == "" { - return nil, errors.New("parameter resourceName cannot be empty") - } - urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) - req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - return req, nil -} - -// listHandleResponse handles the List response. -func (client *OperationStatusResultClient) listHandleResponse(resp *http.Response) (OperationStatusResultClientListResponse, error) { - result := OperationStatusResultClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.OperationStatusResultList); err != nil { - return OperationStatusResultClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/operationstatusresult_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/operationstatusresult_client_example_test.go deleted file mode 100644 index 9c3e548f3ac5..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/operationstatusresult_client_example_test.go +++ /dev/null @@ -1,118 +0,0 @@ -//go:build go1.18 -// +build go1.18 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. -// DO NOT EDIT. - -package armcontainerservice_test - -import ( - "context" - "log" - - "github.com/Azure/azure-sdk-for-go/sdk/azidentity" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/OperationStatusResultList.json -func ExampleOperationStatusResultClient_NewListPager() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - pager := clientFactory.NewOperationStatusResultClient().NewListPager("rg1", "clustername1", 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.OperationStatusResultList = armcontainerservice.OperationStatusResultList{ - // Value: []*armcontainerservice.OperationStatusResult{ - // { - // Name: to.Ptr("d11edb09-6e27-429f-9fe5-17baf773bc4a"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/operations/d11edb09-6e27-429f-9fe5-17baf773bc4a"), - // PercentComplete: to.Ptr[float32](40), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-26T12:14:26.317Z"); return t}()), - // Status: to.Ptr("InProgress"), - // }, - // { - // Name: to.Ptr("d11edb09-6e27-429f-9fe5-17baf773bc4b"), - // EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-26T12:14:50.317Z"); return t}()), - // Error: &armcontainerservice.ErrorDetail{ - // Code: to.Ptr("ReconcileAgentPoolIdentityError"), - // Message: to.Ptr("Reconcile agent pool nodepool1 identity failed"), - // }, - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/operations/d11edb09-6e27-429f-9fe5-17baf773bc4b"), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-26T12:14:26.317Z"); return t}()), - // Status: to.Ptr("Failed"), - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/OperationStatusResultGet.json -func ExampleOperationStatusResultClient_Get() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewOperationStatusResultClient().Get(ctx, "rg1", "clustername1", "00000000-0000-0000-0000-000000000001", nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.OperationStatusResult = armcontainerservice.OperationStatusResult{ - // Name: to.Ptr("00000000-0000-0000-0000-000000000001"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/operations/00000000-0000-0000-0000-000000000001"), - // PercentComplete: to.Ptr[float32](40), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-26T12:14:26.317Z"); return t}()), - // Status: to.Ptr("InProgress"), - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/OperationStatusResultGetByAgentPool.json -func ExampleOperationStatusResultClient_GetByAgentPool() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - res, err := clientFactory.NewOperationStatusResultClient().GetByAgentPool(ctx, "rg1", "clustername1", "agentpool1", "00000000-0000-0000-0000-000000000001", nil) - if err != nil { - log.Fatalf("failed to finish the request: %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.OperationStatusResult = armcontainerservice.OperationStatusResult{ - // Name: to.Ptr("00000000-0000-0000-0000-000000000001"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1/operations/00000000-0000-0000-0000-000000000001"), - // PercentComplete: to.Ptr[float32](40), - // StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-26T12:14:26.317Z"); return t}()), - // Status: to.Ptr("InProgress"), - // } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/options.go b/sdk/resourcemanager/containerservice/armcontainerservice/options.go index d1eb8dfc31d5..2b676ca645fb 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/options.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/options.go @@ -12,13 +12,6 @@ type AgentPoolsClientBeginAbortLatestOperationOptions struct { ResumeToken string } -// AgentPoolsClientBeginCompleteUpgradeOptions contains the optional parameters for the AgentPoolsClient.BeginCompleteUpgrade -// method. -type AgentPoolsClientBeginCompleteUpgradeOptions struct { - // Resumes the long-running operation from the provided token. - ResumeToken string -} - // AgentPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the AgentPoolsClient.BeginCreateOrUpdate // method. type AgentPoolsClientBeginCreateOrUpdateOptions struct { @@ -79,94 +72,6 @@ type AgentPoolsClientListOptions struct { // placeholder for future optional parameters } -// ClientListNodeImageVersionsOptions contains the optional parameters for the Client.NewListNodeImageVersionsPager method. -type ClientListNodeImageVersionsOptions struct { - // placeholder for future optional parameters -} - -// IdentityBindingsClientBeginCreateOrUpdateOptions contains the optional parameters for the IdentityBindingsClient.BeginCreateOrUpdate -// method. -type IdentityBindingsClientBeginCreateOrUpdateOptions struct { - // Resumes the long-running operation from the provided token. - ResumeToken string -} - -// IdentityBindingsClientBeginDeleteOptions contains the optional parameters for the IdentityBindingsClient.BeginDelete method. -type IdentityBindingsClientBeginDeleteOptions struct { - // Resumes the long-running operation from the provided token. - ResumeToken string -} - -// IdentityBindingsClientGetOptions contains the optional parameters for the IdentityBindingsClient.Get method. -type IdentityBindingsClientGetOptions struct { - // placeholder for future optional parameters -} - -// IdentityBindingsClientListByManagedClusterOptions contains the optional parameters for the IdentityBindingsClient.NewListByManagedClusterPager -// method. -type IdentityBindingsClientListByManagedClusterOptions struct { - // placeholder for future optional parameters -} - -// JWTAuthenticatorsClientBeginCreateOrUpdateOptions contains the optional parameters for the JWTAuthenticatorsClient.BeginCreateOrUpdate -// method. -type JWTAuthenticatorsClientBeginCreateOrUpdateOptions struct { - // Resumes the long-running operation from the provided token. - ResumeToken string -} - -// JWTAuthenticatorsClientBeginDeleteOptions contains the optional parameters for the JWTAuthenticatorsClient.BeginDelete -// method. -type JWTAuthenticatorsClientBeginDeleteOptions struct { - // Resumes the long-running operation from the provided token. - ResumeToken string -} - -// JWTAuthenticatorsClientGetOptions contains the optional parameters for the JWTAuthenticatorsClient.Get method. -type JWTAuthenticatorsClientGetOptions struct { - // placeholder for future optional parameters -} - -// JWTAuthenticatorsClientListByManagedClusterOptions contains the optional parameters for the JWTAuthenticatorsClient.NewListByManagedClusterPager -// method. -type JWTAuthenticatorsClientListByManagedClusterOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancersClientBeginDeleteOptions contains the optional parameters for the LoadBalancersClient.BeginDelete method. -type LoadBalancersClientBeginDeleteOptions struct { - // Resumes the long-running operation from the provided token. - ResumeToken string -} - -// LoadBalancersClientCreateOrUpdateOptions contains the optional parameters for the LoadBalancersClient.CreateOrUpdate method. -type LoadBalancersClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancersClientGetOptions contains the optional parameters for the LoadBalancersClient.Get method. -type LoadBalancersClientGetOptions struct { - // placeholder for future optional parameters -} - -// LoadBalancersClientListByManagedClusterOptions contains the optional parameters for the LoadBalancersClient.NewListByManagedClusterPager -// method. -type LoadBalancersClientListByManagedClusterOptions struct { - // placeholder for future optional parameters -} - -// MachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the MachinesClient.BeginCreateOrUpdate method. -type MachinesClientBeginCreateOrUpdateOptions struct { - // The request should only proceed if an entity matches this string. - IfMatch *string - - // The request should only proceed if no entity matches this string. - IfNoneMatch *string - - // Resumes the long-running operation from the provided token. - ResumeToken string -} - // MachinesClientGetOptions contains the optional parameters for the MachinesClient.Get method. type MachinesClientGetOptions struct { // placeholder for future optional parameters @@ -201,41 +106,6 @@ type MaintenanceConfigurationsClientListByManagedClusterOptions struct { // placeholder for future optional parameters } -// ManagedClusterSnapshotsClientCreateOrUpdateOptions contains the optional parameters for the ManagedClusterSnapshotsClient.CreateOrUpdate -// method. -type ManagedClusterSnapshotsClientCreateOrUpdateOptions struct { - // placeholder for future optional parameters -} - -// ManagedClusterSnapshotsClientDeleteOptions contains the optional parameters for the ManagedClusterSnapshotsClient.Delete -// method. -type ManagedClusterSnapshotsClientDeleteOptions struct { - // placeholder for future optional parameters -} - -// ManagedClusterSnapshotsClientGetOptions contains the optional parameters for the ManagedClusterSnapshotsClient.Get method. -type ManagedClusterSnapshotsClientGetOptions struct { - // placeholder for future optional parameters -} - -// ManagedClusterSnapshotsClientListByResourceGroupOptions contains the optional parameters for the ManagedClusterSnapshotsClient.NewListByResourceGroupPager -// method. -type ManagedClusterSnapshotsClientListByResourceGroupOptions struct { - // placeholder for future optional parameters -} - -// ManagedClusterSnapshotsClientListOptions contains the optional parameters for the ManagedClusterSnapshotsClient.NewListPager -// method. -type ManagedClusterSnapshotsClientListOptions struct { - // placeholder for future optional parameters -} - -// ManagedClusterSnapshotsClientUpdateTagsOptions contains the optional parameters for the ManagedClusterSnapshotsClient.UpdateTags -// method. -type ManagedClusterSnapshotsClientUpdateTagsOptions struct { - // placeholder for future optional parameters -} - // ManagedClustersClientBeginAbortLatestOperationOptions contains the optional parameters for the ManagedClustersClient.BeginAbortLatestOperation // method. type ManagedClustersClientBeginAbortLatestOperationOptions struct { @@ -261,16 +131,6 @@ type ManagedClustersClientBeginDeleteOptions struct { // The request should only proceed if an entity matches this string. IfMatch *string - // ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget - IgnorePodDisruptionBudget *bool - - // Resumes the long-running operation from the provided token. - ResumeToken string -} - -// ManagedClustersClientBeginRebalanceLoadBalancersOptions contains the optional parameters for the ManagedClustersClient.BeginRebalanceLoadBalancers -// method. -type ManagedClustersClientBeginRebalanceLoadBalancersOptions struct { // Resumes the long-running operation from the provided token. ResumeToken string } @@ -344,12 +204,6 @@ type ManagedClustersClientGetCommandResultOptions struct { // placeholder for future optional parameters } -// ManagedClustersClientGetGuardrailsVersionsOptions contains the optional parameters for the ManagedClustersClient.GetGuardrailsVersions -// method. -type ManagedClustersClientGetGuardrailsVersionsOptions struct { - // placeholder for future optional parameters -} - // ManagedClustersClientGetMeshRevisionProfileOptions contains the optional parameters for the ManagedClustersClient.GetMeshRevisionProfile // method. type ManagedClustersClientGetMeshRevisionProfileOptions struct { @@ -367,12 +221,6 @@ type ManagedClustersClientGetOptions struct { // placeholder for future optional parameters } -// ManagedClustersClientGetSafeguardsVersionsOptions contains the optional parameters for the ManagedClustersClient.GetSafeguardsVersions -// method. -type ManagedClustersClientGetSafeguardsVersionsOptions struct { - // placeholder for future optional parameters -} - // ManagedClustersClientGetUpgradeProfileOptions contains the optional parameters for the ManagedClustersClient.GetUpgradeProfile // method. type ManagedClustersClientGetUpgradeProfileOptions struct { @@ -411,12 +259,6 @@ type ManagedClustersClientListClusterUserCredentialsOptions struct { ServerFqdn *string } -// ManagedClustersClientListGuardrailsVersionsOptions contains the optional parameters for the ManagedClustersClient.NewListGuardrailsVersionsPager -// method. -type ManagedClustersClientListGuardrailsVersionsOptions struct { - // placeholder for future optional parameters -} - // ManagedClustersClientListKubernetesVersionsOptions contains the optional parameters for the ManagedClustersClient.ListKubernetesVersions // method. type ManagedClustersClientListKubernetesVersionsOptions struct { @@ -446,12 +288,6 @@ type ManagedClustersClientListOutboundNetworkDependenciesEndpointsOptions struct // placeholder for future optional parameters } -// ManagedClustersClientListSafeguardsVersionsOptions contains the optional parameters for the ManagedClustersClient.NewListSafeguardsVersionsPager -// method. -type ManagedClustersClientListSafeguardsVersionsOptions struct { - // placeholder for future optional parameters -} - // ManagedNamespacesClientBeginCreateOrUpdateOptions contains the optional parameters for the ManagedNamespacesClient.BeginCreateOrUpdate // method. type ManagedNamespacesClientBeginCreateOrUpdateOptions struct { @@ -488,47 +324,6 @@ type ManagedNamespacesClientUpdateOptions struct { // placeholder for future optional parameters } -// MeshMembershipsClientBeginCreateOrUpdateOptions contains the optional parameters for the MeshMembershipsClient.BeginCreateOrUpdate -// method. -type MeshMembershipsClientBeginCreateOrUpdateOptions struct { - // Resumes the long-running operation from the provided token. - ResumeToken string -} - -// MeshMembershipsClientBeginDeleteOptions contains the optional parameters for the MeshMembershipsClient.BeginDelete method. -type MeshMembershipsClientBeginDeleteOptions struct { - // Resumes the long-running operation from the provided token. - ResumeToken string -} - -// MeshMembershipsClientGetOptions contains the optional parameters for the MeshMembershipsClient.Get method. -type MeshMembershipsClientGetOptions struct { - // placeholder for future optional parameters -} - -// MeshMembershipsClientListByManagedClusterOptions contains the optional parameters for the MeshMembershipsClient.NewListByManagedClusterPager -// method. -type MeshMembershipsClientListByManagedClusterOptions struct { - // placeholder for future optional parameters -} - -// OperationStatusResultClientGetByAgentPoolOptions contains the optional parameters for the OperationStatusResultClient.GetByAgentPool -// method. -type OperationStatusResultClientGetByAgentPoolOptions struct { - // placeholder for future optional parameters -} - -// OperationStatusResultClientGetOptions contains the optional parameters for the OperationStatusResultClient.Get method. -type OperationStatusResultClientGetOptions struct { - // placeholder for future optional parameters -} - -// OperationStatusResultClientListOptions contains the optional parameters for the OperationStatusResultClient.NewListPager -// method. -type OperationStatusResultClientListOptions struct { - // placeholder for future optional parameters -} - // OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. type OperationsClientListOptions struct { // placeholder for future optional parameters diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client.go index 97d49e16a041..5536573bb43c 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client.go @@ -43,7 +43,7 @@ func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcor // BeginDelete - Deletes a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -69,7 +69,7 @@ func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, // Delete - Deletes a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "PrivateEndpointConnectionsClient.BeginDelete" @@ -115,7 +115,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -124,7 +124,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. // Get - To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -176,7 +176,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -194,7 +194,7 @@ func (client *PrivateEndpointConnectionsClient) getHandleResponse(resp *http.Res // List - To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - PrivateEndpointConnectionsClientListOptions contains the optional parameters for the PrivateEndpointConnectionsClient.List @@ -241,7 +241,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -259,7 +259,7 @@ func (client *PrivateEndpointConnectionsClient) listHandleResponse(resp *http.Re // Update - Updates a private endpoint connection. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - privateEndpointConnectionName - The name of the private endpoint connection. @@ -312,7 +312,7 @@ func (client *PrivateEndpointConnectionsClient) updateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client_example_test.go index 914ed7e64d4f..f34e1d5a828f 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/PrivateEndpointConnectionsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/PrivateEndpointConnectionsList.json func ExamplePrivateEndpointConnectionsClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -41,7 +41,7 @@ func ExamplePrivateEndpointConnectionsClient_List() { // { // Name: to.Ptr("privateendpointconnection1"), // Type: to.Ptr("Microsoft.Network/privateLinkServices/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedCluster/clustername1/privateEndpointConnections/privateendpointconnection1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedCluster/clustername1/privateEndpointConnections/privateendpointconnection1"), // Properties: &armcontainerservice.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armcontainerservice.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Network/privateEndpoints/pe2"), @@ -55,7 +55,7 @@ func ExamplePrivateEndpointConnectionsClient_List() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/PrivateEndpointConnectionsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/PrivateEndpointConnectionsGet.json func ExamplePrivateEndpointConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -76,7 +76,7 @@ func ExamplePrivateEndpointConnectionsClient_Get() { // res.PrivateEndpointConnection = armcontainerservice.PrivateEndpointConnection{ // Name: to.Ptr("privateendpointconnection1"), // Type: to.Ptr("Microsoft.Network/privateLinkServices/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedCluster/clustername1/privateEndpointConnections/privateendpointconnection1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedCluster/clustername1/privateEndpointConnections/privateendpointconnection1"), // Properties: &armcontainerservice.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armcontainerservice.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Network/privateEndpoints/pe2"), @@ -89,7 +89,7 @@ func ExamplePrivateEndpointConnectionsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/PrivateEndpointConnectionsUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/PrivateEndpointConnectionsUpdate.json func ExamplePrivateEndpointConnectionsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -116,7 +116,7 @@ func ExamplePrivateEndpointConnectionsClient_Update() { // res.PrivateEndpointConnection = armcontainerservice.PrivateEndpointConnection{ // Name: to.Ptr("privateendpointconnection1"), // Type: to.Ptr("Microsoft.Network/privateLinkServices/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedCluster/clustername1/privateEndpointConnections/privateendpointconnection1"), + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedCluster/clustername1/privateEndpointConnections/privateendpointconnection1"), // Properties: &armcontainerservice.PrivateEndpointConnectionProperties{ // PrivateEndpoint: &armcontainerservice.PrivateEndpoint{ // ID: to.Ptr("/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Network/privateEndpoints/pe2"), @@ -129,7 +129,7 @@ func ExamplePrivateEndpointConnectionsClient_Update() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/PrivateEndpointConnectionsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/PrivateEndpointConnectionsDelete.json func ExamplePrivateEndpointConnectionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client.go index 42b44b045abd..9e4a52ad0e6d 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client.go @@ -43,7 +43,7 @@ func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.Toke // List - To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - PrivateLinkResourcesClientListOptions contains the optional parameters for the PrivateLinkResourcesClient.List @@ -90,7 +90,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go index 139243498046..8c95d4892163 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/PrivateLinkResourcesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/PrivateLinkResourcesList.json func ExamplePrivateLinkResourcesClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client.go index c3bd0bc7790b..7415bf7ac229 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client.go @@ -43,7 +43,7 @@ func NewResolvePrivateLinkServiceIDClient(subscriptionID string, credential azco // POST - Gets the private link service ID for the specified managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - parameters - Parameters required in order to resolve a private link service ID. @@ -91,7 +91,7 @@ func (client *ResolvePrivateLinkServiceIDClient) postCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client_example_test.go index 5033f2240b65..46790a4a8393 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/ResolvePrivateLinkServiceId.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ResolvePrivateLinkServiceId.json func ExampleResolvePrivateLinkServiceIDClient_POST() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/responses.go b/sdk/resourcemanager/containerservice/armcontainerservice/responses.go index 67cacb0eed1b..cd5b0fe42733 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/responses.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/responses.go @@ -10,11 +10,6 @@ type AgentPoolsClientAbortLatestOperationResponse struct { // placeholder for future response values } -// AgentPoolsClientCompleteUpgradeResponse contains the response from method AgentPoolsClient.BeginCompleteUpgrade. -type AgentPoolsClientCompleteUpgradeResponse struct { - // placeholder for future response values -} - // AgentPoolsClientCreateOrUpdateResponse contains the response from method AgentPoolsClient.BeginCreateOrUpdate. type AgentPoolsClientCreateOrUpdateResponse struct { // Agent Pool. @@ -61,100 +56,10 @@ type AgentPoolsClientUpgradeNodeImageVersionResponse struct { AgentPool } -// ClientListNodeImageVersionsResponse contains the response from method Client.NewListNodeImageVersionsPager. -type ClientListNodeImageVersionsResponse struct { - // Holds an array NodeImageVersions - NodeImageVersionsListResult -} - -// IdentityBindingsClientCreateOrUpdateResponse contains the response from method IdentityBindingsClient.BeginCreateOrUpdate. -type IdentityBindingsClientCreateOrUpdateResponse struct { - // The IdentityBinding resource. - IdentityBinding -} - -// IdentityBindingsClientDeleteResponse contains the response from method IdentityBindingsClient.BeginDelete. -type IdentityBindingsClientDeleteResponse struct { - // placeholder for future response values -} - -// IdentityBindingsClientGetResponse contains the response from method IdentityBindingsClient.Get. -type IdentityBindingsClientGetResponse struct { - // The IdentityBinding resource. - IdentityBinding -} - -// IdentityBindingsClientListByManagedClusterResponse contains the response from method IdentityBindingsClient.NewListByManagedClusterPager. -type IdentityBindingsClientListByManagedClusterResponse struct { - // The response of a IdentityBinding list operation. - IdentityBindingListResult -} - -// JWTAuthenticatorsClientCreateOrUpdateResponse contains the response from method JWTAuthenticatorsClient.BeginCreateOrUpdate. -type JWTAuthenticatorsClientCreateOrUpdateResponse struct { - // Configuration for JWT authenticator in the managed cluster. - JWTAuthenticator -} - -// JWTAuthenticatorsClientDeleteResponse contains the response from method JWTAuthenticatorsClient.BeginDelete. -type JWTAuthenticatorsClientDeleteResponse struct { - // placeholder for future response values -} - -// JWTAuthenticatorsClientGetResponse contains the response from method JWTAuthenticatorsClient.Get. -type JWTAuthenticatorsClientGetResponse struct { - // Configuration for JWT authenticator in the managed cluster. - JWTAuthenticator -} - -// JWTAuthenticatorsClientListByManagedClusterResponse contains the response from method JWTAuthenticatorsClient.NewListByManagedClusterPager. -type JWTAuthenticatorsClientListByManagedClusterResponse struct { - // The response from the List JWT authenticator operation. - JWTAuthenticatorListResult -} - -// LoadBalancersClientCreateOrUpdateResponse contains the response from method LoadBalancersClient.CreateOrUpdate. -type LoadBalancersClientCreateOrUpdateResponse struct { - // The configurations regarding multiple standard load balancers. If not supplied, single load balancer mode will be used. - // Multiple standard load balancers mode will be used if at lease one configuration is supplied. There has to be a configuration - // named `kubernetes`. The name field will be the name of the corresponding public load balancer. There will be an internal - // load balancer created if needed, and the name will be `-internal`. The internal lb shares the same configurations - // as the external one. The internal lbs are not needed to be included in LoadBalancer list. - LoadBalancer -} - -// LoadBalancersClientDeleteResponse contains the response from method LoadBalancersClient.BeginDelete. -type LoadBalancersClientDeleteResponse struct { - // placeholder for future response values -} - -// LoadBalancersClientGetResponse contains the response from method LoadBalancersClient.Get. -type LoadBalancersClientGetResponse struct { - // The configurations regarding multiple standard load balancers. If not supplied, single load balancer mode will be used. - // Multiple standard load balancers mode will be used if at lease one configuration is supplied. There has to be a configuration - // named `kubernetes`. The name field will be the name of the corresponding public load balancer. There will be an internal - // load balancer created if needed, and the name will be `-internal`. The internal lb shares the same configurations - // as the external one. The internal lbs are not needed to be included in LoadBalancer list. - LoadBalancer -} - -// LoadBalancersClientListByManagedClusterResponse contains the response from method LoadBalancersClient.NewListByManagedClusterPager. -type LoadBalancersClientListByManagedClusterResponse struct { - // The response from the List Load Balancers operation. - LoadBalancerListResult -} - -// MachinesClientCreateOrUpdateResponse contains the response from method MachinesClient.BeginCreateOrUpdate. -type MachinesClientCreateOrUpdateResponse struct { - // A machine provides detailed information about its configuration and status. A machine may be visible here but not in kubectl - // get nodes; if so, it may be because the machine has not been registered with the Kubernetes API Server yet. - Machine -} - // MachinesClientGetResponse contains the response from method MachinesClient.Get. type MachinesClientGetResponse struct { - // A machine provides detailed information about its configuration and status. A machine may be visible here but not in kubectl - // get nodes; if so, it may be because the machine has not been registered with the Kubernetes API Server yet. + // A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get + // nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. Machine } @@ -189,41 +94,6 @@ type MaintenanceConfigurationsClientListByManagedClusterResponse struct { MaintenanceConfigurationListResult } -// ManagedClusterSnapshotsClientCreateOrUpdateResponse contains the response from method ManagedClusterSnapshotsClient.CreateOrUpdate. -type ManagedClusterSnapshotsClientCreateOrUpdateResponse struct { - // A managed cluster snapshot resource. - ManagedClusterSnapshot -} - -// ManagedClusterSnapshotsClientDeleteResponse contains the response from method ManagedClusterSnapshotsClient.Delete. -type ManagedClusterSnapshotsClientDeleteResponse struct { - // placeholder for future response values -} - -// ManagedClusterSnapshotsClientGetResponse contains the response from method ManagedClusterSnapshotsClient.Get. -type ManagedClusterSnapshotsClientGetResponse struct { - // A managed cluster snapshot resource. - ManagedClusterSnapshot -} - -// ManagedClusterSnapshotsClientListByResourceGroupResponse contains the response from method ManagedClusterSnapshotsClient.NewListByResourceGroupPager. -type ManagedClusterSnapshotsClientListByResourceGroupResponse struct { - // The response from the List Managed Cluster Snapshots operation. - ManagedClusterSnapshotListResult -} - -// ManagedClusterSnapshotsClientListResponse contains the response from method ManagedClusterSnapshotsClient.NewListPager. -type ManagedClusterSnapshotsClientListResponse struct { - // The response from the List Managed Cluster Snapshots operation. - ManagedClusterSnapshotListResult -} - -// ManagedClusterSnapshotsClientUpdateTagsResponse contains the response from method ManagedClusterSnapshotsClient.UpdateTags. -type ManagedClusterSnapshotsClientUpdateTagsResponse struct { - // A managed cluster snapshot resource. - ManagedClusterSnapshot -} - // ManagedClustersClientAbortLatestOperationResponse contains the response from method ManagedClustersClient.BeginAbortLatestOperation. type ManagedClustersClientAbortLatestOperationResponse struct { // placeholder for future response values @@ -255,12 +125,6 @@ type ManagedClustersClientGetCommandResultResponse struct { Location *string } -// ManagedClustersClientGetGuardrailsVersionsResponse contains the response from method ManagedClustersClient.GetGuardrailsVersions. -type ManagedClustersClientGetGuardrailsVersionsResponse struct { - // Available Guardrails Version - GuardrailsAvailableVersion -} - // ManagedClustersClientGetMeshRevisionProfileResponse contains the response from method ManagedClustersClient.GetMeshRevisionProfile. type ManagedClustersClientGetMeshRevisionProfileResponse struct { // Mesh revision profile for a mesh. @@ -279,12 +143,6 @@ type ManagedClustersClientGetResponse struct { ManagedCluster } -// ManagedClustersClientGetSafeguardsVersionsResponse contains the response from method ManagedClustersClient.GetSafeguardsVersions. -type ManagedClustersClientGetSafeguardsVersionsResponse struct { - // Available Safeguards Version - SafeguardsAvailableVersion -} - // ManagedClustersClientGetUpgradeProfileResponse contains the response from method ManagedClustersClient.GetUpgradeProfile. type ManagedClustersClientGetUpgradeProfileResponse struct { // The list of available upgrades for compute pools. @@ -315,12 +173,6 @@ type ManagedClustersClientListClusterUserCredentialsResponse struct { CredentialResults } -// ManagedClustersClientListGuardrailsVersionsResponse contains the response from method ManagedClustersClient.NewListGuardrailsVersionsPager. -type ManagedClustersClientListGuardrailsVersionsResponse struct { - // Hold values properties, which is array of GuardrailsVersions - GuardrailsAvailableVersionsList -} - // ManagedClustersClientListKubernetesVersionsResponse contains the response from method ManagedClustersClient.ListKubernetesVersions. type ManagedClustersClientListKubernetesVersionsResponse struct { // Hold values properties, which is array of KubernetesVersion @@ -351,17 +203,6 @@ type ManagedClustersClientListResponse struct { ManagedClusterListResult } -// ManagedClustersClientListSafeguardsVersionsResponse contains the response from method ManagedClustersClient.NewListSafeguardsVersionsPager. -type ManagedClustersClientListSafeguardsVersionsResponse struct { - // Hold values properties, which is array of SafeguardsVersions - SafeguardsAvailableVersionsList -} - -// ManagedClustersClientRebalanceLoadBalancersResponse contains the response from method ManagedClustersClient.BeginRebalanceLoadBalancers. -type ManagedClustersClientRebalanceLoadBalancersResponse struct { - // placeholder for future response values -} - // ManagedClustersClientResetAADProfileResponse contains the response from method ManagedClustersClient.BeginResetAADProfile. type ManagedClustersClientResetAADProfileResponse struct { // placeholder for future response values @@ -439,47 +280,6 @@ type ManagedNamespacesClientUpdateResponse struct { ManagedNamespace } -// MeshMembershipsClientCreateOrUpdateResponse contains the response from method MeshMembershipsClient.BeginCreateOrUpdate. -type MeshMembershipsClientCreateOrUpdateResponse struct { - // Mesh membership of a managed cluster. - MeshMembership -} - -// MeshMembershipsClientDeleteResponse contains the response from method MeshMembershipsClient.BeginDelete. -type MeshMembershipsClientDeleteResponse struct { - // placeholder for future response values -} - -// MeshMembershipsClientGetResponse contains the response from method MeshMembershipsClient.Get. -type MeshMembershipsClientGetResponse struct { - // Mesh membership of a managed cluster. - MeshMembership -} - -// MeshMembershipsClientListByManagedClusterResponse contains the response from method MeshMembershipsClient.NewListByManagedClusterPager. -type MeshMembershipsClientListByManagedClusterResponse struct { - // The result of a request to list mesh memberships in a managed cluster. - MeshMembershipsListResult -} - -// OperationStatusResultClientGetByAgentPoolResponse contains the response from method OperationStatusResultClient.GetByAgentPool. -type OperationStatusResultClientGetByAgentPoolResponse struct { - // The current status of an async operation. - OperationStatusResult -} - -// OperationStatusResultClientGetResponse contains the response from method OperationStatusResultClient.Get. -type OperationStatusResultClientGetResponse struct { - // The current status of an async operation. - OperationStatusResult -} - -// OperationStatusResultClientListResponse contains the response from method OperationStatusResultClient.NewListPager. -type OperationStatusResultClientListResponse struct { - // The operations list. It contains an URL link to get the next set of results. - OperationStatusResultList -} - // OperationsClientListResponse contains the response from method OperationsClient.NewListPager. type OperationsClientListResponse struct { // The List Operation response. diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go index c6e6b7bbb70d..ea1a4a26e55b 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go @@ -43,7 +43,7 @@ func NewSnapshotsClient(subscriptionID string, credential azcore.TokenCredential // CreateOrUpdate - Creates or updates a snapshot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - parameters - The snapshot to create or update. @@ -91,7 +91,7 @@ func (client *SnapshotsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -112,7 +112,7 @@ func (client *SnapshotsClient) createOrUpdateHandleResponse(resp *http.Response) // Delete - Deletes a snapshot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - SnapshotsClientDeleteOptions contains the optional parameters for the SnapshotsClient.Delete method. @@ -157,7 +157,7 @@ func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -166,7 +166,7 @@ func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resource // Get - Gets a snapshot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - SnapshotsClientGetOptions contains the optional parameters for the SnapshotsClient.Get method. @@ -212,7 +212,7 @@ func (client *SnapshotsClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -229,7 +229,7 @@ func (client *SnapshotsClient) getHandleResponse(resp *http.Response) (Snapshots // NewListPager - Gets a list of snapshots in the specified subscription. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - options - SnapshotsClientListOptions contains the optional parameters for the SnapshotsClient.NewListPager method. func (client *SnapshotsClient) NewListPager(options *SnapshotsClientListOptions) *runtime.Pager[SnapshotsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[SnapshotsClientListResponse]{ @@ -266,7 +266,7 @@ func (client *SnapshotsClient) listCreateRequest(ctx context.Context, _ *Snapsho return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -283,7 +283,7 @@ func (client *SnapshotsClient) listHandleResponse(resp *http.Response) (Snapshot // NewListByResourceGroupPager - Lists snapshots in the specified subscription and resource group. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - SnapshotsClientListByResourceGroupOptions contains the optional parameters for the SnapshotsClient.NewListByResourceGroupPager // method. @@ -326,7 +326,7 @@ func (client *SnapshotsClient) listByResourceGroupCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -344,7 +344,7 @@ func (client *SnapshotsClient) listByResourceGroupHandleResponse(resp *http.Resp // UpdateTags - Updates tags on a snapshot. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - parameters - Parameters supplied to the Update snapshot Tags operation. @@ -391,7 +391,7 @@ func (client *SnapshotsClient) updateTagsCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client_example_test.go index 37dc9d4c2dde..e789bbc2e20b 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/SnapshotsList.json func ExampleSnapshotsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -73,7 +73,7 @@ func ExampleSnapshotsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/SnapshotsListByResourceGroup.json func ExampleSnapshotsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -128,7 +128,7 @@ func ExampleSnapshotsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/SnapshotsGet.json func ExampleSnapshotsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -175,7 +175,7 @@ func ExampleSnapshotsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/SnapshotsCreate.json func ExampleSnapshotsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -233,7 +233,7 @@ func ExampleSnapshotsClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsUpdateTags.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/SnapshotsUpdateTags.json func ExampleSnapshotsClient_UpdateTags() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -285,7 +285,7 @@ func ExampleSnapshotsClient_UpdateTags() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/SnapshotsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/SnapshotsDelete.json func ExampleSnapshotsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client.go index 6c638e9dae86..faaff5526914 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client.go @@ -43,7 +43,7 @@ func NewTrustedAccessRoleBindingsClient(subscriptionID string, credential azcore // BeginCreateOrUpdate - Create or update a trusted access role binding // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - trustedAccessRoleBindingName - The name of trusted access role binding. @@ -70,7 +70,7 @@ func (client *TrustedAccessRoleBindingsClient) BeginCreateOrUpdate(ctx context.C // CreateOrUpdate - Create or update a trusted access role binding // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *TrustedAccessRoleBindingsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, trustedAccessRoleBindingName string, trustedAccessRoleBinding TrustedAccessRoleBinding, options *TrustedAccessRoleBindingsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error const operationName = "TrustedAccessRoleBindingsClient.BeginCreateOrUpdate" @@ -116,7 +116,7 @@ func (client *TrustedAccessRoleBindingsClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, trustedAccessRoleBinding); err != nil { @@ -128,7 +128,7 @@ func (client *TrustedAccessRoleBindingsClient) createOrUpdateCreateRequest(ctx c // BeginDelete - Delete a trusted access role binding. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - trustedAccessRoleBindingName - The name of trusted access role binding. @@ -154,7 +154,7 @@ func (client *TrustedAccessRoleBindingsClient) BeginDelete(ctx context.Context, // Delete - Delete a trusted access role binding. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 func (client *TrustedAccessRoleBindingsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, trustedAccessRoleBindingName string, options *TrustedAccessRoleBindingsClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "TrustedAccessRoleBindingsClient.BeginDelete" @@ -200,7 +200,7 @@ func (client *TrustedAccessRoleBindingsClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -209,7 +209,7 @@ func (client *TrustedAccessRoleBindingsClient) deleteCreateRequest(ctx context.C // Get - Get a trusted access role binding. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - trustedAccessRoleBindingName - The name of trusted access role binding. @@ -261,7 +261,7 @@ func (client *TrustedAccessRoleBindingsClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -278,7 +278,7 @@ func (client *TrustedAccessRoleBindingsClient) getHandleResponse(resp *http.Resp // NewListPager - List trusted access role bindings. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - options - TrustedAccessRoleBindingsClientListOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.NewListPager @@ -326,7 +326,7 @@ func (client *TrustedAccessRoleBindingsClient) listCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client_example_test.go index d347c305853b..1db44a3b0c0e 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/TrustedAccessRoleBindings_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/TrustedAccessRoleBindings_List.json func ExampleTrustedAccessRoleBindingsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -57,7 +57,7 @@ func ExampleTrustedAccessRoleBindingsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/TrustedAccessRoleBindings_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/TrustedAccessRoleBindings_Get.json func ExampleTrustedAccessRoleBindingsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -88,7 +88,7 @@ func ExampleTrustedAccessRoleBindingsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json func ExampleTrustedAccessRoleBindingsClient_BeginCreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -130,7 +130,7 @@ func ExampleTrustedAccessRoleBindingsClient_BeginCreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/TrustedAccessRoleBindings_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/TrustedAccessRoleBindings_Delete.json func ExampleTrustedAccessRoleBindingsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client.go index 42e7edbcba09..e8899deac011 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client.go @@ -42,7 +42,7 @@ func NewTrustedAccessRolesClient(subscriptionID string, credential azcore.TokenC // NewListPager - List supported trusted access roles. // -// Generated from API version 2025-09-02-preview +// Generated from API version 2025-10-01 // - location - The name of the Azure region. // - options - TrustedAccessRolesClientListOptions contains the optional parameters for the TrustedAccessRolesClient.NewListPager // method. @@ -85,7 +85,7 @@ func (client *TrustedAccessRolesClient) listCreateRequest(ctx context.Context, l return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2025-09-02-preview") + reqQP.Set("api-version", "2025-10-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client_example_test.go index 53ffba46bddd..325daaa521ce 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v8" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/8b53f9cfc1fdb24dbfa28e311d3be4c645169297/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2025-09-02-preview/examples/TrustedAccessRoles_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/9cc7633f842575274f715cc02e37c5769ac2742d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/TrustedAccessRoles_List.json func ExampleTrustedAccessRolesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/version.go b/sdk/resourcemanager/containerservice/armcontainerservice/version.go index 6bc326ab9a5b..ba28437837c0 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/version.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/version.go @@ -6,5 +6,5 @@ package armcontainerservice const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice" - moduleVersion = "v8.2.0-beta.1" + moduleVersion = "v8.2.0" )