diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md b/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md index 8861dcfc4d1d..1abd1ebfc9df 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md +++ b/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md @@ -1,5 +1,13 @@ # Release History +## 4.8.0 (2024-03-22) +### Features Added + +- New struct `ManagedClusterIngressProfile` +- New struct `ManagedClusterIngressProfileWebAppRouting` +- New field `IngressProfile` in struct `ManagedClusterProperties` + + ## 4.8.0-beta.1 (2024-02-23) ### Features Added diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go index 738657364e80..37ed7db8e3cb 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go @@ -17,7 +17,6 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" - "strconv" "strings" ) @@ -46,10 +45,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -75,10 +74,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -124,7 +123,7 @@ func (client *AgentPoolsClient) abortLatestOperationCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -133,7 +132,7 @@ func (client *AgentPoolsClient) abortLatestOperationCreateRequest(ctx context.Co // 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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -160,7 +159,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -206,7 +205,7 @@ func (client *AgentPoolsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -218,7 +217,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -243,7 +242,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -289,104 +288,16 @@ func (client *AgentPoolsClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") - if options != nil && options.IgnorePodDisruptionBudget != nil { - reqQP.Set("ignore-pod-disruption-budget", strconv.FormatBool(*options.IgnorePodDisruptionBudget)) - } + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil } -// BeginDeleteMachines - Deletes specific machines in an agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-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. -// - machines - A list of machines from the agent pool to be deleted. -// - options - AgentPoolsClientBeginDeleteMachinesOptions contains the optional parameters for the AgentPoolsClient.BeginDeleteMachines -// method. -func (client *AgentPoolsClient) BeginDeleteMachines(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machines AgentPoolDeleteMachinesParameter, options *AgentPoolsClientBeginDeleteMachinesOptions) (*runtime.Poller[AgentPoolsClientDeleteMachinesResponse], error) { - if options == nil || options.ResumeToken == "" { - resp, err := client.deleteMachines(ctx, resourceGroupName, resourceName, agentPoolName, machines, options) - if err != nil { - return nil, err - } - poller, err := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[AgentPoolsClientDeleteMachinesResponse]{ - Tracer: client.internal.Tracer(), - }) - return poller, err - } else { - return runtime.NewPollerFromResumeToken(options.ResumeToken, client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[AgentPoolsClientDeleteMachinesResponse]{ - Tracer: client.internal.Tracer(), - }) - } -} - -// DeleteMachines - Deletes specific machines in an agent pool. -// If the operation fails it returns an *azcore.ResponseError type. -// -// Generated from API version 2023-11-02-preview -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" - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, operationName) - ctx, endSpan := runtime.StartSpan(ctx, operationName, client.internal.Tracer(), nil) - defer func() { endSpan(err) }() - req, err := client.deleteMachinesCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, machines, 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 -} - -// deleteMachinesCreateRequest creates the DeleteMachines request. -func (client *AgentPoolsClient) deleteMachinesCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machines AgentPoolDeleteMachinesParameter, options *AgentPoolsClientBeginDeleteMachinesOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines" - 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", "2023-11-02-preview") - req.Raw().URL.RawQuery = reqQP.Encode() - req.Raw().Header["Accept"] = []string{"application/json"} - if err := runtime.MarshalAsJSON(req, machines); err != nil { - return nil, err - } - return req, nil -} - // Get - Gets the specified managed cluster agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -437,7 +348,7 @@ func (client *AgentPoolsClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -456,7 +367,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -503,7 +414,7 @@ func (client *AgentPoolsClient) getAvailableAgentPoolVersionsCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -521,7 +432,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -573,7 +484,7 @@ func (client *AgentPoolsClient) getUpgradeProfileCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -590,7 +501,7 @@ func (client *AgentPoolsClient) getUpgradeProfileHandleResponse(resp *http.Respo // NewListPager - Gets a list of agent pools in the specified managed cluster. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -637,7 +548,7 @@ func (client *AgentPoolsClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -657,7 +568,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -686,7 +597,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -732,7 +643,7 @@ func (client *AgentPoolsClient) upgradeNodeImageVersionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go index 92a185abe593..6c25dbf452d8 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/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsAbortOperation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsList.json func ExampleAgentPoolsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleAgentPoolsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsGet.json func ExampleAgentPoolsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -118,54 +118,7 @@ func ExampleAgentPoolsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsAssociate_CRG.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_associateAgentPoolWithCapacityReservationGroup() { - 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{ - 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"), - }, - }, 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{ - // 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"), - // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_Snapshot.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_Snapshot.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPoolSnapshot() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -180,7 +133,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPool 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"), + SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), }, EnableFIPS: to.Ptr(true), OrchestratorVersion: to.Ptr(""), @@ -205,7 +158,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPool // 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"), + // 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), @@ -218,8 +171,8 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPool // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_EnableCustomCATrust.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithCustomCaTrustEnabled() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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) @@ -231,11 +184,11 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithCustomCaTrus } poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{ Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - Count: to.Ptr[int32](3), - EnableCustomCATrust: 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"), }, }, nil) if err != nil { @@ -253,11 +206,11 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithCustomCaTrus // 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.19.6"), - // EnableCustomCATrust: 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"), @@ -265,7 +218,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithCustomCaTrus // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_DedicatedHostGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_DedicatedHostGroup.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithDedicatedHostGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -301,7 +254,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"), @@ -312,7 +264,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithDedicatedHos // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_EnableEncryptionAtHost.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEncryptionAtHostEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -359,7 +311,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEncryptionAt // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_Ephemeral.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_Ephemeral.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEphemeralOsDisk() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -408,7 +360,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEphemeralOsD // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_EnableFIPS.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_EnableFIPS.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithFipsEnabledOs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -455,7 +407,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithFipsEnabledO // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_GPUMIG.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_GPUMIG.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithGpumig() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -548,7 +500,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithGpumig() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_WasmWasi.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_WasmWasi.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKrustletAndTheWasiRuntime() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -599,7 +551,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKrustletAndT // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_CustomNodeConfig.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKubeletConfigAndLinuxOsConfig() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -690,58 +642,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKubeletConfi // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_MessageOfTheDay.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithMessageOfTheDay() { - 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{ - Count: to.Ptr[int32](3), - MessageOfTheDay: to.Ptr("Zm9vCg=="), - Mode: to.Ptr(armcontainerservice.AgentPoolModeUser), - OrchestratorVersion: to.Ptr(""), - OSDiskSizeGB: to.Ptr[int32](64), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - }, - }, 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{ - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.17.8"), - // MaxPods: to.Ptr[int32](110), - // MessageOfTheDay: to.Ptr("Zm9vCg=="), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeUser), - // OrchestratorVersion: to.Ptr("1.17.8"), - // OSDiskSizeGB: to.Ptr[int32](64), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_OSSKU.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_OSSKU.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithOssku() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -834,7 +735,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithOssku() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_PPG.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_PPG.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithPpg() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -881,7 +782,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithPpg() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_EnableUltraSSD.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_EnableUltraSSD.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithUltraSsdEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -928,98 +829,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithUltraSsdEnab // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithVirtualMachinesPoolType() { - 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.9.6"), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - Tags: map[string]*string{ - "name1": to.Ptr("val1"), - }, - VirtualMachinesProfile: &armcontainerservice.VirtualMachinesProfile{ - Scale: &armcontainerservice.ScaleProfile{ - Manual: []*armcontainerservice.ManualScaleProfile{ - { - Count: to.Ptr[int32](5), - Sizes: []*string{ - to.Ptr("Standard_D2_v2"), - to.Ptr("Standard_D2_v3")}, - }}, - }, - }, - }, - }, 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.9.6"), - // 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.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // Tags: map[string]*string{ - // "name1": to.Ptr("val1"), - // }, - // VirtualMachineNodesStatus: []*armcontainerservice.VirtualMachineNodes{ - // { - // Count: to.Ptr[int32](3), - // Size: to.Ptr("Standard_D2_v2"), - // }, - // { - // Count: to.Ptr[int32](2), - // Size: to.Ptr("Standard_D2_v3"), - // }}, - // VirtualMachinesProfile: &armcontainerservice.VirtualMachinesProfile{ - // Scale: &armcontainerservice.ScaleProfile{ - // Manual: []*armcontainerservice.ManualScaleProfile{ - // { - // Count: to.Ptr[int32](5), - // Sizes: []*string{ - // to.Ptr("Standard_D2_v2"), - // to.Ptr("Standard_D2_v3")}, - // }}, - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_WindowsOSSKU.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_WindowsOSSKU.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithWindowsOssku() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1066,7 +876,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithWindowsOssku // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_Spot.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_Spot.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createSpotAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1132,60 +942,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createSpotAgentPool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createWindowsAgentPoolWithDisablingOutboundNat() { - 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", "wnp2", armcontainerservice.AgentPool{ - Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - Count: to.Ptr[int32](3), - OrchestratorVersion: to.Ptr("1.23.8"), - OSSKU: to.Ptr(armcontainerservice.OSSKUWindows2022), - OSType: to.Ptr(armcontainerservice.OSTypeWindows), - VMSize: to.Ptr("Standard_D4s_v3"), - WindowsProfile: &armcontainerservice.AgentPoolWindowsProfile{ - DisableOutboundNat: to.Ptr(true), - }, - }, - }, 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("wnp2"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"), - // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/wnp2"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.23.8"), - // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.23.8"), - // OSSKU: to.Ptr(armcontainerservice.OSSKUWindows2022), - // OSType: to.Ptr(armcontainerservice.OSTypeWindows), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_D4s_v3"), - // WindowsProfile: &armcontainerservice.AgentPoolWindowsProfile{ - // DisableOutboundNat: to.Ptr(true), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsCreate_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsCreate_Update.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createUpdateAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1231,6 +988,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"), @@ -1252,7 +1010,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createUpdateAgentPool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPools_Start.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPools_Start.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_startAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1297,7 +1055,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_startAgentPool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPools_Stop.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPools_Stop.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_stopAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1340,7 +1098,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_stopAgentPool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPools_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPools_Update.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_updateAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1399,8 +1157,8 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_updateAgentPool() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsDelete.json -func ExampleAgentPoolsClient_BeginDelete_deleteAgentPool() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsDelete.json +func ExampleAgentPoolsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -1410,7 +1168,7 @@ func ExampleAgentPoolsClient_BeginDelete_deleteAgentPool() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewAgentPoolsClient().BeginDelete(ctx, "rg1", "clustername1", "agentpool1", &armcontainerservice.AgentPoolsClientBeginDeleteOptions{IgnorePodDisruptionBudget: nil}) + poller, err := clientFactory.NewAgentPoolsClient().BeginDelete(ctx, "rg1", "clustername1", "agentpool1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -1420,28 +1178,7 @@ func ExampleAgentPoolsClient_BeginDelete_deleteAgentPool() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsDelete_IgnorePodDisruptionBudget.json -func ExampleAgentPoolsClient_BeginDelete_deleteAgentPoolByIgnoringPodDisruptionBudget() { - 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}) - 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsGetUpgradeProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsGetUpgradeProfile.json func ExampleAgentPoolsClient_GetUpgradeProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1475,32 +1212,7 @@ func ExampleAgentPoolsClient_GetUpgradeProfile() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsDeleteMachines.json -func ExampleAgentPoolsClient_BeginDeleteMachines() { - 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().BeginDeleteMachines(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPoolDeleteMachinesParameter{ - MachineNames: []*string{ - to.Ptr("aks-nodepool1-42263519-vmss00000a"), - to.Ptr("aks-nodepool1-42263519-vmss00000b")}, - }, 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json func ExampleAgentPoolsClient_GetAvailableAgentPoolVersions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1539,7 +1251,7 @@ func ExampleAgentPoolsClient_GetAvailableAgentPoolVersions() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/AgentPoolsUpgradeNodeImageVersion.json func ExampleAgentPoolsClient_BeginUpgradeNodeImageVersion() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/assets.json b/sdk/resourcemanager/containerservice/armcontainerservice/assets.json index 5f0930eecb21..438b64f4e270 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/assets.json +++ b/sdk/resourcemanager/containerservice/armcontainerservice/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/containerservice/armcontainerservice", - "Tag": "go/resourcemanager/containerservice/armcontainerservice_5e026610aa" + "Tag": "go/resourcemanager/containerservice/armcontainerservice_ca5abdb7bb" } diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md b/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md index 3eac1efff175..0fcac0bfa559 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.go.md +- https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION -module-version: 4.8.0-beta.1 -tag: package-preview-2023-11 +module-version: 4.8.0 +tag: package-2024-01 ``` diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go b/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go index a53dc8828f4f..629ced52be30 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go @@ -44,14 +44,6 @@ func (c *ClientFactory) NewAgentPoolsClient() *AgentPoolsClient { } } -// NewMachinesClient creates a new instance of MachinesClient. -func (c *ClientFactory) NewMachinesClient() *MachinesClient { - return &MachinesClient{ - subscriptionID: c.subscriptionID, - internal: c.internal, - } -} - // NewMaintenanceConfigurationsClient creates a new instance of MaintenanceConfigurationsClient. func (c *ClientFactory) NewMaintenanceConfigurationsClient() *MaintenanceConfigurationsClient { return &MaintenanceConfigurationsClient{ @@ -60,14 +52,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{ @@ -76,14 +60,6 @@ func (c *ClientFactory) NewManagedClustersClient() *ManagedClustersClient { } } -// 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 2935ce0978dc..bc010893b4cf 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/constants.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/constants.go @@ -10,27 +10,9 @@ package armcontainerservice const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice" - moduleVersion = "v4.8.0-beta.1" + moduleVersion = "v4.8.0" ) -// 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, - } -} - // AgentPoolMode - A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent // pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools type AgentPoolMode string @@ -51,24 +33,6 @@ func PossibleAgentPoolModeValues() []AgentPoolMode { } } -// AgentPoolSSHAccess - SSH access method of an agent pool. -type AgentPoolSSHAccess string - -const ( - // AgentPoolSSHAccessDisabled - SSH service will be turned off on the node. - AgentPoolSSHAccessDisabled AgentPoolSSHAccess = "Disabled" - // AgentPoolSSHAccessLocalUser - Can SSH onto the node as a local user using private key. - AgentPoolSSHAccessLocalUser AgentPoolSSHAccess = "LocalUser" -) - -// PossibleAgentPoolSSHAccessValues returns the possible values for the AgentPoolSSHAccess const type. -func PossibleAgentPoolSSHAccessValues() []AgentPoolSSHAccess { - return []AgentPoolSSHAccess{ - AgentPoolSSHAccessDisabled, - AgentPoolSSHAccessLocalUser, - } -} - // AgentPoolType - The type of Agent Pool. type AgentPoolType string @@ -77,8 +41,6 @@ const ( AgentPoolTypeAvailabilitySet AgentPoolType = "AvailabilitySet" // AgentPoolTypeVirtualMachineScaleSets - Create an Agent Pool backed by a Virtual Machine Scale Set. AgentPoolTypeVirtualMachineScaleSets AgentPoolType = "VirtualMachineScaleSets" - // AgentPoolTypeVirtualMachines - Create an Agent Pool backed by a Single Instance VM orchestration mode. - AgentPoolTypeVirtualMachines AgentPoolType = "VirtualMachines" ) // PossibleAgentPoolTypeValues returns the possible values for the AgentPoolType const type. @@ -86,7 +48,6 @@ func PossibleAgentPoolTypeValues() []AgentPoolType { return []AgentPoolType{ AgentPoolTypeAvailabilitySet, AgentPoolTypeVirtualMachineScaleSets, - AgentPoolTypeVirtualMachines, } } @@ -250,32 +211,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" ) @@ -287,24 +227,6 @@ func PossibleIPFamilyValues() []IPFamily { } } -// 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 @@ -379,25 +301,6 @@ func PossibleKubernetesSupportPlanValues() []KubernetesSupportPlan { } } -// Level - The Safeguards level to be used. By default, Safeguards is enabled for all namespaces except those that AKS excludes -// via systemExcludedNamespaces -type Level string - -const ( - LevelEnforcement Level = "Enforcement" - LevelOff Level = "Off" - LevelWarning Level = "Warning" -) - -// PossibleLevelValues returns the possible values for the Level const type. -func PossibleLevelValues() []Level { - return []Level{ - LevelEnforcement, - LevelOff, - LevelWarning, - } -} - // LicenseType - The license type to use for Windows VMs. See Azure Hybrid User Benefits [https://azure.microsoft.com/pricing/hybrid-benefit/faq/] // for more details. type LicenseType string @@ -504,24 +407,6 @@ func PossibleManagedClusterSKUTierValues() []ManagedClusterSKUTier { } } -// Mode - Specify which proxy mode to use ('IPTABLES' or 'IPVS') -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" -) - -// PossibleModeValues returns the possible values for the Mode const type. -func PossibleModeValues() []Mode { - return []Mode{ - ModeIPTABLES, - ModeIPVS, - } -} - // NetworkDataplane - Network dataplane used in the Kubernetes cluster. type NetworkDataplane string @@ -570,8 +455,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" ) @@ -588,8 +473,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" ) @@ -612,8 +497,6 @@ const ( NetworkPolicyCalico NetworkPolicy = "calico" // NetworkPolicyCilium - Use Cilium to enforce network policies. This requires networkDataplane to be 'cilium'. NetworkPolicyCilium NetworkPolicy = "cilium" - // NetworkPolicyNone - Network policies will not be enforced. This is the default value when NetworkPolicy is not specified. - NetworkPolicyNone NetworkPolicy = "none" ) // PossibleNetworkPolicyValues returns the possible values for the NetworkPolicy const type. @@ -622,11 +505,10 @@ func PossibleNetworkPolicyValues() []NetworkPolicy { NetworkPolicyAzure, NetworkPolicyCalico, NetworkPolicyCilium, - NetworkPolicyNone, } } -// NodeOSUpgradeChannel - The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. +// NodeOSUpgradeChannel - Manner in which the OS on your nodes is updated. The default is NodeImage. type NodeOSUpgradeChannel string const ( @@ -637,17 +519,11 @@ const ( // NodeOSUpgradeChannelNone - No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means // you are responsible for your security updates NodeOSUpgradeChannelNone NodeOSUpgradeChannel = "None" - // NodeOSUpgradeChannelSecurityPatch - AKS will update the nodes VHD with patches from the image maintainer labelled "security - // only" on a regular basis. Where possible, patches will also be applied without reimaging to existing nodes. Some patches, - // such as kernel patches, cannot be applied to existing nodes without disruption. For such patches, the VHD will be updated, - // and machines will be rolling reimaged to that VHD following maintenance windows and surge settings. This option incurs - // the extra cost of hosting the VHDs in your node resource group. - 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" ) @@ -656,30 +532,10 @@ func PossibleNodeOSUpgradeChannelValues() []NodeOSUpgradeChannel { return []NodeOSUpgradeChannel{ NodeOSUpgradeChannelNodeImage, NodeOSUpgradeChannelNone, - NodeOSUpgradeChannelSecurityPatch, NodeOSUpgradeChannelUnmanaged, } } -// NodeProvisioningMode - Once the mode it set to Auto, it cannot be changed back to Manual. -type NodeProvisioningMode string - -const ( - // NodeProvisioningModeAuto - Nodes are provisioned automatically by AKS using Karpenter. Fixed size Node Pools can still - // be created, but autoscaling Node Pools cannot be. (See aka.ms/aks/nap for more details). - NodeProvisioningModeAuto NodeProvisioningMode = "Auto" - // NodeProvisioningModeManual - Nodes are provisioned manually by the user - NodeProvisioningModeManual NodeProvisioningMode = "Manual" -) - -// PossibleNodeProvisioningModeValues returns the possible values for the NodeProvisioningMode const type. -func PossibleNodeProvisioningModeValues() []NodeProvisioningMode { - return []NodeProvisioningMode{ - NodeProvisioningModeAuto, - NodeProvisioningModeManual, - } -} - // OSDiskType - 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]. @@ -704,9 +560,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 ( @@ -715,8 +570,6 @@ const ( OSSKUAzureLinux OSSKU = "AzureLinux" // OSSKUCBLMariner - Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. OSSKUCBLMariner OSSKU = "CBLMariner" - // 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" // OSSKUWindows2019 - Use Windows2019 as the OS for node images. Unsupported for system node pools. Windows2019 only supports @@ -725,9 +578,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" - // 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. @@ -735,11 +585,9 @@ func PossibleOSSKUValues() []OSSKU { return []OSSKU{ OSSKUAzureLinux, OSSKUCBLMariner, - OSSKUMariner, OSSKUUbuntu, OSSKUWindows2019, OSSKUWindows2022, - OSSKUWindowsAnnual, } } @@ -833,12 +681,8 @@ func PossibleProtocolValues() []Protocol { 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. @@ -846,7 +690,6 @@ func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { return []PublicNetworkAccess{ PublicNetworkAccessDisabled, PublicNetworkAccessEnabled, - PublicNetworkAccessSecuredByPerimeter, } } @@ -875,43 +718,6 @@ func PossibleResourceIdentityTypeValues() []ResourceIdentityType { } } -// RestrictionLevel - The restriction level applied to the cluster's node resource group -type RestrictionLevel string - -const ( - // RestrictionLevelReadOnly - Only */read RBAC permissions allowed on the managed node resource group - RestrictionLevelReadOnly RestrictionLevel = "ReadOnly" - // RestrictionLevelUnrestricted - All RBAC permissions are allowed on the managed node resource group - RestrictionLevelUnrestricted RestrictionLevel = "Unrestricted" -) - -// PossibleRestrictionLevelValues returns the possible values for the RestrictionLevel const type. -func PossibleRestrictionLevelValues() []RestrictionLevel { - return []RestrictionLevel{ - RestrictionLevelReadOnly, - RestrictionLevelUnrestricted, - } -} - -// 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 @@ -994,8 +800,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" ) @@ -1003,7 +807,6 @@ const ( // PossibleSnapshotTypeValues returns the possible values for the SnapshotType const type. func PossibleSnapshotTypeValues() []SnapshotType { return []SnapshotType{ - SnapshotTypeManagedCluster, SnapshotTypeNodePool, } } @@ -1030,19 +833,19 @@ func PossibleTrustedAccessRoleBindingProvisioningStateValues() []TrustedAccessRo } } -// Type - Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. +// Type - 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" ) @@ -1123,10 +926,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. - WorkloadRuntimeKataMshvVMIsolation WorkloadRuntime = "KataMshvVmIsolation" // WorkloadRuntimeOCIContainer - Nodes will use Kubelet to run standard OCI container workloads. WorkloadRuntimeOCIContainer WorkloadRuntime = "OCIContainer" // WorkloadRuntimeWasmWasi - Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). @@ -1136,7 +935,6 @@ const ( // PossibleWorkloadRuntimeValues returns the possible values for the WorkloadRuntime const type. func PossibleWorkloadRuntimeValues() []WorkloadRuntime { return []WorkloadRuntime{ - WorkloadRuntimeKataMshvVMIsolation, WorkloadRuntimeOCIContainer, WorkloadRuntimeWasmWasi, } diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/agentpools_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/agentpools_server.go index 336a9aed1a41..faf4db57ac3b 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/agentpools_server.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/fake/agentpools_server.go @@ -20,7 +20,6 @@ import ( "net/http" "net/url" "regexp" - "strconv" ) // AgentPoolsServer is a fake server for instances of the armcontainerservice.AgentPoolsClient type. @@ -37,10 +36,6 @@ type AgentPoolsServer struct { // HTTP status codes to indicate success: http.StatusAccepted, http.StatusNoContent BeginDelete func(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *armcontainerservice.AgentPoolsClientBeginDeleteOptions) (resp azfake.PollerResponder[armcontainerservice.AgentPoolsClientDeleteResponse], errResp azfake.ErrorResponder) - // BeginDeleteMachines is the fake for method AgentPoolsClient.BeginDeleteMachines - // HTTP status codes to indicate success: http.StatusAccepted - BeginDeleteMachines func(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machines armcontainerservice.AgentPoolDeleteMachinesParameter, options *armcontainerservice.AgentPoolsClientBeginDeleteMachinesOptions) (resp azfake.PollerResponder[armcontainerservice.AgentPoolsClientDeleteMachinesResponse], errResp azfake.ErrorResponder) - // Get is the fake for method AgentPoolsClient.Get // HTTP status codes to indicate success: http.StatusOK Get func(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *armcontainerservice.AgentPoolsClientGetOptions) (resp azfake.Responder[armcontainerservice.AgentPoolsClientGetResponse], errResp azfake.ErrorResponder) @@ -71,7 +66,6 @@ func NewAgentPoolsServerTransport(srv *AgentPoolsServer) *AgentPoolsServerTransp beginAbortLatestOperation: newTracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientAbortLatestOperationResponse]](), beginCreateOrUpdate: newTracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientCreateOrUpdateResponse]](), beginDelete: newTracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientDeleteResponse]](), - beginDeleteMachines: newTracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientDeleteMachinesResponse]](), newListPager: newTracker[azfake.PagerResponder[armcontainerservice.AgentPoolsClientListResponse]](), beginUpgradeNodeImageVersion: newTracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientUpgradeNodeImageVersionResponse]](), } @@ -84,7 +78,6 @@ type AgentPoolsServerTransport struct { beginAbortLatestOperation *tracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientAbortLatestOperationResponse]] beginCreateOrUpdate *tracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientCreateOrUpdateResponse]] beginDelete *tracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientDeleteResponse]] - beginDeleteMachines *tracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientDeleteMachinesResponse]] newListPager *tracker[azfake.PagerResponder[armcontainerservice.AgentPoolsClientListResponse]] beginUpgradeNodeImageVersion *tracker[azfake.PollerResponder[armcontainerservice.AgentPoolsClientUpgradeNodeImageVersionResponse]] } @@ -107,8 +100,6 @@ func (a *AgentPoolsServerTransport) Do(req *http.Request) (*http.Response, error resp, err = a.dispatchBeginCreateOrUpdate(req) case "AgentPoolsClient.BeginDelete": resp, err = a.dispatchBeginDelete(req) - case "AgentPoolsClient.BeginDeleteMachines": - resp, err = a.dispatchBeginDeleteMachines(req) case "AgentPoolsClient.Get": resp, err = a.dispatchGet(req) case "AgentPoolsClient.GetAvailableAgentPoolVersions": @@ -242,7 +233,6 @@ func (a *AgentPoolsServerTransport) dispatchBeginDelete(req *http.Request) (*htt if matches == nil || 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 @@ -255,21 +245,7 @@ func (a *AgentPoolsServerTransport) dispatchBeginDelete(req *http.Request) (*htt if err != nil { return nil, err } - 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.AgentPoolsClientBeginDeleteOptions - if ignorePodDisruptionBudgetParam != nil { - options = &armcontainerservice.AgentPoolsClientBeginDeleteOptions{ - IgnorePodDisruptionBudget: ignorePodDisruptionBudgetParam, - } - } - respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameParam, resourceNameParam, agentPoolNameParam, options) + respr, errRespr := a.srv.BeginDelete(req.Context(), resourceGroupNameParam, resourceNameParam, agentPoolNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -293,58 +269,6 @@ func (a *AgentPoolsServerTransport) dispatchBeginDelete(req *http.Request) (*htt return resp, nil } -func (a *AgentPoolsServerTransport) dispatchBeginDeleteMachines(req *http.Request) (*http.Response, error) { - if a.srv.BeginDeleteMachines == nil { - return nil, &nonRetriableError{errors.New("fake for method BeginDeleteMachines not implemented")} - } - beginDeleteMachines := a.beginDeleteMachines.get(req) - if beginDeleteMachines == 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~%@]+)/deleteMachines` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || len(matches) < 4 { - return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) - } - body, err := server.UnmarshalRequestAsJSON[armcontainerservice.AgentPoolDeleteMachinesParameter](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 - } - respr, errRespr := a.srv.BeginDeleteMachines(req.Context(), resourceGroupNameParam, resourceNameParam, agentPoolNameParam, body, nil) - if respErr := server.GetError(errRespr, req); respErr != nil { - return nil, respErr - } - beginDeleteMachines = &respr - a.beginDeleteMachines.add(req, beginDeleteMachines) - } - - resp, err := server.PollerResponderNext(beginDeleteMachines, req) - if err != nil { - return nil, err - } - - if !contains([]int{http.StatusAccepted}, resp.StatusCode) { - a.beginDeleteMachines.remove(req) - return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusAccepted", resp.StatusCode)} - } - if !server.PollerResponderMore(beginDeleteMachines) { - a.beginDeleteMachines.remove(req) - } - - return resp, nil -} - func (a *AgentPoolsServerTransport) dispatchGet(req *http.Request) (*http.Response, error) { if a.srv.Get == nil { return nil, &nonRetriableError{errors.New("fake for method Get not implemented")} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/internal.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/internal.go index 7d2f89ba4bb2..94e060e89dbd 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/internal.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/fake/internal.go @@ -39,17 +39,6 @@ func getOptional[T any](v T) *T { return &v } -func parseOptional[T any](v string, parse func(v string) (T, error)) (*T, error) { - if v == "" { - return nil, nil - } - t, err := parse(v) - if err != nil { - return nil, err - } - return &t, err -} - func newTracker[T any]() *tracker[T] { return &tracker[T]{ items: map[string]*T{}, diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/machines_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/machines_server.go deleted file mode 100644 index 941145aedad9..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/machines_server.go +++ /dev/null @@ -1,164 +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. 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/v4" - "net/http" - "net/url" - "regexp" -) - -// MachinesServer is a fake server for instances of the armcontainerservice.MachinesClient type. -type MachinesServer struct { - // 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) - - // NewListPager is the fake for method MachinesClient.NewListPager - // HTTP status codes to indicate success: http.StatusOK - NewListPager func(resourceGroupName string, resourceName string, agentPoolName string, options *armcontainerservice.MachinesClientListOptions) (resp azfake.PagerResponder[armcontainerservice.MachinesClientListResponse]) -} - -// NewMachinesServerTransport creates a new instance of MachinesServerTransport with the provided implementation. -// The returned MachinesServerTransport instance is connected to an instance of armcontainerservice.MachinesClient via the -// azcore.ClientOptions.Transporter field in the client's constructor parameters. -func NewMachinesServerTransport(srv *MachinesServer) *MachinesServerTransport { - return &MachinesServerTransport{ - 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 - newListPager *tracker[azfake.PagerResponder[armcontainerservice.MachinesClientListResponse]] -} - -// Do implements the policy.Transporter interface for MachinesServerTransport. -func (m *MachinesServerTransport) 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")} - } - - var resp *http.Response - var err error - - switch method { - case "MachinesClient.Get": - resp, err = m.dispatchGet(req) - case "MachinesClient.NewListPager": - resp, err = m.dispatchNewListPager(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } - - if err != nil { - return nil, err - } - - 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")} - } - 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 matches == nil || 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 - } - machineNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("machineName")]) - if err != nil { - return nil, err - } - respr, errRespr := m.srv.Get(req.Context(), resourceGroupNameParam, resourceNameParam, agentPoolNameParam, machineNameParam, 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).Machine, req) - if err != nil { - return nil, err - } - return resp, nil -} - -func (m *MachinesServerTransport) 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~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.ContainerService/managedClusters/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/agentPools/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/machines` - regex := regexp.MustCompile(regexStr) - matches := regex.FindStringSubmatch(req.URL.EscapedPath()) - if matches == nil || 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 - } - agentPoolNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("agentPoolName")]) - if err != nil { - return nil, err - } - resp := m.srv.NewListPager(resourceGroupNameParam, resourceNameParam, agentPoolNameParam, nil) - newListPager = &resp - m.newListPager.add(req, newListPager) - server.PagerResponderInjectNextLinks(newListPager, req, func(page *armcontainerservice.MachinesClientListResponse, 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 -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclusters_server.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclusters_server.go index 23c3b5f57949..891c7430c281 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclusters_server.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclusters_server.go @@ -20,7 +20,6 @@ import ( "net/http" "net/url" "regexp" - "strconv" ) // ManagedClustersServer is a fake server for instances of the armcontainerservice.ManagedClustersClient type. @@ -49,10 +48,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) @@ -65,10 +60,6 @@ type ManagedClustersServer struct { // HTTP status codes to indicate success: http.StatusOK GetOSOptions func(ctx context.Context, location string, options *armcontainerservice.ManagedClustersClientGetOSOptionsOptions) (resp azfake.Responder[armcontainerservice.ManagedClustersClientGetOSOptionsResponse], 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) @@ -93,10 +84,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) @@ -113,10 +100,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]) - // BeginResetAADProfile is the fake for method ManagedClustersClient.BeginResetAADProfile // HTTP status codes to indicate success: http.StatusOK, http.StatusAccepted BeginResetAADProfile func(ctx context.Context, resourceGroupName string, resourceName string, parameters armcontainerservice.ManagedClusterAADProfile, options *armcontainerservice.ManagedClustersClientBeginResetAADProfileOptions) (resp azfake.PollerResponder[armcontainerservice.ManagedClustersClientResetAADProfileResponse], errResp azfake.ErrorResponder) @@ -161,11 +144,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]](), beginResetAADProfile: newTracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientResetAADProfileResponse]](), beginResetServicePrincipalProfile: newTracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientResetServicePrincipalProfileResponse]](), beginRotateClusterCertificates: newTracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientRotateClusterCertificatesResponse]](), @@ -186,11 +167,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]] beginResetAADProfile *tracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientResetAADProfileResponse]] beginResetServicePrincipalProfile *tracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientResetServicePrincipalProfileResponse]] beginRotateClusterCertificates *tracker[azfake.PollerResponder[armcontainerservice.ManagedClustersClientRotateClusterCertificatesResponse]] @@ -225,16 +204,12 @@ func (m *ManagedClustersServerTransport) Do(req *http.Request) (*http.Response, resp, err = m.dispatchGetAccessProfile(req) case "ManagedClustersClient.GetCommandResult": resp, err = m.dispatchGetCommandResult(req) - case "ManagedClustersClient.GetGuardrailsVersions": - resp, err = m.dispatchGetGuardrailsVersions(req) case "ManagedClustersClient.GetMeshRevisionProfile": resp, err = m.dispatchGetMeshRevisionProfile(req) case "ManagedClustersClient.GetMeshUpgradeProfile": resp, err = m.dispatchGetMeshUpgradeProfile(req) case "ManagedClustersClient.GetOSOptions": resp, err = m.dispatchGetOSOptions(req) - case "ManagedClustersClient.GetSafeguardsVersions": - resp, err = m.dispatchGetSafeguardsVersions(req) case "ManagedClustersClient.GetUpgradeProfile": resp, err = m.dispatchGetUpgradeProfile(req) case "ManagedClustersClient.NewListPager": @@ -247,8 +222,6 @@ func (m *ManagedClustersServerTransport) Do(req *http.Request) (*http.Response, resp, err = m.dispatchListClusterMonitoringUserCredentials(req) case "ManagedClustersClient.ListClusterUserCredentials": resp, err = m.dispatchListClusterUserCredentials(req) - case "ManagedClustersClient.NewListGuardrailsVersionsPager": - resp, err = m.dispatchNewListGuardrailsVersionsPager(req) case "ManagedClustersClient.ListKubernetesVersions": resp, err = m.dispatchListKubernetesVersions(req) case "ManagedClustersClient.NewListMeshRevisionProfilesPager": @@ -257,8 +230,6 @@ func (m *ManagedClustersServerTransport) Do(req *http.Request) (*http.Response, resp, err = m.dispatchNewListMeshUpgradeProfilesPager(req) case "ManagedClustersClient.NewListOutboundNetworkDependenciesEndpointsPager": resp, err = m.dispatchNewListOutboundNetworkDependenciesEndpointsPager(req) - case "ManagedClustersClient.NewListSafeguardsVersionsPager": - resp, err = m.dispatchNewListSafeguardsVersionsPager(req) case "ManagedClustersClient.BeginResetAADProfile": resp, err = m.dispatchBeginResetAADProfile(req) case "ManagedClustersClient.BeginResetServicePrincipalProfile": @@ -390,7 +361,6 @@ func (m *ManagedClustersServerTransport) dispatchBeginDelete(req *http.Request) if matches == nil || len(matches) < 3 { 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 @@ -399,21 +369,7 @@ func (m *ManagedClustersServerTransport) dispatchBeginDelete(req *http.Request) if err != nil { return nil, err } - 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 ignorePodDisruptionBudgetParam != nil { - options = &armcontainerservice.ManagedClustersClientBeginDeleteOptions{ - IgnorePodDisruptionBudget: ignorePodDisruptionBudgetParam, - } - } - respr, errRespr := m.srv.BeginDelete(req.Context(), resourceGroupNameParam, resourceNameParam, options) + respr, errRespr := m.srv.BeginDelete(req.Context(), resourceGroupNameParam, resourceNameParam, nil) if respErr := server.GetError(errRespr, req); respErr != nil { return nil, respErr } @@ -547,39 +503,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 matches == nil || 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 - } - 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")} @@ -691,39 +614,6 @@ func (m *ManagedClustersServerTransport) dispatchGetOSOptions(req *http.Request) 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 matches == nil || 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 - } - 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")} @@ -968,43 +858,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 matches == nil || len(matches) < 2 { - 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")} @@ -1153,43 +1006,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 matches == nil || len(matches) < 2 { - 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) 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 27cda4493b6e..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/managedclustersnapshots_server.go +++ /dev/null @@ -1,314 +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. 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/v4" - "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")} - } - - var resp *http.Response - var err error - - switch method { - case "ManagedClusterSnapshotsClient.CreateOrUpdate": - resp, err = m.dispatchCreateOrUpdate(req) - case "ManagedClusterSnapshotsClient.Delete": - resp, err = m.dispatchDelete(req) - case "ManagedClusterSnapshotsClient.Get": - resp, err = m.dispatchGet(req) - case "ManagedClusterSnapshotsClient.NewListPager": - resp, err = m.dispatchNewListPager(req) - case "ManagedClusterSnapshotsClient.NewListByResourceGroupPager": - resp, err = m.dispatchNewListByResourceGroupPager(req) - case "ManagedClusterSnapshotsClient.UpdateTags": - resp, err = m.dispatchUpdateTags(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } - - if err != nil { - return nil, err - } - - return resp, nil -} - -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 matches == nil || len(matches) < 3 { - 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 matches == nil || 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 - } - 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 matches == nil || 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 - } - 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 matches == nil || len(matches) < 1 { - 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 matches == nil || len(matches) < 2 { - 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 matches == nil || len(matches) < 3 { - 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 -} 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 a81d301533de..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/operationstatusresult_server.go +++ /dev/null @@ -1,203 +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. 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/v4" - "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")} - } - - var resp *http.Response - var err error - - switch method { - case "OperationStatusResultClient.Get": - resp, err = o.dispatchGet(req) - case "OperationStatusResultClient.GetByAgentPool": - resp, err = o.dispatchGetByAgentPool(req) - case "OperationStatusResultClient.NewListPager": - resp, err = o.dispatchNewListPager(req) - default: - err = fmt.Errorf("unhandled API %s", method) - } - - if err != nil { - return nil, err - } - - return resp, nil -} - -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 matches == nil || 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 - } - 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 matches == nil || 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 - } - 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 matches == nil || 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 - } - 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 -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/fake/server_factory.go b/sdk/resourcemanager/containerservice/armcontainerservice/fake/server_factory.go index 526a1e4c5eaa..d2f680926f68 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/fake/server_factory.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/fake/server_factory.go @@ -20,11 +20,8 @@ import ( // ServerFactory is a fake server for instances of the armcontainerservice.ClientFactory type. type ServerFactory struct { AgentPoolsServer AgentPoolsServer - MachinesServer MachinesServer MaintenanceConfigurationsServer MaintenanceConfigurationsServer - ManagedClusterSnapshotsServer ManagedClusterSnapshotsServer ManagedClustersServer ManagedClustersServer - OperationStatusResultServer OperationStatusResultServer OperationsServer OperationsServer PrivateEndpointConnectionsServer PrivateEndpointConnectionsServer PrivateLinkResourcesServer PrivateLinkResourcesServer @@ -49,11 +46,8 @@ type ServerFactoryTransport struct { srv *ServerFactory trMu sync.Mutex trAgentPoolsServer *AgentPoolsServerTransport - trMachinesServer *MachinesServerTransport trMaintenanceConfigurationsServer *MaintenanceConfigurationsServerTransport - trManagedClusterSnapshotsServer *ManagedClusterSnapshotsServerTransport trManagedClustersServer *ManagedClustersServerTransport - trOperationStatusResultServer *OperationStatusResultServerTransport trOperationsServer *OperationsServerTransport trPrivateEndpointConnectionsServer *PrivateEndpointConnectionsServerTransport trPrivateLinkResourcesServer *PrivateLinkResourcesServerTransport @@ -79,29 +73,16 @@ 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 "MachinesClient": - initServer(s, &s.trMachinesServer, func() *MachinesServerTransport { return NewMachinesServerTransport(&s.srv.MachinesServer) }) - resp, err = s.trMachinesServer.Do(req) case "MaintenanceConfigurationsClient": initServer(s, &s.trMaintenanceConfigurationsServer, func() *MaintenanceConfigurationsServerTransport { 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) }) resp, err = s.trManagedClustersServer.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/machines_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/machines_client.go deleted file mode 100644 index 7c990cf79175..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/machines_client.go +++ /dev/null @@ -1,187 +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. 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" -) - -// MachinesClient contains the methods for the Machines group. -// Don't use this type directly, use NewMachinesClient() instead. -type MachinesClient struct { - internal *arm.Client - subscriptionID string -} - -// NewMachinesClient creates a new instance of MachinesClient 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 - pass nil to accept the default values. -func NewMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MachinesClient, error) { - cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) - if err != nil { - return nil, err - } - client := &MachinesClient{ - subscriptionID: subscriptionID, - internal: cl, - } - return client, 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 2023-11-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 -// - 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 - const operationName = "MachinesClient.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, agentPoolName, machineName, options) - if err != nil { - return MachinesClientGetResponse{}, err - } - httpResp, err := client.internal.Pipeline().Do(req) - if err != nil { - return MachinesClientGetResponse{}, err - } - if !runtime.HasStatusCode(httpResp, http.StatusOK) { - err = runtime.NewResponseError(httpResp) - return MachinesClientGetResponse{}, err - } - resp, err := client.getHandleResponse(httpResp) - return resp, err -} - -// getCreateRequest creates the Get request. -func (client *MachinesClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machineName string, options *MachinesClientGetOptions) (*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.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-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 *MachinesClient) getHandleResponse(resp *http.Response) (MachinesClientGetResponse, error) { - result := MachinesClientGetResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.Machine); err != nil { - return MachinesClientGetResponse{}, err - } - return result, nil -} - -// NewListPager - Gets a list of machines in the specified agent pool. -// -// Generated from API version 2023-11-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 - MachinesClientListOptions contains the optional parameters for the MachinesClient.NewListPager method. -func (client *MachinesClient) NewListPager(resourceGroupName string, resourceName string, agentPoolName string, options *MachinesClientListOptions) *runtime.Pager[MachinesClientListResponse] { - return runtime.NewPager(runtime.PagingHandler[MachinesClientListResponse]{ - More: func(page MachinesClientListResponse) bool { - return page.NextLink != nil && len(*page.NextLink) > 0 - }, - Fetcher: func(ctx context.Context, page *MachinesClientListResponse) (MachinesClientListResponse, error) { - ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "MachinesClient.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, agentPoolName, options) - }, nil) - if err != nil { - return MachinesClientListResponse{}, err - } - return client.listHandleResponse(resp) - }, - Tracer: client.internal.Tracer(), - }) -} - -// listCreateRequest creates the List request. -func (client *MachinesClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *MachinesClientListOptions) (*policy.Request, error) { - urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines" - 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.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) - if err != nil { - return nil, err - } - reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-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 *MachinesClient) listHandleResponse(resp *http.Response) (MachinesClientListResponse, error) { - result := MachinesClientListResponse{} - if err := runtime.UnmarshalAsJSON(resp, &result.MachineListResult); err != nil { - return MachinesClientListResponse{}, err - } - return result, nil -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/machines_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/machines_client_example_test.go deleted file mode 100644 index 909cd642ef36..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/machines_client_example_test.go +++ /dev/null @@ -1,104 +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/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MachineList.json -func ExampleMachinesClient_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.NewMachinesClient().NewListPager("rg1", "clustername1", "agentpool1", 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.MachineListResult = armcontainerservice.MachineListResult{ - // Value: []*armcontainerservice.Machine{ - // { - // Name: to.Ptr("aks-nodepool1-25481572-vmss000000"), - // 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{ - // 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"), - // }}, - // }, - // ResourceID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-25481572-vmss/virtualMachines/0"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MachineGet.json -func ExampleMachinesClient_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.NewMachinesClient().Get(ctx, "rg1", "clustername1", "agentpool1", "aks-nodepool1-42263519-vmss00000t", 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.Machine = armcontainerservice.Machine{ - // Name: to.Ptr("aks-nodepool1-25481572-vmss000000"), - // 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{ - // 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"), - // }}, - // }, - // ResourceID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-25481572-vmss/virtualMachines/0"), - // }, - // } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go index e3846ef77d5e..8dd64e67dc52 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go @@ -46,7 +46,7 @@ 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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -99,7 +99,7 @@ func (client *MaintenanceConfigurationsClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -120,7 +120,7 @@ func (client *MaintenanceConfigurationsClient) createOrUpdateHandleResponse(resp // Delete - Deletes a maintenance configuration. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -171,7 +171,7 @@ func (client *MaintenanceConfigurationsClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -180,7 +180,7 @@ 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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -232,7 +232,7 @@ func (client *MaintenanceConfigurationsClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -249,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -297,7 +297,7 @@ func (client *MaintenanceConfigurationsClient) listByManagedClusterCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go index e7cf0c225021..730fe99f4a34 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/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/MaintenanceConfigurationsList.json func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMaintenanceConfigurationsByManagedCluster() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMai } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsList_MaintenanceWindow.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMaintenanceConfigurationsConfiguredWithMaintenanceWindowByManagedCluster() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -92,7 +92,7 @@ func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMai // 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), @@ -109,7 +109,7 @@ func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMai // }, // { // 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), @@ -138,7 +138,7 @@ func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMai } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/MaintenanceConfigurationsGet.json func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -184,7 +184,7 @@ func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfiguration() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfigurationConfiguredWithMaintenanceWindow() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -204,7 +204,7 @@ func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfigurationConfi // 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), @@ -227,18 +227,10 @@ func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfigurationConfi // 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsCreate_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/MaintenanceConfigurationsCreate_Update.json func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenanceConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -300,7 +292,7 @@ func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenan // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenanceConfigurationWithMaintenanceWindow() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -345,8 +337,7 @@ func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenan // 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), @@ -370,18 +361,10 @@ func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenan // 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/MaintenanceConfigurationsDelete.json func ExampleMaintenanceConfigurationsClient_Delete_deleteMaintenanceConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -398,7 +381,7 @@ func ExampleMaintenanceConfigurationsClient_Delete_deleteMaintenanceConfiguratio } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_Delete_deleteMaintenanceConfigurationForNodeOsUpgrade() { 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 ecbb1143397d..784c9765c9dd 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go @@ -17,7 +17,6 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" - "strconv" "strings" ) @@ -46,10 +45,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -74,10 +73,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 2023-11-02-preview +// Generated from API version 2024-01-01 func (client *ManagedClustersClient) abortLatestOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginAbortLatestOperationOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginAbortLatestOperation" @@ -119,7 +118,7 @@ func (client *ManagedClustersClient) abortLatestOperationCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -128,7 +127,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -154,7 +153,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -196,7 +195,7 @@ func (client *ManagedClustersClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -208,7 +207,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -233,7 +232,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 2023-11-02-preview +// Generated from API version 2024-01-01 func (client *ManagedClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginDelete" @@ -275,10 +274,7 @@ func (client *ManagedClustersClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") - if options != nil && options.IgnorePodDisruptionBudget != nil { - reqQP.Set("ignore-pod-disruption-budget", strconv.FormatBool(*options.IgnorePodDisruptionBudget)) - } + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -287,7 +283,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -333,7 +329,7 @@ func (client *ManagedClustersClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -353,7 +349,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -405,7 +401,7 @@ func (client *ManagedClustersClient) getAccessProfileCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -423,7 +419,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -475,7 +471,7 @@ func (client *ManagedClustersClient) getCommandResultCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -493,76 +489,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 2023-11-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, options *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", "2023-11-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 2023-11-02-preview +// Generated from API version 2024-01-01 // - location - The name of the Azure region. // - mode - The mode of the mesh. // - options - ManagedClustersClientGetMeshRevisionProfileOptions contains the optional parameters for the ManagedClustersClient.GetMeshRevisionProfile @@ -609,7 +540,7 @@ func (client *ManagedClustersClient) getMeshRevisionProfileCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -627,7 +558,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -679,7 +610,7 @@ func (client *ManagedClustersClient) getMeshUpgradeProfileCreateRequest(ctx cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -697,7 +628,7 @@ func (client *ManagedClustersClient) getMeshUpgradeProfileHandleResponse(resp *h // GetOSOptions - Gets supported OS options in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-01 // - location - The name of the Azure region. // - options - ManagedClustersClientGetOSOptionsOptions contains the optional parameters for the ManagedClustersClient.GetOSOptions // method. @@ -739,7 +670,7 @@ func (client *ManagedClustersClient) getOSOptionsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") if options != nil && options.ResourceType != nil { reqQP.Set("resource-type", *options.ResourceType) } @@ -757,75 +688,10 @@ func (client *ManagedClustersClient) getOSOptionsHandleResponse(resp *http.Respo 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 2023-11-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, options *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", "2023-11-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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -872,7 +738,7 @@ func (client *ManagedClustersClient) getUpgradeProfileCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -889,7 +755,7 @@ func (client *ManagedClustersClient) getUpgradeProfileHandleResponse(resp *http. // NewListPager - Gets a list of managed clusters in the specified subscription. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-01 // - options - ManagedClustersClientListOptions contains the optional parameters for the ManagedClustersClient.NewListPager // method. func (client *ManagedClustersClient) NewListPager(options *ManagedClustersClientListOptions) *runtime.Pager[ManagedClustersClientListResponse] { @@ -927,7 +793,7 @@ func (client *ManagedClustersClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -944,7 +810,7 @@ func (client *ManagedClustersClient) listHandleResponse(resp *http.Response) (Ma // NewListByResourceGroupPager - Lists managed clusters in the specified subscription and resource group. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ManagedClustersClientListByResourceGroupOptions contains the optional parameters for the ManagedClustersClient.NewListByResourceGroupPager // method. @@ -987,7 +853,7 @@ func (client *ManagedClustersClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1005,7 +871,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -1052,7 +918,7 @@ func (client *ManagedClustersClient) listClusterAdminCredentialsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -1073,7 +939,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -1120,7 +986,7 @@ func (client *ManagedClustersClient) listClusterMonitoringUserCredentialsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -1141,7 +1007,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -1188,7 +1054,7 @@ func (client *ManagedClustersClient) listClusterUserCredentialsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") if options != nil && options.Format != nil { reqQP.Set("format", string(*options.Format)) } @@ -1209,72 +1075,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 2023-11-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, options *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", "2023-11-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 2023-11-02-preview +// Generated from API version 2024-01-01 // - location - The name of the Azure region. // - options - ManagedClustersClientListKubernetesVersionsOptions contains the optional parameters for the ManagedClustersClient.ListKubernetesVersions // method. @@ -1316,7 +1121,7 @@ func (client *ManagedClustersClient) listKubernetesVersionsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1334,7 +1139,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 2023-11-02-preview +// Generated from API version 2024-01-01 // - location - The name of the Azure region. // - options - ManagedClustersClientListMeshRevisionProfilesOptions contains the optional parameters for the ManagedClustersClient.NewListMeshRevisionProfilesPager // method. @@ -1377,7 +1182,7 @@ func (client *ManagedClustersClient) listMeshRevisionProfilesCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1394,7 +1199,7 @@ func (client *ManagedClustersClient) listMeshRevisionProfilesHandleResponse(resp // NewListMeshUpgradeProfilesPager - Lists available upgrades for all service meshes in a specific cluster. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -1442,7 +1247,7 @@ func (client *ManagedClustersClient) listMeshUpgradeProfilesCreateRequest(ctx co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1460,7 +1265,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -1508,7 +1313,7 @@ func (client *ManagedClustersClient) listOutboundNetworkDependenciesEndpointsCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1523,72 +1328,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 2023-11-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, options *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", "2023-11-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 -} - // 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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -1616,7 +1360,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -1658,7 +1402,7 @@ func (client *ManagedClustersClient) resetAADProfileCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1670,7 +1414,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -1697,7 +1441,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -1739,7 +1483,7 @@ func (client *ManagedClustersClient) resetServicePrincipalProfileCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1752,7 +1496,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -1779,7 +1523,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 2023-11-02-preview +// Generated from API version 2024-01-01 func (client *ManagedClustersClient) rotateClusterCertificates(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginRotateClusterCertificatesOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginRotateClusterCertificates" @@ -1821,7 +1565,7 @@ func (client *ManagedClustersClient) rotateClusterCertificatesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1830,7 +1574,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -1856,7 +1600,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 2023-11-02-preview +// Generated from API version 2024-01-01 func (client *ManagedClustersClient) rotateServiceAccountSigningKeys(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginRotateServiceAccountSigningKeysOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginRotateServiceAccountSigningKeys" @@ -1898,7 +1642,7 @@ func (client *ManagedClustersClient) rotateServiceAccountSigningKeysCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1909,7 +1653,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -1938,7 +1682,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -1980,7 +1724,7 @@ func (client *ManagedClustersClient) runCommandCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, requestPayload); err != nil { @@ -1993,7 +1737,7 @@ func (client *ManagedClustersClient) runCommandCreateRequest(ctx context.Context // a cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -2020,7 +1764,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 2023-11-02-preview +// Generated from API version 2024-01-01 func (client *ManagedClustersClient) start(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginStart" @@ -2062,7 +1806,7 @@ func (client *ManagedClustersClient) startCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2074,7 +1818,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -2103,7 +1847,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 2023-11-02-preview +// Generated from API version 2024-01-01 func (client *ManagedClustersClient) stop(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginStopOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginStop" @@ -2145,7 +1889,7 @@ func (client *ManagedClustersClient) stopCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -2154,7 +1898,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -2180,7 +1924,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -2222,7 +1966,7 @@ func (client *ManagedClustersClient) updateTagsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go index afe3050bcb62..54ccd39d4f64 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/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ContainerServiceGetOSOptions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ContainerServiceGetOSOptions.json func ExampleManagedClustersClient_GetOSOptions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -56,7 +56,7 @@ func ExampleManagedClustersClient_GetOSOptions() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/KubernetesVersions_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/KubernetesVersions_List.json func ExampleManagedClustersClient_ListKubernetesVersions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -150,7 +150,7 @@ func ExampleManagedClustersClient_ListKubernetesVersions() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersList.json func ExampleManagedClustersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -177,7 +177,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(""), @@ -195,7 +195,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"), @@ -227,7 +228,7 @@ func ExampleManagedClustersClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersListByResourceGroup.json func ExampleManagedClustersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -272,7 +273,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"), @@ -304,7 +306,7 @@ func ExampleManagedClustersClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersGetUpgradeProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersGetUpgradeProfile.json func ExampleManagedClustersClient_GetUpgradeProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -358,7 +360,7 @@ func ExampleManagedClustersClient_GetUpgradeProfile() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersGetAccessProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersGetAccessProfile.json func ExampleManagedClustersClient_GetAccessProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -387,7 +389,7 @@ func ExampleManagedClustersClient_GetAccessProfile() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersListClusterCredentialResult.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersListClusterAdminCredentials.json func ExampleManagedClustersClient_ListClusterAdminCredentials() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -414,7 +416,63 @@ func ExampleManagedClustersClient_ListClusterAdminCredentials() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersListClusterUserCredentials.json +func ExampleManagedClustersClient_ListClusterUserCredentials() { + 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().ListClusterUserCredentials(ctx, "rg1", "clustername1", &armcontainerservice.ManagedClustersClientListClusterUserCredentialsOptions{ServerFqdn: nil, + Format: 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.CredentialResults = armcontainerservice.CredentialResults{ + // Kubeconfigs: []*armcontainerservice.CredentialResult{ + // { + // Name: to.Ptr("credentialName1"), + // Value: []byte("Y3JlZGVudGlhbFZhbHVlMQ=="), + // }}, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json +func ExampleManagedClustersClient_ListClusterMonitoringUserCredentials() { + 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().ListClusterMonitoringUserCredentials(ctx, "rg1", "clustername1", &armcontainerservice.ManagedClustersClientListClusterMonitoringUserCredentialsOptions{ServerFqdn: 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.CredentialResults = armcontainerservice.CredentialResults{ + // Kubeconfigs: []*armcontainerservice.CredentialResult{ + // { + // Name: to.Ptr("credentialName1"), + // Value: []byte("Y3JlZGVudGlhbFZhbHVlMQ=="), + // }}, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersGet.json func ExampleManagedClustersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -462,7 +520,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"), @@ -485,19 +544,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"), // }}, // }, // }, @@ -526,8 +585,8 @@ func ExampleManagedClustersClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersAssociate_CRG.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_associateManagedClusterWithCapacityReservationGroup() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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) @@ -547,319 +606,10 @@ 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"), - }}, - 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"), - EnablePodSecurityPolicy: to.Ptr(true), - 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), - }, - }, 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), - // 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"), - // 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"), - // }}, - // 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"), - // EnablePodSecurityPolicy: to.Ptr(true), - // 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"), - // 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_MCSnapshot.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingAManagedClusterSnapshot() { - 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), - 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"), - }}, - CreationData: &armcontainerservice.CreationData{ - SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), - }, - DNSPrefix: to.Ptr("dnsprefix1"), - KubernetesVersion: to.Ptr(""), - LinuxProfile: &armcontainerservice.LinuxProfile{ - AdminUsername: to.Ptr("azureuser"), - SSH: &armcontainerservice.SSHConfiguration{ - PublicKeys: []*armcontainerservice.SSHPublicKey{ - { - KeyData: to.Ptr("keydata"), - }}, - }, - }, - 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), - }, - }, 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), - // EnableFIPS: 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"), - // }}, - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), - // }, - // 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"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/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) - } - 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), - CreationData: &armcontainerservice.CreationData{ - SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), + 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), @@ -871,178 +621,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA 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"), - EnablePodSecurityPolicy: to.Ptr(false), - 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), - }, - }, 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), - // 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), - // 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"), - // EnablePodSecurityPolicy: to.Ptr(false), - // 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"), - // 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_EnableAIToolchainOperator.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAiToolchainOperatorEnabled() { - 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"), - }}, - AiToolchainOperatorProfile: &armcontainerservice.ManagedClusterAIToolchainOperatorProfile{ - Enabled: to.Ptr(true), - }, - 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"), + EnablePodSecurityPolicy: to.Ptr(false), + EnableRBAC: to.Ptr(true), + KubernetesVersion: to.Ptr(""), LinuxProfile: &armcontainerservice.LinuxProfile{ AdminUsername: to.Ptr("azureuser"), SSH: &armcontainerservice.SSHConfiguration{ @@ -1058,16 +642,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")), @@ -1098,7 +683,11 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAi // { // 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), // EnableNodePublicIP: to.Ptr(true), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), @@ -1109,10 +698,14 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAi // 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"), // }, + // 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"), + // EnablePodSecurityPolicy: to.Ptr(false), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), // KubernetesVersion: to.Ptr("1.9.6"), @@ -1134,20 +727,18 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAi // 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{ @@ -1158,11 +749,17 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAi // }, // 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_ManagedNATGateway.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_ManagedNATGateway.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAksManagedNatGatewayAsOutboundType() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1195,7 +792,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAk 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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -1271,7 +868,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAk // 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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -1293,10 +891,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAk // 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/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](4), // ManagedOutboundIPProfile: &armcontainerservice.ManagedClusterManagedOutboundIPProfile{ @@ -1320,7 +918,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAk // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1361,7 +959,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -1446,7 +1044,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -1468,10 +1066,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAz // 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{ @@ -1496,8 +1094,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAz // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_EnableCustomCATrust.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCustomCaTrustCertificatesPopulatedAndCustomCaTrustEnabled() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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) @@ -1517,14 +1115,14 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCu AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableCustomCATrust: 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"), + 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"), }}, AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ ScaleDownDelayAfterAdd: to.Ptr("15m"), @@ -1553,10 +1151,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCu LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), }, - SecurityProfile: &armcontainerservice.ManagedClusterSecurityProfile{ - CustomCATrustCertificates: [][]byte{ - []byte("ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=")}, - }, ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ ClientID: to.Ptr("clientid"), Secret: to.Ptr("secret"), @@ -1594,9 +1188,9 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCu // 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), // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableCustomCATrust: to.Ptr(true), // EnableNodePublicIP: to.Ptr(true), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), @@ -1657,21 +1251,17 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCu // }, // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), // ProvisioningState: to.Ptr("Succeeded"), - // SecurityProfile: &armcontainerservice.ManagedClusterSecurityProfile{ - // CustomCATrustCertificates: [][]byte{ - // []byte("ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=")}, - // }, - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, + // 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_DedicatedHostGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_DedicatedHostGroup.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDedicatedHostGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1704,7 +1294,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"), EnablePodSecurityPolicy: to.Ptr(false), EnableRBAC: to.Ptr(true), @@ -1765,7 +1355,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), @@ -1780,7 +1369,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"), // EnablePodSecurityPolicy: to.Ptr(false), // EnableRBAC: to.Ptr(true), @@ -1804,10 +1393,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{ @@ -1836,7 +1425,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDe // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_EnableEncryptionAtHost.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_EnableEncryptionAtHost.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithEncryptionAtHostEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1870,7 +1459,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -1947,7 +1536,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -1971,10 +1561,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{ @@ -2003,7 +1593,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithEn // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_EnabledFIPS.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_EnabledFIPS.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithFipsEnabledOs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2037,7 +1627,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"), EnablePodSecurityPolicy: to.Ptr(false), EnableRBAC: to.Ptr(true), @@ -2114,7 +1704,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"), // EnablePodSecurityPolicy: to.Ptr(false), // EnableRBAC: to.Ptr(true), @@ -2138,10 +1729,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{ @@ -2170,7 +1761,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithFi // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_GPUMIG.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_GPUMIG.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithGpumig() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2204,7 +1795,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -2289,7 +1880,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -2321,10 +1913,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{ @@ -2353,7 +1945,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithGp // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_HTTPProxy.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_HTTPProxy.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithHttpProxyConfigured() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2386,7 +1978,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -2470,7 +2062,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -2502,10 +2095,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{ @@ -2534,7 +2127,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithHt // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_Premium.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_Premium.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithLongTermSupport() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2555,192 +2148,22 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithLo 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"), - EnablePodSecurityPolicy: to.Ptr(true), - 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), - }, - }, 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"), - // EnablePodSecurityPolicy: to.Ptr(true), - // 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"), - // }, - // }, - // 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_NodeAutoProvisioning.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNodeAutoProvisioning() { - 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"), + 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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -2760,20 +2183,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), }, }, nil) if err != nil { @@ -2801,6 +2226,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), @@ -2811,10 +2237,17 @@ 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"), // EnablePodSecurityPolicy: to.Ptr(true), // 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"), @@ -2834,20 +2267,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{ @@ -2857,12 +2288,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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_NodePublicIPPrefix.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_NodePublicIPPrefix.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNodePublicIpPrefix() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2896,7 +2339,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -2973,7 +2416,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -2997,10 +2441,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{ @@ -3029,7 +2473,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_OSSKU.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_OSSKU.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithOssku() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3063,7 +2507,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -3148,7 +2592,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -3180,10 +2625,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{ @@ -3212,7 +2657,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithOs // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_PPG.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_PPG.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPpg() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3246,7 +2691,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -3323,7 +2768,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -3347,10 +2793,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{ @@ -3379,7 +2825,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPp // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_PodIdentity.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_PodIdentity.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPodIdentityEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3412,7 +2858,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -3492,7 +2938,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -3516,10 +2963,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{ @@ -3552,7 +2999,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPo // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_DisableRunCommand.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_DisableRunCommand.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithRunCommandDisabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3668,6 +3115,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithRu // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, + // CurrentKubernetesVersion: to.Ptr("1.9.6"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -3691,10 +3139,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{ @@ -3725,7 +3173,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithRu // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_SecurityProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_SecurityProfile.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithSecurityProfileConfigured() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3745,186 +3193,16 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithSe 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"), - 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), - }, - 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), - }, - }, - }, - }, - SKU: &armcontainerservice.ManagedClusterSKU{ - Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - }, - }, 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"), - // EnablePodSecurityPolicy: to.Ptr(true), - // 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"), - // 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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"), - EnablePodSecurityPolicy: to.Ptr(true), - EnableRBAC: to.Ptr(true), - KubernetesVersion: to.Ptr(""), + 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"), + KubernetesVersion: to.Ptr(""), LinuxProfile: &armcontainerservice.LinuxProfile{ AdminUsername: to.Ptr("azureuser"), SSH: &armcontainerservice.SSHConfiguration{ @@ -3943,13 +3221,16 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUl 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"), + 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), + }, }, }, SKU: &armcontainerservice.ManagedClusterSKU{ @@ -3983,7 +3264,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"), @@ -3993,11 +3273,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -4021,10 +3298,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{ @@ -4043,6 +3320,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"), // }, @@ -4053,8 +3341,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUl // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_VirtualMachines.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithVirtualMachinesPoolType() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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) @@ -4074,17 +3362,22 @@ 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"), - EnablePodSecurityPolicy: to.Ptr(false), + EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), KubernetesVersion: to.Ptr(""), LinuxProfile: &armcontainerservice.LinuxProfile{ @@ -4109,6 +3402,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")), @@ -4137,10 +3434,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"), @@ -4150,9 +3448,14 @@ 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"), - // EnablePodSecurityPolicy: to.Ptr(false), + // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), // KubernetesVersion: to.Ptr("1.9.6"), @@ -4174,10 +3477,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{ @@ -4199,11 +3502,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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithWebAppRoutingIngressProfileConfigured() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4361,7 +3667,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithWe // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_UserAssignedNATGateway.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4394,7 +3700,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -4465,7 +3771,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -4501,7 +3808,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUs // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateClusterWithPublicFqdnSpecified() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4620,6 +3927,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, + // CurrentKubernetesVersion: to.Ptr("1.9.6"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -4643,10 +3951,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{ @@ -4676,7 +3984,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateClusterWithFqdnSubdomainSpecified() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4794,6 +4102,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, + // CurrentKubernetesVersion: to.Ptr("1.9.6"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), // FqdnSubdomain: to.Ptr("domain1"), @@ -4816,10 +4125,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{ @@ -4849,7 +4158,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClusterWithEnableAzureRbac() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4890,7 +4199,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -4975,7 +4284,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -4999,10 +4309,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{ @@ -5031,7 +4341,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClus // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_Update.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_Update.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5051,7 +4361,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{ @@ -5080,7 +4390,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -5109,7 +4419,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 }()), }, }, @@ -5145,7 +4455,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"), // }, @@ -5181,7 +4491,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -5205,10 +4516,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{ @@ -5243,7 +4554,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_AzureServiceMesh.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_AzureServiceMesh.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithAzureServiceMesh() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5284,7 +4595,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -5397,7 +4708,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -5416,259 +4727,69 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // 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{ - // { - // Enabled: to.Ptr(true), - // NodeSelector: map[string]*string{ - // "istio": to.Ptr("egress"), - // }, - // }}, - // 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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"), - EnablePodSecurityPolicy: to.Ptr(true), - 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), - }, - }, 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"), + // 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"), // }, - // }, - // 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"), - // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnablePodSecurityPolicy: to.Ptr(true), - // 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{ + // 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"), + // Enabled: to.Ptr(true), + // NodeSelector: map[string]*string{ + // "istio": to.Ptr("egress"), + // }, + // }}, + // 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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithEnableNamespaceResources() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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) @@ -5684,6 +4805,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{ @@ -5704,12 +4831,11 @@ 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), - EnablePodSecurityPolicy: 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"), + EnablePodSecurityPolicy: to.Ptr(true), + EnableRBAC: to.Ptr(true), + KubernetesVersion: to.Ptr(""), LinuxProfile: &armcontainerservice.LinuxProfile{ AdminUsername: to.Ptr("azureuser"), SSH: &armcontainerservice.SSHConfiguration{ @@ -5735,6 +4861,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ AdminPassword: to.Ptr("replacePassword1234$"), AdminUsername: to.Ptr("azureuser"), + LicenseType: to.Ptr(armcontainerservice.LicenseTypeWindowsServer), }, }, SKU: &armcontainerservice.ManagedClusterSKU{ @@ -5761,6 +4888,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{ // { @@ -5785,9 +4921,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), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -5810,10 +4946,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{ @@ -5837,12 +4973,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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_UpdateWindowsGmsa.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithWindowsGMsaEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5862,7 +4999,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{ @@ -5885,7 +5022,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -5947,7 +5084,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"), // }, @@ -5977,7 +5114,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"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -6001,10 +5139,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{ @@ -6036,7 +5174,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersCreate_DualStackNetworking.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersCreate_DualStackNetworking.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithDualStackNetworking() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6056,7 +5194,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{ @@ -6085,7 +5223,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"), EnablePodSecurityPolicy: to.Ptr(true), EnableRBAC: to.Ptr(true), @@ -6147,7 +5285,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"), // }, @@ -6162,12 +5300,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), @@ -6183,12 +5321,13 @@ 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"), // EnablePodSecurityPolicy: to.Ptr(true), // 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{ @@ -6208,13 +5347,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{ @@ -6246,7 +5385,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersUpdateTags.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersUpdateTags.json func ExampleManagedClustersClient_BeginUpdateTags() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6294,7 +5433,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"), @@ -6323,7 +5462,7 @@ func ExampleManagedClustersClient_BeginUpdateTags() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersDelete.json func ExampleManagedClustersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6334,7 +5473,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{IgnorePodDisruptionBudget: nil}) + poller, err := clientFactory.NewManagedClustersClient().BeginDelete(ctx, "rg1", "clustername1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -6344,7 +5483,7 @@ func ExampleManagedClustersClient_BeginDelete() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersResetServicePrincipalProfile.json func ExampleManagedClustersClient_BeginResetServicePrincipalProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6368,7 +5507,7 @@ func ExampleManagedClustersClient_BeginResetServicePrincipalProfile() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersResetAADProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersResetAADProfile.json func ExampleManagedClustersClient_BeginResetAADProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6394,8 +5533,8 @@ func ExampleManagedClustersClient_BeginResetAADProfile() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersAbortOperation.json -func ExampleManagedClustersClient_BeginAbortLatestOperation() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersRotateClusterCertificates.json +func ExampleManagedClustersClient_BeginRotateClusterCertificates() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -6405,7 +5544,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) } @@ -6415,8 +5554,8 @@ func ExampleManagedClustersClient_BeginAbortLatestOperation() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersRotateClusterCertificates.json -func ExampleManagedClustersClient_BeginRotateClusterCertificates() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersAbortOperation.json +func ExampleManagedClustersClient_BeginAbortLatestOperation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -6426,7 +5565,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) } @@ -6436,7 +5575,7 @@ func ExampleManagedClustersClient_BeginRotateClusterCertificates() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json func ExampleManagedClustersClient_BeginRotateServiceAccountSigningKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6457,7 +5596,7 @@ func ExampleManagedClustersClient_BeginRotateServiceAccountSigningKeys() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersStop.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersStop.json func ExampleManagedClustersClient_BeginStop() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6478,7 +5617,7 @@ func ExampleManagedClustersClient_BeginStop() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersStart.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersStart.json func ExampleManagedClustersClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6499,7 +5638,7 @@ func ExampleManagedClustersClient_BeginStart() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/RunCommandRequest.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/RunCommandRequest.json func ExampleManagedClustersClient_BeginRunCommand() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6537,7 +5676,7 @@ func ExampleManagedClustersClient_BeginRunCommand() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/RunCommandResultFailed.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/RunCommandResultFailed.json func ExampleManagedClustersClient_GetCommandResult_commandFailedResult() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6564,7 +5703,7 @@ func ExampleManagedClustersClient_GetCommandResult_commandFailedResult() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/RunCommandResultSucceed.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/RunCommandResultSucceed.json func ExampleManagedClustersClient_GetCommandResult_commandSucceedResult() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6594,7 +5733,7 @@ func ExampleManagedClustersClient_GetCommandResult_commandSucceedResult() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/OutboundNetworkDependenciesEndpointsList.json func ExampleManagedClustersClient_NewListOutboundNetworkDependenciesEndpointsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6819,139 +5958,7 @@ func ExampleManagedClustersClient_NewListOutboundNetworkDependenciesEndpointsPag } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersList_MeshRevisionProfiles.json func ExampleManagedClustersClient_NewListMeshRevisionProfilesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -6993,7 +6000,7 @@ func ExampleManagedClustersClient_NewListMeshRevisionProfilesPager() { // }}, // Revision: to.Ptr("asm-1-17"), // Upgrades: []*string{ - // to.Ptr("1-18")}, + // to.Ptr("asm-1-18")}, // }, // { // CompatibleWith: []*armcontainerservice.CompatibleVersions{ @@ -7015,7 +6022,7 @@ func ExampleManagedClustersClient_NewListMeshRevisionProfilesPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersGet_MeshRevisionProfile.json func ExampleManagedClustersClient_GetMeshRevisionProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -7051,7 +6058,7 @@ func ExampleManagedClustersClient_GetMeshRevisionProfile() { // }}, // Revision: to.Ptr("asm-1-17"), // Upgrades: []*string{ - // to.Ptr("1-18")}, + // to.Ptr("asm-1-18")}, // }, // { // CompatibleWith: []*armcontainerservice.CompatibleVersions{ @@ -7071,7 +6078,7 @@ func ExampleManagedClustersClient_GetMeshRevisionProfile() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersList_MeshUpgradeProfiles.json func ExampleManagedClustersClient_NewListMeshUpgradeProfilesPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -7111,14 +6118,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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/ManagedClustersGet_MeshUpgradeProfile.json func ExampleManagedClustersClient_GetMeshUpgradeProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -7152,7 +6159,7 @@ func ExampleManagedClustersClient_GetMeshUpgradeProfile() { // }}, // Revision: to.Ptr("asm-1-17"), // Upgrades: []*string{ - // to.Ptr("1-18")}, + // to.Ptr("asm-1-18")}, // }, // } } diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client.go deleted file mode 100644 index 677aa9964ce1..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client.go +++ /dev/null @@ -1,417 +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. 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 - 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 2023-11-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, options *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", "2023-11-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 2023-11-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, options *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", "2023-11-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 2023-11-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, options *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", "2023-11-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 2023-11-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, options *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", "2023-11-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 2023-11-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, options *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", "2023-11-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 2023-11-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, options *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", "2023-11-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 995f5d225c73..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/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/models.go b/sdk/resourcemanager/containerservice/armcontainerservice/models.go index 9abe513571f5..6b146803ff0d 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/models.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/models.go @@ -40,13 +40,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. @@ -79,20 +72,6 @@ type AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem struct { KubernetesVersion *string } -// AgentPoolDeleteMachinesParameter - Specifies a list of machine names from the agent pool to be deleted. -type AgentPoolDeleteMachinesParameter struct { - // REQUIRED; The agent pool machine names. - MachineNames []*string -} - -type AgentPoolGPUProfile struct { - // The default value is true when the vmSize of the agent pool contains a GPU, false otherwise. GPU Driver Installation can - // only be set true when VM has an associated GPU resource. Setting this field to - // false prevents automatic GPU driver installation. In that case, in order for the GPU to be usable, the user must perform - // GPU driver installation themselves. - InstallGPUDriver *bool -} - // AgentPoolListResult - The response from the List Agent Pools operation. type AgentPoolListResult struct { // The list of agent pools. @@ -114,22 +93,6 @@ type AgentPoolNetworkProfile struct { NodePublicIPTags []*IPTag } -// 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 - // details, see aka.ms/aks/trustedlaunch. If not specified, the default is - // false. - EnableSecureBoot *bool - - // vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally on the - // node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the - // default is false. - EnableVTPM *bool - - // SSH access method of an agent pool. - SSHAccess *AgentPoolSSHAccess -} - // AgentPoolUpgradeProfile - The list of available upgrades for an agent pool. type AgentPoolUpgradeProfile struct { // REQUIRED; The properties of the agent pool upgrade profile. @@ -187,13 +150,6 @@ type AgentPoolUpgradeSettings struct { NodeSoakDurationInMinutes *int32 } -// AgentPoolWindowsProfile - The Windows agent pool's specific profile. -type AgentPoolWindowsProfile struct { - // The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows - // agent pool does not have node public IP enabled. - DisableOutboundNat *bool -} - // 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. @@ -326,33 +282,6 @@ type EndpointDetail struct { Protocol *string } -// ErrorAdditionalInfo - The resource management error additional info. -type ErrorAdditionalInfo struct { - // READ-ONLY; The additional info. - Info any - - // READ-ONLY; The additional info type. - Type *string -} - -// ErrorDetail - The error detail. -type ErrorDetail struct { - // READ-ONLY; The error additional info. - AdditionalInfo []*ErrorAdditionalInfo - - // READ-ONLY; The error code. - Code *string - - // READ-ONLY; The error details. - Details []*ErrorDetail - - // READ-ONLY; The error message. - Message *string - - // READ-ONLY; The error target. - Target *string -} - // ExtendedLocation - The complex type of the extended location. type ExtendedLocation struct { // The name of the extended location. @@ -362,42 +291,6 @@ type ExtendedLocation struct { Type *ExtendedLocationTypes } -// 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. type IPTag struct { // The IP tag type. Example: RoutingPreference. @@ -579,56 +472,6 @@ type LinuxProfile struct { SSH *SSHConfiguration } -// 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 { - // 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 -} - -// MachineIPAddress - The machine IP address details. -type MachineIPAddress struct { - // READ-ONLY; To determine if address belongs IPv4 or IPv6 family. - Family *IPFamily - - // READ-ONLY; IPv4 or IPv6 address of the machine - IP *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 - network properties of the machine -type MachineNetworkProperties struct { - // READ-ONLY; IPv4, IPv6 addresses of the machine - IPAddresses []*MachineIPAddress -} - -// MachineProperties - The properties of the machine -type MachineProperties struct { - // READ-ONLY; network properties of the machine - Network *MachineNetworkProperties - - // READ-ONLY; Arm resource id of the machine. It can be used to GET underlying VM Instance - ResourceID *string -} - // MaintenanceConfiguration - See planned maintenance [https://docs.microsoft.com/azure/aks/planned-maintenance] for more // information about planned maintenance. type MaintenanceConfiguration struct { @@ -753,14 +596,6 @@ type ManagedClusterAADProfile struct { TenantID *string } -// ManagedClusterAIToolchainOperatorProfile - When enabling the operator, a set of AKS managed CRDs and controllers will be -// installed in the cluster. The operator automates the deployment of OSS models for inference and/or training purposes. It -// provides a set of preset models and enables distributed inference against them. -type ManagedClusterAIToolchainOperatorProfile struct { - // Indicates if AI toolchain operator enabled or not. - Enabled *bool -} - // ManagedClusterAPIServerAccessProfile - Access profile for managed cluster API server. type ManagedClusterAPIServerAccessProfile struct { // IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public @@ -777,16 +612,9 @@ 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. - EnableVnetIntegration *bool - // 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 - - // It is required when: 1. creating a new cluster with BYO Vnet; 2. updating an existing cluster to enable apiserver vnet - // integration. - SubnetID *string } // ManagedClusterAccessProfile - Managed cluster Access Profile. @@ -842,9 +670,6 @@ type ManagedClusterAgentPoolProfile struct { // REQUIRED; Windows agent pool 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 @@ -862,11 +687,6 @@ type ManagedClusterAgentPoolProfile struct { // Whether to enable auto-scaler EnableAutoScaling *bool - // When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with - // host services to sync custom certificate authorities from user-provided list of - // base64 encoded certificates into node trust stores. Defaults to false. - EnableCustomCATrust *bool - // This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption EnableEncryptionAtHost *bool @@ -887,9 +707,6 @@ 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. - GpuProfile *AgentPoolGPUProfile - // This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. // For more information see Azure dedicated hosts // [https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts]. @@ -910,11 +727,6 @@ type ManagedClusterAgentPoolProfile struct { // The maximum number of pods that can run on a node. MaxPods *int32 - // 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 - // The minimum number of nodes for auto-scaling MinCount *int32 @@ -925,13 +737,6 @@ type ManagedClusterAgentPoolProfile struct { // Network-related settings of an agent pool. NetworkProfile *AgentPoolNetworkProfile - // 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 @@ -950,21 +755,20 @@ type ManagedClusterAgentPoolProfile struct { // 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 - // 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]. + // 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 // If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: @@ -988,9 +792,6 @@ type ManagedClusterAgentPoolProfile struct { // The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. ScaleSetPriority *ScaleSetPriority - // The security settings of an agent pool. - SecurityProfile *AgentPoolSecurityProfile - // Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. // For more details on spot pricing, see spot VMs pricing // [https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing] @@ -1010,25 +811,16 @@ type ManagedClusterAgentPoolProfile struct { // https://docs.microsoft.com/azure/aks/quotas-skus-regions VMSize *string - // The status of nodes in a VirtualMachines agent pool. - VirtualMachineNodesStatus []*VirtualMachineNodes - - // Specifications on VirtualMachines agent pool. - VirtualMachinesProfile *VirtualMachinesProfile - // 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 - // The Windows agent pool's specific profile. - WindowsProfile *AgentPoolWindowsProfile - // Determines the type of workload a node can run. WorkloadRuntime *WorkloadRuntime - // READ-ONLY; 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. + // READ-ONLY; 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 // READ-ONLY; The version of node image @@ -1040,9 +832,6 @@ type ManagedClusterAgentPoolProfile struct { // 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 @@ -1060,11 +849,6 @@ type ManagedClusterAgentPoolProfileProperties struct { // Whether to enable auto-scaler EnableAutoScaling *bool - // When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with - // host services to sync custom certificate authorities from user-provided list of - // base64 encoded certificates into node trust stores. Defaults to false. - EnableCustomCATrust *bool - // This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption EnableEncryptionAtHost *bool @@ -1085,9 +869,6 @@ 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. - GpuProfile *AgentPoolGPUProfile - // This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. // For more information see Azure dedicated hosts // [https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts]. @@ -1108,11 +889,6 @@ type ManagedClusterAgentPoolProfileProperties struct { // The maximum number of pods that can run on a node. MaxPods *int32 - // 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 - // The minimum number of nodes for auto-scaling MinCount *int32 @@ -1123,13 +899,6 @@ type ManagedClusterAgentPoolProfileProperties struct { // Network-related settings of an agent pool. NetworkProfile *AgentPoolNetworkProfile - // 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 @@ -1148,21 +917,20 @@ type ManagedClusterAgentPoolProfileProperties struct { // 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 - // 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]. + // 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 // If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: @@ -1186,9 +954,6 @@ type ManagedClusterAgentPoolProfileProperties struct { // The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. ScaleSetPriority *ScaleSetPriority - // The security settings of an agent pool. - SecurityProfile *AgentPoolSecurityProfile - // Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. // For more details on spot pricing, see spot VMs pricing // [https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing] @@ -1208,25 +973,16 @@ type ManagedClusterAgentPoolProfileProperties struct { // https://docs.microsoft.com/azure/aks/quotas-skus-regions VMSize *string - // The status of nodes in a VirtualMachines agent pool. - VirtualMachineNodesStatus []*VirtualMachineNodes - - // Specifications on VirtualMachines agent pool. - VirtualMachinesProfile *VirtualMachinesProfile - // 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 - // The Windows agent pool's specific profile. - WindowsProfile *AgentPoolWindowsProfile - // Determines the type of workload a node can run. WorkloadRuntime *WorkloadRuntime - // READ-ONLY; 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. + // READ-ONLY; 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 // READ-ONLY; The version of node image @@ -1238,108 +994,50 @@ type ManagedClusterAgentPoolProfileProperties struct { // ManagedClusterAutoUpgradeProfile - Auto upgrade profile for a managed cluster. type ManagedClusterAutoUpgradeProfile struct { - // The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. + // Manner in which the OS on your nodes is updated. The default is NodeImage. NodeOSUpgradeChannel *NodeOSUpgradeChannel // For more information see setting the AKS cluster auto-upgrade channel [https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel]. UpgradeChannel *UpgradeChannel } -// ManagedClusterAzureMonitorProfile - Prometheus addon profile for the container service cluster +// ManagedClusterAzureMonitorProfile - Azure Monitor addon profiles for monitoring the managed cluster. type ManagedClusterAzureMonitorProfile struct { - // Logs profile for the Azure Monitor Infrastructure and Application Logs. Collect out-of-the-box Kubernetes infrastructure - // & application logs to send to Azure Monitor. See - // aka.ms/AzureMonitorContainerInsights for an overview. - Logs *ManagedClusterAzureMonitorProfileLogs - - // 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 { - // Indicates if Application Monitoring enabled or not. - Enabled *bool -} - -// ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics - Application Monitoring Open Telemetry Metrics Profile -// for Kubernetes Application Container Metrics. Collects OpenTelemetry metrics through auto-instrumentation 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 -} - -// 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 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 - - // Windows Host Logs Profile for Kubernetes Windows Nodes Log Collection. Collects ETW, Event Logs and Text logs etc. See - // aka.ms/AzureMonitorContainerInsights for an overview. - WindowsHostLogs *ManagedClusterAzureMonitorProfileWindowsHostLogs -} - -// 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 } -// ManagedClusterAzureMonitorProfileLogs - Logs profile for the Azure Monitor Infrastructure and Application Logs. Collect -// out-of-the-box Kubernetes infrastructure & application logs to send to Azure Monitor. See -// aka.ms/AzureMonitorContainerInsights for an overview. -type ManagedClusterAzureMonitorProfileLogs 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 -} - -// 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 - // Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects OpenTelemetry - // metrics through auto-instrumentation of the application using Azure Monitor - // OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. - AppMonitoringOpenTelemetryMetrics *ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics - - // 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 } -// ManagedClusterAzureMonitorProfileWindowsHostLogs - Windows Host Logs Profile for Kubernetes Windows Nodes Log Collection. -// Collects ETW, Event Logs and Text logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. -type ManagedClusterAzureMonitorProfileWindowsHostLogs struct { - // Indicates if Windows Host Log Collection is enabled or not for Azure Monitor Container Insights Logs Addon. - Enabled *bool -} - -// ManagedClusterCostAnalysis - The cost analysis configuration for the cluster -type ManagedClusterCostAnalysis struct { - // The Managed Cluster sku.tier must be set to 'Standard' to enable this feature. Enabling this will add Kubernetes Namespace - // and Deployment details to the Cost Analysis views in the Azure portal. If not - // specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. - Enabled *bool -} - // ManagedClusterHTTPProxyConfig - Cluster HTTP proxy configuration. type ManagedClusterHTTPProxyConfig struct { // The HTTP proxy server endpoint to use. @@ -1353,10 +1051,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 } // ManagedClusterIdentity - Identity for the managed cluster. @@ -1381,23 +1075,25 @@ type ManagedClusterIdentity struct { // ManagedClusterIngressProfile - Ingress profile for the container service cluster. type ManagedClusterIngressProfile struct { - // 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 } -// 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 - // Whether to enable Web App Routing. + // Whether to enable the Application Routing add-on. Enabled *bool - // 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 } @@ -1471,12 +1167,6 @@ type ManagedClusterManagedOutboundIPProfile struct { Count *int32 } -// ManagedClusterMetricsProfile - The metrics profile for the ManagedCluster. -type ManagedClusterMetricsProfile struct { - // The cost analysis configuration for the cluster - CostAnalysis *ManagedClusterCostAnalysis -} - // ManagedClusterNATGatewayProfile - Profile of the managed cluster NAT gateway. type ManagedClusterNATGatewayProfile struct { // The effective outbound IP resources of the cluster NAT gateway. @@ -1490,17 +1180,6 @@ type ManagedClusterNATGatewayProfile struct { ManagedOutboundIPProfile *ManagedClusterManagedOutboundIPProfile } -type ManagedClusterNodeProvisioningProfile struct { - // Once the mode it set to Auto, it cannot be changed back to Manual. - Mode *NodeProvisioningMode -} - -// ManagedClusterNodeResourceGroupProfile - Node resource group lockdown profile for a managed cluster. -type ManagedClusterNodeResourceGroupProfile struct { - // The restriction level applied to the cluster's node resource group - RestrictionLevel *RestrictionLevel -} - // ManagedClusterOIDCIssuerProfile - The OIDC issuer profile of the Managed Cluster. type ManagedClusterOIDCIssuerProfile struct { // Whether the OIDC issuer is enabled. @@ -1626,21 +1305,15 @@ type ManagedClusterProperties struct { // The agent pool properties. AgentPoolProfiles []*ManagedClusterAgentPoolProfile - // AI toolchain operator settings that apply to the whole cluster. - AiToolchainOperatorProfile *ManagedClusterAIToolchainOperatorProfile - // Parameters to be applied to the cluster-autoscaler when enabled AutoScalerProfile *ManagedClusterPropertiesAutoScalerProfile // 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 - // CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot. - CreationData *CreationData - // This cannot be updated once the Managed Cluster has been created. DNSPrefix *string @@ -1652,11 +1325,6 @@ type ManagedClusterProperties struct { // This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' DiskEncryptionSetID *string - // 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 - // (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes // v1.21, and removed from Kubernetes in v1.25. Learn more at // https://aka.ms/k8s/psp and https://aka.ms/aks/psp. @@ -1677,30 +1345,24 @@ type ManagedClusterProperties struct { // Ingress profile for the managed cluster. IngressProfile *ManagedClusterIngressProfile - // 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. + // 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. LinuxProfile *LinuxProfile - // Optional cluster metrics configuration. - MetricsProfile *ManagedClusterMetricsProfile - // The network configuration profile. NetworkProfile *NetworkProfile - // Node provisioning settings that apply to the whole cluster. - NodeProvisioningProfile *ManagedClusterNodeProvisioningProfile - // The name of the resource group containing agent pool nodes. NodeResourceGroup *string - // The node resource group configuration profile. - NodeResourceGroupProfile *ManagedClusterNodeResourceGroupProfile - // The OIDC issuer profile of the Managed Cluster. OidcIssuerProfile *ManagedClusterOIDCIssuerProfile @@ -1714,9 +1376,6 @@ type ManagedClusterProperties struct { // Allow or deny public network access for AKS PublicNetworkAccess *PublicNetworkAccess - // The Safeguards profile holds all the safeguards information for a given cluster - SafeguardsProfile *SafeguardsProfile - // Security profile for the managed cluster. SecurityProfile *ManagedClusterSecurityProfile @@ -1746,7 +1405,8 @@ type ManagedClusterProperties struct { // allowing the Azure Portal to function properly. AzurePortalFQDN *string - // READ-ONLY; The version of Kubernetes the Managed Cluster is running. + // READ-ONLY; 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. @@ -1774,22 +1434,10 @@ type ManagedClusterPropertiesAutoScalerProfile struct { // Valid values are 'true' and 'false' BalanceSimilarNodeGroups *string - // If set to true, all daemonset pods on empty nodes will be evicted before deletion of the node. If the daemonset pod cannot - // be evicted another node will be chosen for scaling. If set to false, the node - // will be deleted without ensuring that daemonset pods are deleted or evicted. - DaemonsetEvictionForEmptyNodes *bool - - // If set to true, all daemonset pods on occupied nodes will be evicted before deletion of the node. If the daemonset pod - // cannot be evicted another node will be chosen for scaling. If set to false, the - // node will be deleted without ensuring that daemonset pods are deleted or evicted. - DaemonsetEvictionForOccupiedNodes *bool - - // Available values are: 'least-waste', 'most-pods', 'priority', 'random'. + // 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 - // If set to true, the resources used by daemonset will be taken into account when making scaling down decisions. - IgnoreDaemonsetsUtilization *bool - // The default is 10. MaxEmptyBulkDelete *string @@ -1840,21 +1488,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. @@ -1871,26 +1504,12 @@ type ManagedClusterSecurityProfile struct { // the security profile. AzureKeyVaultKms *AzureKeyVaultKms - // A list of up to 10 base64 encoded CAs that will be added to the trust store on nodes with the Custom CA Trust feature enabled. - // For more information see Custom CA Trust Certificates - // [https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority] - CustomCATrustCertificates [][]byte - // Microsoft Defender settings for the security profile. Defender *ManagedClusterSecurityProfileDefender // 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 - - // 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. @@ -1924,18 +1543,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. @@ -1952,51 +1559,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 -} - // ManagedClusterStorageProfile - Storage profile for the container service cluster. type ManagedClusterStorageProfile struct { // AzureBlob CSI Driver settings for the storage profile. @@ -2022,9 +1584,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. @@ -2100,7 +1659,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 } @@ -2111,12 +1672,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 } type ManagedServiceIdentityUserAssignedIdentitiesValue struct { @@ -2127,16 +1687,6 @@ type ManagedServiceIdentityUserAssignedIdentitiesValue struct { PrincipalID *string } -// ManualScaleProfile - Specifications on number of machines. -type ManualScaleProfile struct { - // Number of nodes. - Count *int32 - - // The list of allowed vm sizes. AKS will use the first available one when scaling. If a VM size is unavailable (e.g. due - // to quota or regional capacity reasons), AKS will use the next size. - Sizes []*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. @@ -2220,13 +1770,6 @@ type MeshUpgradeProfileProperties struct { Upgrades []*string } -// NetworkMonitoring - This addon can be used to configure network monitoring and generate network monitoring data in Prometheus -// format -type NetworkMonitoring struct { - // Enable or disable the network monitoring plugin on the cluster - Enabled *bool -} - // NetworkProfile - Profile of network configuration. type NetworkProfile struct { // An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified @@ -2237,12 +1780,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 @@ -2250,9 +1787,6 @@ type NetworkProfile struct { // information about the differences between load balancer SKUs. LoadBalancerSKU *LoadBalancerSKU - // This addon can be used to configure network monitoring and generate network monitoring data in Prometheus format - Monitoring *NetworkMonitoring - // Profile of the cluster NAT gateway. NatGatewayProfile *ManagedClusterNATGatewayProfile @@ -2265,7 +1799,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. @@ -2290,56 +1824,6 @@ type NetworkProfile struct { ServiceCidrs []*string } -// 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' or 'IPVS') - 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 -} - // OSOptionProfile - The OS option profile. type OSOptionProfile struct { // REQUIRED; The list of OS options. @@ -2376,45 +1860,6 @@ type OperationListResult struct { 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. @@ -2562,7 +2007,7 @@ type RelativeMonthlySchedule struct { // REQUIRED; Specifies the number of months between each set of occurrences. IntervalMonths *int32 - // REQUIRED; Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. + // REQUIRED; Specifies on which week of the month the dayOfWeek applies. WeekIndex *Type } @@ -2606,64 +2051,6 @@ 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 -} - -// SafeguardsProfile - The Safeguards profile. -type SafeguardsProfile struct { - // REQUIRED; The Safeguards level to be used. By default, Safeguards is enabled for all namespaces except those that AKS excludes - // via systemExcludedNamespaces - Level *Level - - // List of namespaces excluded from Safeguards checks - ExcludedNamespaces []*string - - // The version of constraints to use - Version *string - - // READ-ONLY; List of namespaces specified by AKS to be excluded from Safeguards - SystemExcludedNamespaces []*string -} - -// ScaleProfile - Specifications on how to scale a VirtualMachines agent pool. -type ScaleProfile struct { - // Specifications on how to scale the VirtualMachines agent pool to a fixed size. - Manual []*ManualScaleProfile -} - // Schedule - One and only one of the schedule types should be specified. Choose either 'daily', 'weekly', 'absoluteMonthly' // or 'relativeMonthly' for your maintenance schedule. type Schedule struct { @@ -2739,9 +2126,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. @@ -2987,21 +2373,6 @@ type UserAssignedIdentity struct { ResourceID *string } -// VirtualMachineNodes - Current status on a group of nodes of the same vm size. -type VirtualMachineNodes struct { - // Number of nodes. - Count *int32 - - // The VM size of the agents used to host this group of nodes. - Size *string -} - -// VirtualMachinesProfile - Specifications on VirtualMachines agent pool. -type VirtualMachinesProfile struct { - // Specifications on how to scale a VirtualMachines agent pool. - Scale *ScaleProfile -} - // WeeklySchedule - For schedules like: 'recur every Monday' or 'recur every 3 weeks on Wednesday'. type WeeklySchedule struct { // REQUIRED; Specifies on which day of the week the maintenance occurs. diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go b/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go index e9a87957a15b..1c83c2acca98 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go @@ -117,33 +117,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) @@ -245,60 +218,6 @@ func (a *AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem) UnmarshalJSO return nil } -// MarshalJSON implements the json.Marshaller interface for type AgentPoolDeleteMachinesParameter. -func (a AgentPoolDeleteMachinesParameter) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "machineNames", a.MachineNames) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolDeleteMachinesParameter. -func (a *AgentPoolDeleteMachinesParameter) 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 "machineNames": - err = unpopulate(val, "MachineNames", &a.MachineNames) - 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 AgentPoolGPUProfile. -func (a AgentPoolGPUProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "installGPUDriver", a.InstallGPUDriver) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolGPUProfile. -func (a *AgentPoolGPUProfile) 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 "installGPUDriver": - err = unpopulate(val, "InstallGPUDriver", &a.InstallGPUDriver) - 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 AgentPoolListResult. func (a AgentPoolListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -365,41 +284,6 @@ func (a *AgentPoolNetworkProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AgentPoolSecurityProfile. -func (a AgentPoolSecurityProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enableSecureBoot", a.EnableSecureBoot) - populate(objectMap, "enableVTPM", a.EnableVTPM) - populate(objectMap, "sshAccess", a.SSHAccess) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolSecurityProfile. -func (a *AgentPoolSecurityProfile) 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 "enableSecureBoot": - err = unpopulate(val, "EnableSecureBoot", &a.EnableSecureBoot) - delete(rawMsg, key) - case "enableVTPM": - err = unpopulate(val, "EnableVTPM", &a.EnableVTPM) - delete(rawMsg, key) - case "sshAccess": - err = unpopulate(val, "SSHAccess", &a.SSHAccess) - 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 AgentPoolUpgradeProfile. func (a AgentPoolUpgradeProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -544,33 +428,6 @@ func (a *AgentPoolUpgradeSettings) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type AgentPoolWindowsProfile. -func (a AgentPoolWindowsProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "disableOutboundNat", a.DisableOutboundNat) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolWindowsProfile. -func (a *AgentPoolWindowsProfile) 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 "disableOutboundNat": - err = unpopulate(val, "DisableOutboundNat", &a.DisableOutboundNat) - 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) @@ -971,80 +828,6 @@ func (e *EndpointDetail) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo. -func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populateAny(objectMap, "info", e.Info) - populate(objectMap, "type", e.Type) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo. -func (e *ErrorAdditionalInfo) 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", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "info": - err = unpopulate(val, "Info", &e.Info) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &e.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ErrorDetail. -func (e ErrorDetail) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "additionalInfo", e.AdditionalInfo) - populate(objectMap, "code", e.Code) - populate(objectMap, "details", e.Details) - populate(objectMap, "message", e.Message) - populate(objectMap, "target", e.Target) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail. -func (e *ErrorDetail) 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", e, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "additionalInfo": - err = unpopulate(val, "AdditionalInfo", &e.AdditionalInfo) - delete(rawMsg, key) - case "code": - err = unpopulate(val, "Code", &e.Code) - delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &e.Details) - delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &e.Message) - delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &e.Target) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", e, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type ExtendedLocation. func (e ExtendedLocation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1076,111 +859,6 @@ func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type GuardrailsAvailableVersion. -func (g GuardrailsAvailableVersion) 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) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GuardrailsAvailableVersion. -func (g *GuardrailsAvailableVersion) 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) - } - 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) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &g.Type) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GuardrailsAvailableVersionsList. -func (g GuardrailsAvailableVersionsList) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "nextLink", g.NextLink) - populate(objectMap, "value", g.Value) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GuardrailsAvailableVersionsList. -func (g *GuardrailsAvailableVersionsList) 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) - } - 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) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type GuardrailsAvailableVersionsProperties. -func (g GuardrailsAvailableVersionsProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "isDefaultVersion", g.IsDefaultVersion) - populate(objectMap, "support", g.Support) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type GuardrailsAvailableVersionsProperties. -func (g *GuardrailsAvailableVersionsProperties) 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) - } - for key, val := range rawMsg { - var err error - switch key { - case "isDefaultVersion": - err = unpopulate(val, "IsDefaultVersion", &g.IsDefaultVersion) - delete(rawMsg, key) - case "support": - err = unpopulate(val, "Support", &g.Support) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", g, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type IPTag. func (i IPTag) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1667,18 +1345,19 @@ func (l *LinuxProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type Machine. -func (m Machine) 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, "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 Machine. -func (m *Machine) 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", m, err) @@ -1695,6 +1374,9 @@ func (m *Machine) UnmarshalJSON(data []byte) error { 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) @@ -1706,16 +1388,16 @@ func (m *Machine) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type MachineIPAddress. -func (m MachineIPAddress) 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, "family", m.Family) - populate(objectMap, "ip", m.IP) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MachineIPAddress. -func (m *MachineIPAddress) 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", m, err) @@ -1723,11 +1405,11 @@ func (m *MachineIPAddress) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "family": - err = unpopulate(val, "Family", &m.Family) + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) delete(rawMsg, key) - case "ip": - err = unpopulate(val, "IP", &m.IP) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { @@ -1737,16 +1419,17 @@ func (m *MachineIPAddress) 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 MaintenanceConfigurationProperties. +func (m MaintenanceConfigurationProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) + 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 MachineListResult. -func (m *MachineListResult) 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", m, err) @@ -1754,172 +1437,8 @@ 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) - 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 MachineNetworkProperties. -func (m MachineNetworkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "ipAddresses", m.IPAddresses) - return json.Marshal(objectMap) -} - -// 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "ipAddresses": - err = unpopulate(val, "IPAddresses", &m.IPAddresses) - 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 MachineProperties. -func (m MachineProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "network", m.Network) - populate(objectMap, "resourceId", m.ResourceID) - return json.Marshal(objectMap) -} - -// 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "network": - err = unpopulate(val, "Network", &m.Network) - 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 MaintenanceConfiguration. -func (m MaintenanceConfiguration) 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) - return json.Marshal(objectMap) -} - -// 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", m, err) - } - 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) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - 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 MaintenanceConfigurationListResult. -func (m MaintenanceConfigurationListResult) 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 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", 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 MaintenanceConfigurationProperties. -func (m MaintenanceConfigurationProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - 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 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "maintenanceWindow": - err = unpopulate(val, "MaintenanceWindow", &m.MaintenanceWindow) + case "maintenanceWindow": + err = unpopulate(val, "MaintenanceWindow", &m.MaintenanceWindow) delete(rawMsg, key) case "notAllowedTime": err = unpopulate(val, "NotAllowedTime", &m.NotAllowedTime) @@ -2096,33 +1615,6 @@ func (m *ManagedClusterAADProfile) UnmarshalJSON(data []byte) error { 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) - 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 ManagedClusterAPIServerAccessProfile. func (m ManagedClusterAPIServerAccessProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2130,9 +1622,7 @@ func (m ManagedClusterAPIServerAccessProfile) MarshalJSON() ([]byte, error) { 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) } @@ -2157,15 +1647,9 @@ func (m *ManagedClusterAPIServerAccessProfile) UnmarshalJSON(data []byte) error 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) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2298,33 +1782,28 @@ func (m *ManagedClusterAddonProfileIdentity) UnmarshalJSON(data []byte) error { // 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, "enableAutoScaling", m.EnableAutoScaling) - populate(objectMap, "enableCustomCATrust", m.EnableCustomCATrust) populate(objectMap, "enableEncryptionAtHost", m.EnableEncryptionAtHost) populate(objectMap, "enableFIPS", m.EnableFIPS) populate(objectMap, "enableNodePublicIP", m.EnableNodePublicIP) populate(objectMap, "enableUltraSSD", m.EnableUltraSSD) 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, "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, "nodeInitializationTaints", m.NodeInitializationTaints) populate(objectMap, "nodeLabels", m.NodeLabels) populate(objectMap, "nodePublicIPPrefixID", m.NodePublicIPPrefixID) populate(objectMap, "nodeTaints", m.NodeTaints) @@ -2340,16 +1819,12 @@ func (m ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) { 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, "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) } @@ -2363,9 +1838,6 @@ func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { 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) @@ -2384,9 +1856,6 @@ func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { case "enableAutoScaling": err = unpopulate(val, "EnableAutoScaling", &m.EnableAutoScaling) delete(rawMsg, key) - case "enableCustomCATrust": - err = unpopulate(val, "EnableCustomCATrust", &m.EnableCustomCATrust) - delete(rawMsg, key) case "enableEncryptionAtHost": err = unpopulate(val, "EnableEncryptionAtHost", &m.EnableEncryptionAtHost) delete(rawMsg, key) @@ -2402,9 +1871,6 @@ func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { 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) @@ -2423,9 +1889,6 @@ func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { 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) @@ -2441,9 +1904,6 @@ func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { 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) @@ -2489,9 +1949,6 @@ func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { 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) @@ -2507,18 +1964,9 @@ func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { 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) @@ -2533,32 +1981,27 @@ func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { // 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, "enableAutoScaling", m.EnableAutoScaling) - populate(objectMap, "enableCustomCATrust", m.EnableCustomCATrust) populate(objectMap, "enableEncryptionAtHost", m.EnableEncryptionAtHost) populate(objectMap, "enableFIPS", m.EnableFIPS) populate(objectMap, "enableNodePublicIP", m.EnableNodePublicIP) populate(objectMap, "enableUltraSSD", m.EnableUltraSSD) 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, "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, "nodeInitializationTaints", m.NodeInitializationTaints) populate(objectMap, "nodeLabels", m.NodeLabels) populate(objectMap, "nodePublicIPPrefixID", m.NodePublicIPPrefixID) populate(objectMap, "nodeTaints", m.NodeTaints) @@ -2574,16 +2017,12 @@ func (m ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) 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, "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) } @@ -2597,9 +2036,6 @@ func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) er 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) @@ -2618,9 +2054,6 @@ func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) er case "enableAutoScaling": err = unpopulate(val, "EnableAutoScaling", &m.EnableAutoScaling) delete(rawMsg, key) - case "enableCustomCATrust": - err = unpopulate(val, "EnableCustomCATrust", &m.EnableCustomCATrust) - delete(rawMsg, key) case "enableEncryptionAtHost": err = unpopulate(val, "EnableEncryptionAtHost", &m.EnableEncryptionAtHost) delete(rawMsg, key) @@ -2636,9 +2069,6 @@ func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) er 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) @@ -2657,9 +2087,6 @@ func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) er 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) @@ -2672,9 +2099,6 @@ func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) er 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) @@ -2720,9 +2144,6 @@ func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) er 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) @@ -2738,18 +2159,9 @@ func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) er 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) @@ -2795,7 +2207,6 @@ func (m *ManagedClusterAutoUpgradeProfile) UnmarshalJSON(data []byte) error { // MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfile. func (m ManagedClusterAzureMonitorProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "logs", m.Logs) populate(objectMap, "metrics", m.Metrics) return json.Marshal(objectMap) } @@ -2809,9 +2220,6 @@ func (m *ManagedClusterAzureMonitorProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "logs": - err = unpopulate(val, "Logs", &m.Logs) - delete(rawMsg, key) case "metrics": err = unpopulate(val, "Metrics", &m.Metrics) delete(rawMsg, key) @@ -2823,15 +2231,16 @@ func (m *ManagedClusterAzureMonitorProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoring. -func (m ManagedClusterAzureMonitorProfileAppMonitoring) 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, "enabled", m.Enabled) + populate(objectMap, "metricAnnotationsAllowList", m.MetricAnnotationsAllowList) + populate(objectMap, "metricLabelsAllowlist", m.MetricLabelsAllowlist) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoring. -func (m *ManagedClusterAzureMonitorProfileAppMonitoring) 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) @@ -2839,8 +2248,11 @@ func (m *ManagedClusterAzureMonitorProfileAppMonitoring) UnmarshalJSON(data []by for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + 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 { @@ -2850,15 +2262,16 @@ func (m *ManagedClusterAzureMonitorProfileAppMonitoring) UnmarshalJSON(data []by return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics. -func (m ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics) 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, "enabled", m.Enabled) + populate(objectMap, "kubeStateMetrics", m.KubeStateMetrics) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics. -func (m *ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics) 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) @@ -2869,6 +2282,9 @@ func (m *ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics) Unm 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) @@ -2877,17 +2293,18 @@ func (m *ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics) Unm return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileContainerInsights. -func (m ManagedClusterAzureMonitorProfileContainerInsights) 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, "enabled", m.Enabled) - populate(objectMap, "logAnalyticsWorkspaceResourceId", m.LogAnalyticsWorkspaceResourceID) - populate(objectMap, "windowsHostLogs", m.WindowsHostLogs) + 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 ManagedClusterAzureMonitorProfileContainerInsights. -func (m *ManagedClusterAzureMonitorProfileContainerInsights) 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) @@ -2895,14 +2312,17 @@ func (m *ManagedClusterAzureMonitorProfileContainerInsights) UnmarshalJSON(data for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "httpProxy": + err = unpopulate(val, "HTTPProxy", &m.HTTPProxy) delete(rawMsg, key) - case "logAnalyticsWorkspaceResourceId": - err = unpopulate(val, "LogAnalyticsWorkspaceResourceID", &m.LogAnalyticsWorkspaceResourceID) + case "httpsProxy": + err = unpopulate(val, "HTTPSProxy", &m.HTTPSProxy) + delete(rawMsg, key) + case "noProxy": + err = unpopulate(val, "NoProxy", &m.NoProxy) delete(rawMsg, key) - case "windowsHostLogs": - err = unpopulate(val, "WindowsHostLogs", &m.WindowsHostLogs) + case "trustedCa": + err = unpopulate(val, "TrustedCa", &m.TrustedCa) delete(rawMsg, key) } if err != nil { @@ -2912,202 +2332,8 @@ func (m *ManagedClusterAzureMonitorProfileContainerInsights) UnmarshalJSON(data 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 ManagedClusterAzureMonitorProfileLogs. -func (m ManagedClusterAzureMonitorProfileLogs) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "appMonitoring", m.AppMonitoring) - populate(objectMap, "containerInsights", m.ContainerInsights) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileLogs. -func (m *ManagedClusterAzureMonitorProfileLogs) 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) - } - 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, "appMonitoringOpenTelemetryMetrics", m.AppMonitoringOpenTelemetryMetrics) - 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 "appMonitoringOpenTelemetryMetrics": - err = unpopulate(val, "AppMonitoringOpenTelemetryMetrics", &m.AppMonitoringOpenTelemetryMetrics) - delete(rawMsg, 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 ManagedClusterAzureMonitorProfileWindowsHostLogs. -func (m ManagedClusterAzureMonitorProfileWindowsHostLogs) 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 ManagedClusterAzureMonitorProfileWindowsHostLogs. -func (m *ManagedClusterAzureMonitorProfileWindowsHostLogs) 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 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, "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 "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 ManagedClusterIdentity. -func (m ManagedClusterIdentity) 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, "delegatedResources", m.DelegatedResources) populate(objectMap, "principalId", m.PrincipalID) @@ -3409,33 +2635,6 @@ func (m *ManagedClusterManagedOutboundIPProfile) UnmarshalJSON(data []byte) erro 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) @@ -3471,60 +2670,6 @@ func (m *ManagedClusterNATGatewayProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterNodeProvisioningProfile. -func (m ManagedClusterNodeProvisioningProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - 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 "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) @@ -3847,17 +2992,14 @@ func (m ManagedClusterProperties) MarshalJSON() ([]byte, error) { 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, "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, "enablePodSecurityPolicy", m.EnablePodSecurityPolicy) populate(objectMap, "enableRBAC", m.EnableRBAC) populate(objectMap, "fqdn", m.Fqdn) @@ -3868,11 +3010,8 @@ func (m ManagedClusterProperties) MarshalJSON() ([]byte, error) { 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) @@ -3881,7 +3020,6 @@ func (m ManagedClusterProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "provisioningState", m.ProvisioningState) populate(objectMap, "publicNetworkAccess", m.PublicNetworkAccess) populate(objectMap, "resourceUID", m.ResourceUID) - populate(objectMap, "safeguardsProfile", m.SafeguardsProfile) populate(objectMap, "securityProfile", m.SecurityProfile) populate(objectMap, "serviceMeshProfile", m.ServiceMeshProfile) populate(objectMap, "servicePrincipalProfile", m.ServicePrincipalProfile) @@ -3914,9 +3052,6 @@ func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { 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) @@ -3929,9 +3064,6 @@ func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { case "azurePortalFQDN": err = unpopulate(val, "AzurePortalFQDN", &m.AzurePortalFQDN) 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) @@ -3944,9 +3076,6 @@ func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { case "diskEncryptionSetID": err = unpopulate(val, "DiskEncryptionSetID", &m.DiskEncryptionSetID) delete(rawMsg, key) - case "enableNamespaceResources": - err = unpopulate(val, "EnableNamespaceResources", &m.EnableNamespaceResources) - delete(rawMsg, key) case "enablePodSecurityPolicy": err = unpopulate(val, "EnablePodSecurityPolicy", &m.EnablePodSecurityPolicy) delete(rawMsg, key) @@ -3977,21 +3106,12 @@ func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { 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) @@ -4016,9 +3136,6 @@ func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { case "resourceUID": err = unpopulate(val, "ResourceUID", &m.ResourceUID) delete(rawMsg, key) - case "safeguardsProfile": - err = unpopulate(val, "SafeguardsProfile", &m.SafeguardsProfile) - delete(rawMsg, key) case "securityProfile": err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) delete(rawMsg, key) @@ -4055,10 +3172,7 @@ func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { 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) @@ -4089,18 +3203,9 @@ func (m *ManagedClusterPropertiesAutoScalerProfile) UnmarshalJSON(data []byte) e 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) @@ -4154,18 +3259,16 @@ 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 ManagedClusterSKU. +func (m ManagedClusterSKU) 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, "name", m.Name) + populate(objectMap, "tier", m.Tier) 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 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) @@ -4173,45 +3276,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) - 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 ManagedClusterSKU. -func (m ManagedClusterSKU) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "name", m.Name) - populate(objectMap, "tier", m.Tier) - return json.Marshal(objectMap) -} - -// 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) - } - for key, val := range rawMsg { - var err error - switch key { - case "name": - err = unpopulate(val, "Name", &m.Name) + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) case "tier": err = unpopulate(val, "Tier", &m.Tier) @@ -4228,17 +3294,8 @@ func (m *ManagedClusterSKU) UnmarshalJSON(data []byte) error { func (m ManagedClusterSecurityProfile) 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, "nodeRestriction", m.NodeRestriction) populate(objectMap, "workloadIdentity", m.WorkloadIdentity) return json.Marshal(objectMap) } @@ -4255,28 +3312,12 @@ func (m *ManagedClusterSecurityProfile) UnmarshalJSON(data []byte) error { 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 "nodeRestriction": - err = unpopulate(val, "NodeRestriction", &m.NodeRestriction) - delete(rawMsg, key) case "workloadIdentity": err = unpopulate(val, "WorkloadIdentity", &m.WorkloadIdentity) delete(rawMsg, key) @@ -4377,60 +3418,6 @@ func (m *ManagedClusterSecurityProfileImageCleaner) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileImageIntegrity. -func (m ManagedClusterSecurityProfileImageIntegrity) 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 ManagedClusterSecurityProfileImageIntegrity. -func (m *ManagedClusterSecurityProfileImageIntegrity) 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 ManagedClusterSecurityProfileNodeRestriction. -func (m ManagedClusterSecurityProfileNodeRestriction) 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 ManagedClusterSecurityProfileNodeRestriction. -func (m *ManagedClusterSecurityProfileNodeRestriction) 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 ManagedClusterSecurityProfileWorkloadIdentity. func (m ManagedClusterSecurityProfileWorkloadIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4489,123 +3476,6 @@ func (m *ManagedClusterServicePrincipalProfile) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSnapshot. -func (m ManagedClusterSnapshot) 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 ManagedClusterSnapshot. -func (m *ManagedClusterSnapshot) 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) - 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 "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", m, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSnapshotListResult. -func (m ManagedClusterSnapshotListResult) 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 ManagedClusterSnapshotListResult. -func (m *ManagedClusterSnapshotListResult) 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 ManagedClusterSnapshotProperties. -func (m ManagedClusterSnapshotProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "creationData", m.CreationData) - populate(objectMap, "managedClusterPropertiesReadOnly", m.ManagedClusterPropertiesReadOnly) - populate(objectMap, "snapshotType", m.SnapshotType) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSnapshotProperties. -func (m *ManagedClusterSnapshotProperties) 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 "creationData": - err = unpopulate(val, "CreationData", &m.CreationData) - delete(rawMsg, key) - case "managedClusterPropertiesReadOnly": - err = unpopulate(val, "ManagedClusterPropertiesReadOnly", &m.ManagedClusterPropertiesReadOnly) - delete(rawMsg, key) - case "snapshotType": - err = unpopulate(val, "SnapshotType", &m.SnapshotType) - 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) @@ -4676,7 +3546,6 @@ func (m *ManagedClusterStorageProfileBlobCSIDriver) UnmarshalJSON(data []byte) e func (m ManagedClusterStorageProfileDiskCSIDriver) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "version", m.Version) return json.Marshal(objectMap) } @@ -4692,9 +3561,6 @@ func (m *ManagedClusterStorageProfileDiskCSIDriver) UnmarshalJSON(data []byte) e case "enabled": err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &m.Version) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -4931,7 +3797,6 @@ func (m *ManagedClusterWorkloadAutoScalerProfileKeda) UnmarshalJSON(data []byte) // MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. func (m ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "addonAutoscaling", m.AddonAutoscaling) populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } @@ -4945,9 +3810,6 @@ 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) delete(rawMsg, key) @@ -4990,37 +3852,6 @@ func (m *ManagedServiceIdentityUserAssignedIdentitiesValue) UnmarshalJSON(data [ return nil } -// MarshalJSON implements the json.Marshaller interface for type ManualScaleProfile. -func (m ManualScaleProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", m.Count) - populate(objectMap, "sizes", m.Sizes) - return json.Marshal(objectMap) -} - -// 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", m, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &m.Count) - delete(rawMsg, key) - case "sizes": - err = unpopulate(val, "Sizes", &m.Sizes) - 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 MeshRevision. func (m MeshRevision) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -5266,42 +4097,13 @@ func (m *MeshUpgradeProfileProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type NetworkMonitoring. -func (n NetworkMonitoring) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", n.Enabled) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkMonitoring. -func (n *NetworkMonitoring) 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) - } - for key, val := range rawMsg { - var err error - switch key { - case "enabled": - err = unpopulate(val, "Enabled", &n.Enabled) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type NetworkProfile. func (n NetworkProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) 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, "monitoring", n.Monitoring) populate(objectMap, "natGatewayProfile", n.NatGatewayProfile) populate(objectMap, "networkDataplane", n.NetworkDataplane) populate(objectMap, "networkMode", n.NetworkMode) @@ -5331,18 +4133,12 @@ func (n *NetworkProfile) UnmarshalJSON(data []byte) error { 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 "monitoring": - err = unpopulate(val, "Monitoring", &n.Monitoring) - delete(rawMsg, key) case "natGatewayProfile": err = unpopulate(val, "NatGatewayProfile", &n.NatGatewayProfile) delete(rawMsg, key) @@ -5359,139 +4155,22 @@ func (n *NetworkProfile) UnmarshalJSON(data []byte) error { 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) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkProfileForSnapshot. -func (n NetworkProfileForSnapshot) 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) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileForSnapshot. -func (n *NetworkProfileForSnapshot) 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) - } - 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) - delete(rawMsg, key) - case "networkPolicy": - err = unpopulate(val, "NetworkPolicy", &n.NetworkPolicy) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkProfileKubeProxyConfig. -func (n NetworkProfileKubeProxyConfig) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "enabled", n.Enabled) - populate(objectMap, "ipvsConfig", n.IpvsConfig) - populate(objectMap, "mode", n.Mode) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileKubeProxyConfig. -func (n *NetworkProfileKubeProxyConfig) 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) - } - 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) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", n, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type NetworkProfileKubeProxyConfigIpvsConfig. -func (n NetworkProfileKubeProxyConfigIpvsConfig) 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) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileKubeProxyConfigIpvsConfig. -func (n *NetworkProfileKubeProxyConfigIpvsConfig) 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) - } - for key, val := range rawMsg { - var err error - switch key { - case "scheduler": - err = unpopulate(val, "Scheduler", &n.Scheduler) + err = unpopulate(val, "NetworkPolicy", &n.NetworkPolicy) + delete(rawMsg, key) + case "outboundType": + err = unpopulate(val, "OutboundType", &n.OutboundType) delete(rawMsg, key) - case "tcpFinTimeoutSeconds": - err = unpopulate(val, "TCPFinTimeoutSeconds", &n.TCPFinTimeoutSeconds) + case "podCidr": + err = unpopulate(val, "PodCidr", &n.PodCidr) + delete(rawMsg, key) + case "podCidrs": + err = unpopulate(val, "PodCidrs", &n.PodCidrs) delete(rawMsg, key) - case "tcpTimeoutSeconds": - err = unpopulate(val, "TCPTimeoutSeconds", &n.TCPTimeoutSeconds) + case "serviceCidr": + err = unpopulate(val, "ServiceCidr", &n.ServiceCidr) delete(rawMsg, key) - case "udpTimeoutSeconds": - err = unpopulate(val, "UDPTimeoutSeconds", &n.UDPTimeoutSeconds) + case "serviceCidrs": + err = unpopulate(val, "ServiceCidrs", &n.ServiceCidrs) delete(rawMsg, key) } if err != nil { @@ -5625,96 +4304,6 @@ func (o *OperationListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type OperationStatusResult. -func (o OperationStatusResult) 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) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type OperationStatusResult. -func (o *OperationStatusResult) 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) - } - for key, val := range rawMsg { - var err error - switch key { - case "endTime": - err = unpopulateDateTimeRFC3339(val, "EndTime", &o.EndTime) - delete(rawMsg, key) - case "error": - err = unpopulate(val, "Error", &o.Error) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &o.ID) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &o.Name) - delete(rawMsg, key) - case "operations": - err = unpopulate(val, "Operations", &o.Operations) - delete(rawMsg, key) - case "percentComplete": - err = unpopulate(val, "PercentComplete", &o.PercentComplete) - delete(rawMsg, key) - case "resourceId": - err = unpopulate(val, "ResourceID", &o.ResourceID) - delete(rawMsg, key) - case "startTime": - err = unpopulateDateTimeRFC3339(val, "StartTime", &o.StartTime) - delete(rawMsg, key) - case "status": - err = unpopulate(val, "Status", &o.Status) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type OperationStatusResultList. -func (o OperationStatusResultList) 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 { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - 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) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", o, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type OperationValue. func (o OperationValue) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -6328,177 +4917,6 @@ 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 SafeguardsProfile. -func (s SafeguardsProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "excludedNamespaces", s.ExcludedNamespaces) - populate(objectMap, "level", s.Level) - populate(objectMap, "systemExcludedNamespaces", s.SystemExcludedNamespaces) - populate(objectMap, "version", s.Version) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type SafeguardsProfile. -func (s *SafeguardsProfile) 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 "excludedNamespaces": - err = unpopulate(val, "ExcludedNamespaces", &s.ExcludedNamespaces) - delete(rawMsg, key) - case "level": - err = unpopulate(val, "Level", &s.Level) - delete(rawMsg, key) - case "systemExcludedNamespaces": - err = unpopulate(val, "SystemExcludedNamespaces", &s.SystemExcludedNamespaces) - delete(rawMsg, key) - case "version": - err = unpopulate(val, "Version", &s.Version) - 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, "manual", s.Manual) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type ScaleProfile. -func (s *ScaleProfile) 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 "manual": - err = unpopulate(val, "Manual", &s.Manual) - 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 Schedule. func (s Schedule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -7261,64 +5679,6 @@ func (u *UserAssignedIdentity) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type VirtualMachineNodes. -func (v VirtualMachineNodes) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "count", v.Count) - populate(objectMap, "size", v.Size) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineNodes. -func (v *VirtualMachineNodes) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "count": - err = unpopulate(val, "Count", &v.Count) - delete(rawMsg, key) - case "size": - err = unpopulate(val, "Size", &v.Size) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - -// MarshalJSON implements the json.Marshaller interface for type VirtualMachinesProfile. -func (v VirtualMachinesProfile) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]any) - populate(objectMap, "scale", v.Scale) - return json.Marshal(objectMap) -} - -// UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachinesProfile. -func (v *VirtualMachinesProfile) UnmarshalJSON(data []byte) error { - var rawMsg map[string]json.RawMessage - if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - for key, val := range rawMsg { - var err error - switch key { - case "scale": - err = unpopulate(val, "Scale", &v.Scale) - delete(rawMsg, key) - } - if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", v, err) - } - } - return nil -} - // MarshalJSON implements the json.Marshaller interface for type WeeklySchedule. func (w WeeklySchedule) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -7395,16 +5755,6 @@ func populate(m map[string]any, k string, v any) { } } -func populateAny(m map[string]any, k string, v any) { - if v == nil { - return - } else if azcore.IsNullValue(v) { - m[k] = nil - } else { - m[k] = v - } -} - func populateByteArray[T any](m map[string]any, k string, b []T, convert func() any) { if azcore.IsNullValue(b) { m[k] = nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/operations_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/operations_client.go index bfc700c76a31..150abb35a881 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/operations_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/operations_client.go @@ -39,7 +39,7 @@ func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientO // NewListPager - Gets a list of operations. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-01 // - options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method. func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse] { return runtime.NewPager(runtime.PagingHandler[OperationsClientListResponse]{ @@ -73,7 +73,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go index efc62c5c14e6..2326ae08ed28 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/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/Operation_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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 bf79b9b6dd18..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/operationstatusresult_client.go +++ /dev/null @@ -1,254 +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. 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 - 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 2023-11-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, options *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", "2023-11-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 2023-11-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, options *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", "2023-11-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 2023-11-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, options *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", "2023-11-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 a1725da4d5b2..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/v4" -) - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-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 f209cbc7f0ed..061d3e76d1e4 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/options.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/options.go @@ -22,18 +22,8 @@ type AgentPoolsClientBeginCreateOrUpdateOptions struct { ResumeToken string } -// AgentPoolsClientBeginDeleteMachinesOptions contains the optional parameters for the AgentPoolsClient.BeginDeleteMachines -// method. -type AgentPoolsClientBeginDeleteMachinesOptions struct { - // Resumes the LRO from the provided token. - ResumeToken string -} - // AgentPoolsClientBeginDeleteOptions contains the optional parameters for the AgentPoolsClient.BeginDelete method. type AgentPoolsClientBeginDeleteOptions struct { - // ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget - IgnorePodDisruptionBudget *bool - // Resumes the LRO from the provided token. ResumeToken string } @@ -66,16 +56,6 @@ type AgentPoolsClientListOptions struct { // placeholder for future optional parameters } -// MachinesClientGetOptions contains the optional parameters for the MachinesClient.Get method. -type MachinesClientGetOptions struct { - // placeholder for future optional parameters -} - -// MachinesClientListOptions contains the optional parameters for the MachinesClient.NewListPager method. -type MachinesClientListOptions struct { - // placeholder for future optional parameters -} - // MaintenanceConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the MaintenanceConfigurationsClient.CreateOrUpdate // method. type MaintenanceConfigurationsClientCreateOrUpdateOptions struct { @@ -100,41 +80,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 { @@ -151,9 +96,6 @@ type ManagedClustersClientBeginCreateOrUpdateOptions struct { // ManagedClustersClientBeginDeleteOptions contains the optional parameters for the ManagedClustersClient.BeginDelete method. type ManagedClustersClientBeginDeleteOptions struct { - // ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget - IgnorePodDisruptionBudget *bool - // Resumes the LRO from the provided token. ResumeToken string } @@ -224,12 +166,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 { @@ -253,12 +189,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 { @@ -297,12 +227,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 { @@ -332,29 +256,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 -} - -// 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 d20f4f69db3d..c232eaf41109 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client.go @@ -46,7 +46,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -72,7 +72,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -118,7 +118,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -127,7 +127,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -179,7 +179,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -197,7 +197,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -244,7 +244,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -262,7 +262,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -315,7 +315,7 @@ func (client *PrivateEndpointConnectionsClient) updateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, 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 e71e5e30b607..ffe1567b0646 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/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/PrivateEndpointConnectionsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/PrivateEndpointConnectionsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/PrivateEndpointConnectionsUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/PrivateEndpointConnectionsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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 19222b1656a5..c8b35480cc74 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client.go @@ -46,7 +46,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 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -93,7 +93,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go index cb34ef0d5c88..d1887dc796f9 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/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/PrivateLinkResourcesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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 d30ebf05b25c..8d8ba014d6fc 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client.go @@ -46,7 +46,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -94,7 +94,7 @@ func (client *ResolvePrivateLinkServiceIDClient) postCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, 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 628e4cbc0a86..ceeff2f66509 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/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/ResolvePrivateLinkServiceId.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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 8acdd298df60..ae19892e0379 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/responses.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/responses.go @@ -19,11 +19,6 @@ type AgentPoolsClientCreateOrUpdateResponse struct { AgentPool } -// AgentPoolsClientDeleteMachinesResponse contains the response from method AgentPoolsClient.BeginDeleteMachines. -type AgentPoolsClientDeleteMachinesResponse struct { - // placeholder for future response values -} - // AgentPoolsClientDeleteResponse contains the response from method AgentPoolsClient.BeginDelete. type AgentPoolsClientDeleteResponse struct { // placeholder for future response values @@ -59,19 +54,6 @@ type AgentPoolsClientUpgradeNodeImageVersionResponse struct { AgentPool } -// MachinesClientGetResponse contains the response from method MachinesClient.Get. -type MachinesClientGetResponse struct { - // 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 -} - -// MachinesClientListResponse contains the response from method MachinesClient.NewListPager. -type MachinesClientListResponse struct { - // The response from the List Machines operation. - MachineListResult -} - // MaintenanceConfigurationsClientCreateOrUpdateResponse contains the response from method MaintenanceConfigurationsClient.CreateOrUpdate. type MaintenanceConfigurationsClientCreateOrUpdateResponse struct { // See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned @@ -97,41 +79,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 @@ -163,12 +110,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. @@ -193,12 +134,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. @@ -229,12 +164,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 @@ -265,12 +194,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 -} - // ManagedClustersClientResetAADProfileResponse contains the response from method ManagedClustersClient.BeginResetAADProfile. type ManagedClustersClientResetAADProfileResponse struct { // placeholder for future response values @@ -313,24 +236,6 @@ type ManagedClustersClientUpdateTagsResponse struct { ManagedCluster } -// 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 c0cb5e2f3514..dd160f7d9739 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go @@ -46,7 +46,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -94,7 +94,7 @@ func (client *SnapshotsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -115,7 +115,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -160,7 +160,7 @@ func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -169,7 +169,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -215,7 +215,7 @@ func (client *SnapshotsClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -232,7 +232,7 @@ func (client *SnapshotsClient) getHandleResponse(resp *http.Response) (Snapshots // NewListPager - Gets a list of snapshots in the specified subscription. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-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]{ @@ -269,7 +269,7 @@ func (client *SnapshotsClient) listCreateRequest(ctx context.Context, options *S return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -286,7 +286,7 @@ func (client *SnapshotsClient) listHandleResponse(resp *http.Response) (Snapshot // NewListByResourceGroupPager - Lists snapshots in the specified subscription and resource group. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - SnapshotsClientListByResourceGroupOptions contains the optional parameters for the SnapshotsClient.NewListByResourceGroupPager // method. @@ -329,7 +329,7 @@ func (client *SnapshotsClient) listByResourceGroupCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -347,7 +347,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -394,7 +394,7 @@ func (client *SnapshotsClient) updateTagsCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, 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 afbf54d9e978..e4f1bdb55f0d 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/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsUpdateTags.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/SnapshotsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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 13e18a3767ba..2cb313e07ccb 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client.go @@ -46,7 +46,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -73,7 +73,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -119,7 +119,7 @@ func (client *TrustedAccessRoleBindingsClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, trustedAccessRoleBinding); err != nil { @@ -131,7 +131,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -157,7 +157,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 2023-11-02-preview +// Generated from API version 2024-01-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" @@ -203,7 +203,7 @@ func (client *TrustedAccessRoleBindingsClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -212,7 +212,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 2023-11-02-preview +// Generated from API version 2024-01-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. @@ -264,7 +264,7 @@ func (client *TrustedAccessRoleBindingsClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -281,7 +281,7 @@ func (client *TrustedAccessRoleBindingsClient) getHandleResponse(resp *http.Resp // NewListPager - List trusted access role bindings. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-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 @@ -329,7 +329,7 @@ func (client *TrustedAccessRoleBindingsClient) listCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client_example_test.go index 5888ae3e39d9..36f9e4ca974e 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/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/TrustedAccessRoleBindings_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/TrustedAccessRoleBindings_Get.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/TrustedAccessRoleBindings_Delete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-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 b50cc3b2d22c..f5a658211b92 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client.go @@ -45,7 +45,7 @@ func NewTrustedAccessRolesClient(subscriptionID string, credential azcore.TokenC // NewListPager - List supported trusted access roles. // -// Generated from API version 2023-11-02-preview +// Generated from API version 2024-01-01 // - location - The name of the Azure region. // - options - TrustedAccessRolesClientListOptions contains the optional parameters for the TrustedAccessRolesClient.NewListPager // method. @@ -88,7 +88,7 @@ func (client *TrustedAccessRolesClient) listCreateRequest(ctx context.Context, l return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-11-02-preview") + reqQP.Set("api-version", "2024-01-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client_example_test.go index 5be21fbd2a71..e90c6de79fbb 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/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d4205894880b989ede35d62d97c8e901ed14fb5a/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-11-02-preview/examples/TrustedAccessRoles_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c16ce913afbdaa073e8ca5e480f3b465db2de542/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-01-01/examples/TrustedAccessRoles_List.json func ExampleTrustedAccessRolesClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {