From 3057296fa704cfc2407376f319b81e8c2e067017 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 10 Aug 2023 02:38:55 +0000 Subject: [PATCH] CodeGen from PR 25248 in Azure/azure-rest-api-specs Merge 3558281506f50744c00951b9001a11f7b7b78209 into c992976478b8ab8c3ea2b4abaeac9b0aacee55fe --- .../armcontainerservice/CHANGELOG.md | 14 +- .../armcontainerservice/agentpools_client.go | 40 +- .../agentpools_client_example_test.go | 1226 ---- .../armcontainerservice/autorest.md | 7 +- .../armcontainerservice/constants.go | 36 +- .../armcontainerservice/go.mod | 2 +- .../maintenanceconfigurations_client.go | 16 +- ...nanceconfigurations_client_example_test.go | 399 -- .../managedclusters_client.go | 114 +- .../managedclusters_client_example_test.go | 5380 ----------------- .../armcontainerservice/models.go | 59 + .../armcontainerservice/models_serde.go | 144 + .../armcontainerservice/operations_client.go | 4 +- .../operations_client_example_test.go | 3616 ----------- .../privateendpointconnections_client.go | 18 +- ...endpointconnections_client_example_test.go | 151 - .../privatelinkresources_client.go | 4 +- ...rivatelinkresources_client_example_test.go | 49 - .../resolveprivatelinkserviceid_client.go | 4 +- ...rivatelinkserviceid_client_example_test.go | 44 - .../armcontainerservice/snapshots_client.go | 24 +- .../snapshots_client_example_test.go | 303 - 22 files changed, 361 insertions(+), 11293 deletions(-) delete mode 100644 sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go delete mode 100644 sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go delete mode 100644 sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go delete mode 100644 sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go delete mode 100644 sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client_example_test.go delete mode 100644 sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go delete mode 100644 sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client_example_test.go delete mode 100644 sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client_example_test.go diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md b/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md index b59646f8c59f..ce5fe3a27ac7 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md +++ b/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md @@ -1,10 +1,18 @@ # Release History -## 4.2.0-beta.1 (2023-07-28) - +## 4.2.0 (2023-08-10) ### Features Added -- Support for test fakes and OpenTelemetry trace spans. +- New enum type `NodeOSUpgradeChannel` with values `NodeOSUpgradeChannelNodeImage`, `NodeOSUpgradeChannelNone`, `NodeOSUpgradeChannelUnmanaged` +- New struct `ClusterUpgradeSettings` +- New struct `DelegatedResource` +- New struct `ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler` +- New struct `UpgradeOverrideSettings` +- New field `DrainTimeoutInMinutes` in struct `AgentPoolUpgradeSettings` +- New field `NodeOSUpgradeChannel` in struct `ManagedClusterAutoUpgradeProfile` +- New field `DelegatedResources` in struct `ManagedClusterIdentity` +- New field `UpgradeSettings` in struct `ManagedClusterProperties` +- New field `VerticalPodAutoscaler` in struct `ManagedClusterWorkloadAutoScalerProfile` ## 4.1.0 (2023-07-28) diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go index 7d2b4e32f300..7d79a58602b1 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go @@ -48,7 +48,7 @@ func NewAgentPoolsClient(subscriptionID string, credential azcore.TokenCredentia // 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-05-01 +// Generated from API version 2023-07-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. @@ -74,7 +74,7 @@ func (client *AgentPoolsClient) BeginAbortLatestOperation(ctx context.Context, r // 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-05-01 +// Generated from API version 2023-07-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" @@ -120,7 +120,7 @@ func (client *AgentPoolsClient) abortLatestOperationCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -129,7 +129,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-05-01 +// Generated from API version 2023-07-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. @@ -152,7 +152,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-05-01 +// Generated from API version 2023-07-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" @@ -198,7 +198,7 @@ func (client *AgentPoolsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -210,7 +210,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-05-01 +// Generated from API version 2023-07-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. @@ -231,7 +231,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-05-01 +// Generated from API version 2023-07-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" @@ -277,7 +277,7 @@ func (client *AgentPoolsClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -286,7 +286,7 @@ func (client *AgentPoolsClient) deleteCreateRequest(ctx context.Context, resourc // Get - Gets the specified managed cluster agent pool. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-07-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. @@ -337,7 +337,7 @@ func (client *AgentPoolsClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -356,7 +356,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-05-01 +// Generated from API version 2023-07-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 @@ -403,7 +403,7 @@ func (client *AgentPoolsClient) getAvailableAgentPoolVersionsCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -421,7 +421,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-05-01 +// Generated from API version 2023-07-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. @@ -473,7 +473,7 @@ func (client *AgentPoolsClient) getUpgradeProfileCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -490,7 +490,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-05-01 +// Generated from API version 2023-07-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. @@ -544,7 +544,7 @@ func (client *AgentPoolsClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -564,7 +564,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-05-01 +// Generated from API version 2023-07-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. @@ -590,7 +590,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-05-01 +// Generated from API version 2023-07-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" @@ -636,7 +636,7 @@ func (client *AgentPoolsClient) upgradeNodeImageVersionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-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 deleted file mode 100644 index ace10157b1dd..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go +++ /dev/null @@ -1,1226 +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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsAbortOperation.json -func ExampleAgentPoolsClient_BeginAbortLatestOperation() { - 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().BeginAbortLatestOperation(ctx, "rg1", "clustername1", "agentpool1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsList.json -func ExampleAgentPoolsClient_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.NewAgentPoolsClient().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.AgentPoolListResult = armcontainerservice.AgentPoolListResult{ - // Value: []*armcontainerservice.AgentPool{ - // { - // Name: to.Ptr("agentpool1"), - // ID: to.Ptr("/subscriptions/subid1/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), - // 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"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsGet.json -func ExampleAgentPoolsClient_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.NewAgentPoolsClient().Get(ctx, "rg1", "clustername1", "agentpool1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AgentPool = armcontainerservice.AgentPool{ - // Name: to.Ptr("agentpool1"), - // ID: to.Ptr("/subscriptions/subid1/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), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // UpgradeSettings: &armcontainerservice.AgentPoolUpgradeSettings{ - // MaxSurge: to.Ptr("33%"), - // }, - // VMSize: to.Ptr("Standard_DS1_v2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_Snapshot.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPoolSnapshot() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - 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), - CreationData: &armcontainerservice.CreationData{ - SourceResourceID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - }, - EnableFIPS: to.Ptr(true), - OrchestratorVersion: to.Ptr(""), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - }, - }, 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](3), - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - // }, - // CurrentOrchestratorVersion: to.Ptr("1.19.6"), - // EnableFIPS: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.19.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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_DedicatedHostGroup.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithDedicatedHostGroup() { - 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), - HostGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"), - 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](3), - // HostGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"), - // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.19.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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEncryptionAtHostEnabled() { - 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), - EnableEncryptionAtHost: to.Ptr(true), - 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.17.13"), - // EnableEncryptionAtHost: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.17.13"), - // 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_Ephemeral.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEphemeralOsDisk() { - 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), - OrchestratorVersion: to.Ptr(""), - OSDiskSizeGB: to.Ptr[int32](64), - OSDiskType: to.Ptr(armcontainerservice.OSDiskTypeEphemeral), - 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/subid1/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), - // OrchestratorVersion: to.Ptr("1.17.8"), - // OSDiskSizeGB: to.Ptr[int32](64), - // OSDiskType: to.Ptr(armcontainerservice.OSDiskTypeEphemeral), - // 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_EnableFIPS.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithFipsEnabledOs() { - 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), - EnableFIPS: to.Ptr(true), - 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.19.6"), - // EnableFIPS: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.19.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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_GPUMIG.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithGpumig() { - 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), - GpuInstanceProfile: to.Ptr(armcontainerservice.GPUInstanceProfileMIG2G), - KubeletConfig: &armcontainerservice.KubeletConfig{ - AllowedUnsafeSysctls: []*string{ - to.Ptr("kernel.msg*"), - to.Ptr("net.core.somaxconn")}, - CPUCfsQuota: to.Ptr(true), - CPUCfsQuotaPeriod: to.Ptr("200ms"), - CPUManagerPolicy: to.Ptr("static"), - FailSwapOn: to.Ptr(false), - ImageGcHighThreshold: to.Ptr[int32](90), - ImageGcLowThreshold: to.Ptr[int32](70), - TopologyManagerPolicy: to.Ptr("best-effort"), - }, - LinuxOSConfig: &armcontainerservice.LinuxOSConfig{ - SwapFileSizeMB: to.Ptr[int32](1500), - Sysctls: &armcontainerservice.SysctlConfig{ - KernelThreadsMax: to.Ptr[int32](99999), - NetCoreWmemDefault: to.Ptr[int32](12345), - NetIPv4IPLocalPortRange: to.Ptr("20000 60000"), - NetIPv4TCPTwReuse: to.Ptr(true), - }, - TransparentHugePageDefrag: to.Ptr("madvise"), - TransparentHugePageEnabled: to.Ptr("always"), - }, - OrchestratorVersion: to.Ptr(""), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_ND96asr_v4"), - }, - }, 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.17.8"), - // GpuInstanceProfile: to.Ptr(armcontainerservice.GPUInstanceProfileMIG2G), - // KubeletConfig: &armcontainerservice.KubeletConfig{ - // AllowedUnsafeSysctls: []*string{ - // to.Ptr("kernel.msg*"), - // to.Ptr("net.core.somaxconn")}, - // CPUCfsQuota: to.Ptr(true), - // CPUCfsQuotaPeriod: to.Ptr("200ms"), - // CPUManagerPolicy: to.Ptr("static"), - // FailSwapOn: to.Ptr(false), - // ImageGcHighThreshold: to.Ptr[int32](90), - // ImageGcLowThreshold: to.Ptr[int32](70), - // TopologyManagerPolicy: to.Ptr("best-effort"), - // }, - // LinuxOSConfig: &armcontainerservice.LinuxOSConfig{ - // SwapFileSizeMB: to.Ptr[int32](1500), - // Sysctls: &armcontainerservice.SysctlConfig{ - // KernelThreadsMax: to.Ptr[int32](99999), - // NetCoreWmemDefault: to.Ptr[int32](12345), - // NetIPv4IPLocalPortRange: to.Ptr("20000 60000"), - // NetIPv4TCPTwReuse: to.Ptr(true), - // }, - // TransparentHugePageDefrag: to.Ptr("madvise"), - // TransparentHugePageEnabled: to.Ptr("always"), - // }, - // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.17.8"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_ND96asr_v4"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_WasmWasi.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKrustletAndTheWasiRuntime() { - 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), - Mode: to.Ptr(armcontainerservice.AgentPoolModeUser), - OrchestratorVersion: to.Ptr(""), - OSDiskSizeGB: to.Ptr[int32](64), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - WorkloadRuntime: to.Ptr(armcontainerservice.WorkloadRuntimeWasmWasi), - }, - }, 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/subid1/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), - // 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"), - // WorkloadRuntime: to.Ptr(armcontainerservice.WorkloadRuntimeWasmWasi), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_CustomNodeConfig.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKubeletConfigAndLinuxOsConfig() { - 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), - KubeletConfig: &armcontainerservice.KubeletConfig{ - AllowedUnsafeSysctls: []*string{ - to.Ptr("kernel.msg*"), - to.Ptr("net.core.somaxconn")}, - CPUCfsQuota: to.Ptr(true), - CPUCfsQuotaPeriod: to.Ptr("200ms"), - CPUManagerPolicy: to.Ptr("static"), - FailSwapOn: to.Ptr(false), - ImageGcHighThreshold: to.Ptr[int32](90), - ImageGcLowThreshold: to.Ptr[int32](70), - TopologyManagerPolicy: to.Ptr("best-effort"), - }, - LinuxOSConfig: &armcontainerservice.LinuxOSConfig{ - SwapFileSizeMB: to.Ptr[int32](1500), - Sysctls: &armcontainerservice.SysctlConfig{ - KernelThreadsMax: to.Ptr[int32](99999), - NetCoreWmemDefault: to.Ptr[int32](12345), - NetIPv4IPLocalPortRange: to.Ptr("20000 60000"), - NetIPv4TCPTwReuse: to.Ptr(true), - }, - TransparentHugePageDefrag: to.Ptr("madvise"), - TransparentHugePageEnabled: to.Ptr("always"), - }, - 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.17.8"), - // KubeletConfig: &armcontainerservice.KubeletConfig{ - // AllowedUnsafeSysctls: []*string{ - // to.Ptr("kernel.msg*"), - // to.Ptr("net.core.somaxconn")}, - // CPUCfsQuota: to.Ptr(true), - // CPUCfsQuotaPeriod: to.Ptr("200ms"), - // CPUManagerPolicy: to.Ptr("static"), - // FailSwapOn: to.Ptr(false), - // ImageGcHighThreshold: to.Ptr[int32](90), - // ImageGcLowThreshold: to.Ptr[int32](70), - // TopologyManagerPolicy: to.Ptr("best-effort"), - // }, - // LinuxOSConfig: &armcontainerservice.LinuxOSConfig{ - // SwapFileSizeMB: to.Ptr[int32](1500), - // Sysctls: &armcontainerservice.SysctlConfig{ - // KernelThreadsMax: to.Ptr[int32](99999), - // NetCoreWmemDefault: to.Ptr[int32](12345), - // NetIPv4IPLocalPortRange: to.Ptr("20000 60000"), - // NetIPv4TCPTwReuse: to.Ptr(true), - // }, - // TransparentHugePageDefrag: to.Ptr("madvise"), - // TransparentHugePageEnabled: to.Ptr("always"), - // }, - // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.17.8"), - // 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_OSSKU.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithOssku() { - 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), - KubeletConfig: &armcontainerservice.KubeletConfig{ - AllowedUnsafeSysctls: []*string{ - to.Ptr("kernel.msg*"), - to.Ptr("net.core.somaxconn")}, - CPUCfsQuota: to.Ptr(true), - CPUCfsQuotaPeriod: to.Ptr("200ms"), - CPUManagerPolicy: to.Ptr("static"), - FailSwapOn: to.Ptr(false), - ImageGcHighThreshold: to.Ptr[int32](90), - ImageGcLowThreshold: to.Ptr[int32](70), - TopologyManagerPolicy: to.Ptr("best-effort"), - }, - LinuxOSConfig: &armcontainerservice.LinuxOSConfig{ - SwapFileSizeMB: to.Ptr[int32](1500), - Sysctls: &armcontainerservice.SysctlConfig{ - KernelThreadsMax: to.Ptr[int32](99999), - NetCoreWmemDefault: to.Ptr[int32](12345), - NetIPv4IPLocalPortRange: to.Ptr("20000 60000"), - NetIPv4TCPTwReuse: to.Ptr(true), - }, - TransparentHugePageDefrag: to.Ptr("madvise"), - TransparentHugePageEnabled: to.Ptr("always"), - }, - OrchestratorVersion: to.Ptr(""), - OSSKU: to.Ptr(armcontainerservice.OSSKUAzureLinux), - 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.17.8"), - // KubeletConfig: &armcontainerservice.KubeletConfig{ - // AllowedUnsafeSysctls: []*string{ - // to.Ptr("kernel.msg*"), - // to.Ptr("net.core.somaxconn")}, - // CPUCfsQuota: to.Ptr(true), - // CPUCfsQuotaPeriod: to.Ptr("200ms"), - // CPUManagerPolicy: to.Ptr("static"), - // FailSwapOn: to.Ptr(false), - // ImageGcHighThreshold: to.Ptr[int32](90), - // ImageGcLowThreshold: to.Ptr[int32](70), - // TopologyManagerPolicy: to.Ptr("best-effort"), - // }, - // LinuxOSConfig: &armcontainerservice.LinuxOSConfig{ - // SwapFileSizeMB: to.Ptr[int32](1500), - // Sysctls: &armcontainerservice.SysctlConfig{ - // KernelThreadsMax: to.Ptr[int32](99999), - // NetCoreWmemDefault: to.Ptr[int32](12345), - // NetIPv4IPLocalPortRange: to.Ptr("20000 60000"), - // NetIPv4TCPTwReuse: to.Ptr(true), - // }, - // TransparentHugePageDefrag: to.Ptr("madvise"), - // TransparentHugePageEnabled: to.Ptr("always"), - // }, - // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.17.8"), - // OSSKU: to.Ptr(armcontainerservice.OSSKUAzureLinux), - // 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_PPG.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithPpg() { - 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), - OrchestratorVersion: to.Ptr(""), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - ProximityPlacementGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"), - 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/subid1/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), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // ProximityPlacementGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_EnableUltraSSD.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithUltraSsdEnabled() { - 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), - EnableUltraSSD: to.Ptr(true), - 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.17.13"), - // EnableUltraSSD: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.17.13"), - // 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_WindowsOSSKU.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithWindowsOssku() { - 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.3"), - OSSKU: to.Ptr(armcontainerservice.OSSKUWindows2022), - OSType: to.Ptr(armcontainerservice.OSTypeWindows), - VMSize: to.Ptr("Standard_D4s_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("wnp2"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/wnp2"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.23.3"), - // MaxPods: to.Ptr[int32](110), - // OrchestratorVersion: to.Ptr("1.23.3"), - // OSSKU: to.Ptr(armcontainerservice.OSSKUWindows2022), - // OSType: to.Ptr(armcontainerservice.OSTypeWindows), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_D4s_v3"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_Spot.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createSpotAgentPool() { - 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), - NodeLabels: map[string]*string{ - "key1": to.Ptr("val1"), - }, - NodeTaints: []*string{ - to.Ptr("Key1=Value1:NoSchedule")}, - OrchestratorVersion: to.Ptr(""), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete), - ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot), - Tags: map[string]*string{ - "name1": to.Ptr("val1"), - }, - VMSize: to.Ptr("Standard_DS1_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/subid1/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), - // 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"), - // ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete), - // ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot), - // SpotMaxPrice: to.Ptr[float32](-1), - // Tags: map[string]*string{ - // "name1": to.Ptr("val1"), - // }, - // VMSize: to.Ptr("Standard_DS1_v2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsCreate_Update.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_createUpdateAgentPool() { - 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), - Mode: to.Ptr(armcontainerservice.AgentPoolModeUser), - NodeLabels: map[string]*string{ - "key1": to.Ptr("val1"), - }, - NodeTaints: []*string{ - to.Ptr("Key1=Value1:NoSchedule")}, - OrchestratorVersion: to.Ptr(""), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete), - ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot), - Tags: map[string]*string{ - "name1": to.Ptr("val1"), - }, - VMSize: to.Ptr("Standard_DS1_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/subid1/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"), - // 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"), - // ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete), - // ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot), - // Tags: map[string]*string{ - // "name1": to.Ptr("val1"), - // }, - // VMSize: to.Ptr("Standard_DS1_v2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPools_Start.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_startAgentPool() { - 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{ - PowerState: &armcontainerservice.PowerState{ - Code: to.Ptr(armcontainerservice.CodeRunning), - }, - }, - }, 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](50), - // EnableAutoScaling: to.Ptr(true), - // MaxCount: to.Ptr[int32](55), - // MinCount: to.Ptr[int32](3), - // PowerState: &armcontainerservice.PowerState{ - // Code: to.Ptr(armcontainerservice.CodeRunning), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPools_Stop.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_stopAgentPool() { - 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{ - PowerState: &armcontainerservice.PowerState{ - Code: to.Ptr(armcontainerservice.CodeStopped), - }, - }, - }, 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](0), - // EnableAutoScaling: to.Ptr(false), - // PowerState: &armcontainerservice.PowerState{ - // Code: to.Ptr(armcontainerservice.CodeStopped), - // }, - // ProvisioningState: to.Ptr("Succeeded"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPools_Update.json -func ExampleAgentPoolsClient_BeginCreateOrUpdate_updateAgentPool() { - 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), - EnableAutoScaling: to.Ptr(true), - MaxCount: to.Ptr[int32](2), - MinCount: to.Ptr[int32](2), - NodeTaints: []*string{ - to.Ptr("Key1=Value1:NoSchedule")}, - OrchestratorVersion: to.Ptr(""), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete), - ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot), - VMSize: to.Ptr("Standard_DS1_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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), - // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableAutoScaling: to.Ptr(true), - // MaxCount: to.Ptr[int32](2), - // MaxPods: to.Ptr[int32](110), - // MinCount: to.Ptr[int32](2), - // NodeTaints: []*string{ - // to.Ptr("Key1=Value1:NoSchedule")}, - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // ScaleSetEvictionPolicy: to.Ptr(armcontainerservice.ScaleSetEvictionPolicyDelete), - // ScaleSetPriority: to.Ptr(armcontainerservice.ScaleSetPrioritySpot), - // VMSize: to.Ptr("Standard_DS1_v2"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsDelete.json -func ExampleAgentPoolsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewAgentPoolsClient().BeginDelete(ctx, "rg1", "clustername1", "agentpool1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsGetUpgradeProfile.json -func ExampleAgentPoolsClient_GetUpgradeProfile() { - 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.NewAgentPoolsClient().GetUpgradeProfile(ctx, "rg1", "clustername1", "agentpool1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - // You could use response here. We use blank identifier for just demo purposes. - _ = res - // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // res.AgentPoolUpgradeProfile = armcontainerservice.AgentPoolUpgradeProfile{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools/upgradeProfiles"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1/upgradeprofiles/default"), - // Properties: &armcontainerservice.AgentPoolUpgradeProfileProperties{ - // KubernetesVersion: to.Ptr("1.12.8"), - // LatestNodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // Upgrades: []*armcontainerservice.AgentPoolUpgradeProfilePropertiesUpgradesItem{ - // { - // KubernetesVersion: to.Ptr("1.13.5"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json -func ExampleAgentPoolsClient_GetAvailableAgentPoolVersions() { - 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.NewAgentPoolsClient().GetAvailableAgentPoolVersions(ctx, "rg1", "clustername1", 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.AgentPoolAvailableVersions = armcontainerservice.AgentPoolAvailableVersions{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/availableAgentpoolVersions"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/availableagentpoolversions"), - // Properties: &armcontainerservice.AgentPoolAvailableVersionsProperties{ - // AgentPoolVersions: []*armcontainerservice.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem{ - // { - // KubernetesVersion: to.Ptr("1.12.7"), - // }, - // { - // KubernetesVersion: to.Ptr("1.12.8"), - // }, - // { - // Default: to.Ptr(true), - // IsPreview: to.Ptr(true), - // KubernetesVersion: to.Ptr("1.13.5"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/AgentPoolsUpgradeNodeImageVersion.json -func ExampleAgentPoolsClient_BeginUpgradeNodeImageVersion() { - 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().BeginUpgradeNodeImageVersion(ctx, "rg1", "clustername1", "agentpool1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md b/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md index 661750c9144c..30dc88cf8265 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md +++ b/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md @@ -5,12 +5,11 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.go.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.go.md license-header: MICROSOFT_MIT_NO_VERSION module: github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4 -module-version: 4.2.0-beta.1 -tag: package-2023-05 +module-version: 4.2.0 azcore-version: 1.8.0-beta.1 generate-fakes: true inject-spans: true diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/constants.go b/sdk/resourcemanager/containerservice/armcontainerservice/constants.go index 13cded0ddcc5..a383ca8b867a 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/constants.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/constants.go @@ -10,7 +10,7 @@ package armcontainerservice const ( moduleName = "armcontainerservice" - moduleVersion = "v4.2.0-beta.1" + moduleVersion = "v4.2.0" ) // AgentPoolMode - A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent @@ -472,6 +472,34 @@ func PossibleNetworkPolicyValues() []NetworkPolicy { } } +// NodeOSUpgradeChannel - Manner in which the OS on your nodes is updated. The default is NodeImage. +type NodeOSUpgradeChannel string + +const ( + // NodeOSUpgradeChannelNodeImage - AKS will update the nodes with a newly patched VHD containing security fixes and bugfixes + // on a weekly cadence. With the VHD update machines will be rolling reimaged to that VHD following maintenance windows and + // surge settings. No extra VHD cost is incurred when choosing this option as AKS hosts the images. + NodeOSUpgradeChannelNodeImage NodeOSUpgradeChannel = "NodeImage" + // 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" + // 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 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" +) + +// PossibleNodeOSUpgradeChannelValues returns the possible values for the NodeOSUpgradeChannel const type. +func PossibleNodeOSUpgradeChannelValues() []NodeOSUpgradeChannel { + return []NodeOSUpgradeChannel{ + NodeOSUpgradeChannelNodeImage, + NodeOSUpgradeChannelNone, + NodeOSUpgradeChannelUnmanaged, + } +} + // 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]. @@ -742,10 +770,8 @@ func PossibleTypeValues() []Type { type UpgradeChannel string const ( - // UpgradeChannelNodeImage - Automatically upgrade the node image to the latest version available. Microsoft provides patches - // and new images for image nodes frequently (usually weekly), but your running nodes won't get the new images unless you - // do a node image upgrade. Turning on the node-image channel will automatically update your node images whenever a new version - // is available. + // UpgradeChannelNodeImage - Automatically upgrade the node image to the latest version available. Consider using nodeOSUpgradeChannel + // instead as that allows you to configure node OS patching separate from Kubernetes version patching UpgradeChannelNodeImage UpgradeChannel = "node-image" // UpgradeChannelNone - Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. UpgradeChannelNone UpgradeChannel = "none" diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/go.mod b/sdk/resourcemanager/containerservice/armcontainerservice/go.mod index 3b9b740c43d7..b1c6d42458ce 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/go.mod +++ b/sdk/resourcemanager/containerservice/armcontainerservice/go.mod @@ -4,12 +4,12 @@ go 1.18 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0-beta.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/stretchr/testify v1.7.0 ) require ( + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.9.0 // indirect diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go index 28d6b3a747d3..29588cc39647 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-05-01 +// Generated from API version 2023-07-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-05-01") + reqQP.Set("api-version", "2023-07-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-05-01 +// Generated from API version 2023-07-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-05-01") + reqQP.Set("api-version", "2023-07-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-05-01 +// Generated from API version 2023-07-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-05-01") + reqQP.Set("api-version", "2023-07-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-05-01 +// Generated from API version 2023-07-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 @@ -304,7 +304,7 @@ func (client *MaintenanceConfigurationsClient) listByManagedClusterCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-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 deleted file mode 100644 index 9f7f81612ce8..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go +++ /dev/null @@ -1,399 +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" - - "time" - - "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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/MaintenanceConfigurationsList.json -func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMaintenanceConfigurationsByManagedCluster() { - 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.NewMaintenanceConfigurationsClient().NewListByManagedClusterPager("rg1", "clustername1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.MaintenanceConfigurationListResult = armcontainerservice.MaintenanceConfigurationListResult{ - // Value: []*armcontainerservice.MaintenanceConfiguration{ - // { - // Name: to.Ptr("default"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default"), - // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ - // NotAllowedTime: []*armcontainerservice.TimeSpan{ - // { - // End: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-30T12:00:00Z"); return t}()), - // Start: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-26T03:00:00Z"); return t}()), - // }}, - // TimeInWeek: []*armcontainerservice.TimeInWeek{ - // { - // Day: to.Ptr(armcontainerservice.WeekDayMonday), - // HourSlots: []*int32{ - // to.Ptr[int32](1), - // to.Ptr[int32](2)}, - // }}, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json -func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMaintenanceConfigurationsConfiguredWithMaintenanceWindowByManagedCluster() { - 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.NewMaintenanceConfigurationsClient().NewListByManagedClusterPager("rg1", "clustername1", nil) - for pager.More() { - page, err := pager.NextPage(ctx) - if err != nil { - log.Fatalf("failed to advance page: %v", err) - } - for _, v := range page.Value { - // You could use page here. We use blank identifier for just demo purposes. - _ = v - } - // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. - // page.MaintenanceConfigurationListResult = armcontainerservice.MaintenanceConfigurationListResult{ - // Value: []*armcontainerservice.MaintenanceConfiguration{ - // { - // Name: to.Ptr("aksManagedNodeOSUpgradeSchedule"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule"), - // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ - // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ - // DurationHours: to.Ptr[int32](10), - // Schedule: &armcontainerservice.Schedule{ - // Daily: &armcontainerservice.DailySchedule{ - // IntervalDays: to.Ptr[int32](5), - // }, - // }, - // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-01-01"); return t}()), - // StartTime: to.Ptr("13:30"), - // UTCOffset: to.Ptr("-07:00"), - // }, - // }, - // }, - // { - // Name: to.Ptr("aksManagedAutoUpgradeSchedule"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedAutoUpgradeSchedule"), - // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ - // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ - // DurationHours: to.Ptr[int32](5), - // NotAllowedDates: []*armcontainerservice.DateSpan{ - // { - // End: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-02-25"); return t}()), - // Start: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-02-18"); return t}()), - // }, - // { - // End: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2024-01-05"); return t}()), - // Start: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-12-23"); return t}()), - // }}, - // Schedule: &armcontainerservice.Schedule{ - // AbsoluteMonthly: &armcontainerservice.AbsoluteMonthlySchedule{ - // DayOfMonth: to.Ptr[int32](15), - // IntervalMonths: to.Ptr[int32](3), - // }, - // }, - // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-01-01"); return t}()), - // StartTime: to.Ptr("08:30"), - // UTCOffset: to.Ptr("+00:00"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/MaintenanceConfigurationsGet.json -func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfiguration() { - 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.NewMaintenanceConfigurationsClient().Get(ctx, "rg1", "clustername1", "default", 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.MaintenanceConfiguration = armcontainerservice.MaintenanceConfiguration{ - // Name: to.Ptr("default"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default"), - // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ - // NotAllowedTime: []*armcontainerservice.TimeSpan{ - // { - // End: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-30T12:00:00Z"); return t}()), - // Start: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-26T03:00:00Z"); return t}()), - // }}, - // TimeInWeek: []*armcontainerservice.TimeInWeek{ - // { - // Day: to.Ptr(armcontainerservice.WeekDayMonday), - // HourSlots: []*int32{ - // to.Ptr[int32](1), - // to.Ptr[int32](2)}, - // }}, - // }, - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); 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.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcontainerservice.CreatedByTypeUser), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json -func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfigurationConfiguredWithMaintenanceWindow() { - 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.NewMaintenanceConfigurationsClient().Get(ctx, "rg1", "clustername1", "aksManagedNodeOSUpgradeSchedule", 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.MaintenanceConfiguration = armcontainerservice.MaintenanceConfiguration{ - // Name: to.Ptr("aksManagedNodeOSUpgradeSchedule"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule"), - // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ - // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ - // DurationHours: to.Ptr[int32](4), - // NotAllowedDates: []*armcontainerservice.DateSpan{ - // { - // End: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-02-25"); return t}()), - // Start: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-02-18"); return t}()), - // }, - // { - // End: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2024-01-05"); return t}()), - // Start: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-12-23"); return t}()), - // }}, - // Schedule: &armcontainerservice.Schedule{ - // Daily: &armcontainerservice.DailySchedule{ - // IntervalDays: to.Ptr[int32](3), - // }, - // }, - // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-01-01"); return t}()), - // StartTime: to.Ptr("09:30"), - // UTCOffset: to.Ptr("-07:00"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/MaintenanceConfigurationsCreate_Update.json -func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenanceConfiguration() { - 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.NewMaintenanceConfigurationsClient().CreateOrUpdate(ctx, "rg1", "clustername1", "default", armcontainerservice.MaintenanceConfiguration{ - Properties: &armcontainerservice.MaintenanceConfigurationProperties{ - NotAllowedTime: []*armcontainerservice.TimeSpan{ - { - End: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-30T12:00:00Z"); return t }()), - Start: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-26T03:00:00Z"); return t }()), - }}, - TimeInWeek: []*armcontainerservice.TimeInWeek{ - { - Day: to.Ptr(armcontainerservice.WeekDayMonday), - HourSlots: []*int32{ - to.Ptr[int32](1), - to.Ptr[int32](2)}, - }}, - }, - }, 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.MaintenanceConfiguration = armcontainerservice.MaintenanceConfiguration{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/maintenanceConfigurations"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default"), - // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ - // NotAllowedTime: []*armcontainerservice.TimeSpan{ - // { - // End: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-30T12:00:00Z"); return t}()), - // Start: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-11-26T03:00:00Z"); return t}()), - // }}, - // TimeInWeek: []*armcontainerservice.TimeInWeek{ - // { - // Day: to.Ptr(armcontainerservice.WeekDayMonday), - // HourSlots: []*int32{ - // to.Ptr[int32](1), - // to.Ptr[int32](2)}, - // }}, - // }, - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.1234567Z"); 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.1234567Z"); return t}()), - // LastModifiedBy: to.Ptr("user2"), - // LastModifiedByType: to.Ptr(armcontainerservice.CreatedByTypeUser), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json -func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenanceConfigurationWithMaintenanceWindow() { - 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.NewMaintenanceConfigurationsClient().CreateOrUpdate(ctx, "rg1", "clustername1", "aksManagedAutoUpgradeSchedule", armcontainerservice.MaintenanceConfiguration{ - Properties: &armcontainerservice.MaintenanceConfigurationProperties{ - MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ - DurationHours: to.Ptr[int32](10), - NotAllowedDates: []*armcontainerservice.DateSpan{ - { - End: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-02-25"); return t }()), - Start: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-02-18"); return t }()), - }, - { - End: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2024-01-05"); return t }()), - Start: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-12-23"); return t }()), - }}, - Schedule: &armcontainerservice.Schedule{ - RelativeMonthly: &armcontainerservice.RelativeMonthlySchedule{ - DayOfWeek: to.Ptr(armcontainerservice.WeekDayMonday), - IntervalMonths: to.Ptr[int32](3), - WeekIndex: to.Ptr(armcontainerservice.TypeFirst), - }, - }, - StartDate: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-01-01"); return t }()), - StartTime: to.Ptr("08:30"), - UTCOffset: to.Ptr("+05:30"), - }, - }, - }, 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.MaintenanceConfiguration = armcontainerservice.MaintenanceConfiguration{ - // Name: to.Ptr("aksManagedAutoUpgradeSchedule"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedAutoUpgradeSchedule"), - // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ - // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ - // DurationHours: to.Ptr[int32](10), - // NotAllowedDates: []*armcontainerservice.DateSpan{ - // { - // End: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-02-25"); return t}()), - // Start: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-02-18"); return t}()), - // }, - // { - // End: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2024-01-05"); return t}()), - // Start: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-12-23"); return t}()), - // }}, - // Schedule: &armcontainerservice.Schedule{ - // Weekly: &armcontainerservice.WeeklySchedule{ - // DayOfWeek: to.Ptr(armcontainerservice.WeekDayMonday), - // IntervalWeeks: to.Ptr[int32](3), - // }, - // }, - // StartDate: to.Ptr(func() time.Time { t, _ := time.Parse("2006-01-02", "2023-01-01"); return t}()), - // StartTime: to.Ptr("08:30"), - // UTCOffset: to.Ptr("+05:30"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/MaintenanceConfigurationsDelete.json -func ExampleMaintenanceConfigurationsClient_Delete_deleteMaintenanceConfiguration() { - 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.NewMaintenanceConfigurationsClient().Delete(ctx, "rg1", "clustername1", "default", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json -func ExampleMaintenanceConfigurationsClient_Delete_deleteMaintenanceConfigurationForNodeOsUpgrade() { - 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.NewMaintenanceConfigurationsClient().Delete(ctx, "rg1", "clustername1", "aksManagedNodeOSUpgradeSchedule", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go index 9121e20bc986..aab0463f4357 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go @@ -48,7 +48,7 @@ func NewManagedClustersClient(subscriptionID string, credential azcore.TokenCred // 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-05-01 +// Generated from API version 2023-07-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 @@ -73,7 +73,7 @@ func (client *ManagedClustersClient) BeginAbortLatestOperation(ctx context.Conte // 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-05-01 +// Generated from API version 2023-07-01 func (client *ManagedClustersClient) abortLatestOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginAbortLatestOperationOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginAbortLatestOperation" @@ -115,7 +115,7 @@ func (client *ManagedClustersClient) abortLatestOperationCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -124,7 +124,7 @@ func (client *ManagedClustersClient) abortLatestOperationCreateRequest(ctx conte // BeginCreateOrUpdate - Creates or updates a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-07-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. @@ -146,7 +146,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-05-01 +// Generated from API version 2023-07-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" @@ -188,7 +188,7 @@ func (client *ManagedClustersClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -200,7 +200,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-05-01 +// Generated from API version 2023-07-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 @@ -221,7 +221,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-05-01 +// Generated from API version 2023-07-01 func (client *ManagedClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginDeleteOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginDelete" @@ -263,7 +263,7 @@ func (client *ManagedClustersClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -272,7 +272,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-05-01 +// Generated from API version 2023-07-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. @@ -318,7 +318,7 @@ func (client *ManagedClustersClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -338,7 +338,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-05-01 +// Generated from API version 2023-07-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. @@ -390,7 +390,7 @@ func (client *ManagedClustersClient) getAccessProfileCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -408,7 +408,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-05-01 +// Generated from API version 2023-07-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. @@ -460,7 +460,7 @@ func (client *ManagedClustersClient) getCommandResultCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -481,7 +481,7 @@ func (client *ManagedClustersClient) getCommandResultHandleResponse(resp *http.R // GetOSOptions - Gets supported OS options in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-07-01 // - location - The name of Azure region. // - options - ManagedClustersClientGetOSOptionsOptions contains the optional parameters for the ManagedClustersClient.GetOSOptions // method. @@ -523,7 +523,7 @@ func (client *ManagedClustersClient) getOSOptionsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") if options != nil && options.ResourceType != nil { reqQP.Set("resource-type", *options.ResourceType) } @@ -544,7 +544,7 @@ func (client *ManagedClustersClient) getOSOptionsHandleResponse(resp *http.Respo // GetUpgradeProfile - Gets the upgrade profile of a managed cluster. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-07-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 @@ -591,7 +591,7 @@ func (client *ManagedClustersClient) getUpgradeProfileCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -608,7 +608,7 @@ func (client *ManagedClustersClient) getUpgradeProfileHandleResponse(resp *http. // NewListPager - Gets a list of managed clusters in the specified subscription. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-07-01 // - options - ManagedClustersClientListOptions contains the optional parameters for the ManagedClustersClient.NewListPager // method. func (client *ManagedClustersClient) NewListPager(options *ManagedClustersClientListOptions) *runtime.Pager[ManagedClustersClientListResponse] { @@ -653,7 +653,7 @@ func (client *ManagedClustersClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -670,7 +670,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-05-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ManagedClustersClientListByResourceGroupOptions contains the optional parameters for the ManagedClustersClient.NewListByResourceGroupPager // method. @@ -720,7 +720,7 @@ func (client *ManagedClustersClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -738,7 +738,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-05-01 +// Generated from API version 2023-07-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 @@ -785,7 +785,7 @@ func (client *ManagedClustersClient) listClusterAdminCredentialsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -806,7 +806,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-05-01 +// Generated from API version 2023-07-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 @@ -853,7 +853,7 @@ func (client *ManagedClustersClient) listClusterMonitoringUserCredentialsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -874,7 +874,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-05-01 +// Generated from API version 2023-07-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 @@ -921,7 +921,7 @@ func (client *ManagedClustersClient) listClusterUserCredentialsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -946,7 +946,7 @@ func (client *ManagedClustersClient) listClusterUserCredentialsHandleResponse(re // upgrades, and details on preview status of the version // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-07-01 // - location - The name of Azure region. // - options - ManagedClustersClientListKubernetesVersionsOptions contains the optional parameters for the ManagedClustersClient.ListKubernetesVersions // method. @@ -988,7 +988,7 @@ func (client *ManagedClustersClient) listKubernetesVersionsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1006,7 +1006,7 @@ func (client *ManagedClustersClient) listKubernetesVersionsHandleResponse(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-05-01 +// Generated from API version 2023-07-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 @@ -1061,7 +1061,7 @@ func (client *ManagedClustersClient) listOutboundNetworkDependenciesEndpointsCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1080,7 +1080,7 @@ func (client *ManagedClustersClient) listOutboundNetworkDependenciesEndpointsHan // [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-05-01 +// Generated from API version 2023-07-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 @@ -1105,7 +1105,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-05-01 +// Generated from API version 2023-07-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" @@ -1147,7 +1147,7 @@ func (client *ManagedClustersClient) resetAADProfileCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1159,7 +1159,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-05-01 +// Generated from API version 2023-07-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. @@ -1183,7 +1183,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-05-01 +// Generated from API version 2023-07-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" @@ -1225,7 +1225,7 @@ func (client *ManagedClustersClient) resetServicePrincipalProfileCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1238,7 +1238,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-05-01 +// Generated from API version 2023-07-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 @@ -1262,7 +1262,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-05-01 +// Generated from API version 2023-07-01 func (client *ManagedClustersClient) rotateClusterCertificates(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginRotateClusterCertificatesOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginRotateClusterCertificates" @@ -1304,7 +1304,7 @@ func (client *ManagedClustersClient) rotateClusterCertificatesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1313,7 +1313,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-05-01 +// Generated from API version 2023-07-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 @@ -1336,7 +1336,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-05-01 +// Generated from API version 2023-07-01 func (client *ManagedClustersClient) rotateServiceAccountSigningKeys(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginRotateServiceAccountSigningKeysOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginRotateServiceAccountSigningKeys" @@ -1378,7 +1378,7 @@ func (client *ManagedClustersClient) rotateServiceAccountSigningKeysCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1389,7 +1389,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-05-01 +// Generated from API version 2023-07-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 @@ -1415,7 +1415,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-05-01 +// Generated from API version 2023-07-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" @@ -1457,7 +1457,7 @@ func (client *ManagedClustersClient) runCommandCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, requestPayload); err != nil { @@ -1470,7 +1470,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-05-01 +// Generated from API version 2023-07-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 @@ -1494,7 +1494,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-05-01 +// Generated from API version 2023-07-01 func (client *ManagedClustersClient) start(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginStartOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginStart" @@ -1536,7 +1536,7 @@ func (client *ManagedClustersClient) startCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1548,7 +1548,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-05-01 +// Generated from API version 2023-07-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 @@ -1574,7 +1574,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-05-01 +// Generated from API version 2023-07-01 func (client *ManagedClustersClient) stop(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginStopOptions) (*http.Response, error) { var err error const operationName = "ManagedClustersClient.BeginStop" @@ -1616,7 +1616,7 @@ func (client *ManagedClustersClient) stopCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1625,7 +1625,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-05-01 +// Generated from API version 2023-07-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. @@ -1647,7 +1647,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-05-01 +// Generated from API version 2023-07-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" @@ -1689,7 +1689,7 @@ func (client *ManagedClustersClient) updateTagsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-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 deleted file mode 100644 index 19a31df15cea..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go +++ /dev/null @@ -1,5380 +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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ContainerServiceGetOSOptions.json -func ExampleManagedClustersClient_GetOSOptions() { - 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().GetOSOptions(ctx, "location1", &armcontainerservice.ManagedClustersClientGetOSOptionsOptions{ResourceType: 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.OSOptionProfile = armcontainerservice.OSOptionProfile{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.ContainerService/locations/osOptions"), - // ID: to.Ptr("/subscriptions/subid1/providers/Microsoft.ContainerService/locations/location1/osOptions/default"), - // Properties: &armcontainerservice.OSOptionPropertyList{ - // OSOptionPropertyList: []*armcontainerservice.OSOptionProperty{ - // { - // EnableFipsImage: to.Ptr(false), - // OSType: to.Ptr("Linux"), - // }, - // { - // EnableFipsImage: to.Ptr(false), - // OSType: to.Ptr("Windows"), - // }}, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/KubernetesVersions_List.json -func ExampleManagedClustersClient_ListKubernetesVersions() { - 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().ListKubernetesVersions(ctx, "location1", 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.KubernetesVersionListResult = armcontainerservice.KubernetesVersionListResult{ - // Values: []*armcontainerservice.KubernetesVersion{ - // { - // Capabilities: &armcontainerservice.KubernetesVersionCapabilities{ - // SupportPlan: []*armcontainerservice.KubernetesSupportPlan{ - // to.Ptr(armcontainerservice.KubernetesSupportPlanKubernetesOfficial)}, - // }, - // PatchVersions: map[string]*armcontainerservice.KubernetesPatchVersion{ - // "1.23.12": &armcontainerservice.KubernetesPatchVersion{ - // Upgrades: []*string{ - // to.Ptr("1.23.15"), - // to.Ptr("1.24.6"), - // to.Ptr("1.24.9")}, - // }, - // "1.23.15": &armcontainerservice.KubernetesPatchVersion{ - // Upgrades: []*string{ - // to.Ptr("1.24.6"), - // to.Ptr("1.24.9")}, - // }, - // }, - // Version: to.Ptr("1.23"), - // }, - // { - // Capabilities: &armcontainerservice.KubernetesVersionCapabilities{ - // SupportPlan: []*armcontainerservice.KubernetesSupportPlan{ - // to.Ptr(armcontainerservice.KubernetesSupportPlanKubernetesOfficial)}, - // }, - // PatchVersions: map[string]*armcontainerservice.KubernetesPatchVersion{ - // "1.24.6": &armcontainerservice.KubernetesPatchVersion{ - // Upgrades: []*string{ - // to.Ptr("1.24.9"), - // to.Ptr("1.25.4"), - // to.Ptr("1.25.5")}, - // }, - // "1.24.9": &armcontainerservice.KubernetesPatchVersion{ - // Upgrades: []*string{ - // to.Ptr("1.25.4"), - // to.Ptr("1.25.5")}, - // }, - // }, - // Version: to.Ptr("1.24"), - // }, - // { - // Capabilities: &armcontainerservice.KubernetesVersionCapabilities{ - // SupportPlan: []*armcontainerservice.KubernetesSupportPlan{ - // to.Ptr(armcontainerservice.KubernetesSupportPlanKubernetesOfficial)}, - // }, - // PatchVersions: map[string]*armcontainerservice.KubernetesPatchVersion{ - // "1.25.4": &armcontainerservice.KubernetesPatchVersion{ - // Upgrades: []*string{ - // to.Ptr("1.25.5"), - // to.Ptr("1.26.0")}, - // }, - // "1.25.5": &armcontainerservice.KubernetesPatchVersion{ - // Upgrades: []*string{ - // to.Ptr("1.26.0")}, - // }, - // }, - // Version: to.Ptr("1.25"), - // }, - // { - // Capabilities: &armcontainerservice.KubernetesVersionCapabilities{ - // SupportPlan: []*armcontainerservice.KubernetesSupportPlan{ - // to.Ptr(armcontainerservice.KubernetesSupportPlanKubernetesOfficial)}, - // }, - // PatchVersions: map[string]*armcontainerservice.KubernetesPatchVersion{ - // "1.26.0": &armcontainerservice.KubernetesPatchVersion{ - // Upgrades: []*string{ - // }, - // }, - // }, - // Version: to.Ptr("1.26"), - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersList.json -func ExampleManagedClustersClient_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.NewManagedClustersClient().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.ManagedClusterListResult = armcontainerservice.ManagedClusterListResult{ - // Value: []*armcontainerservice.ManagedCluster{ - // { - // Name: to.Ptr("clustername1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), - // ID: to.Ptr("/subscriptions/subid1/providers/Microsoft.ContainerService/managedClusters"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // 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_DS1_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableRBAC: to.Ptr(false), - // 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"), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // PodCidr: to.Ptr("10.244.0.0/16"), - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersListByResourceGroup.json -func ExampleManagedClustersClient_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.NewManagedClustersClient().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.ManagedClusterListResult = armcontainerservice.ManagedClusterListResult{ - // Value: []*armcontainerservice.ManagedCluster{ - // { - // Name: to.Ptr("clustername1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // 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_DS1_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableRBAC: to.Ptr(false), - // 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"), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // PodCidr: to.Ptr("10.244.0.0/16"), - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersGetUpgradeProfile.json -func ExampleManagedClustersClient_GetUpgradeProfile() { - 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().GetUpgradeProfile(ctx, "rg1", "clustername1", 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.ManagedClusterUpgradeProfile = armcontainerservice.ManagedClusterUpgradeProfile{ - // Name: to.Ptr("default"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/upgradeprofiles"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/upgradeprofiles/default"), - // Properties: &armcontainerservice.ManagedClusterUpgradeProfileProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterPoolUpgradeProfile{ - // { - // Name: to.Ptr("agent"), - // KubernetesVersion: to.Ptr("1.7.7"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // Upgrades: []*armcontainerservice.ManagedClusterPoolUpgradeProfileUpgradesItem{ - // { - // KubernetesVersion: to.Ptr("1.7.9"), - // }, - // { - // IsPreview: to.Ptr(true), - // KubernetesVersion: to.Ptr("1.7.11"), - // }}, - // }}, - // ControlPlaneProfile: &armcontainerservice.ManagedClusterPoolUpgradeProfile{ - // Name: to.Ptr("master"), - // KubernetesVersion: to.Ptr("1.7.7"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // Upgrades: []*armcontainerservice.ManagedClusterPoolUpgradeProfileUpgradesItem{ - // { - // IsPreview: to.Ptr(true), - // KubernetesVersion: to.Ptr("1.7.9"), - // }, - // { - // KubernetesVersion: to.Ptr("1.7.11"), - // }}, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersGetAccessProfile.json -func ExampleManagedClustersClient_GetAccessProfile() { - 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().GetAccessProfile(ctx, "rg1", "clustername1", "clusterUser", 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.ManagedClusterAccessProfile = armcontainerservice.ManagedClusterAccessProfile{ - // Name: to.Ptr("clusterUser"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters/AccessProfiles"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/accessProfiles/clusterUser"), - // Location: to.Ptr("location1"), - // Properties: &armcontainerservice.AccessProfile{ - // KubeConfig: []byte("a3ViZUNvbmZpZzE="), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersListClusterAdminCredentials.json -func ExampleManagedClustersClient_ListClusterAdminCredentials() { - 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().ListClusterAdminCredentials(ctx, "rg1", "clustername1", &armcontainerservice.ManagedClustersClientListClusterAdminCredentialsOptions{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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersGet.json -func ExampleManagedClustersClient_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.NewManagedClustersClient().Get(ctx, "rg1", "clustername1", 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.ManagedCluster = armcontainerservice.ManagedCluster{ - // Name: to.Ptr("clustername1"), - // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), - // ID: to.Ptr("/subscriptions/subid1/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{ - // { - // AvailabilityZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // MaxPods: to.Ptr[int32](110), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // UpgradeSettings: &armcontainerservice.AgentPoolUpgradeSettings{ - // MaxSurge: to.Ptr("33%"), - // }, - // VMSize: to.Ptr("Standard_DS1_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // AzurePortalFQDN: to.Ptr("dnsprefix1-abcd1234.portal.hcp.eastus.azmk8s.io"), - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableRBAC: to.Ptr(false), - // 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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // OutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileOutboundIPs{ - // PublicIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/customeroutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/customeroutboundip2"), - // }}, - // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - // 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-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) - } - 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/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - }, - EnableFIPS: to.Ptr(true), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/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/subid1/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"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_ManagedNATGateway.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAksManagedNatGatewayAsOutboundType() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(false), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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{ - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - NatGatewayProfile: &armcontainerservice.ManagedClusterNATGatewayProfile{ - ManagedOutboundIPProfile: &armcontainerservice.ManagedClusterManagedOutboundIPProfile{ - Count: to.Ptr[int32](2), - }, - }, - OutboundType: to.Ptr(armcontainerservice.OutboundTypeManagedNATGateway), - }, - ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - ClientID: to.Ptr("clientid"), - Secret: to.Ptr("secret"), - }, - WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - AdminPassword: to.Ptr("replacePassword1234$"), - AdminUsername: to.Ptr("azureuser"), - }, - }, - SKU: &armcontainerservice.ManagedClusterSKU{ - Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), - Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), - }, - }, 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableNodePublicIP: to.Ptr(false), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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"), - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NatGatewayProfile: &armcontainerservice.ManagedClusterNATGatewayProfile{ - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](4), - // ManagedOutboundIPProfile: &armcontainerservice.ManagedClusterManagedOutboundIPProfile{ - // Count: to.Ptr[int32](2), - // }, - // }, - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeManagedNATGateway), - // PodCidr: to.Ptr("10.244.0.0/16"), - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{ - "azureKeyvaultSecretsProvider": { - Config: map[string]*string{ - "enableSecretRotation": to.Ptr("true"), - "rotationPollInterval": to.Ptr("2m"), - }, - Enabled: to.Ptr(true), - }, - }, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{ - // "azureKeyvaultSecretsProvider": &armcontainerservice.ManagedClusterAddonProfile{ - // Config: map[string]*string{ - // "enableSecretRotation": to.Ptr("true"), - // "rotationPollInterval": to.Ptr("2m"), - // }, - // Enabled: to.Ptr(true), - // }, - // }, - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // Count: to.Ptr[int32](3), - // 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"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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"), - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), - // }, - // }, - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), - // PodCidr: to.Ptr("10.244.0.0/16"), - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_DedicatedHostGroup.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDedicatedHostGroup() { - 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), - HostGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"), - 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/subid1/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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // Count: to.Ptr[int32](3), - // EnableNodePublicIP: to.Ptr(true), - // HostGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"), - // MaxPods: to.Ptr[int32](110), - // 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/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_EnableEncryptionAtHost.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithEncryptionAtHostEnabled() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableEncryptionAtHost: to.Ptr(true), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/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"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_EnabledFIPS.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithFipsEnabledOs() { - 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), - EnableFIPS: to.Ptr(true), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/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"), - // 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"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_GPUMIG.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithGpumig() { - 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), - GpuInstanceProfile: to.Ptr(armcontainerservice.GPUInstanceProfileMIG3G), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_ND96asr_v4"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - DNSPrefix: to.Ptr("dnsprefix1"), - EnablePodSecurityPolicy: to.Ptr(true), - EnableRBAC: to.Ptr(true), - HTTPProxyConfig: &armcontainerservice.ManagedClusterHTTPProxyConfig{ - HTTPProxy: to.Ptr("http://myproxy.server.com:8080"), - HTTPSProxy: to.Ptr("https://myproxy.server.com:8080"), - NoProxy: []*string{ - to.Ptr("localhost"), - to.Ptr("127.0.0.1")}, - TrustedCa: to.Ptr("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U="), - }, - 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/subid1/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), - // GpuInstanceProfile: to.Ptr(armcontainerservice.GPUInstanceProfileMIG3G), - // 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_ND96asr_v4"), - // Name: to.Ptr("nodepool1"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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"), - // HTTPProxyConfig: &armcontainerservice.ManagedClusterHTTPProxyConfig{ - // HTTPProxy: to.Ptr("http://myproxy.server.com:8080"), - // HTTPSProxy: to.Ptr("https://myproxy.server.com:8080"), - // NoProxy: []*string{ - // to.Ptr("localhost"), - // to.Ptr("127.0.0.1")}, - // TrustedCa: to.Ptr("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U="), - // }, - // 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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_HTTPProxy.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithHttpProxyConfigured() { - 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"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - DNSPrefix: to.Ptr("dnsprefix1"), - EnablePodSecurityPolicy: to.Ptr(true), - EnableRBAC: to.Ptr(true), - HTTPProxyConfig: &armcontainerservice.ManagedClusterHTTPProxyConfig{ - HTTPProxy: to.Ptr("http://myproxy.server.com:8080"), - HTTPSProxy: to.Ptr("https://myproxy.server.com:8080"), - NoProxy: []*string{ - to.Ptr("localhost"), - to.Ptr("127.0.0.1")}, - TrustedCa: to.Ptr("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U="), - }, - 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/subid1/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"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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"), - // HTTPProxyConfig: &armcontainerservice.ManagedClusterHTTPProxyConfig{ - // HTTPProxy: to.Ptr("http://myproxy.server.com:8080"), - // HTTPSProxy: to.Ptr("https://myproxy.server.com:8080"), - // NoProxy: []*string{ - // to.Ptr("localhost"), - // to.Ptr("127.0.0.1")}, - // TrustedCa: to.Ptr("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U="), - // }, - // 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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_Premium.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithLongTermSupport() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableEncryptionAtHost: to.Ptr(true), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - APIServerAccessProfile: &armcontainerservice.ManagedClusterAPIServerAccessProfile{ - DisableRunCommand: to.Ptr(true), - }, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DNSPrefix: to.Ptr("dnsprefix1"), - 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/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_NodePublicIPPrefix.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNodePublicIpPrefix() { - 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), - NodePublicIPPrefixID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix"), - 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/subid1/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/subid1/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"), - // NodePublicIPPrefixID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix"), - // 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"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_OSSKU.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithOssku() { - 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), - OSSKU: to.Ptr(armcontainerservice.OSSKUAzureLinux), - 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/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - DNSPrefix: to.Ptr("dnsprefix1"), - EnablePodSecurityPolicy: to.Ptr(true), - EnableRBAC: to.Ptr(true), - HTTPProxyConfig: &armcontainerservice.ManagedClusterHTTPProxyConfig{ - HTTPProxy: to.Ptr("http://myproxy.server.com:8080"), - HTTPSProxy: to.Ptr("https://myproxy.server.com:8080"), - NoProxy: []*string{ - to.Ptr("localhost"), - to.Ptr("127.0.0.1")}, - TrustedCa: to.Ptr("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U="), - }, - 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/subid1/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"), - // OSSKU: to.Ptr(armcontainerservice.OSSKUAzureLinux), - // 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"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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"), - // HTTPProxyConfig: &armcontainerservice.ManagedClusterHTTPProxyConfig{ - // HTTPProxy: to.Ptr("http://myproxy.server.com:8080"), - // HTTPSProxy: to.Ptr("https://myproxy.server.com:8080"), - // NoProxy: []*string{ - // to.Ptr("localhost"), - // to.Ptr("127.0.0.1")}, - // TrustedCa: to.Ptr("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U="), - // }, - // 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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_PPG.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPpg() { - 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), - ProximityPlacementGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"), - 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/subid1/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/subid1/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"), - // ProximityPlacementGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_PodIdentity.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPodIdentityEnabled() { - 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"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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), - }, - PodIdentityProfile: &armcontainerservice.ManagedClusterPodIdentityProfile{ - AllowNetworkPluginKubenet: to.Ptr(true), - Enabled: to.Ptr(true), - }, - 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/subid1/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"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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"), - // PodIdentityProfile: &armcontainerservice.ManagedClusterPodIdentityProfile{ - // AllowNetworkPluginKubenet: to.Ptr(true), - // Enabled: to.Ptr(true), - // }, - // 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_DisableRunCommand.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithRunCommandDisabled() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableEncryptionAtHost: to.Ptr(true), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - APIServerAccessProfile: &armcontainerservice.ManagedClusterAPIServerAccessProfile{ - DisableRunCommand: to.Ptr(true), - }, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DNSPrefix: to.Ptr("dnsprefix1"), - 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/subid1/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"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // 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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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.KubernetesSupportPlanKubernetesOfficial), - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_SecurityProfile.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithSecurityProfileConfigured() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - DNSPrefix: to.Ptr("dnsprefix1"), - 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), - }, - }, - WorkloadIdentity: &armcontainerservice.ManagedClusterSecurityProfileWorkloadIdentity{ - 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/subid1/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"), - // }}, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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), - // }, - // }, - // WorkloadIdentity: &armcontainerservice.ManagedClusterSecurityProfileWorkloadIdentity{ - // 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-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) - } - 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/subid1/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/subid1/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), - // EnableUltraSSD: 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"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(false), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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{ - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - OutboundType: to.Ptr(armcontainerservice.OutboundTypeUserAssignedNATGateway), - }, - 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv2": to.Ptr(""), - // "tier": to.Ptr("production"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableNodePublicIP: to.Ptr(false), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS2_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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"), - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // OutboundType: to.Ptr(armcontainerservice.OutboundTypeUserAssignedNATGateway), - // PodCidr: to.Ptr("10.244.0.0/16"), - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateClusterWithPublicFqdnSpecified() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableEncryptionAtHost: to.Ptr(true), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - APIServerAccessProfile: &armcontainerservice.ManagedClusterAPIServerAccessProfile{ - EnablePrivateCluster: to.Ptr(true), - EnablePrivateClusterPublicFQDN: 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"), - }, - 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/subid1/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{ - // EnablePrivateCluster: to.Ptr(true), - // EnablePrivateClusterPublicFQDN: to.Ptr(true), - // PrivateDNSZone: to.Ptr("system"), - // }, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // 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), - // 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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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"), - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateClusterWithFqdnSubdomainSpecified() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ - Location: to.Ptr("location1"), - Tags: map[string]*string{ - "archv2": to.Ptr(""), - "tier": to.Ptr("production"), - }, - Properties: &armcontainerservice.ManagedClusterProperties{ - AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, - AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableEncryptionAtHost: to.Ptr(true), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), - }}, - APIServerAccessProfile: &armcontainerservice.ManagedClusterAPIServerAccessProfile{ - EnablePrivateCluster: to.Ptr(true), - PrivateDNSZone: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io"), - }, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - }, - EnablePodSecurityPolicy: to.Ptr(true), - EnableRBAC: to.Ptr(true), - FqdnSubdomain: to.Ptr("domain1"), - 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/subid1/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{ - // EnablePrivateCluster: to.Ptr(true), - // PrivateDNSZone: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io"), - // }, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // 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"), - // 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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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("domain1.privatelink.location1.azmk8s.io"), - // 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClusterWithEnableAzureRbac() { - 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{ - AADProfile: &armcontainerservice.ManagedClusterAADProfile{ - EnableAzureRBAC: to.Ptr(true), - Managed: to.Ptr(true), - }, - 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/subid1/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/subid1/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{ - // AADProfile: &armcontainerservice.ManagedClusterAADProfile{ - // EnableAzureRBAC: to.Ptr(true), - // Managed: to.Ptr(true), - // TenantID: to.Ptr("tenantID"), - // }, - // 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"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_Update.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster() { - 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/subid1/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), - ScaleDownMode: to.Ptr(armcontainerservice.ScaleDownModeDeallocate), - VMSize: to.Ptr("Standard_DS1_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - BalanceSimilarNodeGroups: to.Ptr("true"), - Expander: to.Ptr(armcontainerservice.ExpanderPriority), - MaxNodeProvisionTime: to.Ptr("15m"), - NewPodScaleUpDelay: to.Ptr("1m"), - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - SkipNodesWithSystemPods: to.Ptr("false"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/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/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // }, - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // AvailabilityZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableNodePublicIP: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // ScaleDownMode: to.Ptr(armcontainerservice.ScaleDownModeDeallocate), - // VMSize: to.Ptr("Standard_DS1_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // BalanceSimilarNodeGroups: to.Ptr("true"), - // Expander: to.Ptr(armcontainerservice.ExpanderPriority), - // MaxNodeProvisionTime: to.Ptr("15m"), - // NewPodScaleUpDelay: to.Ptr("1m"), - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // SkipNodesWithSystemPods: to.Ptr("false"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-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) - } - 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/subid1/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/subid1/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/subid1/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/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // }, - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // AvailabilityZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableNodePublicIP: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS1_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithWindowsGMsaEnabled() { - 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/subid1/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/subid1/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"), - GmsaProfile: &armcontainerservice.WindowsGmsaProfile{ - 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/subid1/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/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // }, - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // AvailabilityZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableNodePublicIP: to.Ptr(true), - // MaxPods: to.Ptr[int32](110), - // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), - // OrchestratorVersion: to.Ptr("1.9.6"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // VMSize: to.Ptr("Standard_DS1_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/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"), - // GmsaProfile: &armcontainerservice.WindowsGmsaProfile{ - // Enabled: to.Ptr(true), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersCreate_DualStackNetworking.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithDualStackNetworking() { - 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/subid1/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), - ScaleDownMode: to.Ptr(armcontainerservice.ScaleDownModeDeallocate), - VMSize: to.Ptr("Standard_DS1_v2"), - Name: to.Ptr("nodepool1"), - }}, - AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - BalanceSimilarNodeGroups: to.Ptr("true"), - Expander: to.Ptr(armcontainerservice.ExpanderPriority), - MaxNodeProvisionTime: to.Ptr("15m"), - NewPodScaleUpDelay: to.Ptr("1m"), - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), - SkipNodesWithSystemPods: to.Ptr("false"), - }, - DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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{ - IPFamilies: []*armcontainerservice.IPFamily{ - to.Ptr(armcontainerservice.IPFamilyIPv4), - to.Ptr(armcontainerservice.IPFamilyIPv6)}, - 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/subid1/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/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // }, - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - // AvailabilityZones: []*string{ - // to.Ptr("1"), - // to.Ptr("2"), - // to.Ptr("3")}, - // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.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.22.1"), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // ProvisioningState: to.Ptr("Succeeded"), - // ScaleDownMode: to.Ptr(armcontainerservice.ScaleDownModeDeallocate), - // VMSize: to.Ptr("Standard_DS1_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - // BalanceSimilarNodeGroups: to.Ptr("true"), - // Expander: to.Ptr(armcontainerservice.ExpanderPriority), - // MaxNodeProvisionTime: to.Ptr("15m"), - // NewPodScaleUpDelay: to.Ptr("1m"), - // ScaleDownDelayAfterAdd: to.Ptr("15m"), - // ScanInterval: to.Ptr("20s"), - // SkipNodesWithSystemPods: to.Ptr("false"), - // }, - // CurrentKubernetesVersion: to.Ptr("1.22.1"), - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/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.22.1"), - // 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), - // to.Ptr(armcontainerservice.IPFamilyIPv6)}, - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), - // }, - // { - // ID: to.Ptr("/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip3-ipv6"), - // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](10), - // ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ - // Count: to.Ptr[int32](2), - // CountIPv6: to.Ptr[int32](1), - // }, - // }, - // 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"), - // to.Ptr("fd11:1234::/64")}, - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // ServiceCidrs: []*string{ - // to.Ptr("10.0.0.0/16"), - // to.Ptr("fd00:1234::/108")}, - // }, - // 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersUpdateTags.json -func ExampleManagedClustersClient_BeginUpdateTags() { - 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().BeginUpdateTags(ctx, "rg1", "clustername1", armcontainerservice.TagsObject{ - Tags: map[string]*string{ - "archv3": to.Ptr(""), - "tier": to.Ptr("testing"), - }, - }, 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/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1"), - // Location: to.Ptr("location1"), - // Tags: map[string]*string{ - // "archv3": to.Ptr(""), - // "tier": to.Ptr("testing"), - // }, - // Properties: &armcontainerservice.ManagedClusterProperties{ - // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ - // { - // 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_DS1_v2"), - // Name: to.Ptr("nodepool1"), - // }}, - // DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - // DNSPrefix: to.Ptr("dnsprefix1"), - // EnableRBAC: to.Ptr(false), - // 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"), - // }}, - // }, - // }, - // NetworkProfile: &armcontainerservice.NetworkProfile{ - // DNSServiceIP: to.Ptr("10.0.0.10"), - // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), - // PodCidr: to.Ptr("10.244.0.0/16"), - // ServiceCidr: to.Ptr("10.0.0.0/16"), - // }, - // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), - // ProvisioningState: to.Ptr("Succeeded"), - // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ - // ClientID: to.Ptr("clientid"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersDelete.json -func ExampleManagedClustersClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewManagedClustersClient().BeginDelete(ctx, "rg1", "clustername1", 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersResetServicePrincipalProfile.json -func ExampleManagedClustersClient_BeginResetServicePrincipalProfile() { - 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().BeginResetServicePrincipalProfile(ctx, "rg1", "clustername1", armcontainerservice.ManagedClusterServicePrincipalProfile{ - ClientID: to.Ptr("clientid"), - Secret: to.Ptr("secret"), - }, 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersResetAADProfile.json -func ExampleManagedClustersClient_BeginResetAADProfile() { - 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().BeginResetAADProfile(ctx, "rg1", "clustername1", armcontainerservice.ManagedClusterAADProfile{ - ClientAppID: to.Ptr("clientappid"), - ServerAppID: to.Ptr("serverappid"), - ServerAppSecret: to.Ptr("serverappsecret"), - TenantID: to.Ptr("tenantid"), - }, 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersRotateClusterCertificates.json -func ExampleManagedClustersClient_BeginRotateClusterCertificates() { - 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().BeginRotateClusterCertificates(ctx, "rg1", "clustername1", 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersAbortOperation.json -func ExampleManagedClustersClient_BeginAbortLatestOperation() { - 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().BeginAbortLatestOperation(ctx, "rg1", "clustername1", 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json -func ExampleManagedClustersClient_BeginRotateServiceAccountSigningKeys() { - 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().BeginRotateServiceAccountSigningKeys(ctx, "rg1", "clustername1", 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersStop.json -func ExampleManagedClustersClient_BeginStop() { - 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().BeginStop(ctx, "rg1", "clustername1", 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ManagedClustersStart.json -func ExampleManagedClustersClient_BeginStart() { - 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().BeginStart(ctx, "rg1", "clustername1", 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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/RunCommandRequest.json -func ExampleManagedClustersClient_BeginRunCommand() { - 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().BeginRunCommand(ctx, "rg1", "clustername1", armcontainerservice.RunCommandRequest{ - ClusterToken: to.Ptr(""), - Command: to.Ptr("kubectl apply -f ns.yaml"), - Context: to.Ptr(""), - }, 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.RunCommandResult = armcontainerservice.RunCommandResult{ - // ID: to.Ptr("def7b3ea71bd4f7e9d226ddbc0f00ad9"), - // Properties: &armcontainerservice.CommandResultProperties{ - // ExitCode: to.Ptr[int32](0), - // FinishedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-02-17T00:28:33Z"); return t}()), - // Logs: to.Ptr("namespace dummy created"), - // ProvisioningState: to.Ptr("Succeeded"), - // StartedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-02-17T00:28:20Z"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/RunCommandResultFailed.json -func ExampleManagedClustersClient_GetCommandResult_commandFailedResult() { - 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().GetCommandResult(ctx, "rg1", "clustername1", "def7b3ea71bd4f7e9d226ddbc0f00ad9", 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.RunCommandResult = armcontainerservice.RunCommandResult{ - // ID: to.Ptr("def7b3ea71bd4f7e9d226ddbc0f00ad9"), - // Properties: &armcontainerservice.CommandResultProperties{ - // ProvisioningState: to.Ptr("Succeeded"), - // Reason: to.Ptr("ImagePullBackoff"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/RunCommandResultSucceed.json -func ExampleManagedClustersClient_GetCommandResult_commandSucceedResult() { - 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().GetCommandResult(ctx, "rg1", "clustername1", "def7b3ea71bd4f7e9d226ddbc0f00ad9", 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.RunCommandResult = armcontainerservice.RunCommandResult{ - // ID: to.Ptr("def7b3ea71bd4f7e9d226ddbc0f00ad9"), - // Properties: &armcontainerservice.CommandResultProperties{ - // ExitCode: to.Ptr[int32](0), - // FinishedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-02-17T00:28:33Z"); return t}()), - // Logs: to.Ptr("namespace dummy created"), - // ProvisioningState: to.Ptr("Succeeded"), - // StartedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-02-17T00:28:20Z"); return t}()), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/OutboundNetworkDependenciesEndpointsList.json -func ExampleManagedClustersClient_NewListOutboundNetworkDependenciesEndpointsPager() { - 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().NewListOutboundNetworkDependenciesEndpointsPager("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.OutboundEnvironmentEndpointCollection = armcontainerservice.OutboundEnvironmentEndpointCollection{ - // Value: []*armcontainerservice.OutboundEnvironmentEndpoint{ - // { - // Category: to.Ptr("azure-resource-management"), - // Endpoints: []*armcontainerservice.EndpointDependency{ - // { - // DomainName: to.Ptr("management.azure.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }, - // { - // DomainName: to.Ptr("login.microsoftonline.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("images"), - // Endpoints: []*armcontainerservice.EndpointDependency{ - // { - // DomainName: to.Ptr("mcr.microsoft.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }, - // { - // DomainName: to.Ptr("*.data.mcr.microsoft.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Description: to.Ptr("mcr cdn"), - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("artifacts"), - // Endpoints: []*armcontainerservice.EndpointDependency{ - // { - // DomainName: to.Ptr("packages.microsoft.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }, - // { - // DomainName: to.Ptr("acs-mirror.azureedge.net"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("time-sync"), - // Endpoints: []*armcontainerservice.EndpointDependency{ - // { - // DomainName: to.Ptr("ntp.ubuntu.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](123), - // Protocol: to.Ptr("UDP"), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("ubuntu-optional"), - // Endpoints: []*armcontainerservice.EndpointDependency{ - // { - // DomainName: to.Ptr("security.ubuntu.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](80), - // Protocol: to.Ptr("Http"), - // }}, - // }, - // { - // DomainName: to.Ptr("azure.archive.ubuntu.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](80), - // Protocol: to.Ptr("Http"), - // }}, - // }, - // { - // DomainName: to.Ptr("changelogs.ubuntu.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](80), - // Protocol: to.Ptr("Http"), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("gpu"), - // Endpoints: []*armcontainerservice.EndpointDependency{ - // { - // DomainName: to.Ptr("nvidia.github.io"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }, - // { - // DomainName: to.Ptr("us.download.nvidia.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }, - // { - // DomainName: to.Ptr("apt.dockerproject.org"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("windows"), - // Endpoints: []*armcontainerservice.EndpointDependency{ - // { - // DomainName: to.Ptr("onegetcdn.azureedge.net"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }, - // { - // DomainName: to.Ptr("go.microsoft.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }, - // { - // DomainName: to.Ptr("*.mp.microsoft.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](80), - // Protocol: to.Ptr("Http"), - // }}, - // }, - // { - // DomainName: to.Ptr("www.msftconnecttest.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](80), - // Protocol: to.Ptr("Http"), - // }}, - // }, - // { - // DomainName: to.Ptr("ctldl.windowsupdate.com"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](80), - // Protocol: to.Ptr("Http"), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("apiserver"), - // Endpoints: []*armcontainerservice.EndpointDependency{ - // { - // DomainName: to.Ptr("*.azmk8s.io"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](443), - // Protocol: to.Ptr("Https"), - // }}, - // }}, - // }, - // { - // Category: to.Ptr("tunnel-classic"), - // Endpoints: []*armcontainerservice.EndpointDependency{ - // { - // DomainName: to.Ptr("*.azmk8s.io"), - // EndpointDetails: []*armcontainerservice.EndpointDetail{ - // { - // Port: to.Ptr[int32](9000), - // Protocol: to.Ptr("TCP"), - // }}, - // }}, - // }}, - // } - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/models.go b/sdk/resourcemanager/containerservice/armcontainerservice/models.go index 433fc9fa86ae..4c7940a3bec5 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/models.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/models.go @@ -121,6 +121,11 @@ type AgentPoolUpgradeProfilePropertiesUpgradesItem struct { // AgentPoolUpgradeSettings - Settings for upgrading an agentpool type AgentPoolUpgradeSettings struct { + // The amount of time (in minutes) to wait on eviction of pods and graceful termination per node. This eviction wait time + // honors waiting on pod disruption budgets. If this time is exceeded, the upgrade + // fails. If not specified, the default is 30 minutes. + DrainTimeoutInMinutes *int32 + // This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage // of the total agent pool size at the time of the upgrade. For // percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best @@ -150,6 +155,12 @@ type AzureKeyVaultKms struct { KeyVaultResourceID *string } +// ClusterUpgradeSettings - Settings for upgrading a cluster. +type ClusterUpgradeSettings struct { + // Settings for overrides. + OverrideSettings *UpgradeOverrideSettings +} + // CommandResultProperties - The results of a run command type CommandResultProperties struct { // READ-ONLY; The exit code of the command @@ -207,6 +218,21 @@ type DateSpan struct { Start *time.Time } +// DelegatedResource - Delegated resource properties - internal use only. +type DelegatedResource struct { + // The source resource location - internal use only. + Location *string + + // The delegation id of the referral delegation (optional) - internal use only. + ReferralResource *string + + // The ARM resource id of the delegated resource - internal use only. + ResourceID *string + + // The tenant id of the delegated resource - internal use only. + TenantID *string +} + // EndpointDependency - A domain name that AKS agent nodes are reaching at. type EndpointDependency struct { // The domain name of the dependency. @@ -853,6 +879,9 @@ type ManagedClusterAgentPoolProfileProperties struct { // ManagedClusterAutoUpgradeProfile - Auto upgrade profile for a managed cluster. type ManagedClusterAutoUpgradeProfile struct { + // 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 } @@ -911,6 +940,11 @@ type ManagedClusterHTTPProxyConfig struct { // ManagedClusterIdentity - Identity for the managed cluster. type ManagedClusterIdentity struct { + // The delegated identity resources assigned to this managed cluster. This can only be set by another Azure Resource Provider, + // and managed cluster only accept one delegated identity resource. Internal + // use only. + DelegatedResources map[string]*DelegatedResource + // For more information see use managed identities in AKS [https://docs.microsoft.com/azure/aks/use-managed-identity]. Type *ResourceIdentityType @@ -1208,6 +1242,9 @@ type ManagedClusterProperties struct { // The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. SupportPlan *KubernetesSupportPlan + // Settings for upgrading a cluster. + UpgradeSettings *ClusterUpgradeSettings + // The profile for Windows VMs in the Managed Cluster. WindowsProfile *ManagedClusterWindowsProfile @@ -1470,6 +1507,9 @@ type ManagedClusterWindowsProfile struct { type ManagedClusterWorkloadAutoScalerProfile struct { // KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. Keda *ManagedClusterWorkloadAutoScalerProfileKeda + + // VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + VerticalPodAutoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler } // ManagedClusterWorkloadAutoScalerProfileKeda - KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler @@ -1479,6 +1519,13 @@ 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. Default value is false. + Enabled *bool +} + type ManagedServiceIdentityUserAssignedIdentitiesValue struct { // READ-ONLY; The client id of user assigned identity. ClientID *string @@ -1967,6 +2014,18 @@ type TimeSpan struct { Start *time.Time } +// UpgradeOverrideSettings - Settings for overrides when upgrading a cluster. +type UpgradeOverrideSettings struct { + // Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections such + // as checking for deprecated API usage. Enable this option only with caution. + ForceUpgrade *bool + + // Until when the overrides are effective. Note that this only matches the start time of an upgrade, and the effectiveness + // won't change once an upgrade starts even if the until expires as upgrade + // proceeds. This field is not set by default. It must be set for the overrides to take effect. + Until *time.Time +} + // UserAssignedIdentity - Details about a user assigned identity. type UserAssignedIdentity struct { // The client ID of the user assigned identity. diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go b/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go index 6bdd7fbca553..506fbd4564be 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go @@ -357,6 +357,7 @@ func (a *AgentPoolUpgradeProfilePropertiesUpgradesItem) UnmarshalJSON(data []byt // MarshalJSON implements the json.Marshaller interface for type AgentPoolUpgradeSettings. func (a AgentPoolUpgradeSettings) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "drainTimeoutInMinutes", a.DrainTimeoutInMinutes) populate(objectMap, "maxSurge", a.MaxSurge) return json.Marshal(objectMap) } @@ -370,6 +371,9 @@ func (a *AgentPoolUpgradeSettings) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "drainTimeoutInMinutes": + err = unpopulate(val, "DrainTimeoutInMinutes", &a.DrainTimeoutInMinutes) + delete(rawMsg, key) case "maxSurge": err = unpopulate(val, "MaxSurge", &a.MaxSurge) delete(rawMsg, key) @@ -420,6 +424,33 @@ func (a *AzureKeyVaultKms) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ClusterUpgradeSettings. +func (c ClusterUpgradeSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "overrideSettings", c.OverrideSettings) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ClusterUpgradeSettings. +func (c *ClusterUpgradeSettings) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "overrideSettings": + err = unpopulate(val, "OverrideSettings", &c.OverrideSettings) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CommandResultProperties. func (c CommandResultProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -610,6 +641,45 @@ func (d *DateSpan) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type DelegatedResource. +func (d DelegatedResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "location", d.Location) + populate(objectMap, "referralResource", d.ReferralResource) + populate(objectMap, "resourceId", d.ResourceID) + populate(objectMap, "tenantId", d.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type DelegatedResource. +func (d *DelegatedResource) 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", d, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "location": + err = unpopulate(val, "Location", &d.Location) + delete(rawMsg, key) + case "referralResource": + err = unpopulate(val, "ReferralResource", &d.ReferralResource) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &d.ResourceID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &d.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", d, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type EndpointDependency. func (e EndpointDependency) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1783,6 +1853,7 @@ func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) er // MarshalJSON implements the json.Marshaller interface for type ManagedClusterAutoUpgradeProfile. func (m ManagedClusterAutoUpgradeProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "nodeOSUpgradeChannel", m.NodeOSUpgradeChannel) populate(objectMap, "upgradeChannel", m.UpgradeChannel) return json.Marshal(objectMap) } @@ -1796,6 +1867,9 @@ func (m *ManagedClusterAutoUpgradeProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "nodeOSUpgradeChannel": + err = unpopulate(val, "NodeOSUpgradeChannel", &m.NodeOSUpgradeChannel) + delete(rawMsg, key) case "upgradeChannel": err = unpopulate(val, "UpgradeChannel", &m.UpgradeChannel) delete(rawMsg, key) @@ -1938,6 +2012,7 @@ func (m *ManagedClusterHTTPProxyConfig) UnmarshalJSON(data []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) populate(objectMap, "tenantId", m.TenantID) populate(objectMap, "type", m.Type) @@ -1954,6 +2029,9 @@ func (m *ManagedClusterIdentity) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "delegatedResources": + err = unpopulate(val, "DelegatedResources", &m.DelegatedResources) + delete(rawMsg, key) case "principalId": err = unpopulate(val, "PrincipalID", &m.PrincipalID) delete(rawMsg, key) @@ -2555,6 +2633,7 @@ func (m ManagedClusterProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "servicePrincipalProfile", m.ServicePrincipalProfile) populate(objectMap, "storageProfile", m.StorageProfile) populate(objectMap, "supportPlan", m.SupportPlan) + populate(objectMap, "upgradeSettings", m.UpgradeSettings) populate(objectMap, "windowsProfile", m.WindowsProfile) populate(objectMap, "workloadAutoScalerProfile", m.WorkloadAutoScalerProfile) return json.Marshal(objectMap) @@ -2671,6 +2750,9 @@ func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { case "supportPlan": err = unpopulate(val, "SupportPlan", &m.SupportPlan) delete(rawMsg, key) + case "upgradeSettings": + err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) + delete(rawMsg, key) case "windowsProfile": err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) delete(rawMsg, key) @@ -3257,6 +3339,7 @@ func (m *ManagedClusterWindowsProfile) UnmarshalJSON(data []byte) error { func (m ManagedClusterWorkloadAutoScalerProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "keda", m.Keda) + populate(objectMap, "verticalPodAutoscaler", m.VerticalPodAutoscaler) return json.Marshal(objectMap) } @@ -3272,6 +3355,9 @@ func (m *ManagedClusterWorkloadAutoScalerProfile) UnmarshalJSON(data []byte) err case "keda": err = unpopulate(val, "Keda", &m.Keda) delete(rawMsg, key) + case "verticalPodAutoscaler": + err = unpopulate(val, "VerticalPodAutoscaler", &m.VerticalPodAutoscaler) + delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -3307,6 +3393,33 @@ func (m *ManagedClusterWorkloadAutoScalerProfileKeda) UnmarshalJSON(data []byte) return nil } +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. +func (m ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) 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 ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. +func (m *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + 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 ManagedServiceIdentityUserAssignedIdentitiesValue. func (m ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4570,6 +4683,37 @@ func (t *TimeSpan) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type UpgradeOverrideSettings. +func (u UpgradeOverrideSettings) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "forceUpgrade", u.ForceUpgrade) + populateTimeRFC3339(objectMap, "until", u.Until) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UpgradeOverrideSettings. +func (u *UpgradeOverrideSettings) 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", u, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "forceUpgrade": + err = unpopulate(val, "ForceUpgrade", &u.ForceUpgrade) + delete(rawMsg, key) + case "until": + err = unpopulateTimeRFC3339(val, "Until", &u.Until) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", u, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type UserAssignedIdentity. func (u UserAssignedIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/operations_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/operations_client.go index cbe43637e782..064c342dbb24 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-05-01 +// Generated from API version 2023-07-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-05-01") + reqQP.Set("api-version", "2023-07-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 deleted file mode 100644 index 6aa17a60ff52..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go +++ /dev/null @@ -1,3616 +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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/Operation_List.json -func ExampleOperationsClient_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.NewOperationsClient().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.OperationListResult = armcontainerservice.OperationListResult{ - // Value: []*armcontainerservice.OperationValue{ - // { - // Name: to.Ptr("Microsoft.ContainerService/locations/operations/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets the status of an asynchronous operation"), - // Operation: to.Ptr("Get Operation"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Operation"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/locations/orchestrators/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Lists the supported orchestrators"), - // Operation: to.Ptr("List Orchestrators"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Orchestrator"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/locations/osOptions/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets OS options"), - // Operation: to.Ptr("Get OS Options"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("OSOptions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/operations/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Lists operations available on Microsoft.ContainerService resource provider"), - // Operation: to.Ptr("List Available Container Service Operations"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Available Container Service Operations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/register/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Registers Subscription with Microsoft.ContainerService resource provider"), - // Operation: to.Ptr("Register Subscription for Container Service"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Container Service Register Subscription"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/unregister/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Unregisters Subscription with Microsoft.ContainerService resource provider"), - // Operation: to.Ptr("Unregister Subscription for Container Service"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Container Service Unregister Subscription"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/locations/operationresults/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets the status of an asynchronous operation result"), - // Operation: to.Ptr("Get Operation Result"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("OperationResult"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/containerServices/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Get a container service"), - // Operation: to.Ptr("Get Container Service"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Container Services"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/containerServices/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Creates a new container service or updates an existing one"), - // Operation: to.Ptr("Create or Update Container Service"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Container Services"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/containerServices/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes a container service"), - // Operation: to.Ptr("Delete Container Service"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Container Services"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Get a managed cluster"), - // Operation: to.Ptr("Get Managed Cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Creates a new managed cluster or updates an existing one"), - // Operation: to.Ptr("Create or Update Managed Cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes a managed cluster"), - // Operation: to.Ptr("Delete Managed Cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/start/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Starts a managed cluster"), - // Operation: to.Ptr("Start Managed Cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/stop/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Stops a managed cluster"), - // Operation: to.Ptr("Stop Managed Cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/maintenanceConfigurations/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets a maintenance configuration"), - // Operation: to.Ptr("Get a maintenance configuration"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Maintenance Configurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/maintenanceConfigurations/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Creates a new MaintenanceConfiguration or updates an existing one"), - // Operation: to.Ptr("Create or Update maintenance configuratio"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Maintenance Configurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/maintenanceConfigurations/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes a maintenance configuration"), - // Operation: to.Ptr("Delete Maintenance Configuration"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Maintenance Configurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets an agent pool"), - // Operation: to.Ptr("Get Agent Pool"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Agent Pools"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Creates a new agent pool or updates an existing one"), - // Operation: to.Ptr("Create or Update Agent Pool"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Agent Pools"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes an agent pool"), - // Operation: to.Ptr("Delete Agent Pool"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Agent Pools"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools/upgradeProfiles/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets the upgrade profile of the Agent Pool"), - // Operation: to.Ptr("Get Agent Pool UpgradeProfile"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Agent Pools"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools/upgradeNodeImageVersion/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Upgrade the node image version of agent pool"), - // Operation: to.Ptr("Upgrade agent pool node image version"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Agent Pools"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/availableAgentPoolVersions/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets the available agent pool versions of the cluster"), - // Operation: to.Ptr("Get Available Agent Pool Versions"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/accessProfiles/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Get a managed cluster access profile by role name"), - // Operation: to.Ptr("Get Managed Cluster AccessProfile"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/accessProfiles/listCredential/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Get a managed cluster access profile by role name using list credential"), - // Operation: to.Ptr("Get Managed Cluster AccessProfile by List Credential"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/upgradeProfiles/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets the upgrade profile of the cluster"), - // Operation: to.Ptr("Get UpgradeProfile"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("UpgradeProfile"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/listClusterAdminCredential/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("List the clusterAdmin credential of a managed cluster"), - // Operation: to.Ptr("List clusterAdmin credential"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/listClusterUserCredential/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("List the clusterUser credential of a managed cluster"), - // Operation: to.Ptr("List clusterUser credential"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/listClusterMonitoringUserCredential/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("List the clusterMonitoringUser credential of a managed cluster"), - // Operation: to.Ptr("List clusterMonitoringUser credential"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/resetServicePrincipalProfile/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reset the service principal profile of a managed cluster"), - // Operation: to.Ptr("Reset service principal profile"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/resolvePrivateLinkServiceId/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Resolve the private link service id of a managed cluster"), - // Operation: to.Ptr("Resolve private link service id"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/resetAADProfile/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reset the AAD profile of a managed cluster"), - // Operation: to.Ptr("Reset AAD profile"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rotateClusterCertificates/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Rotate certificates of a managed cluster"), - // Operation: to.Ptr("Rotate certificates of the cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/runCommand/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Run user issued command against managed kubernetes server."), - // Operation: to.Ptr("RunCommand"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/commandResults/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Retrieve result from previous issued command."), - // Operation: to.Ptr("CommandResult"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/providers/Microsoft.Insights/diagnosticSettings/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Get the diagnostic setting for a managed cluster resource"), - // Operation: to.Ptr("Read Diagnostic Setting"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/providers/Microsoft.Insights/diagnosticSettings/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Creates or updates the diagnostic setting for a managed cluster resource"), - // Operation: to.Ptr("Write Diagnostic Setting"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Clusters"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/detectors/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Get Managed Cluster Detector"), - // Operation: to.Ptr("Get Managed Cluster Detector"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Managed Cluster Detector"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/diagnosticsState/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets the diagnostics state of the cluster"), - // Operation: to.Ptr("Get Diagnostics State"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Diagnostics State"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/privateEndpointConnectionsApproval/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Determines if user is allowed to approve a private endpoint connection"), - // Operation: to.Ptr("Approve Private Endpoint Connections"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Approve Private Endpoint Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/privateEndpointConnections/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Get private endpoint connection"), - // Operation: to.Ptr("Get private endpoint connection"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Private Endpoint Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/privateEndpointConnections/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Approve or Reject a private endpoint connection"), - // Operation: to.Ptr("Update private endpoint connection"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Private Endpoint Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/privateEndpointConnections/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Delete private endpoint connection"), - // Operation: to.Ptr("Delete private endpoint connection"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Private Endpoint Connections"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensionaddons/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets an extension addon"), - // Operation: to.Ptr("Get an extension addon"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("ExtensionAddons"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensionaddons/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Creates a new extension addon or updates an existing one"), - // Operation: to.Ptr("Create or Update extension addon"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("ExtensionAddons"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensionaddons/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes an extension addon"), - // Operation: to.Ptr("Delete an extension addon"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("ExtensionAddons"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/snapshots/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Get a snapshot"), - // Operation: to.Ptr("Get Snapshot"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Snapshots"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/snapshots/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Creates a new snapshot"), - // Operation: to.Ptr("Create Snapshot"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Snapshots"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/snapshots/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes a snapshot"), - // Operation: to.Ptr("Delete Snapshot"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Snapshots"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/eventGridFilters/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Get eventgrid filter"), - // Operation: to.Ptr("Get eventgrid filter"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("EventGridFilters"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/eventGridFilters/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Create or Update eventgrid filter"), - // Operation: to.Ptr("Create or Update eventgrid filter"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("EventGridFilters"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/eventGridFilters/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Delete an eventgrid filter"), - // Operation: to.Ptr("Delete an eventgrid filter"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("EventGridFilters"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/admissionregistration.k8s.io/initializerconfigurations/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads initializerconfigurations"), - // Operation: to.Ptr("Gets/List initializerconfigurations resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Initializerconfigurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/admissionregistration.k8s.io/initializerconfigurations/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes initializerconfigurations"), - // Operation: to.Ptr("Creates/Updates initializerconfigurations resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Initializerconfigurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/admissionregistration.k8s.io/initializerconfigurations/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes/DeletesCollection initializerconfigurations resource"), - // Operation: to.Ptr("Initializerconfigurations"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Initializerconfigurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/admissionregistration.k8s.io/mutatingwebhookconfigurations/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads mutatingwebhookconfigurations"), - // Operation: to.Ptr("Gets/List mutatingwebhookconfigurations resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Mutatingwebhookconfigurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/admissionregistration.k8s.io/mutatingwebhookconfigurations/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes mutatingwebhookconfigurations"), - // Operation: to.Ptr("Creates/Updates mutatingwebhookconfigurations resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Mutatingwebhookconfigurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/admissionregistration.k8s.io/mutatingwebhookconfigurations/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes mutatingwebhookconfigurations"), - // Operation: to.Ptr("Deletes/DeletesCollection mutatingwebhookconfigurations resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Mutatingwebhookconfigurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/admissionregistration.k8s.io/validatingwebhookconfigurations/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads validatingwebhookconfigurations"), - // Operation: to.Ptr("Gets/List validatingwebhookconfigurations resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Validatingwebhookconfigurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/admissionregistration.k8s.io/validatingwebhookconfigurations/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes validatingwebhookconfigurations"), - // Operation: to.Ptr("Creates/Updates validatingwebhookconfigurations resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Validatingwebhookconfigurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/admissionregistration.k8s.io/validatingwebhookconfigurations/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes validatingwebhookconfigurations"), - // Operation: to.Ptr("Deletes/DeletesCollection validatingwebhookconfigurations resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Validatingwebhookconfigurations"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apiextensions.k8s.io/customresourcedefinitions/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads customresourcedefinitions"), - // Operation: to.Ptr("Gets/List customresourcedefinitions resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Customresourcedefinitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apiextensions.k8s.io/customresourcedefinitions/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes customresourcedefinitions"), - // Operation: to.Ptr("Creates/Updates customresourcedefinitions resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Customresourcedefinitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apiextensions.k8s.io/customresourcedefinitions/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes customresourcedefinitions"), - // Operation: to.Ptr("Deletes/DeletesCollection customresourcedefinitions resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Customresourcedefinitions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apiregistration.k8s.io/apiservices/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiservices"), - // Operation: to.Ptr("Gets/List apiservices resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apiservices"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apiregistration.k8s.io/apiservices/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes apiservices"), - // Operation: to.Ptr("Creates/Updates apiservices resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apiservices"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apiregistration.k8s.io/apiservices/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes apiservices"), - // Operation: to.Ptr("Deletes/DeletesCollection apiservices resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apiservices"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/controllerrevisions/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads controllerrevisions"), - // Operation: to.Ptr("Gets/List controllerrevisions resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Controllerrevisions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/controllerrevisions/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes controllerrevisions"), - // Operation: to.Ptr("Creates/Updates controllerrevisions resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Controllerrevisions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/controllerrevisions/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes controllerrevisions"), - // Operation: to.Ptr("Deletes/DeletesCollection controllerrevisions resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Controllerrevisions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/daemonsets/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads daemonsets"), - // Operation: to.Ptr("Gets/List daemonsets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Daemonsets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/daemonsets/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes daemonsets"), - // Operation: to.Ptr("Creates/Updates daemonsets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Daemonsets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/daemonsets/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes daemonsets"), - // Operation: to.Ptr("Deletes/DeletesCollection daemonsets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Daemonsets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/deployments/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads deployments"), - // Operation: to.Ptr("Gets/List deployments resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/deployments/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes deployments"), - // Operation: to.Ptr("Creates/Updates deployments resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/deployments/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes deployments"), - // Operation: to.Ptr("Deletes/DeletesCollection deployments resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/replicasets/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads replicasets"), - // Operation: to.Ptr("Gets/List replicasets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Replicasets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/replicasets/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes replicasets"), - // Operation: to.Ptr("Creates/Updates replicasets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Replicasets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/replicasets/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes replicasets"), - // Operation: to.Ptr("Deletes/DeletesCollection replicasets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Replicasets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/statefulsets/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads statefulsets"), - // Operation: to.Ptr("Gets/List statefulsets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Statefulsets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/statefulsets/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes statefulsets"), - // Operation: to.Ptr("Creates/Updates statefulsets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Statefulsets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apps/statefulsets/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes statefulsets"), - // Operation: to.Ptr("Deletes/DeletesCollection statefulsets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Statefulsets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/authentication.k8s.io/tokenreviews/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes tokenreviews"), - // Operation: to.Ptr("Creates/Updates tokenreviews resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Tokenreviews"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/authorization.k8s.io/localsubjectaccessreviews/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes localsubjectaccessreviews"), - // Operation: to.Ptr("Creates/Updates localsubjectaccessreviews resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Localsubjectaccessreviews"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/authorization.k8s.io/selfsubjectaccessreviews/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes selfsubjectaccessreviews"), - // Operation: to.Ptr("Creates/Updates selfsubjectaccessreviews resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Selfsubjectaccessreviews"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/authorization.k8s.io/selfsubjectrulesreviews/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes selfsubjectrulesreviews"), - // Operation: to.Ptr("Creates/Updates selfsubjectrulesreviews resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Selfsubjectrulesreviews"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/authorization.k8s.io/subjectaccessreviews/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes subjectaccessreviews"), - // Operation: to.Ptr("Creates/Updates subjectaccessreviews resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Subjectaccessreviews"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/autoscaling/horizontalpodautoscalers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads horizontalpodautoscalers"), - // Operation: to.Ptr("Gets/List horizontalpodautoscalers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Horizontalpodautoscalers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/autoscaling/horizontalpodautoscalers/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes horizontalpodautoscalers"), - // Operation: to.Ptr("Creates/Updates horizontalpodautoscalers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Horizontalpodautoscalers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/autoscaling/horizontalpodautoscalers/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes horizontalpodautoscalers"), - // Operation: to.Ptr("Deletes/DeletesCollection horizontalpodautoscalers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Horizontalpodautoscalers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/batch/cronjobs/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads cronjobs"), - // Operation: to.Ptr("Gets/List cronjobs resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Cronjobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/batch/cronjobs/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes cronjobs"), - // Operation: to.Ptr("Creates/Updates cronjobs resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Cronjobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/batch/cronjobs/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes cronjobs"), - // Operation: to.Ptr("Deletes/DeletesCollection cronjobs resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Cronjobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/batch/jobs/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads jobs"), - // Operation: to.Ptr("Gets/List jobs resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Jobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/batch/jobs/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes jobs"), - // Operation: to.Ptr("Creates/Updates jobs resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Jobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/batch/jobs/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes jobs"), - // Operation: to.Ptr("Deletes/DeletesCollection jobs resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Jobs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/certificates.k8s.io/certificatesigningrequests/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads certificatesigningrequests"), - // Operation: to.Ptr("Gets/List certificatesigningrequests resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Certificatesigningrequests"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/certificates.k8s.io/certificatesigningrequests/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes certificatesigningrequests"), - // Operation: to.Ptr("Creates/Updates certificatesigningrequests resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Certificatesigningrequests"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/certificates.k8s.io/certificatesigningrequests/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes certificatesigningrequests"), - // Operation: to.Ptr("Deletes/DeletesCollection certificatesigningrequests resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Certificatesigningrequests"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/coordination.k8s.io/leases/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads leases"), - // Operation: to.Ptr("Gets/List leases resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Leases"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/coordination.k8s.io/leases/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes leases"), - // Operation: to.Ptr("Creates/Updates leases resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Leases"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/coordination.k8s.io/leases/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes leases"), - // Operation: to.Ptr("Deletes/DeletesCollection leases resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Leases"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/bindings/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes bindings"), - // Operation: to.Ptr("Creates/Updates bindings resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Bindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/componentstatuses/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads componentstatuses"), - // Operation: to.Ptr("Gets/List componentstatuses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Componentstatuses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/componentstatuses/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes componentstatuses"), - // Operation: to.Ptr("Creates/Updates componentstatuses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Componentstatuses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/componentstatuses/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes componentstatuses"), - // Operation: to.Ptr("Deletes/DeletesCollection componentstatuses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Componentstatuses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/configmaps/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads configmaps"), - // Operation: to.Ptr("Gets/List configmaps resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Configmaps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/configmaps/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes configmaps"), - // Operation: to.Ptr("Creates/Updates configmaps resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Configmaps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/configmaps/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes configmaps"), - // Operation: to.Ptr("Deletes/DeletesCollection configmaps resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Configmaps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/endpoints/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads endpoints"), - // Operation: to.Ptr("Gets/List endpoints resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Endpoints"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/endpoints/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes endpoints"), - // Operation: to.Ptr("Creates/Updates endpoints resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Endpoints"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/endpoints/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes endpoints"), - // Operation: to.Ptr("Deletes/DeletesCollection endpoints resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Endpoints"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/events/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads events"), - // Operation: to.Ptr("Gets/List events resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Events"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/events/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes events"), - // Operation: to.Ptr("Creates/Updates events resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Events"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/events/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes events"), - // Operation: to.Ptr("Deletes/DeletesCollection events resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Events"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/limitranges/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads limitranges"), - // Operation: to.Ptr("Gets/List limitranges resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Limitranges"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/limitranges/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes limitranges"), - // Operation: to.Ptr("Creates/Updates limitranges resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Limitranges"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/limitranges/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes limitranges"), - // Operation: to.Ptr("Deletes/DeletesCollection limitranges resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Limitranges"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/namespaces/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads namespaces"), - // Operation: to.Ptr("Gets/List namespaces resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Namespaces"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/namespaces/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes namespaces"), - // Operation: to.Ptr("Creates/Updates namespaces resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Namespaces"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/namespaces/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes namespaces"), - // Operation: to.Ptr("Deletes/DeletesCollection namespaces resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Namespaces"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/nodes/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads nodes"), - // Operation: to.Ptr("Gets/List nodes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Nodes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/nodes/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes nodes"), - // Operation: to.Ptr("Creates/Updates nodes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Nodes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/nodes/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes nodes"), - // Operation: to.Ptr("Deletes/DeletesCollection nodes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Nodes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/persistentvolumeclaims/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads persistentvolumeclaims"), - // Operation: to.Ptr("Gets/List persistentvolumeclaims resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Persistentvolumeclaims"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/persistentvolumeclaims/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes persistentvolumeclaims"), - // Operation: to.Ptr("Creates/Updates persistentvolumeclaims resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Persistentvolumeclaims"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/persistentvolumeclaims/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes persistentvolumeclaims"), - // Operation: to.Ptr("Deletes/DeletesCollection persistentvolumeclaims resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Persistentvolumeclaims"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/persistentvolumes/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads persistentvolumes"), - // Operation: to.Ptr("Gets/List persistentvolumes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Persistentvolumes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/persistentvolumes/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes persistentvolumes"), - // Operation: to.Ptr("Creates/Updates persistentvolumes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Persistentvolumes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/persistentvolumes/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes persistentvolumes"), - // Operation: to.Ptr("Deletes/DeletesCollection persistentvolumes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Persistentvolumes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/pods/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads pods"), - // Operation: to.Ptr("Gets/List pods resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Pods"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/pods/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes pods"), - // Operation: to.Ptr("Creates/Updates pods resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Pods"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/pods/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes pods"), - // Operation: to.Ptr("Deletes/DeletesCollection pods resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Pods"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/pods/exec/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Exec into pods resource"), - // Operation: to.Ptr("Exec into pods resource "), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Pods"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/podtemplates/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads podtemplates"), - // Operation: to.Ptr("Gets/List podtemplates resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Podtemplates"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/podtemplates/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes podtemplates"), - // Operation: to.Ptr("Creates/Updates podtemplates resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Podtemplates"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/podtemplates/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes podtemplates"), - // Operation: to.Ptr("Deletes/DeletesCollection podtemplates resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Podtemplates"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/replicationcontrollers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads replicationcontrollers"), - // Operation: to.Ptr("Gets/List replicationcontrollers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Replicationcontrollers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/replicationcontrollers/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes replicationcontrollers"), - // Operation: to.Ptr("Creates/Updates replicationcontrollers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Replicationcontrollers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/replicationcontrollers/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes replicationcontrollers"), - // Operation: to.Ptr("Deletes/DeletesCollection replicationcontrollers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Replicationcontrollers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/resourcequotas/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads resourcequotas"), - // Operation: to.Ptr("Gets/List resourcequotas resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Resourcequotas"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/resourcequotas/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes resourcequotas"), - // Operation: to.Ptr("Creates/Updates resourcequotas resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Resourcequotas"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/resourcequotas/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes resourcequotas"), - // Operation: to.Ptr("Deletes/DeletesCollection resourcequotas resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Resourcequotas"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/secrets/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads secrets"), - // Operation: to.Ptr("Gets/List secrets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Secrets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/secrets/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes secrets"), - // Operation: to.Ptr("Creates/Updates secrets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Secrets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/secrets/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes secrets"), - // Operation: to.Ptr("Deletes/DeletesCollection secrets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Secrets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/serviceaccounts/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads serviceaccounts"), - // Operation: to.Ptr("Gets/List serviceaccounts resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Serviceaccounts"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/serviceaccounts/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes serviceaccounts"), - // Operation: to.Ptr("Creates/Updates serviceaccounts resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Serviceaccounts"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/serviceaccounts/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes serviceaccounts"), - // Operation: to.Ptr("Deletes/DeletesCollection serviceaccounts resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Serviceaccounts"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/services/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads services"), - // Operation: to.Ptr("Gets/List services resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Services"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/services/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes services"), - // Operation: to.Ptr("Creates/Updates services resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Services"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/services/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes services"), - // Operation: to.Ptr("Deletes/DeletesCollection services resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Services"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/events.k8s.io/events/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads events"), - // Operation: to.Ptr("Gets/List events resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Events"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/events.k8s.io/events/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes events"), - // Operation: to.Ptr("Creates/Updates events resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Events"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/events.k8s.io/events/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes events"), - // Operation: to.Ptr("Deletes/DeletesCollection events resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Events"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/daemonsets/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads daemonsets"), - // Operation: to.Ptr("Gets/List daemonsets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Daemonsets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/daemonsets/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes daemonsets"), - // Operation: to.Ptr("Creates/Updates daemonsets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Daemonsets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/daemonsets/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes daemonsets"), - // Operation: to.Ptr("Deletes/DeletesCollection daemonsets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Daemonsets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/deployments/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads deployments"), - // Operation: to.Ptr("Gets/List deployments resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/deployments/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes deployments"), - // Operation: to.Ptr("Creates/Updates deployments resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/deployments/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes deployments"), - // Operation: to.Ptr("Deletes/DeletesCollection deployments resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Deployments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/ingresses/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads ingresses"), - // Operation: to.Ptr("Gets/List ingresses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Ingresses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/ingresses/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes ingresses"), - // Operation: to.Ptr("Creates/Updates ingresses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Ingresses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/ingresses/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes ingresses"), - // Operation: to.Ptr("Deletes/DeletesCollection ingresses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Ingresses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/networkpolicies/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads networkpolicies"), - // Operation: to.Ptr("Gets/List networkpolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Networkpolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/networkpolicies/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes networkpolicies"), - // Operation: to.Ptr("Creates/Updates networkpolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Networkpolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/networkpolicies/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes networkpolicies"), - // Operation: to.Ptr("Deletes/DeletesCollection networkpolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Networkpolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/podsecuritypolicies/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads podsecuritypolicies"), - // Operation: to.Ptr("Gets/List podsecuritypolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Podsecuritypolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/podsecuritypolicies/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes podsecuritypolicies"), - // Operation: to.Ptr("Creates/Updates podsecuritypolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Podsecuritypolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/podsecuritypolicies/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes podsecuritypolicies"), - // Operation: to.Ptr("Deletes/DeletesCollection podsecuritypolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Podsecuritypolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/replicasets/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads replicasets"), - // Operation: to.Ptr("Gets/List replicasets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Replicasets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/replicasets/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes replicasets"), - // Operation: to.Ptr("Creates/Updates replicasets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Replicasets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/extensions/replicasets/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes replicasets"), - // Operation: to.Ptr("Deletes/DeletesCollection replicasets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Replicasets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/metrics.k8s.io/pods/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads pods"), - // Operation: to.Ptr("Gets/List pods resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Pods"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/metrics.k8s.io/nodes/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads nodes"), - // Operation: to.Ptr("Gets/List nodes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Nodes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/networking.k8s.io/networkpolicies/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads networkpolicies"), - // Operation: to.Ptr("Gets/List networkpolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Networkpolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/networking.k8s.io/networkpolicies/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes networkpolicies"), - // Operation: to.Ptr("Creates/Updates networkpolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Networkpolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/networking.k8s.io/networkpolicies/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes networkpolicies"), - // Operation: to.Ptr("Deletes/DeletesCollection networkpolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Networkpolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/networking.k8s.io/ingresses/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads ingresses"), - // Operation: to.Ptr("Gets/List ingresses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Ingresses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/networking.k8s.io/ingresses/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes ingresses"), - // Operation: to.Ptr("Creates/Updates ingresses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Ingresses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/networking.k8s.io/ingresses/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes ingresses"), - // Operation: to.Ptr("Deletes/DeletesCollection ingresses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Ingresses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/node.k8s.io/runtimeclasses/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads runtimeclasses"), - // Operation: to.Ptr("Gets/List runtimeclasses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Runtimeclasses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/node.k8s.io/runtimeclasses/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes runtimeclasses"), - // Operation: to.Ptr("Creates/Updates runtimeclasses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Runtimeclasses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/node.k8s.io/runtimeclasses/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes runtimeclasses"), - // Operation: to.Ptr("Deletes/DeletesCollection runtimeclasses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Runtimeclasses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/api/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads api"), - // Operation: to.Ptr("Gets/List api resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Api"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/api/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads api/v1"), - // Operation: to.Ptr("Gets/List api/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Api/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apis"), - // Operation: to.Ptr("Gets/List apis resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apis"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/admissionregistration.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads admissionregistration.k8s.io"), - // Operation: to.Ptr("Gets/List admissionregistration.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Admissionregistration.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/admissionregistration.k8s.io/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads admissionregistration.k8s.io/v1"), - // Operation: to.Ptr("Gets/List admissionregistration.k8s.io/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Admissionregistration.K8s.Io/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/admissionregistration.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads admissionregistration.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List admissionregistration.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Admissionregistration.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/apiextensions.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiextensions.k8s.io"), - // Operation: to.Ptr("Gets/List apiextensions.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apiextensions.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/apiextensions.k8s.io/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiextensions.k8s.io/v1"), - // Operation: to.Ptr("Gets/List apiextensions.k8s.io/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apiextensions.K8s.Io/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/apiextensions.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiextensions.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List apiextensions.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apiextensions.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/apiregistration.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiregistration.k8s.io"), - // Operation: to.Ptr("Gets/List apiregistration.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apiregistration.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/apiregistration.k8s.io/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiregistration.k8s.io/v1"), - // Operation: to.Ptr("Gets/List apiregistration.k8s.io/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apiregistration.K8s.Io/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/apiregistration.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiregistration.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List apiregistration.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apiregistration.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/apps/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apps"), - // Operation: to.Ptr("Gets/List apps resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apps"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/apps/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apps/v1"), - // Operation: to.Ptr("Gets/List apps/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apps/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/apps/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apps/v1beta1"), - // Operation: to.Ptr("Gets/List apps/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apps/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/apps/v1beta2/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apps/v1beta2"), - // Operation: to.Ptr("Gets/List apps/v1beta2 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Apps/V1beta2"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/authentication.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads authentication.k8s.io"), - // Operation: to.Ptr("Gets/List authentication.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Authentication.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/authentication.k8s.io/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads authentication.k8s.io/v1"), - // Operation: to.Ptr("Gets/List authentication.k8s.io/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Authentication.K8s.Io/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/authentication.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads authentication.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List authentication.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Authentication.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/authorization.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads authorization.k8s.io"), - // Operation: to.Ptr("Gets/List authorization.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Authorization.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/authorization.k8s.io/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads authorization.k8s.io/v1"), - // Operation: to.Ptr("Gets/List authorization.k8s.io/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Authorization.K8s.Io/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/authorization.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads authorization.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List authorization.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Authorization.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/autoscaling/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads autoscaling"), - // Operation: to.Ptr("Gets/List autoscaling resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Autoscaling"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/autoscaling/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads autoscaling/v1"), - // Operation: to.Ptr("Gets/List autoscaling/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Autoscaling/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/autoscaling/v2beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads autoscaling/v2beta1"), - // Operation: to.Ptr("Gets/List autoscaling/v2beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Autoscaling/V2beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/autoscaling/v2beta2/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads autoscaling/v2beta2"), - // Operation: to.Ptr("Gets/List autoscaling/v2beta2 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Autoscaling/V2beta2"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/batch/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads batch"), - // Operation: to.Ptr("Gets/List batch resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Batch"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/batch/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads batch/v1"), - // Operation: to.Ptr("Gets/List batch/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Batch/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/batch/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads batch/v1beta1"), - // Operation: to.Ptr("Gets/List batch/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Batch/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/certificates.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads certificates.k8s.io"), - // Operation: to.Ptr("Gets/List certificates.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Certificates.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/certificates.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads certificates.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List certificates.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Certificates.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/coordination.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads coordination.k8s.io"), - // Operation: to.Ptr("Gets/List coordination.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Coordination.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/coordination.k8s.io/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads coordination/v1"), - // Operation: to.Ptr("Gets/List coordination/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Coordination.K8s.Io/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/coordination.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads coordination.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List coordination.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Coordination.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/events.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads events.k8s.io"), - // Operation: to.Ptr("Gets/List events.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Events.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/events.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads events.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List events.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Events.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/extensions/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads extensions"), - // Operation: to.Ptr("Gets/List extensions resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Extensions"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/extensions/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads extensions/v1beta1"), - // Operation: to.Ptr("Gets/List extensions/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Extensions/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/metrics.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads metrics.k8s.io"), - // Operation: to.Ptr("Gets/List metrics.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Metrics.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/metrics.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads metrics.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List metrics.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Metrics.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/networking.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads networking.k8s.io"), - // Operation: to.Ptr("Gets/List networking.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Networking.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/networking.k8s.io/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads networking/v1"), - // Operation: to.Ptr("Gets/List networking/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Networking.K8s.Io/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/networking.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads networking.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List networking.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Networking.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/node.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads node.k8s.io"), - // Operation: to.Ptr("Gets/List node.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Node.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/node.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads node.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List node.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Node.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/policy/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads policy"), - // Operation: to.Ptr("Gets/List policy resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Policy"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/policy/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads policy/v1beta1"), - // Operation: to.Ptr("Gets/List policy/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Policy/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/rbac.authorization.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads rbac.authorization.k8s.io"), - // Operation: to.Ptr("Gets/List rbac.authorization.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Rbac.Authorization.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/rbac.authorization.k8s.io/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads rbac.authorization/v1"), - // Operation: to.Ptr("Gets/List rbac.authorization/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Rbac.Authorization.K8s.Io/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/rbac.authorization.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads rbac.authorization.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List rbac.authorization.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Rbac.Authorization.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/scheduling.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads scheduling.k8s.io"), - // Operation: to.Ptr("Gets/List scheduling.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Scheduling.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/scheduling.k8s.io/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads scheduling/v1"), - // Operation: to.Ptr("Gets/List scheduling/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Scheduling.K8s.Io/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/scheduling.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads scheduling.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List scheduling.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Scheduling.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/storage.k8s.io/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads storage.k8s.io"), - // Operation: to.Ptr("Gets/List storage.k8s.io resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Storage.K8s.Io"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/storage.k8s.io/v1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads storage/v1"), - // Operation: to.Ptr("Gets/List storage/v1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Storage.K8s.Io/V1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/apis/storage.k8s.io/v1beta1/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads storage.k8s.io/v1beta1"), - // Operation: to.Ptr("Gets/List storage.k8s.io/v1beta1 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Storage.K8s.Io/V1beta1"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads healthz"), - // Operation: to.Ptr("Gets/List healthz resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/autoregister-completion/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads autoregister-completion"), - // Operation: to.Ptr("Gets/List autoregister-completion resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Autoregister-Completion"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/etcd/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads etcd"), - // Operation: to.Ptr("Gets/List etcd resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Etcd"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/log/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads log"), - // Operation: to.Ptr("Gets/List log resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Log"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/ping/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads ping"), - // Operation: to.Ptr("Gets/List ping resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Ping"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/apiservice-openapi-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiservice-openapi-controller"), - // Operation: to.Ptr("Gets/List apiservice-openapi-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Apiservice-Openapi-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/apiservice-registration-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiservice-registration-controller"), - // Operation: to.Ptr("Gets/List apiservice-registration-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Apiservice-Registration-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/apiservice-status-available-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiservice-status-available-controller"), - // Operation: to.Ptr("Gets/List apiservice-status-available-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Apiservice-Status-Available-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/bootstrap-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads bootstrap-controller"), - // Operation: to.Ptr("Gets/List bootstrap-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Bootstrap-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/ca-registration/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads ca-registration"), - // Operation: to.Ptr("Gets/List ca-registration resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Ca-Registration"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/crd-informer-synced/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads crd-informer-synced"), - // Operation: to.Ptr("Gets/List crd-informer-synced resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Crd-Informer-Synced"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/generic-apiserver-start-informers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads generic-apiserver-start-informers"), - // Operation: to.Ptr("Gets/List generic-apiserver-start-informers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Generic-Apiserver-Start-Informers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/kube-apiserver-autoregistration/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads kube-apiserver-autoregistration"), - // Operation: to.Ptr("Gets/List kube-apiserver-autoregistration resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Kube-Apiserver-Autoregistration"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/rbac/bootstrap-roles/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads bootstrap-roles"), - // Operation: to.Ptr("Gets/List bootstrap-roles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Bootstrap-Roles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/scheduling/bootstrap-system-priority-classes/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads bootstrap-system-priority-classes"), - // Operation: to.Ptr("Gets/List bootstrap-system-priority-classes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Bootstrap-System-Priority-Classes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/start-apiextensions-controllers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-apiextensions-controllers"), - // Operation: to.Ptr("Gets/List start-apiextensions-controllers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Start-Apiextensions-Controllers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/start-apiextensions-informers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-apiextensions-informers"), - // Operation: to.Ptr("Gets/List start-apiextensions-informers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Start-Apiextensions-Informers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/start-kube-aggregator-informers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-kube-aggregator-informers"), - // Operation: to.Ptr("Gets/List start-kube-aggregator-informers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Start-Kube-Aggregator-Informers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/healthz/poststarthook/start-kube-apiserver-admission-initializer/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-kube-apiserver-admission-initializer"), - // Operation: to.Ptr("Gets/List start-kube-apiserver-admission-initializer resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Healthz/Poststarthook/Start-Kube-Apiserver-Admission-Initializer"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads livez"), - // Operation: to.Ptr("Gets/List livez resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/autoregister-completion/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads autoregister-completion"), - // Operation: to.Ptr("Gets/List autoregister-completion resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Autoregister-Completion"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/etcd/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads etcd"), - // Operation: to.Ptr("Gets/List etcd resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Etcd"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/log/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads log"), - // Operation: to.Ptr("Gets/List log resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Log"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/ping/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads ping"), - // Operation: to.Ptr("Gets/List ping resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Ping"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/apiservice-openapi-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiservice-openapi-controller"), - // Operation: to.Ptr("Gets/List apiservice-openapi-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Apiservice-Openapi-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/apiservice-registration-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiservice-registration-controller"), - // Operation: to.Ptr("Gets/List apiservice-registration-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Apiservice-Registration-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/apiservice-status-available-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiservice-status-available-controller"), - // Operation: to.Ptr("Gets/List apiservice-status-available-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Apiservice-Status-Available-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/bootstrap-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads bootstrap-controller"), - // Operation: to.Ptr("Gets/List bootstrap-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Bootstrap-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/ca-registration/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads ca-registration"), - // Operation: to.Ptr("Gets/List ca-registration resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Ca-Registration"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/crd-informer-synced/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads crd-informer-synced"), - // Operation: to.Ptr("Gets/List crd-informer-synced resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Crd-Informer-Synced"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/generic-apiserver-start-informers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads generic-apiserver-start-informers"), - // Operation: to.Ptr("Gets/List generic-apiserver-start-informers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Generic-Apiserver-Start-Informers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/kube-apiserver-autoregistration/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads kube-apiserver-autoregistration"), - // Operation: to.Ptr("Gets/List kube-apiserver-autoregistration resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Kube-Apiserver-Autoregistration"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/rbac/bootstrap-roles/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads bootstrap-roles"), - // Operation: to.Ptr("Gets/List bootstrap-roles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Bootstrap-Roles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/scheduling/bootstrap-system-priority-classes/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads bootstrap-system-priority-classes"), - // Operation: to.Ptr("Gets/List bootstrap-system-priority-classes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Bootstrap-System-Priority-Classes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/start-apiextensions-controllers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-apiextensions-controllers"), - // Operation: to.Ptr("Gets/List start-apiextensions-controllers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Start-Apiextensions-Controllers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/start-apiextensions-informers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-apiextensions-informers"), - // Operation: to.Ptr("Gets/List start-apiextensions-informers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Start-Apiextensions-Informers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/start-kube-aggregator-informers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-kube-aggregator-informers"), - // Operation: to.Ptr("Gets/List start-kube-aggregator-informers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Start-Kube-Aggregator-Informers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/livez/poststarthook/start-kube-apiserver-admission-initializer/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-kube-apiserver-admission-initializer"), - // Operation: to.Ptr("Gets/List start-kube-apiserver-admission-initializer resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Livez/Poststarthook/Start-Kube-Apiserver-Admission-Initializer"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/logs/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads logs"), - // Operation: to.Ptr("Gets/List logs resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Logs"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/metrics/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads metrics"), - // Operation: to.Ptr("Gets/List metrics resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Metrics"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/openapi/v2/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads v2"), - // Operation: to.Ptr("Gets/List v2 resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Openapi/V2"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads readyz"), - // Operation: to.Ptr("Gets/List readyz resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/autoregister-completion/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads autoregister-completion"), - // Operation: to.Ptr("Gets/List autoregister-completion resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Autoregister-Completion"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/etcd/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads etcd"), - // Operation: to.Ptr("Gets/List etcd resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Etcd"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/log/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads log"), - // Operation: to.Ptr("Gets/List log resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Log"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/ping/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads ping"), - // Operation: to.Ptr("Gets/List ping resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Ping"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/apiservice-openapi-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiservice-openapi-controller"), - // Operation: to.Ptr("Gets/List apiservice-openapi-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Apiservice-Openapi-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/apiservice-registration-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiservice-registration-controller"), - // Operation: to.Ptr("Gets/List apiservice-registration-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Apiservice-Registration-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/apiservice-status-available-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads apiservice-status-available-controller"), - // Operation: to.Ptr("Gets/List apiservice-status-available-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Apiservice-Status-Available-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/bootstrap-controller/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads bootstrap-controller"), - // Operation: to.Ptr("Gets/List bootstrap-controller resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Bootstrap-Controller"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/ca-registration/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads ca-registration"), - // Operation: to.Ptr("Gets/List ca-registration resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Ca-Registration"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/crd-informer-synced/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads crd-informer-synced"), - // Operation: to.Ptr("Gets/List crd-informer-synced resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Crd-Informer-Synced"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/generic-apiserver-start-informers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads generic-apiserver-start-informers"), - // Operation: to.Ptr("Gets/List generic-apiserver-start-informers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Generic-Apiserver-Start-Informers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/kube-apiserver-autoregistration/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads kube-apiserver-autoregistration"), - // Operation: to.Ptr("Gets/List kube-apiserver-autoregistration resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Kube-Apiserver-Autoregistration"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/rbac/bootstrap-roles/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads bootstrap-roles"), - // Operation: to.Ptr("Gets/List bootstrap-roles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Bootstrap-Roles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/scheduling/bootstrap-system-priority-classes/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads bootstrap-system-priority-classes"), - // Operation: to.Ptr("Gets/List bootstrap-system-priority-classes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Bootstrap-System-Priority-Classes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/start-apiextensions-controllers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-apiextensions-controllers"), - // Operation: to.Ptr("Gets/List start-apiextensions-controllers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Start-Apiextensions-Controllers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/start-apiextensions-informers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-apiextensions-informers"), - // Operation: to.Ptr("Gets/List start-apiextensions-informers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Start-Apiextensions-Informers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/start-kube-aggregator-informers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-kube-aggregator-informers"), - // Operation: to.Ptr("Gets/List start-kube-aggregator-informers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Start-Kube-Aggregator-Informers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/poststarthook/start-kube-apiserver-admission-initializer/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads start-kube-apiserver-admission-initializer"), - // Operation: to.Ptr("Gets/List start-kube-apiserver-admission-initializer resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Poststarthook/Start-Kube-Apiserver-Admission-Initializer"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/readyz/shutdown/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads shutdown"), - // Operation: to.Ptr("Gets/List shutdown resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Readyz/Shutdown"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/resetMetrics/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads resetMetrics"), - // Operation: to.Ptr("Gets/List resetMetrics resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Resetmetrics"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/swagger-ui/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads swagger-ui"), - // Operation: to.Ptr("Gets/List swagger-ui resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Swagger-Ui"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/swagger-api/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads swagger-api"), - // Operation: to.Ptr("Gets/List swagger-api resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Swagger-Api"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/ui/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads ui"), - // Operation: to.Ptr("Gets/List ui resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Ui"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/version/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads version"), - // Operation: to.Ptr("Gets/List version resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Version"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/policy/poddisruptionbudgets/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads poddisruptionbudgets"), - // Operation: to.Ptr("Gets/List poddisruptionbudgets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Poddisruptionbudgets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/policy/poddisruptionbudgets/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes poddisruptionbudgets"), - // Operation: to.Ptr("Creates/Updates poddisruptionbudgets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Poddisruptionbudgets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/policy/poddisruptionbudgets/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes poddisruptionbudgets"), - // Operation: to.Ptr("Deletes/DeletesCollection poddisruptionbudgets resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Poddisruptionbudgets"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/policy/podsecuritypolicies/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads podsecuritypolicies"), - // Operation: to.Ptr("Gets/List podsecuritypolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Podsecuritypolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/policy/podsecuritypolicies/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes podsecuritypolicies"), - // Operation: to.Ptr("Creates/Updates podsecuritypolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Podsecuritypolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/policy/podsecuritypolicies/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes podsecuritypolicies"), - // Operation: to.Ptr("Deletes/DeletesCollection podsecuritypolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Podsecuritypolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/clusterrolebindings/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads clusterrolebindings"), - // Operation: to.Ptr("Gets/List clusterrolebindings resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Clusterrolebindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/clusterrolebindings/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes clusterrolebindings"), - // Operation: to.Ptr("Creates/Updates clusterrolebindings resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Clusterrolebindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/clusterrolebindings/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes clusterrolebindings"), - // Operation: to.Ptr("Deletes/DeletesCollection clusterrolebindings resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Clusterrolebindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/clusterroles/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads clusterroles"), - // Operation: to.Ptr("Gets/List clusterroles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Clusterroles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/clusterroles/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes clusterroles"), - // Operation: to.Ptr("Creates/Updates clusterroles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Clusterroles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/clusterroles/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes clusterroles"), - // Operation: to.Ptr("Deletes/DeletesCollection clusterroles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Clusterroles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/rolebindings/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads rolebindings"), - // Operation: to.Ptr("Gets/List rolebindings resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Rolebindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/rolebindings/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes rolebindings"), - // Operation: to.Ptr("Creates/Updates rolebindings resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Rolebindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/rolebindings/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes rolebindings"), - // Operation: to.Ptr("Deletes/DeletesCollection rolebindings resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Rolebindings"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/roles/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads roles"), - // Operation: to.Ptr("Gets/List roles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Roles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/roles/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes roles"), - // Operation: to.Ptr("Creates/Updates roles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Roles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/roles/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes roles"), - // Operation: to.Ptr("Deletes/DeletesCollection roles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Roles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/scheduling.k8s.io/priorityclasses/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads priorityclasses"), - // Operation: to.Ptr("Gets/List priorityclasses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Priorityclasses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/scheduling.k8s.io/priorityclasses/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes priorityclasses"), - // Operation: to.Ptr("Creates/Updates priorityclasses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Priorityclasses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/scheduling.k8s.io/priorityclasses/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes priorityclasses"), - // Operation: to.Ptr("Deletes/DeletesCollection priorityclasses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Priorityclasses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/policy/podsecuritypolicies/use/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Use action on podsecuritypolicies"), - // Operation: to.Ptr("Use podsecuritypolicies resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Podsecuritypolicies"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/clusterroles/bind/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Binds clusterroles"), - // Operation: to.Ptr("Bind clusterroles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Clusterroles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/clusterroles/escalate/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Escalates"), - // Operation: to.Ptr("Escalate clusterroles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Clusterroles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/roles/bind/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Binds roles"), - // Operation: to.Ptr("Bind roles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Roles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/rbac.authorization.k8s.io/roles/escalate/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Escalates roles"), - // Operation: to.Ptr("Escalate roles resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Roles"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/serviceaccounts/impersonate/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Impersonate serviceaccounts"), - // Operation: to.Ptr("Impersonate serviceaccounts resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Serviceaccounts"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/users/impersonate/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Impersonate users"), - // Operation: to.Ptr("Impersonate users resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Users"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/groups/impersonate/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Impersonate groups"), - // Operation: to.Ptr("Impersonate groups resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Groups"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/authentication.k8s.io/userextras/impersonate/action"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Impersonate userextras"), - // Operation: to.Ptr("Impersonate userextras resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Userextras"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/storageclasses/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads storageclasses"), - // Operation: to.Ptr("Gets/List storageclasses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Storageclasses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/storageclasses/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes storageclasses"), - // Operation: to.Ptr("Creates/Updates storageclasses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Storageclasses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/storageclasses/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes storageclasses"), - // Operation: to.Ptr("Deletes/DeletesCollection storageclasses resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Storageclasses"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/volumeattachments/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads volumeattachments"), - // Operation: to.Ptr("Gets/List volumeattachments resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Volumeattachments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/volumeattachments/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes volumeattachments"), - // Operation: to.Ptr("Creates/Updates volumeattachments resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Volumeattachments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/volumeattachments/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes volumeattachments"), - // Operation: to.Ptr("Deletes/DeletesCollection volumeattachments resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Volumeattachments"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/csidrivers/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads csidrivers"), - // Operation: to.Ptr("Gets/List csidrivers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Csidrivers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/csidrivers/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes csidrivers"), - // Operation: to.Ptr("Creates/Updates csidrivers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Csidrivers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/csidrivers/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes csidrivers"), - // Operation: to.Ptr("Deletes/DeletesCollection csidrivers resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Csidrivers"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/csinodes/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Reads csinodes"), - // Operation: to.Ptr("Gets/List csinodes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Csinodes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/csinodes/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Writes csinodes"), - // Operation: to.Ptr("Creates/Updates csinodes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Csinodes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/storage.k8s.io/csinodes/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Deletes csinodes"), - // Operation: to.Ptr("Deletes/DeletesCollection csinodes resource"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Csinodes"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/providers/Microsoft.Insights/metricDefinitions/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets the available metrics for Managed Cluster"), - // Operation: to.Ptr("Read Managed Cluster metric definitions"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("The metric definition of Managed Cluster"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/managedClusters/providers/Microsoft.Insights/logDefinitions/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Gets the available logs for Managed Cluster"), - // Operation: to.Ptr("Read Managed Cluster log definitions"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("The log definition of Managed Cluster"), - // }, - // Origin: to.Ptr("system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/openShiftManagedClusters/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Get a Open Shift Managed Cluster"), - // Operation: to.Ptr("Get Open Shift Managed Cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Open Shift Managed Cluster"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/openShiftManagedClusters/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Creates a new Open Shift Managed Cluster or updates an existing one"), - // Operation: to.Ptr("Create or Update Open Shift Managed Cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Open Shift Managed Cluster"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/openShiftManagedClusters/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Delete a Open Shift Managed Cluster"), - // Operation: to.Ptr("Delete Open Shift Managed Cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Open Shift Managed Cluster"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/openShiftClusters/read"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Get a Open Shift Cluster"), - // Operation: to.Ptr("Get Open Shift Cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Open Shift Cluster"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/openShiftClusters/write"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Creates a new Open Shift Cluster or updates an existing one"), - // Operation: to.Ptr("Create or Update Open Shift Cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Open Shift Cluster"), - // }, - // Origin: to.Ptr("user,system"), - // }, - // { - // Name: to.Ptr("Microsoft.ContainerService/openShiftClusters/delete"), - // Display: &armcontainerservice.OperationValueDisplay{ - // Description: to.Ptr("Delete a Open Shift Cluster"), - // Operation: to.Ptr("Delete Open Shift Cluster"), - // Provider: to.Ptr("Microsoft Container Service"), - // Resource: to.Ptr("Open Shift Cluster"), - // }, - // Origin: to.Ptr("user,system"), - // }}, - // } - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client.go index 48c1b938bf8c..828cc9af20fb 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-05-01 +// Generated from API version 2023-07-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. @@ -68,7 +68,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-05-01 +// Generated from API version 2023-07-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" @@ -114,7 +114,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -123,7 +123,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-05-01 +// Generated from API version 2023-07-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. @@ -175,7 +175,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -193,7 +193,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-05-01 +// Generated from API version 2023-07-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 @@ -240,7 +240,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -258,7 +258,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-05-01 +// Generated from API version 2023-07-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. @@ -311,7 +311,7 @@ func (client *PrivateEndpointConnectionsClient) updateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-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 deleted file mode 100644 index f5a1e993192f..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client_example_test.go +++ /dev/null @@ -1,151 +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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/PrivateEndpointConnectionsList.json -func ExamplePrivateEndpointConnectionsClient_List() { - 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.NewPrivateEndpointConnectionsClient().List(ctx, "rg1", "clustername1", 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.PrivateEndpointConnectionListResult = armcontainerservice.PrivateEndpointConnectionListResult{ - // Value: []*armcontainerservice.PrivateEndpointConnection{ - // { - // Name: to.Ptr("privateendpointconnection1"), - // Type: to.Ptr("Microsoft.Network/privateLinkServices/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/subid1/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"), - // }, - // PrivateLinkServiceConnectionState: &armcontainerservice.PrivateLinkServiceConnectionState{ - // Status: to.Ptr(armcontainerservice.ConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armcontainerservice.PrivateEndpointConnectionProvisioningStateSucceeded), - // }, - // }}, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/PrivateEndpointConnectionsGet.json -func ExamplePrivateEndpointConnectionsClient_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.NewPrivateEndpointConnectionsClient().Get(ctx, "rg1", "clustername1", "privateendpointconnection1", 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.PrivateEndpointConnection = armcontainerservice.PrivateEndpointConnection{ - // Name: to.Ptr("privateendpointconnection1"), - // Type: to.Ptr("Microsoft.Network/privateLinkServices/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/subid1/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"), - // }, - // PrivateLinkServiceConnectionState: &armcontainerservice.PrivateLinkServiceConnectionState{ - // Status: to.Ptr(armcontainerservice.ConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armcontainerservice.PrivateEndpointConnectionProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/PrivateEndpointConnectionsUpdate.json -func ExamplePrivateEndpointConnectionsClient_Update() { - 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.NewPrivateEndpointConnectionsClient().Update(ctx, "rg1", "clustername1", "privateendpointconnection1", armcontainerservice.PrivateEndpointConnection{ - Properties: &armcontainerservice.PrivateEndpointConnectionProperties{ - PrivateLinkServiceConnectionState: &armcontainerservice.PrivateLinkServiceConnectionState{ - Status: to.Ptr(armcontainerservice.ConnectionStatusApproved), - }, - }, - }, 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.PrivateEndpointConnection = armcontainerservice.PrivateEndpointConnection{ - // Name: to.Ptr("privateendpointconnection1"), - // Type: to.Ptr("Microsoft.Network/privateLinkServices/privateEndpointConnections"), - // ID: to.Ptr("/subscriptions/subid1/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"), - // }, - // PrivateLinkServiceConnectionState: &armcontainerservice.PrivateLinkServiceConnectionState{ - // Status: to.Ptr(armcontainerservice.ConnectionStatusApproved), - // }, - // ProvisioningState: to.Ptr(armcontainerservice.PrivateEndpointConnectionProvisioningStateSucceeded), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/PrivateEndpointConnectionsDelete.json -func ExamplePrivateEndpointConnectionsClient_BeginDelete() { - cred, err := azidentity.NewDefaultAzureCredential(nil) - if err != nil { - log.Fatalf("failed to obtain a credential: %v", err) - } - ctx := context.Background() - clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) - if err != nil { - log.Fatalf("failed to create client: %v", err) - } - poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "rg1", "clustername1", "privateendpointconnection1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } - _, err = poller.PollUntilDone(ctx, nil) - if err != nil { - log.Fatalf("failed to pull the result: %v", err) - } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client.go index 8c7b28471b7b..09361337a0ba 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-05-01 +// Generated from API version 2023-07-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-05-01") + reqQP.Set("api-version", "2023-07-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 deleted file mode 100644 index 7f1a7c3cbfea..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go +++ /dev/null @@ -1,49 +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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/PrivateLinkResourcesList.json -func ExamplePrivateLinkResourcesClient_List() { - 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.NewPrivateLinkResourcesClient().List(ctx, "rg1", "clustername1", 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.PrivateLinkResourcesListResult = armcontainerservice.PrivateLinkResourcesListResult{ - // Value: []*armcontainerservice.PrivateLinkResource{ - // { - // Name: to.Ptr("management"), - // Type: to.Ptr("Microsoft.ContainerService/managedClusters/privateLinkResources"), - // GroupID: to.Ptr("management"), - // PrivateLinkServiceID: to.Ptr("/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Network/privateLinkServices/plsName"), - // RequiredMembers: []*string{ - // to.Ptr("management")}, - // }}, - // } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client.go index b68b34242d52..771424a01d9f 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-05-01 +// Generated from API version 2023-07-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-05-01") + reqQP.Set("api-version", "2023-07-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 deleted file mode 100644 index 64593d0ff564..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client_example_test.go +++ /dev/null @@ -1,44 +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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/ResolvePrivateLinkServiceId.json -func ExampleResolvePrivateLinkServiceIDClient_POST() { - 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.NewResolvePrivateLinkServiceIDClient().POST(ctx, "rg1", "clustername1", armcontainerservice.PrivateLinkResource{ - Name: to.Ptr("management"), - }, 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.PrivateLinkResource = armcontainerservice.PrivateLinkResource{ - // PrivateLinkServiceID: to.Ptr("/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Network/privateLinkServices/plsName"), - // } -} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go index fcd967b1f0b9..38da36cd323f 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-05-01 +// Generated from API version 2023-07-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-05-01") + reqQP.Set("api-version", "2023-07-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-05-01 +// Generated from API version 2023-07-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-05-01") + reqQP.Set("api-version", "2023-07-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-05-01 +// Generated from API version 2023-07-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-05-01") + reqQP.Set("api-version", "2023-07-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-05-01 +// Generated from API version 2023-07-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]{ @@ -276,7 +276,7 @@ func (client *SnapshotsClient) listCreateRequest(ctx context.Context, options *S return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -293,7 +293,7 @@ func (client *SnapshotsClient) listHandleResponse(resp *http.Response) (Snapshot // NewListByResourceGroupPager - Lists snapshots in the specified subscription and resource group. // -// Generated from API version 2023-05-01 +// Generated from API version 2023-07-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - SnapshotsClientListByResourceGroupOptions contains the optional parameters for the SnapshotsClient.NewListByResourceGroupPager // method. @@ -343,7 +343,7 @@ func (client *SnapshotsClient) listByResourceGroupCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -361,7 +361,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-05-01 +// Generated from API version 2023-07-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. @@ -408,7 +408,7 @@ func (client *SnapshotsClient) updateTagsCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-05-01") + reqQP.Set("api-version", "2023-07-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 deleted file mode 100644 index 25fdc8c1e7e7..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client_example_test.go +++ /dev/null @@ -1,303 +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/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/SnapshotsList.json -func ExampleSnapshotsClient_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.NewSnapshotsClient().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.SnapshotListResult = armcontainerservice.SnapshotListResult{ - // Value: []*armcontainerservice.Snapshot{ - // { - // Name: to.Ptr("snapshot1"), - // Type: to.Ptr("Microsoft.ContainerService/Snapshots"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.298420761Z"); 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.SnapshotProperties{ - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0"), - // }, - // EnableFIPS: to.Ptr(false), - // KubernetesVersion: to.Ptr("1.20.5"), - // NodeImageVersion: to.Ptr("AKSUbuntu-1804gen2containerd-2021.09.11"), - // OSSKU: to.Ptr(armcontainerservice.OSSKUUbuntu), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeNodePool), - // VMSize: to.Ptr("Standard_D2s_v3"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/SnapshotsListByResourceGroup.json -func ExampleSnapshotsClient_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.NewSnapshotsClient().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.SnapshotListResult = armcontainerservice.SnapshotListResult{ - // Value: []*armcontainerservice.Snapshot{ - // { - // Name: to.Ptr("snapshot1"), - // Type: to.Ptr("Microsoft.ContainerService/Snapshots"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.298420761Z"); 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.SnapshotProperties{ - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0"), - // }, - // EnableFIPS: to.Ptr(false), - // KubernetesVersion: to.Ptr("1.20.5"), - // NodeImageVersion: to.Ptr("AKSUbuntu-1804gen2containerd-2021.09.11"), - // OSSKU: to.Ptr(armcontainerservice.OSSKUUbuntu), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeNodePool), - // VMSize: to.Ptr("Standard_D2s_v3"), - // }, - // }}, - // } - } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/SnapshotsGet.json -func ExampleSnapshotsClient_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.NewSnapshotsClient().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.Snapshot = armcontainerservice.Snapshot{ - // Name: to.Ptr("snapshot1"), - // Type: to.Ptr("Microsoft.ContainerService/Snapshots"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.298420761Z"); 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.SnapshotProperties{ - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0"), - // }, - // EnableFIPS: to.Ptr(false), - // KubernetesVersion: to.Ptr("1.20.5"), - // NodeImageVersion: to.Ptr("AKSUbuntu-1804gen2containerd-2021.09.11"), - // OSSKU: to.Ptr(armcontainerservice.OSSKUUbuntu), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeNodePool), - // VMSize: to.Ptr("Standard_D2s_v3"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/SnapshotsCreate.json -func ExampleSnapshotsClient_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.NewSnapshotsClient().CreateOrUpdate(ctx, "rg1", "snapshot1", armcontainerservice.Snapshot{ - Location: to.Ptr("westus"), - Tags: map[string]*string{ - "key1": to.Ptr("val1"), - "key2": to.Ptr("val2"), - }, - Properties: &armcontainerservice.SnapshotProperties{ - CreationData: &armcontainerservice.CreationData{ - SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0"), - }, - }, - }, 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.Snapshot = armcontainerservice.Snapshot{ - // Name: to.Ptr("snapshot1"), - // Type: to.Ptr("Microsoft.ContainerService/Snapshots"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.298420761Z"); 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.SnapshotProperties{ - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0"), - // }, - // EnableFIPS: to.Ptr(false), - // KubernetesVersion: to.Ptr("1.20.5"), - // NodeImageVersion: to.Ptr("AKSUbuntu-1804gen2containerd-2021.09.11"), - // OSSKU: to.Ptr(armcontainerservice.OSSKUUbuntu), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeNodePool), - // VMSize: to.Ptr("Standard_D2s_v3"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/SnapshotsUpdateTags.json -func ExampleSnapshotsClient_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.NewSnapshotsClient().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.Snapshot = armcontainerservice.Snapshot{ - // Name: to.Ptr("snapshot1"), - // Type: to.Ptr("Microsoft.ContainerService/Snapshots"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1"), - // SystemData: &armcontainerservice.SystemData{ - // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.298420761Z"); 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.SnapshotProperties{ - // CreationData: &armcontainerservice.CreationData{ - // SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0"), - // }, - // EnableFIPS: to.Ptr(false), - // KubernetesVersion: to.Ptr("1.20.5"), - // NodeImageVersion: to.Ptr("AKSUbuntu-1804gen2containerd-2021.09.11"), - // OSSKU: to.Ptr(armcontainerservice.OSSKUUbuntu), - // OSType: to.Ptr(armcontainerservice.OSTypeLinux), - // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeNodePool), - // VMSize: to.Ptr("Standard_D2s_v3"), - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/c53808ba54beef57059371708f1fa6949a11a280/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-05-01/examples/SnapshotsDelete.json -func ExampleSnapshotsClient_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.NewSnapshotsClient().Delete(ctx, "rg1", "snapshot1", nil) - if err != nil { - log.Fatalf("failed to finish the request: %v", err) - } -}