diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md b/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md index b18a12306a44..57ecf7871005 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md +++ b/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md @@ -1,5 +1,32 @@ # Release History +## 4.4.0 (2023-08-30) +### Features Added + +- New enum type `IstioIngressGatewayMode` with values `IstioIngressGatewayModeExternal`, `IstioIngressGatewayModeInternal` +- New enum type `ServiceMeshMode` with values `ServiceMeshModeDisabled`, `ServiceMeshModeIstio` +- New function `*ManagedClustersClient.GetMeshRevisionProfile(context.Context, string, string, *ManagedClustersClientGetMeshRevisionProfileOptions) (ManagedClustersClientGetMeshRevisionProfileResponse, error)` +- New function `*ManagedClustersClient.GetMeshUpgradeProfile(context.Context, string, string, string, *ManagedClustersClientGetMeshUpgradeProfileOptions) (ManagedClustersClientGetMeshUpgradeProfileResponse, error)` +- New function `*ManagedClustersClient.NewListMeshRevisionProfilesPager(string, *ManagedClustersClientListMeshRevisionProfilesOptions) *runtime.Pager[ManagedClustersClientListMeshRevisionProfilesResponse]` +- New function `*ManagedClustersClient.NewListMeshUpgradeProfilesPager(string, string, *ManagedClustersClientListMeshUpgradeProfilesOptions) *runtime.Pager[ManagedClustersClientListMeshUpgradeProfilesResponse]` +- New struct `CompatibleVersions` +- New struct `IstioCertificateAuthority` +- New struct `IstioComponents` +- New struct `IstioEgressGateway` +- New struct `IstioIngressGateway` +- New struct `IstioPluginCertificateAuthority` +- New struct `IstioServiceMesh` +- New struct `MeshRevision` +- New struct `MeshRevisionProfile` +- New struct `MeshRevisionProfileList` +- New struct `MeshRevisionProfileProperties` +- New struct `MeshUpgradeProfile` +- New struct `MeshUpgradeProfileList` +- New struct `MeshUpgradeProfileProperties` +- New struct `ServiceMeshProfile` +- New field `ResourceUID`, `ServiceMeshProfile` in struct `ManagedClusterProperties` + + ## 4.3.0 (2023-08-25) ### Features Added diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go index 623e6fabcb1d..e265f4a5a319 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-07-01 +// Generated from API version 2023-08-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-07-01 +// Generated from API version 2023-08-01 func (client *AgentPoolsClient) abortLatestOperation(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientBeginAbortLatestOperationOptions) (*http.Response, error) { var err error req, err := client.abortLatestOperationCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, options) @@ -116,7 +116,7 @@ func (client *AgentPoolsClient) abortLatestOperationCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -125,7 +125,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-07-01 +// Generated from API version 2023-08-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. @@ -148,7 +148,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-07-01 +// Generated from API version 2023-08-01 func (client *AgentPoolsClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool, options *AgentPoolsClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, parameters, options) @@ -190,7 +190,7 @@ func (client *AgentPoolsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -202,7 +202,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-07-01 +// Generated from API version 2023-08-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. @@ -223,7 +223,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-07-01 +// Generated from API version 2023-08-01 func (client *AgentPoolsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, options) @@ -265,7 +265,7 @@ func (client *AgentPoolsClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -274,7 +274,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-07-01 +// Generated from API version 2023-08-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. @@ -321,7 +321,7 @@ func (client *AgentPoolsClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -340,7 +340,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-07-01 +// Generated from API version 2023-08-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 @@ -383,7 +383,7 @@ func (client *AgentPoolsClient) getAvailableAgentPoolVersionsCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -401,7 +401,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-07-01 +// Generated from API version 2023-08-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. @@ -449,7 +449,7 @@ func (client *AgentPoolsClient) getUpgradeProfileCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -466,7 +466,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-07-01 +// Generated from API version 2023-08-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. @@ -518,7 +518,7 @@ func (client *AgentPoolsClient) listCreateRequest(ctx context.Context, resourceG return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -538,7 +538,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-07-01 +// Generated from API version 2023-08-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. @@ -564,7 +564,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-07-01 +// Generated from API version 2023-08-01 func (client *AgentPoolsClient) upgradeNodeImageVersion(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *AgentPoolsClientBeginUpgradeNodeImageVersionOptions) (*http.Response, error) { var err error req, err := client.upgradeNodeImageVersionCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, options) @@ -606,7 +606,7 @@ func (client *AgentPoolsClient) upgradeNodeImageVersionCreateRequest(ctx context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-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 3bdc890b1388..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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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 74b4e13962a2..3b574bd03195 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md +++ b/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md @@ -5,9 +5,8 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md -- https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/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-version: 4.3.0 -tag: package-2023-07 +module-version: 4.4.0 ``` diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/constants.go b/sdk/resourcemanager/containerservice/armcontainerservice/constants.go index 36e47bef0d7a..68aefcae74c2 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.3.0" + moduleVersion = "v4.4.0" ) // AgentPoolMode - A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent @@ -209,6 +209,24 @@ func PossibleIPFamilyValues() []IPFamily { } } +// IstioIngressGatewayMode - Mode of an ingress gateway. +type IstioIngressGatewayMode string + +const ( + // IstioIngressGatewayModeExternal - The ingress gateway is assigned a public IP address and is publicly accessible. + IstioIngressGatewayModeExternal IstioIngressGatewayMode = "External" + // IstioIngressGatewayModeInternal - The ingress gateway is assigned an internal IP address and cannot is accessed publicly. + IstioIngressGatewayModeInternal IstioIngressGatewayMode = "Internal" +) + +// PossibleIstioIngressGatewayModeValues returns the possible values for the IstioIngressGatewayMode const type. +func PossibleIstioIngressGatewayModeValues() []IstioIngressGatewayMode { + return []IstioIngressGatewayMode{ + IstioIngressGatewayModeExternal, + IstioIngressGatewayModeInternal, + } +} + // KeyVaultNetworkAccessTypes - Network access of key vault. The possible values are Public and Private. Public means the // key vault allows public access from all networks. Private means the key vault disables public access and // enables private link. The default value is Public. @@ -724,6 +742,24 @@ func PossibleScaleSetPriorityValues() []ScaleSetPriority { } } +// ServiceMeshMode - Mode of the service mesh. +type ServiceMeshMode string + +const ( + // ServiceMeshModeDisabled - Mesh is disabled. + ServiceMeshModeDisabled ServiceMeshMode = "Disabled" + // ServiceMeshModeIstio - Istio deployed as an AKS addon. + ServiceMeshModeIstio ServiceMeshMode = "Istio" +) + +// PossibleServiceMeshModeValues returns the possible values for the ServiceMeshMode const type. +func PossibleServiceMeshModeValues() []ServiceMeshMode { + return []ServiceMeshMode{ + ServiceMeshModeDisabled, + ServiceMeshModeIstio, + } +} + // SnapshotType - The type of a snapshot. The default is NodePool. type SnapshotType string diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/go.mod b/sdk/resourcemanager/containerservice/armcontainerservice/go.mod index 9b6a1d84eda9..150eff2f4846 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.7.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.1.2 github.com/stretchr/testify v1.8.4 ) require ( + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // 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 v1.1.1 // indirect diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go index 8e14b59d7376..2b177987c108 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-07-01 +// Generated from API version 2023-08-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. @@ -95,7 +95,7 @@ func (client *MaintenanceConfigurationsClient) createOrUpdateCreateRequest(ctx c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -116,7 +116,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-07-01 +// Generated from API version 2023-08-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. @@ -163,7 +163,7 @@ func (client *MaintenanceConfigurationsClient) deleteCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -172,7 +172,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-07-01 +// Generated from API version 2023-08-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. @@ -220,7 +220,7 @@ func (client *MaintenanceConfigurationsClient) getCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -237,7 +237,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-07-01 +// Generated from API version 2023-08-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 @@ -290,7 +290,7 @@ func (client *MaintenanceConfigurationsClient) listByManagedClusterCreateRequest return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-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 719e2c68fa81..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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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 bf9f59c7ae2e..beb51d9bb083 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-07-01 +// Generated from API version 2023-08-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-07-01 +// Generated from API version 2023-08-01 func (client *ManagedClustersClient) abortLatestOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginAbortLatestOperationOptions) (*http.Response, error) { var err error req, err := client.abortLatestOperationCreateRequest(ctx, resourceGroupName, resourceName, options) @@ -111,7 +111,7 @@ func (client *ManagedClustersClient) abortLatestOperationCreateRequest(ctx conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -120,7 +120,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-07-01 +// Generated from API version 2023-08-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. @@ -142,7 +142,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-07-01 +// Generated from API version 2023-08-01 func (client *ManagedClustersClient) createOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster, options *ManagedClustersClientBeginCreateOrUpdateOptions) (*http.Response, error) { var err error req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, parameters, options) @@ -180,7 +180,7 @@ func (client *ManagedClustersClient) createOrUpdateCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -192,7 +192,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-07-01 +// Generated from API version 2023-08-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 @@ -213,7 +213,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-07-01 +// Generated from API version 2023-08-01 func (client *ManagedClustersClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, options) @@ -251,7 +251,7 @@ func (client *ManagedClustersClient) deleteCreateRequest(ctx context.Context, re return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +260,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-07-01 +// Generated from API version 2023-08-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. @@ -302,7 +302,7 @@ func (client *ManagedClustersClient) getCreateRequest(ctx context.Context, resou return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -322,7 +322,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-07-01 +// Generated from API version 2023-08-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. @@ -370,7 +370,7 @@ func (client *ManagedClustersClient) getAccessProfileCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -388,7 +388,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-07-01 +// Generated from API version 2023-08-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. @@ -436,7 +436,7 @@ func (client *ManagedClustersClient) getCommandResultCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -454,10 +454,138 @@ func (client *ManagedClustersClient) getCommandResultHandleResponse(resp *http.R return result, nil } +// GetMeshRevisionProfile - Contains extra metadata on the revision, including supported revisions, cluster compatibility +// and available upgrades +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-08-01 +// - location - The name of Azure region. +// - mode - The mode of the mesh. +// - options - ManagedClustersClientGetMeshRevisionProfileOptions contains the optional parameters for the ManagedClustersClient.GetMeshRevisionProfile +// method. +func (client *ManagedClustersClient) GetMeshRevisionProfile(ctx context.Context, location string, mode string, options *ManagedClustersClientGetMeshRevisionProfileOptions) (ManagedClustersClientGetMeshRevisionProfileResponse, error) { + var err error + req, err := client.getMeshRevisionProfileCreateRequest(ctx, location, mode, options) + if err != nil { + return ManagedClustersClientGetMeshRevisionProfileResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClustersClientGetMeshRevisionProfileResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedClustersClientGetMeshRevisionProfileResponse{}, err + } + resp, err := client.getMeshRevisionProfileHandleResponse(httpResp) + return resp, err +} + +// getMeshRevisionProfileCreateRequest creates the GetMeshRevisionProfile request. +func (client *ManagedClustersClient) getMeshRevisionProfileCreateRequest(ctx context.Context, location string, mode string, options *ManagedClustersClientGetMeshRevisionProfileOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if mode == "" { + return nil, errors.New("parameter mode cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{mode}", url.PathEscape(mode)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-08-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getMeshRevisionProfileHandleResponse handles the GetMeshRevisionProfile response. +func (client *ManagedClustersClient) getMeshRevisionProfileHandleResponse(resp *http.Response) (ManagedClustersClientGetMeshRevisionProfileResponse, error) { + result := ManagedClustersClientGetMeshRevisionProfileResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MeshRevisionProfile); err != nil { + return ManagedClustersClientGetMeshRevisionProfileResponse{}, err + } + return result, nil +} + +// GetMeshUpgradeProfile - Gets available upgrades for a service mesh in a cluster. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-08-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - mode - The mode of the mesh. +// - options - ManagedClustersClientGetMeshUpgradeProfileOptions contains the optional parameters for the ManagedClustersClient.GetMeshUpgradeProfile +// method. +func (client *ManagedClustersClient) GetMeshUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, mode string, options *ManagedClustersClientGetMeshUpgradeProfileOptions) (ManagedClustersClientGetMeshUpgradeProfileResponse, error) { + var err error + req, err := client.getMeshUpgradeProfileCreateRequest(ctx, resourceGroupName, resourceName, mode, options) + if err != nil { + return ManagedClustersClientGetMeshUpgradeProfileResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClustersClientGetMeshUpgradeProfileResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedClustersClientGetMeshUpgradeProfileResponse{}, err + } + resp, err := client.getMeshUpgradeProfileHandleResponse(httpResp) + return resp, err +} + +// getMeshUpgradeProfileCreateRequest creates the GetMeshUpgradeProfile request. +func (client *ManagedClustersClient) getMeshUpgradeProfileCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, mode string, options *ManagedClustersClientGetMeshUpgradeProfileOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles/{mode}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if mode == "" { + return nil, errors.New("parameter mode cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{mode}", url.PathEscape(mode)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-08-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getMeshUpgradeProfileHandleResponse handles the GetMeshUpgradeProfile response. +func (client *ManagedClustersClient) getMeshUpgradeProfileHandleResponse(resp *http.Response) (ManagedClustersClientGetMeshUpgradeProfileResponse, error) { + result := ManagedClustersClientGetMeshUpgradeProfileResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MeshUpgradeProfile); err != nil { + return ManagedClustersClientGetMeshUpgradeProfileResponse{}, err + } + return result, nil +} + // GetOSOptions - Gets supported OS options in the specified subscription. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2023-08-01 // - location - The name of Azure region. // - options - ManagedClustersClientGetOSOptionsOptions contains the optional parameters for the ManagedClustersClient.GetOSOptions // method. @@ -495,7 +623,7 @@ func (client *ManagedClustersClient) getOSOptionsCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") if options != nil && options.ResourceType != nil { reqQP.Set("resource-type", *options.ResourceType) } @@ -516,7 +644,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-07-01 +// Generated from API version 2023-08-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 @@ -559,7 +687,7 @@ func (client *ManagedClustersClient) getUpgradeProfileCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -576,7 +704,7 @@ func (client *ManagedClustersClient) getUpgradeProfileHandleResponse(resp *http. // NewListPager - Gets a list of managed clusters in the specified subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2023-08-01 // - options - ManagedClustersClientListOptions contains the optional parameters for the ManagedClustersClient.NewListPager // method. func (client *ManagedClustersClient) NewListPager(options *ManagedClustersClientListOptions) *runtime.Pager[ManagedClustersClientListResponse] { @@ -619,7 +747,7 @@ func (client *ManagedClustersClient) listCreateRequest(ctx context.Context, opti return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -636,7 +764,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-07-01 +// Generated from API version 2023-08-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - ManagedClustersClientListByResourceGroupOptions contains the optional parameters for the ManagedClustersClient.NewListByResourceGroupPager // method. @@ -684,7 +812,7 @@ func (client *ManagedClustersClient) listByResourceGroupCreateRequest(ctx contex return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -702,7 +830,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-07-01 +// Generated from API version 2023-08-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 @@ -745,7 +873,7 @@ func (client *ManagedClustersClient) listClusterAdminCredentialsCreateRequest(ct return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -766,7 +894,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-07-01 +// Generated from API version 2023-08-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 @@ -809,7 +937,7 @@ func (client *ManagedClustersClient) listClusterMonitoringUserCredentialsCreateR return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -830,7 +958,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-07-01 +// Generated from API version 2023-08-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 @@ -873,7 +1001,7 @@ func (client *ManagedClustersClient) listClusterUserCredentialsCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -898,7 +1026,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-07-01 +// Generated from API version 2023-08-01 // - location - The name of Azure region. // - options - ManagedClustersClientListKubernetesVersionsOptions contains the optional parameters for the ManagedClustersClient.ListKubernetesVersions // method. @@ -936,7 +1064,7 @@ func (client *ManagedClustersClient) listKubernetesVersionsCreateRequest(ctx con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -951,10 +1079,146 @@ func (client *ManagedClustersClient) listKubernetesVersionsHandleResponse(resp * return result, nil } +// NewListMeshRevisionProfilesPager - Contains extra metadata on each revision, including supported revisions, cluster compatibility +// and available upgrades +// +// Generated from API version 2023-08-01 +// - location - The name of Azure region. +// - options - ManagedClustersClientListMeshRevisionProfilesOptions contains the optional parameters for the ManagedClustersClient.NewListMeshRevisionProfilesPager +// method. +func (client *ManagedClustersClient) NewListMeshRevisionProfilesPager(location string, options *ManagedClustersClientListMeshRevisionProfilesOptions) *runtime.Pager[ManagedClustersClientListMeshRevisionProfilesResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedClustersClientListMeshRevisionProfilesResponse]{ + More: func(page ManagedClustersClientListMeshRevisionProfilesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedClustersClientListMeshRevisionProfilesResponse) (ManagedClustersClientListMeshRevisionProfilesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listMeshRevisionProfilesCreateRequest(ctx, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ManagedClustersClientListMeshRevisionProfilesResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClustersClientListMeshRevisionProfilesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedClustersClientListMeshRevisionProfilesResponse{}, runtime.NewResponseError(resp) + } + return client.listMeshRevisionProfilesHandleResponse(resp) + }, + }) +} + +// listMeshRevisionProfilesCreateRequest creates the ListMeshRevisionProfiles request. +func (client *ManagedClustersClient) listMeshRevisionProfilesCreateRequest(ctx context.Context, location string, options *ManagedClustersClientListMeshRevisionProfilesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-08-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMeshRevisionProfilesHandleResponse handles the ListMeshRevisionProfiles response. +func (client *ManagedClustersClient) listMeshRevisionProfilesHandleResponse(resp *http.Response) (ManagedClustersClientListMeshRevisionProfilesResponse, error) { + result := ManagedClustersClientListMeshRevisionProfilesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MeshRevisionProfileList); err != nil { + return ManagedClustersClientListMeshRevisionProfilesResponse{}, err + } + return result, nil +} + +// NewListMeshUpgradeProfilesPager - Lists available upgrades for all service meshes in a specific cluster. +// +// Generated from API version 2023-08-01 +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - options - ManagedClustersClientListMeshUpgradeProfilesOptions contains the optional parameters for the ManagedClustersClient.NewListMeshUpgradeProfilesPager +// method. +func (client *ManagedClustersClient) NewListMeshUpgradeProfilesPager(resourceGroupName string, resourceName string, options *ManagedClustersClientListMeshUpgradeProfilesOptions) *runtime.Pager[ManagedClustersClientListMeshUpgradeProfilesResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedClustersClientListMeshUpgradeProfilesResponse]{ + More: func(page ManagedClustersClientListMeshUpgradeProfilesResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedClustersClientListMeshUpgradeProfilesResponse) (ManagedClustersClientListMeshUpgradeProfilesResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listMeshUpgradeProfilesCreateRequest(ctx, resourceGroupName, resourceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ManagedClustersClientListMeshUpgradeProfilesResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClustersClientListMeshUpgradeProfilesResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedClustersClientListMeshUpgradeProfilesResponse{}, runtime.NewResponseError(resp) + } + return client.listMeshUpgradeProfilesHandleResponse(resp) + }, + }) +} + +// listMeshUpgradeProfilesCreateRequest creates the ListMeshUpgradeProfiles request. +func (client *ManagedClustersClient) listMeshUpgradeProfilesCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientListMeshUpgradeProfilesOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshUpgradeProfiles" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-08-01") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listMeshUpgradeProfilesHandleResponse handles the ListMeshUpgradeProfiles response. +func (client *ManagedClustersClient) listMeshUpgradeProfilesHandleResponse(resp *http.Response) (ManagedClustersClientListMeshUpgradeProfilesResponse, error) { + result := ManagedClustersClientListMeshUpgradeProfilesResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MeshUpgradeProfileList); err != nil { + return ManagedClustersClientListMeshUpgradeProfilesResponse{}, err + } + return result, nil +} + // 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-07-01 +// Generated from API version 2023-08-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 @@ -1007,7 +1271,7 @@ func (client *ManagedClustersClient) listOutboundNetworkDependenciesEndpointsCre return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1026,7 +1290,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-07-01 +// Generated from API version 2023-08-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 @@ -1051,7 +1315,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-07-01 +// Generated from API version 2023-08-01 func (client *ManagedClustersClient) resetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile, options *ManagedClustersClientBeginResetAADProfileOptions) (*http.Response, error) { var err error req, err := client.resetAADProfileCreateRequest(ctx, resourceGroupName, resourceName, parameters, options) @@ -1089,7 +1353,7 @@ func (client *ManagedClustersClient) resetAADProfileCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1101,7 +1365,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-07-01 +// Generated from API version 2023-08-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. @@ -1125,7 +1389,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-07-01 +// Generated from API version 2023-08-01 func (client *ManagedClustersClient) resetServicePrincipalProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile, options *ManagedClustersClientBeginResetServicePrincipalProfileOptions) (*http.Response, error) { var err error req, err := client.resetServicePrincipalProfileCreateRequest(ctx, resourceGroupName, resourceName, parameters, options) @@ -1163,7 +1427,7 @@ func (client *ManagedClustersClient) resetServicePrincipalProfileCreateRequest(c return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1176,7 +1440,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-07-01 +// Generated from API version 2023-08-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 @@ -1200,7 +1464,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-07-01 +// Generated from API version 2023-08-01 func (client *ManagedClustersClient) rotateClusterCertificates(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginRotateClusterCertificatesOptions) (*http.Response, error) { var err error req, err := client.rotateClusterCertificatesCreateRequest(ctx, resourceGroupName, resourceName, options) @@ -1238,7 +1502,7 @@ func (client *ManagedClustersClient) rotateClusterCertificatesCreateRequest(ctx return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1247,7 +1511,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-07-01 +// Generated from API version 2023-08-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 @@ -1270,7 +1534,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-07-01 +// Generated from API version 2023-08-01 func (client *ManagedClustersClient) rotateServiceAccountSigningKeys(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginRotateServiceAccountSigningKeysOptions) (*http.Response, error) { var err error req, err := client.rotateServiceAccountSigningKeysCreateRequest(ctx, resourceGroupName, resourceName, options) @@ -1308,7 +1572,7 @@ func (client *ManagedClustersClient) rotateServiceAccountSigningKeysCreateReques return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1319,7 +1583,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-07-01 +// Generated from API version 2023-08-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 @@ -1345,7 +1609,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-07-01 +// Generated from API version 2023-08-01 func (client *ManagedClustersClient) runCommand(ctx context.Context, resourceGroupName string, resourceName string, requestPayload RunCommandRequest, options *ManagedClustersClientBeginRunCommandOptions) (*http.Response, error) { var err error req, err := client.runCommandCreateRequest(ctx, resourceGroupName, resourceName, requestPayload, options) @@ -1383,7 +1647,7 @@ func (client *ManagedClustersClient) runCommandCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, requestPayload); err != nil { @@ -1396,7 +1660,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-07-01 +// Generated from API version 2023-08-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 @@ -1420,7 +1684,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-07-01 +// Generated from API version 2023-08-01 func (client *ManagedClustersClient) start(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginStartOptions) (*http.Response, error) { var err error req, err := client.startCreateRequest(ctx, resourceGroupName, resourceName, options) @@ -1458,7 +1722,7 @@ func (client *ManagedClustersClient) startCreateRequest(ctx context.Context, res return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1470,7 +1734,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-07-01 +// Generated from API version 2023-08-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 @@ -1496,7 +1760,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-07-01 +// Generated from API version 2023-08-01 func (client *ManagedClustersClient) stop(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClustersClientBeginStopOptions) (*http.Response, error) { var err error req, err := client.stopCreateRequest(ctx, resourceGroupName, resourceName, options) @@ -1534,7 +1798,7 @@ func (client *ManagedClustersClient) stopCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1543,7 +1807,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-07-01 +// Generated from API version 2023-08-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. @@ -1565,7 +1829,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-07-01 +// Generated from API version 2023-08-01 func (client *ManagedClustersClient) updateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject, options *ManagedClustersClientBeginUpdateTagsOptions) (*http.Response, error) { var err error req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, resourceName, parameters, options) @@ -1603,7 +1867,7 @@ func (client *ManagedClustersClient) updateTagsCreateRequest(ctx context.Context return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-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 5d2409a80a1b..000000000000 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go +++ /dev/null @@ -1,5400 +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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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"), - // }, - // UpgradeSettings: &armcontainerservice.ClusterUpgradeSettings{ - // OverrideSettings: &armcontainerservice.UpgradeOverrideSettings{ - // ForceUpgrade: to.Ptr(true), - // Until: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-01T13:00:00Z"); return t}()), - // }, - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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"), - }, - UpgradeSettings: &armcontainerservice.ClusterUpgradeSettings{ - OverrideSettings: &armcontainerservice.UpgradeOverrideSettings{ - ForceUpgrade: to.Ptr(false), - Until: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-01T13:00:00Z"); return t }()), - }, - }, - 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"), - // }, - // UpgradeSettings: &armcontainerservice.ClusterUpgradeSettings{ - // OverrideSettings: &armcontainerservice.UpgradeOverrideSettings{ - // ForceUpgrade: to.Ptr(false), - // Until: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-11-01T13:00:00Z"); return t}()), - // }, - // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), - // }, - // }, - // } -} - -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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 4c7940a3bec5..e435a8643b17 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/models.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/models.go @@ -182,6 +182,15 @@ type CommandResultProperties struct { StartedAt *time.Time } +// CompatibleVersions - Version information about a product/service that is compatible with a service mesh revision. +type CompatibleVersions struct { + // The product/service name. + Name *string + + // Product/service versions compatible with a service mesh add-on revision. + Versions []*string +} + // CreationData - Data used when creating a target resource from a source resource. type CreationData struct { // This is the ARM ID of the source object to be used to create the target object. @@ -266,6 +275,75 @@ type ExtendedLocation struct { Type *ExtendedLocationTypes } +// IstioCertificateAuthority - Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin +// certificates as described here https://aka.ms/asm-plugin-ca +type IstioCertificateAuthority struct { + // Plugin certificates information for Service Mesh. + Plugin *IstioPluginCertificateAuthority +} + +// IstioComponents - Istio components configuration. +type IstioComponents struct { + // Istio egress gateways. + EgressGateways []*IstioEgressGateway + + // Istio ingress gateways. + IngressGateways []*IstioIngressGateway +} + +// IstioEgressGateway - Istio egress gateway configuration. +type IstioEgressGateway struct { + // REQUIRED; Whether to enable the egress gateway. + Enabled *bool + + // NodeSelector for scheduling the egress gateway. + NodeSelector map[string]*string +} + +// IstioIngressGateway - Istio ingress gateway configuration. For now, we support up to one external ingress gateway named +// aks-istio-ingressgateway-external and one internal ingress gateway named +// aks-istio-ingressgateway-internal. +type IstioIngressGateway struct { + // REQUIRED; Whether to enable the ingress gateway. + Enabled *bool + + // REQUIRED; Mode of an ingress gateway. + Mode *IstioIngressGatewayMode +} + +// IstioPluginCertificateAuthority - Plugin certificates information for Service Mesh. +type IstioPluginCertificateAuthority struct { + // Certificate chain object name in Azure Key Vault. + CertChainObjectName *string + + // Intermediate certificate object name in Azure Key Vault. + CertObjectName *string + + // Intermediate certificate private key object name in Azure Key Vault. + KeyObjectName *string + + // The resource ID of the Key Vault. + KeyVaultID *string + + // Root certificate object name in Azure Key Vault. + RootCertObjectName *string +} + +// IstioServiceMesh - Istio service mesh configuration. +type IstioServiceMesh struct { + // Istio Service Mesh Certificate Authority (CA) configuration. For now, we only support plugin certificates as described + // here https://aka.ms/asm-plugin-ca + CertificateAuthority *IstioCertificateAuthority + + // Istio components configuration. + Components *IstioComponents + + // The list of revisions of the Istio control plane. When an upgrade is not in progress, this holds one value. When canary + // upgrade is in progress, this can only hold two consecutive values. For more + // information, see: https://learn.microsoft.com/en-us/azure/aks/istio-upgrade + Revisions []*string +} + // KubeletConfig - See AKS custom node configuration [https://docs.microsoft.com/azure/aks/custom-node-configuration] for // more details. type KubeletConfig struct { @@ -1233,6 +1311,9 @@ type ManagedClusterProperties struct { // Security profile for the managed cluster. SecurityProfile *ManagedClusterSecurityProfile + // Service mesh profile for a managed cluster. + ServiceMeshProfile *ServiceMeshProfile + // Information about a service principal identity for the cluster to use for manipulating Azure APIs. ServicePrincipalProfile *ManagedClusterServicePrincipalProfile @@ -1274,6 +1355,10 @@ type ManagedClusterProperties struct { // READ-ONLY; The current provisioning state. ProvisioningState *string + + // READ-ONLY; The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create + // sequence) + ResourceUID *string } // ManagedClusterPropertiesAutoScalerProfile - Parameters to be applied to the cluster-autoscaler when enabled @@ -1534,6 +1619,89 @@ type ManagedServiceIdentityUserAssignedIdentitiesValue struct { PrincipalID *string } +// MeshRevision - Holds information on upgrades and compatibility for given major.minor mesh release. +type MeshRevision struct { + // List of items this revision of service mesh is compatible with, and their associated versions. + CompatibleWith []*CompatibleVersions + + // The revision of the mesh release. + Revision *string + + // List of revisions available for upgrade of a specific mesh revision + Upgrades []*string +} + +// MeshRevisionProfile - Mesh revision profile for a mesh. +type MeshRevisionProfile struct { + // Mesh revision profile properties for a mesh + Properties *MeshRevisionProfileProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// MeshRevisionProfileList - Holds an array of MeshRevisionsProfiles +type MeshRevisionProfileList struct { + // Array of service mesh add-on revision profiles for all supported mesh modes. + Value []*MeshRevisionProfile + + // READ-ONLY; The URL to get the next set of mesh revision profile. + NextLink *string +} + +// MeshRevisionProfileProperties - Mesh revision profile properties for a mesh +type MeshRevisionProfileProperties struct { + MeshRevisions []*MeshRevision +} + +// MeshUpgradeProfile - Upgrade profile for given mesh. +type MeshUpgradeProfile struct { + // Mesh upgrade profile properties for a major.minor release. + Properties *MeshUpgradeProfileProperties + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// MeshUpgradeProfileList - Holds an array of MeshUpgradeProfiles +type MeshUpgradeProfileList struct { + // Array of supported service mesh add-on upgrade profiles. + Value []*MeshUpgradeProfile + + // READ-ONLY; The URL to get the next set of mesh upgrade profile. + NextLink *string +} + +// MeshUpgradeProfileProperties - Mesh upgrade profile properties for a major.minor release. +type MeshUpgradeProfileProperties struct { + // List of items this revision of service mesh is compatible with, and their associated versions. + CompatibleWith []*CompatibleVersions + + // The revision of the mesh release. + Revision *string + + // List of revisions available for upgrade of a specific mesh revision + Upgrades []*string +} + // NetworkProfile - Profile of network configuration. type NetworkProfile struct { // An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified @@ -1819,6 +1987,15 @@ type Schedule struct { Weekly *WeeklySchedule } +// ServiceMeshProfile - Service mesh profile for a managed cluster. +type ServiceMeshProfile struct { + // REQUIRED; Mode of the service mesh. + Mode *ServiceMeshMode + + // Istio service mesh configuration. + Istio *IstioServiceMesh +} + // Snapshot - A node pool snapshot resource. type Snapshot struct { // REQUIRED; The geo-location where the resource lives diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go b/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go index 506fbd4564be..b64908740e32 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go @@ -498,6 +498,37 @@ func (c *CommandResultProperties) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CompatibleVersions. +func (c CompatibleVersions) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", c.Name) + populate(objectMap, "versions", c.Versions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CompatibleVersions. +func (c *CompatibleVersions) 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 "name": + err = unpopulate(val, "Name", &c.Name) + delete(rawMsg, key) + case "versions": + err = unpopulate(val, "Versions", &c.Versions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", c, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CreationData. func (c CreationData) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -781,6 +812,204 @@ func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type IstioCertificateAuthority. +func (i IstioCertificateAuthority) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "plugin", i.Plugin) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioCertificateAuthority. +func (i *IstioCertificateAuthority) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "plugin": + err = unpopulate(val, "Plugin", &i.Plugin) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IstioComponents. +func (i IstioComponents) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "egressGateways", i.EgressGateways) + populate(objectMap, "ingressGateways", i.IngressGateways) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioComponents. +func (i *IstioComponents) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "egressGateways": + err = unpopulate(val, "EgressGateways", &i.EgressGateways) + delete(rawMsg, key) + case "ingressGateways": + err = unpopulate(val, "IngressGateways", &i.IngressGateways) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IstioEgressGateway. +func (i IstioEgressGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", i.Enabled) + populate(objectMap, "nodeSelector", i.NodeSelector) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioEgressGateway. +func (i *IstioEgressGateway) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &i.Enabled) + delete(rawMsg, key) + case "nodeSelector": + err = unpopulate(val, "NodeSelector", &i.NodeSelector) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IstioIngressGateway. +func (i IstioIngressGateway) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", i.Enabled) + populate(objectMap, "mode", i.Mode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioIngressGateway. +func (i *IstioIngressGateway) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &i.Enabled) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &i.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IstioPluginCertificateAuthority. +func (i IstioPluginCertificateAuthority) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certChainObjectName", i.CertChainObjectName) + populate(objectMap, "certObjectName", i.CertObjectName) + populate(objectMap, "keyObjectName", i.KeyObjectName) + populate(objectMap, "keyVaultId", i.KeyVaultID) + populate(objectMap, "rootCertObjectName", i.RootCertObjectName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioPluginCertificateAuthority. +func (i *IstioPluginCertificateAuthority) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certChainObjectName": + err = unpopulate(val, "CertChainObjectName", &i.CertChainObjectName) + delete(rawMsg, key) + case "certObjectName": + err = unpopulate(val, "CertObjectName", &i.CertObjectName) + delete(rawMsg, key) + case "keyObjectName": + err = unpopulate(val, "KeyObjectName", &i.KeyObjectName) + delete(rawMsg, key) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &i.KeyVaultID) + delete(rawMsg, key) + case "rootCertObjectName": + err = unpopulate(val, "RootCertObjectName", &i.RootCertObjectName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type IstioServiceMesh. +func (i IstioServiceMesh) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "certificateAuthority", i.CertificateAuthority) + populate(objectMap, "components", i.Components) + populate(objectMap, "revisions", i.Revisions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioServiceMesh. +func (i *IstioServiceMesh) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "certificateAuthority": + err = unpopulate(val, "CertificateAuthority", &i.CertificateAuthority) + delete(rawMsg, key) + case "components": + err = unpopulate(val, "Components", &i.Components) + delete(rawMsg, key) + case "revisions": + err = unpopulate(val, "Revisions", &i.Revisions) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", i, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type KubeletConfig. func (k KubeletConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -2629,7 +2858,9 @@ func (m ManagedClusterProperties) MarshalJSON() ([]byte, error) { populate(objectMap, "privateLinkResources", m.PrivateLinkResources) populate(objectMap, "provisioningState", m.ProvisioningState) populate(objectMap, "publicNetworkAccess", m.PublicNetworkAccess) + populate(objectMap, "resourceUID", m.ResourceUID) populate(objectMap, "securityProfile", m.SecurityProfile) + populate(objectMap, "serviceMeshProfile", m.ServiceMeshProfile) populate(objectMap, "servicePrincipalProfile", m.ServicePrincipalProfile) populate(objectMap, "storageProfile", m.StorageProfile) populate(objectMap, "supportPlan", m.SupportPlan) @@ -2738,9 +2969,15 @@ func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { case "publicNetworkAccess": err = unpopulate(val, "PublicNetworkAccess", &m.PublicNetworkAccess) delete(rawMsg, key) + case "resourceUID": + err = unpopulate(val, "ResourceUID", &m.ResourceUID) + delete(rawMsg, key) case "securityProfile": err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) delete(rawMsg, key) + case "serviceMeshProfile": + err = unpopulate(val, "ServiceMeshProfile", &m.ServiceMeshProfile) + delete(rawMsg, key) case "servicePrincipalProfile": err = unpopulate(val, "ServicePrincipalProfile", &m.ServicePrincipalProfile) delete(rawMsg, key) @@ -3451,6 +3688,251 @@ func (m *ManagedServiceIdentityUserAssignedIdentitiesValue) UnmarshalJSON(data [ return nil } +// MarshalJSON implements the json.Marshaller interface for type MeshRevision. +func (m MeshRevision) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "compatibleWith", m.CompatibleWith) + populate(objectMap, "revision", m.Revision) + populate(objectMap, "upgrades", m.Upgrades) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevision. +func (m *MeshRevision) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "compatibleWith": + err = unpopulate(val, "CompatibleWith", &m.CompatibleWith) + delete(rawMsg, key) + case "revision": + err = unpopulate(val, "Revision", &m.Revision) + delete(rawMsg, key) + case "upgrades": + err = unpopulate(val, "Upgrades", &m.Upgrades) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfile. +func (m MeshRevisionProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevisionProfile. +func (m *MeshRevisionProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfileList. +func (m MeshRevisionProfileList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevisionProfileList. +func (m *MeshRevisionProfileList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfileProperties. +func (m MeshRevisionProfileProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "meshRevisions", m.MeshRevisions) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevisionProfileProperties. +func (m *MeshRevisionProfileProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "meshRevisions": + err = unpopulate(val, "MeshRevisions", &m.MeshRevisions) + 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 MeshUpgradeProfile. +func (m MeshUpgradeProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshUpgradeProfile. +func (m *MeshUpgradeProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MeshUpgradeProfileList. +func (m MeshUpgradeProfileList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshUpgradeProfileList. +func (m *MeshUpgradeProfileList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MeshUpgradeProfileProperties. +func (m MeshUpgradeProfileProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "compatibleWith", m.CompatibleWith) + populate(objectMap, "revision", m.Revision) + populate(objectMap, "upgrades", m.Upgrades) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshUpgradeProfileProperties. +func (m *MeshUpgradeProfileProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "compatibleWith": + err = unpopulate(val, "CompatibleWith", &m.CompatibleWith) + delete(rawMsg, key) + case "revision": + err = unpopulate(val, "Revision", &m.Revision) + delete(rawMsg, key) + case "upgrades": + err = unpopulate(val, "Upgrades", &m.Upgrades) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type NetworkProfile. func (n NetworkProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4275,6 +4757,37 @@ func (s *Schedule) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type ServiceMeshProfile. +func (s ServiceMeshProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "istio", s.Istio) + populate(objectMap, "mode", s.Mode) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ServiceMeshProfile. +func (s *ServiceMeshProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "istio": + err = unpopulate(val, "Istio", &s.Istio) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &s.Mode) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", s, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Snapshot. func (s Snapshot) 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 6878e3fa553d..26713ee96752 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-07-01 +// Generated from API version 2023-08-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]{ @@ -71,7 +71,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, options * return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-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 e31ef4d5fcef..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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/options.go b/sdk/resourcemanager/containerservice/armcontainerservice/options.go index 83203afcc4d0..15de99918592 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/options.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/options.go @@ -166,6 +166,18 @@ type ManagedClustersClientGetCommandResultOptions struct { // placeholder for future optional parameters } +// ManagedClustersClientGetMeshRevisionProfileOptions contains the optional parameters for the ManagedClustersClient.GetMeshRevisionProfile +// method. +type ManagedClustersClientGetMeshRevisionProfileOptions struct { + // placeholder for future optional parameters +} + +// ManagedClustersClientGetMeshUpgradeProfileOptions contains the optional parameters for the ManagedClustersClient.GetMeshUpgradeProfile +// method. +type ManagedClustersClientGetMeshUpgradeProfileOptions struct { + // placeholder for future optional parameters +} + // ManagedClustersClientGetOSOptionsOptions contains the optional parameters for the ManagedClustersClient.GetOSOptions method. type ManagedClustersClientGetOSOptionsOptions struct { // The resource type for which the OS options needs to be returned @@ -221,6 +233,18 @@ type ManagedClustersClientListKubernetesVersionsOptions struct { // placeholder for future optional parameters } +// ManagedClustersClientListMeshRevisionProfilesOptions contains the optional parameters for the ManagedClustersClient.NewListMeshRevisionProfilesPager +// method. +type ManagedClustersClientListMeshRevisionProfilesOptions struct { + // placeholder for future optional parameters +} + +// ManagedClustersClientListMeshUpgradeProfilesOptions contains the optional parameters for the ManagedClustersClient.NewListMeshUpgradeProfilesPager +// method. +type ManagedClustersClientListMeshUpgradeProfilesOptions struct { + // placeholder for future optional parameters +} + // ManagedClustersClientListOptions contains the optional parameters for the ManagedClustersClient.NewListPager method. type ManagedClustersClientListOptions struct { // placeholder for future optional parameters diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client.go index 552efc5bab4e..27ab66b0ddb2 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-07-01 +// Generated from API version 2023-08-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-07-01 +// Generated from API version 2023-08-01 func (client *PrivateEndpointConnectionsClient) deleteOperation(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*http.Response, error) { var err error req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, privateEndpointConnectionName, options) @@ -110,7 +110,7 @@ func (client *PrivateEndpointConnectionsClient) deleteCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -119,7 +119,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-07-01 +// Generated from API version 2023-08-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. @@ -167,7 +167,7 @@ func (client *PrivateEndpointConnectionsClient) getCreateRequest(ctx context.Con return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -185,7 +185,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-07-01 +// Generated from API version 2023-08-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 @@ -228,7 +228,7 @@ func (client *PrivateEndpointConnectionsClient) listCreateRequest(ctx context.Co return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -246,7 +246,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-07-01 +// Generated from API version 2023-08-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. @@ -295,7 +295,7 @@ func (client *PrivateEndpointConnectionsClient) updateCreateRequest(ctx context. return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-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 2d67a5e34c6d..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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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 3f5942c19616..b9c987979def 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-07-01 +// Generated from API version 2023-08-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 @@ -89,7 +89,7 @@ func (client *PrivateLinkResourcesClient) listCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-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 0cca1ad01d32..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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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 3a85ee711d8b..f480bb5f8b7e 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-07-01 +// Generated from API version 2023-08-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. @@ -90,7 +90,7 @@ func (client *ResolvePrivateLinkServiceIDClient) postCreateRequest(ctx context.C return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-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 d02eeda31d39..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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/response_types.go b/sdk/resourcemanager/containerservice/armcontainerservice/response_types.go index cdf20508551a..199da3717267 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/response_types.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/response_types.go @@ -110,6 +110,18 @@ type ManagedClustersClientGetCommandResultResponse struct { Location *string } +// ManagedClustersClientGetMeshRevisionProfileResponse contains the response from method ManagedClustersClient.GetMeshRevisionProfile. +type ManagedClustersClientGetMeshRevisionProfileResponse struct { + // Mesh revision profile for a mesh. + MeshRevisionProfile +} + +// ManagedClustersClientGetMeshUpgradeProfileResponse contains the response from method ManagedClustersClient.GetMeshUpgradeProfile. +type ManagedClustersClientGetMeshUpgradeProfileResponse struct { + // Upgrade profile for given mesh. + MeshUpgradeProfile +} + // ManagedClustersClientGetOSOptionsResponse contains the response from method ManagedClustersClient.GetOSOptions. type ManagedClustersClientGetOSOptionsResponse struct { // The OS option profile. @@ -158,6 +170,18 @@ type ManagedClustersClientListKubernetesVersionsResponse struct { KubernetesVersionListResult } +// ManagedClustersClientListMeshRevisionProfilesResponse contains the response from method ManagedClustersClient.NewListMeshRevisionProfilesPager. +type ManagedClustersClientListMeshRevisionProfilesResponse struct { + // Holds an array of MeshRevisionsProfiles + MeshRevisionProfileList +} + +// ManagedClustersClientListMeshUpgradeProfilesResponse contains the response from method ManagedClustersClient.NewListMeshUpgradeProfilesPager. +type ManagedClustersClientListMeshUpgradeProfilesResponse struct { + // Holds an array of MeshUpgradeProfiles + MeshUpgradeProfileList +} + // ManagedClustersClientListOutboundNetworkDependenciesEndpointsResponse contains the response from method ManagedClustersClient.NewListOutboundNetworkDependenciesEndpointsPager. type ManagedClustersClientListOutboundNetworkDependenciesEndpointsResponse struct { // Collection of OutboundEnvironmentEndpoint diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go index 77f874e4e102..40f8bf094f3d 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-07-01 +// Generated from API version 2023-08-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. @@ -90,7 +90,7 @@ func (client *SnapshotsClient) createOrUpdateCreateRequest(ctx context.Context, return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -111,7 +111,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-07-01 +// Generated from API version 2023-08-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. @@ -152,7 +152,7 @@ func (client *SnapshotsClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -161,7 +161,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-07-01 +// Generated from API version 2023-08-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. @@ -203,7 +203,7 @@ func (client *SnapshotsClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -220,7 +220,7 @@ func (client *SnapshotsClient) getHandleResponse(resp *http.Response) (Snapshots // NewListPager - Gets a list of snapshots in the specified subscription. // -// Generated from API version 2023-07-01 +// Generated from API version 2023-08-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]{ @@ -262,7 +262,7 @@ func (client *SnapshotsClient) listCreateRequest(ctx context.Context, options *S return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -279,7 +279,7 @@ func (client *SnapshotsClient) listHandleResponse(resp *http.Response) (Snapshot // NewListByResourceGroupPager - Lists snapshots in the specified subscription and resource group. // -// Generated from API version 2023-07-01 +// Generated from API version 2023-08-01 // - resourceGroupName - The name of the resource group. The name is case insensitive. // - options - SnapshotsClientListByResourceGroupOptions contains the optional parameters for the SnapshotsClient.NewListByResourceGroupPager // method. @@ -327,7 +327,7 @@ func (client *SnapshotsClient) listByResourceGroupCreateRequest(ctx context.Cont return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-01") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -345,7 +345,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-07-01 +// Generated from API version 2023-08-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. @@ -388,7 +388,7 @@ func (client *SnapshotsClient) updateTagsCreateRequest(ctx context.Context, reso return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", "2023-07-01") + reqQP.Set("api-version", "2023-08-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 257fc6400032..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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-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) - } -}