diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md b/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md index b18a12306a44..b919dbb0963f 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md +++ b/sdk/resourcemanager/containerservice/armcontainerservice/CHANGELOG.md @@ -1,5 +1,120 @@ # Release History +## 4.4.0-beta.1 (2023-09-22) +### Features Added + +- New value `NodeOSUpgradeChannelSecurityPatch` added to enum type `NodeOSUpgradeChannel` +- New value `OSSKUMariner` added to enum type `OSSKU` +- New value `PublicNetworkAccessSecuredByPerimeter` added to enum type `PublicNetworkAccess` +- New value `SnapshotTypeManagedCluster` added to enum type `SnapshotType` +- New value `WorkloadRuntimeKataMshvVMIsolation` added to enum type `WorkloadRuntime` +- New enum type `AgentPoolSSHAccess` with values `AgentPoolSSHAccessDisabled`, `AgentPoolSSHAccessLocalUser` +- New enum type `BackendPoolType` with values `BackendPoolTypeNodeIP`, `BackendPoolTypeNodeIPConfiguration` +- New enum type `GuardrailsSupport` with values `GuardrailsSupportPreview`, `GuardrailsSupportStable` +- New enum type `IpvsScheduler` with values `IpvsSchedulerLeastConnection`, `IpvsSchedulerRoundRobin` +- New enum type `IstioIngressGatewayMode` with values `IstioIngressGatewayModeExternal`, `IstioIngressGatewayModeInternal` +- New enum type `Level` with values `LevelEnforcement`, `LevelOff`, `LevelWarning` +- New enum type `Mode` with values `ModeIPTABLES`, `ModeIPVS` +- New enum type `Protocol` with values `ProtocolTCP`, `ProtocolUDP` +- New enum type `RestrictionLevel` with values `RestrictionLevelReadOnly`, `RestrictionLevelUnrestricted` +- New enum type `ServiceMeshMode` with values `ServiceMeshModeDisabled`, `ServiceMeshModeIstio` +- New enum type `TrustedAccessRoleBindingProvisioningState` with values `TrustedAccessRoleBindingProvisioningStateCanceled`, `TrustedAccessRoleBindingProvisioningStateDeleting`, `TrustedAccessRoleBindingProvisioningStateFailed`, `TrustedAccessRoleBindingProvisioningStateSucceeded`, `TrustedAccessRoleBindingProvisioningStateUpdating` +- New function `*ClientFactory.NewMachinesClient() *MachinesClient` +- New function `*ClientFactory.NewManagedClusterSnapshotsClient() *ManagedClusterSnapshotsClient` +- New function `*ClientFactory.NewTrustedAccessRoleBindingsClient() *TrustedAccessRoleBindingsClient` +- New function `*ClientFactory.NewTrustedAccessRolesClient() *TrustedAccessRolesClient` +- New function `NewMachinesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*MachinesClient, error)` +- New function `*MachinesClient.Get(context.Context, string, string, string, string, *MachinesClientGetOptions) (MachinesClientGetResponse, error)` +- New function `*MachinesClient.NewListPager(string, string, string, *MachinesClientListOptions) *runtime.Pager[MachinesClientListResponse]` +- New function `NewManagedClusterSnapshotsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*ManagedClusterSnapshotsClient, error)` +- New function `*ManagedClusterSnapshotsClient.CreateOrUpdate(context.Context, string, string, ManagedClusterSnapshot, *ManagedClusterSnapshotsClientCreateOrUpdateOptions) (ManagedClusterSnapshotsClientCreateOrUpdateResponse, error)` +- New function `*ManagedClusterSnapshotsClient.Delete(context.Context, string, string, *ManagedClusterSnapshotsClientDeleteOptions) (ManagedClusterSnapshotsClientDeleteResponse, error)` +- New function `*ManagedClusterSnapshotsClient.Get(context.Context, string, string, *ManagedClusterSnapshotsClientGetOptions) (ManagedClusterSnapshotsClientGetResponse, error)` +- New function `*ManagedClusterSnapshotsClient.NewListByResourceGroupPager(string, *ManagedClusterSnapshotsClientListByResourceGroupOptions) *runtime.Pager[ManagedClusterSnapshotsClientListByResourceGroupResponse]` +- New function `*ManagedClusterSnapshotsClient.NewListPager(*ManagedClusterSnapshotsClientListOptions) *runtime.Pager[ManagedClusterSnapshotsClientListResponse]` +- New function `*ManagedClusterSnapshotsClient.UpdateTags(context.Context, string, string, TagsObject, *ManagedClusterSnapshotsClientUpdateTagsOptions) (ManagedClusterSnapshotsClientUpdateTagsResponse, error)` +- New function `*ManagedClustersClient.GetGuardrailsVersions(context.Context, string, string, *ManagedClustersClientGetGuardrailsVersionsOptions) (ManagedClustersClientGetGuardrailsVersionsResponse, error)` +- 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.NewListGuardrailsVersionsPager(string, *ManagedClustersClientListGuardrailsVersionsOptions) *runtime.Pager[ManagedClustersClientListGuardrailsVersionsResponse]` +- New function `*ManagedClustersClient.NewListMeshRevisionProfilesPager(string, *ManagedClustersClientListMeshRevisionProfilesOptions) *runtime.Pager[ManagedClustersClientListMeshRevisionProfilesResponse]` +- New function `*ManagedClustersClient.NewListMeshUpgradeProfilesPager(string, string, *ManagedClustersClientListMeshUpgradeProfilesOptions) *runtime.Pager[ManagedClustersClientListMeshUpgradeProfilesResponse]` +- New function `NewTrustedAccessRoleBindingsClient(string, azcore.TokenCredential, *arm.ClientOptions) (*TrustedAccessRoleBindingsClient, error)` +- New function `*TrustedAccessRoleBindingsClient.CreateOrUpdate(context.Context, string, string, string, TrustedAccessRoleBinding, *TrustedAccessRoleBindingsClientCreateOrUpdateOptions) (TrustedAccessRoleBindingsClientCreateOrUpdateResponse, error)` +- New function `*TrustedAccessRoleBindingsClient.Delete(context.Context, string, string, string, *TrustedAccessRoleBindingsClientDeleteOptions) (TrustedAccessRoleBindingsClientDeleteResponse, error)` +- New function `*TrustedAccessRoleBindingsClient.Get(context.Context, string, string, string, *TrustedAccessRoleBindingsClientGetOptions) (TrustedAccessRoleBindingsClientGetResponse, error)` +- New function `*TrustedAccessRoleBindingsClient.NewListPager(string, string, *TrustedAccessRoleBindingsClientListOptions) *runtime.Pager[TrustedAccessRoleBindingsClientListResponse]` +- New function `NewTrustedAccessRolesClient(string, azcore.TokenCredential, *arm.ClientOptions) (*TrustedAccessRolesClient, error)` +- New function `*TrustedAccessRolesClient.NewListPager(string, *TrustedAccessRolesClientListOptions) *runtime.Pager[TrustedAccessRolesClientListResponse]` +- New struct `AgentPoolNetworkProfile` +- New struct `AgentPoolSecurityProfile` +- New struct `AgentPoolWindowsProfile` +- New struct `CompatibleVersions` +- New struct `GuardrailsAvailableVersion` +- New struct `GuardrailsAvailableVersionsList` +- New struct `GuardrailsAvailableVersionsProperties` +- New struct `GuardrailsProfile` +- New struct `IPTag` +- New struct `IstioCertificateAuthority` +- New struct `IstioComponents` +- New struct `IstioIngressGateway` +- New struct `IstioPluginCertificateAuthority` +- New struct `IstioServiceMesh` +- New struct `Machine` +- New struct `MachineIPAddress` +- New struct `MachineListResult` +- New struct `MachineNetworkProperties` +- New struct `MachineProperties` +- New struct `ManagedClusterAzureMonitorProfileAppMonitoring` +- New struct `ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics` +- New struct `ManagedClusterAzureMonitorProfileContainerInsights` +- New struct `ManagedClusterAzureMonitorProfileLogs` +- New struct `ManagedClusterAzureMonitorProfileWindowsHostLogs` +- New struct `ManagedClusterCostAnalysis` +- New struct `ManagedClusterIngressProfile` +- New struct `ManagedClusterIngressProfileWebAppRouting` +- New struct `ManagedClusterMetricsProfile` +- New struct `ManagedClusterNodeResourceGroupProfile` +- New struct `ManagedClusterPropertiesForSnapshot` +- New struct `ManagedClusterSecurityProfileImageIntegrity` +- New struct `ManagedClusterSecurityProfileNodeRestriction` +- New struct `ManagedClusterSnapshot` +- New struct `ManagedClusterSnapshotListResult` +- New struct `ManagedClusterSnapshotProperties` +- New struct `MeshRevision` +- New struct `MeshRevisionProfile` +- New struct `MeshRevisionProfileList` +- New struct `MeshRevisionProfileProperties` +- New struct `MeshUpgradeProfile` +- New struct `MeshUpgradeProfileList` +- New struct `MeshUpgradeProfileProperties` +- New struct `NetworkMonitoring` +- New struct `NetworkProfileForSnapshot` +- New struct `NetworkProfileKubeProxyConfig` +- New struct `NetworkProfileKubeProxyConfigIpvsConfig` +- New struct `PortRange` +- New struct `ServiceMeshProfile` +- New struct `TrustedAccessRole` +- New struct `TrustedAccessRoleBinding` +- New struct `TrustedAccessRoleBindingListResult` +- New struct `TrustedAccessRoleBindingProperties` +- New struct `TrustedAccessRoleListResult` +- New struct `TrustedAccessRoleRule` +- New field `IgnorePodDisruptionBudget` in struct `AgentPoolsClientBeginDeleteOptions` +- New field `EnableVnetIntegration`, `SubnetID` in struct `ManagedClusterAPIServerAccessProfile` +- New field `CapacityReservationGroupID`, `EnableCustomCATrust`, `MessageOfTheDay`, `NetworkProfile`, `SecurityProfile`, `WindowsProfile` in struct `ManagedClusterAgentPoolProfile` +- New field `CapacityReservationGroupID`, `EnableCustomCATrust`, `MessageOfTheDay`, `NetworkProfile`, `SecurityProfile`, `WindowsProfile` in struct `ManagedClusterAgentPoolProfileProperties` +- New field `Logs` in struct `ManagedClusterAzureMonitorProfile` +- New field `AppMonitoringOpenTelemetryMetrics` in struct `ManagedClusterAzureMonitorProfileMetrics` +- New field `EffectiveNoProxy` in struct `ManagedClusterHTTPProxyConfig` +- New field `BackendPoolType` in struct `ManagedClusterLoadBalancerProfile` +- New field `CreationData`, `EnableNamespaceResources`, `GuardrailsProfile`, `IngressProfile`, `MetricsProfile`, `NodeResourceGroupProfile`, `ResourceUID`, `ServiceMeshProfile` in struct `ManagedClusterProperties` +- New field `CustomCATrustCertificates`, `ImageIntegrity`, `NodeRestriction` in struct `ManagedClusterSecurityProfile` +- New field `Version` in struct `ManagedClusterStorageProfileDiskCSIDriver` +- New field `IgnorePodDisruptionBudget` in struct `ManagedClustersClientBeginDeleteOptions` +- New field `KubeProxyConfig`, `Monitoring` in struct `NetworkProfile` + + ## 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..d5010337d805 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client.go @@ -17,6 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -45,10 +46,10 @@ func NewAgentPoolsClient(subscriptionID string, credential azcore.TokenCredentia // BeginAbortLatestOperation - Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a // Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes -// before cancellation can take place, a 409 error code is returned. +// before cancellation can take place, an error is returned. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2023-07-02-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -71,10 +72,10 @@ func (client *AgentPoolsClient) BeginAbortLatestOperation(ctx context.Context, r // AbortLatestOperation - Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling // state and eventually to a Canceled state when cancellation finishes. If the operation completes -// before cancellation can take place, a 409 error code is returned. +// before cancellation can take place, an error is returned. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2023-07-02-preview 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 +117,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -125,7 +126,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-07-02-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -148,7 +149,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-07-02-preview 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 +191,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -202,7 +203,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-07-02-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -223,7 +224,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-07-02-preview 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 +266,10 @@ 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-07-02-preview") + if options != nil && options.IgnorePodDisruptionBudget != nil { + reqQP.Set("ignore-pod-disruption-budget", strconv.FormatBool(*options.IgnorePodDisruptionBudget)) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -274,7 +278,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-07-02-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -321,7 +325,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -340,7 +344,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-07-02-preview // - 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 +387,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -401,7 +405,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-07-02-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -449,7 +453,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -466,7 +470,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-07-02-preview // - 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 +522,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -538,7 +542,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-07-02-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - agentPoolName - The name of the agent pool. @@ -564,7 +568,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-07-02-preview 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 +610,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go index 3bdc890b1388..6cabc917d444 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/agentpools_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/AgentPoolsAbortOperation.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsAbortOperation.json func ExampleAgentPoolsClient_BeginAbortLatestOperation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -39,7 +39,7 @@ func ExampleAgentPoolsClient_BeginAbortLatestOperation() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/AgentPoolsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsList.json func ExampleAgentPoolsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -81,7 +81,7 @@ func ExampleAgentPoolsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/AgentPoolsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsGet.json func ExampleAgentPoolsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -118,7 +118,54 @@ func ExampleAgentPoolsClient_Get() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsAssociate_CRG.json +func ExampleAgentPoolsClient_BeginCreateOrUpdate_associateAgentPoolWithCapacityReservationGroup() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{ + Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ + CapacityReservationGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"), + Count: to.Ptr[int32](3), + OrchestratorVersion: to.Ptr(""), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.AgentPool = armcontainerservice.AgentPool{ + // Name: to.Ptr("agentpool1"), + // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/agentpool1"), + // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ + // CapacityReservationGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"), + // Count: to.Ptr[int32](3), + // CurrentOrchestratorVersion: to.Ptr("1.9.6"), + // MaxPods: to.Ptr[int32](110), + // OrchestratorVersion: to.Ptr("1.9.6"), + // OSType: to.Ptr(armcontainerservice.OSTypeLinux), + // ProvisioningState: to.Ptr("Succeeded"), + // VMSize: to.Ptr("Standard_DS2_v2"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_Snapshot.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPoolSnapshot() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -171,7 +218,54 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolUsingAnAgentPool // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_EnableCustomCATrust.json +func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithCustomCaTrustEnabled() { + 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), + EnableCustomCATrust: 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"), + // EnableCustomCATrust: 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/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_DedicatedHostGroup.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithDedicatedHostGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -207,6 +301,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithDedicatedHos // 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"), // HostGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"), // MaxPods: to.Ptr[int32](110), // OrchestratorVersion: to.Ptr("1.19.6"), @@ -217,7 +312,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithDedicatedHos // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_EnableEncryptionAtHost.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEncryptionAtHostEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -264,7 +359,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEncryptionAt // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_Ephemeral.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEphemeralOsDisk() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -313,7 +408,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithEphemeralOsD // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_EnableFIPS.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithFipsEnabledOs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -360,7 +455,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithFipsEnabledO // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_GPUMIG.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithGpumig() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -453,7 +548,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithGpumig() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_WasmWasi.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKrustletAndTheWasiRuntime() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -504,7 +599,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKrustletAndT // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKubeletConfigAndLinuxOsConfig() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -595,7 +690,58 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithKubeletConfi // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_MessageOfTheDay.json +func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithMessageOfTheDay() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "agentpool1", armcontainerservice.AgentPool{ + Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ + Count: to.Ptr[int32](3), + MessageOfTheDay: to.Ptr("Zm9vCg=="), + Mode: to.Ptr(armcontainerservice.AgentPoolModeUser), + OrchestratorVersion: to.Ptr(""), + OSDiskSizeGB: to.Ptr[int32](64), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.AgentPool = armcontainerservice.AgentPool{ + // Name: to.Ptr("agentpool1"), + // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"), + // ID: to.Ptr("/subscriptions/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), + // MessageOfTheDay: to.Ptr("Zm9vCg=="), + // Mode: to.Ptr(armcontainerservice.AgentPoolModeUser), + // OrchestratorVersion: to.Ptr("1.17.8"), + // OSDiskSizeGB: to.Ptr[int32](64), + // OSType: to.Ptr(armcontainerservice.OSTypeLinux), + // ProvisioningState: to.Ptr("Succeeded"), + // VMSize: to.Ptr("Standard_DS2_v2"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_OSSKU.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithOssku() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -688,7 +834,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithOssku() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_PPG.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithPpg() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -735,7 +881,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithPpg() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_EnableUltraSSD.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithUltraSsdEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -782,7 +928,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithUltraSsdEnab // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_WindowsOSSKU.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithWindowsOssku() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -829,7 +975,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createAgentPoolWithWindowsOssku // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_Spot.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createSpotAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -895,7 +1041,60 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createSpotAgentPool() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json +func ExampleAgentPoolsClient_BeginCreateOrUpdate_createWindowsAgentPoolWithDisablingOutboundNat() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewAgentPoolsClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", "wnp2", armcontainerservice.AgentPool{ + Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ + Count: to.Ptr[int32](3), + OrchestratorVersion: to.Ptr("1.23.8"), + OSSKU: to.Ptr(armcontainerservice.OSSKUWindows2022), + OSType: to.Ptr(armcontainerservice.OSTypeWindows), + VMSize: to.Ptr("Standard_D4s_v3"), + WindowsProfile: &armcontainerservice.AgentPoolWindowsProfile{ + DisableOutboundNat: to.Ptr(true), + }, + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.AgentPool = armcontainerservice.AgentPool{ + // Name: to.Ptr("wnp2"), + // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/agentPools/wnp2"), + // Properties: &armcontainerservice.ManagedClusterAgentPoolProfileProperties{ + // Count: to.Ptr[int32](3), + // CurrentOrchestratorVersion: to.Ptr("1.23.8"), + // MaxPods: to.Ptr[int32](110), + // OrchestratorVersion: to.Ptr("1.23.8"), + // OSSKU: to.Ptr(armcontainerservice.OSSKUWindows2022), + // OSType: to.Ptr(armcontainerservice.OSTypeWindows), + // ProvisioningState: to.Ptr("Succeeded"), + // VMSize: to.Ptr("Standard_D4s_v3"), + // WindowsProfile: &armcontainerservice.AgentPoolWindowsProfile{ + // DisableOutboundNat: to.Ptr(true), + // }, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsCreate_Update.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_createUpdateAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -941,7 +1140,6 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createUpdateAgentPool() { // 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"), @@ -963,7 +1161,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_createUpdateAgentPool() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPools_Start.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_startAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1008,7 +1206,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_startAgentPool() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPools_Stop.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_stopAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1051,7 +1249,7 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_stopAgentPool() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPools_Update.json func ExampleAgentPoolsClient_BeginCreateOrUpdate_updateAgentPool() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1110,8 +1308,29 @@ func ExampleAgentPoolsClient_BeginCreateOrUpdate_updateAgentPool() { // } } -// 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() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsDelete.json +func ExampleAgentPoolsClient_BeginDelete_deleteAgentPool() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewAgentPoolsClient().BeginDelete(ctx, "rg1", "clustername1", "agentpool1", &armcontainerservice.AgentPoolsClientBeginDeleteOptions{IgnorePodDisruptionBudget: nil}) + 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/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsDelete_IgnorePodDisruptionBudget.json +func ExampleAgentPoolsClient_BeginDelete_deleteAgentPoolByIgnoringPodDisruptionBudget() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -1121,7 +1340,7 @@ func ExampleAgentPoolsClient_BeginDelete() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewAgentPoolsClient().BeginDelete(ctx, "rg1", "clustername1", "agentpool1", nil) + poller, err := clientFactory.NewAgentPoolsClient().BeginDelete(ctx, "rg1", "clustername1", "agentpool1", &armcontainerservice.AgentPoolsClientBeginDeleteOptions{IgnorePodDisruptionBudget: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -1131,7 +1350,7 @@ func ExampleAgentPoolsClient_BeginDelete() { } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsGetUpgradeProfile.json func ExampleAgentPoolsClient_GetUpgradeProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1165,7 +1384,7 @@ func ExampleAgentPoolsClient_GetUpgradeProfile() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json func ExampleAgentPoolsClient_GetAvailableAgentPoolVersions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1204,7 +1423,7 @@ func ExampleAgentPoolsClient_GetAvailableAgentPoolVersions() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json func ExampleAgentPoolsClient_BeginUpgradeNodeImageVersion() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/assets.json b/sdk/resourcemanager/containerservice/armcontainerservice/assets.json index f2be3ff2e698..1ce1042a09c2 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/assets.json +++ b/sdk/resourcemanager/containerservice/armcontainerservice/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "go", "TagPrefix": "go/resourcemanager/containerservice/armcontainerservice", - "Tag": "go/resourcemanager/containerservice/armcontainerservice_7b6bc13370" + "Tag": "go/resourcemanager/containerservice/armcontainerservice_399b8b5805" } diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md b/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md index 74b4e13962a2..ee21351bf557 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md +++ b/sdk/resourcemanager/containerservice/armcontainerservice/autorest.md @@ -5,9 +5,9 @@ ``` yaml azure-arm: true require: -- https://github.com/Azure/azure-rest-api-specs/blob/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 +- https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md +- https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/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-beta.1 +tag: package-preview-2023-07 ``` diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go b/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go index fdfb61072aca..39bd37cd8e4f 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/client_factory.go @@ -42,11 +42,21 @@ func (c *ClientFactory) NewAgentPoolsClient() *AgentPoolsClient { return subClient } +func (c *ClientFactory) NewMachinesClient() *MachinesClient { + subClient, _ := NewMachinesClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewMaintenanceConfigurationsClient() *MaintenanceConfigurationsClient { subClient, _ := NewMaintenanceConfigurationsClient(c.subscriptionID, c.credential, c.options) return subClient } +func (c *ClientFactory) NewManagedClusterSnapshotsClient() *ManagedClusterSnapshotsClient { + subClient, _ := NewManagedClusterSnapshotsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + func (c *ClientFactory) NewManagedClustersClient() *ManagedClustersClient { subClient, _ := NewManagedClustersClient(c.subscriptionID, c.credential, c.options) return subClient @@ -76,3 +86,13 @@ func (c *ClientFactory) NewSnapshotsClient() *SnapshotsClient { subClient, _ := NewSnapshotsClient(c.subscriptionID, c.credential, c.options) return subClient } + +func (c *ClientFactory) NewTrustedAccessRoleBindingsClient() *TrustedAccessRoleBindingsClient { + subClient, _ := NewTrustedAccessRoleBindingsClient(c.subscriptionID, c.credential, c.options) + return subClient +} + +func (c *ClientFactory) NewTrustedAccessRolesClient() *TrustedAccessRolesClient { + subClient, _ := NewTrustedAccessRolesClient(c.subscriptionID, c.credential, c.options) + return subClient +} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/constants.go b/sdk/resourcemanager/containerservice/armcontainerservice/constants.go index 36e47bef0d7a..d25be35b0d73 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-beta.1" ) // AgentPoolMode - A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent @@ -33,6 +33,24 @@ func PossibleAgentPoolModeValues() []AgentPoolMode { } } +// AgentPoolSSHAccess - SSH access method of an agent pool. +type AgentPoolSSHAccess string + +const ( + // AgentPoolSSHAccessDisabled - SSH service will be turned off on the node. + AgentPoolSSHAccessDisabled AgentPoolSSHAccess = "Disabled" + // AgentPoolSSHAccessLocalUser - Can SSH onto the node as a local user using private key. + AgentPoolSSHAccessLocalUser AgentPoolSSHAccess = "LocalUser" +) + +// PossibleAgentPoolSSHAccessValues returns the possible values for the AgentPoolSSHAccess const type. +func PossibleAgentPoolSSHAccessValues() []AgentPoolSSHAccess { + return []AgentPoolSSHAccess{ + AgentPoolSSHAccessDisabled, + AgentPoolSSHAccessLocalUser, + } +} + // AgentPoolType - The type of Agent Pool. type AgentPoolType string @@ -51,6 +69,24 @@ func PossibleAgentPoolTypeValues() []AgentPoolType { } } +// BackendPoolType - The type of the managed inbound Load Balancer BackendPool. +type BackendPoolType string + +const ( + // BackendPoolTypeNodeIP - The type of the managed inbound Load Balancer BackendPool. https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. + BackendPoolTypeNodeIP BackendPoolType = "NodeIP" + // BackendPoolTypeNodeIPConfiguration - The type of the managed inbound Load Balancer BackendPool. https://cloud-provider-azure.sigs.k8s.io/topics/loadbalancer/#configure-load-balancer-backend. + BackendPoolTypeNodeIPConfiguration BackendPoolType = "NodeIPConfiguration" +) + +// PossibleBackendPoolTypeValues returns the possible values for the BackendPoolType const type. +func PossibleBackendPoolTypeValues() []BackendPoolType { + return []BackendPoolType{ + BackendPoolTypeNodeIP, + BackendPoolTypeNodeIPConfiguration, + } +} + // Code - Tells whether the cluster is Running or Stopped type Code string @@ -193,11 +229,32 @@ func PossibleGPUInstanceProfileValues() []GPUInstanceProfile { } } -// IPFamily - The IP version to use for cluster networking and IP assignment. +// GuardrailsSupport - Whether the version is preview or stable. +type GuardrailsSupport string + +const ( + // GuardrailsSupportPreview - The version is preview. It is not recommended to use preview versions on critical production + // clusters. The preview version may not support all use-cases. + GuardrailsSupportPreview GuardrailsSupport = "Preview" + // GuardrailsSupportStable - The version is stable and can be used on critical production clusters. + GuardrailsSupportStable GuardrailsSupport = "Stable" +) + +// PossibleGuardrailsSupportValues returns the possible values for the GuardrailsSupport const type. +func PossibleGuardrailsSupportValues() []GuardrailsSupport { + return []GuardrailsSupport{ + GuardrailsSupportPreview, + GuardrailsSupportStable, + } +} + +// IPFamily - To determine if address belongs IPv4 or IPv6 family. type IPFamily string const ( + // IPFamilyIPv4 - IPv4 family IPFamilyIPv4 IPFamily = "IPv4" + // IPFamilyIPv6 - IPv6 family IPFamilyIPv6 IPFamily = "IPv6" ) @@ -209,6 +266,42 @@ func PossibleIPFamilyValues() []IPFamily { } } +// IpvsScheduler - IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. +type IpvsScheduler string + +const ( + // IpvsSchedulerLeastConnection - Least Connection + IpvsSchedulerLeastConnection IpvsScheduler = "LeastConnection" + // IpvsSchedulerRoundRobin - Round Robin + IpvsSchedulerRoundRobin IpvsScheduler = "RoundRobin" +) + +// PossibleIpvsSchedulerValues returns the possible values for the IpvsScheduler const type. +func PossibleIpvsSchedulerValues() []IpvsScheduler { + return []IpvsScheduler{ + IpvsSchedulerLeastConnection, + IpvsSchedulerRoundRobin, + } +} + +// IstioIngressGatewayMode - Mode of an ingress gateway. +type IstioIngressGatewayMode string + +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. @@ -265,6 +358,25 @@ func PossibleKubernetesSupportPlanValues() []KubernetesSupportPlan { } } +// Level - The guardrails level to be used. By default, Guardrails is enabled for all namespaces except those that AKS excludes +// via systemExcludedNamespaces +type Level string + +const ( + LevelEnforcement Level = "Enforcement" + LevelOff Level = "Off" + LevelWarning Level = "Warning" +) + +// PossibleLevelValues returns the possible values for the Level const type. +func PossibleLevelValues() []Level { + return []Level{ + LevelEnforcement, + LevelOff, + LevelWarning, + } +} + // LicenseType - The license type to use for Windows VMs. See Azure Hybrid User Benefits [https://azure.microsoft.com/pricing/hybrid-benefit/faq/] // for more details. type LicenseType string @@ -371,6 +483,24 @@ func PossibleManagedClusterSKUTierValues() []ManagedClusterSKUTier { } } +// Mode - Specify which proxy mode to use ('IPTABLES' or 'IPVS') +type Mode string + +const ( + // ModeIPTABLES - IPTables proxy mode + ModeIPTABLES Mode = "IPTABLES" + // ModeIPVS - IPVS proxy mode. Must be using Kubernetes version >= 1.22. + ModeIPVS Mode = "IPVS" +) + +// PossibleModeValues returns the possible values for the Mode const type. +func PossibleModeValues() []Mode { + return []Mode{ + ModeIPTABLES, + ModeIPVS, + } +} + // NetworkDataplane - Network dataplane used in the Kubernetes cluster. type NetworkDataplane string @@ -419,8 +549,8 @@ const ( // NetworkPluginKubenet - Use the Kubenet network plugin. See [Kubenet (basic) networking](https://docs.microsoft.com/azure/aks/concepts-network#kubenet-basic-networking) // for more information. NetworkPluginKubenet NetworkPlugin = "kubenet" - // NetworkPluginNone - No CNI plugin is pre-installed. See [BYO CNI](https://docs.microsoft.com/en-us/azure/aks/use-byo-cni) - // for more information. + // NetworkPluginNone - Do not use a network plugin. A custom CNI will need to be installed after cluster creation for networking + // functionality. NetworkPluginNone NetworkPlugin = "none" ) @@ -437,8 +567,8 @@ func PossibleNetworkPluginValues() []NetworkPlugin { type NetworkPluginMode string const ( - // NetworkPluginModeOverlay - Used with networkPlugin=azure, pods are given IPs from the PodCIDR address space but use Azure - // Routing Domains rather than Kubenet's method of route tables. For more information visit https://aka.ms/aks/azure-cni-overlay. + // NetworkPluginModeOverlay - Pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather than + // Kubenet reference plugins host-local and bridge. NetworkPluginModeOverlay NetworkPluginMode = "overlay" ) @@ -472,7 +602,7 @@ func PossibleNetworkPolicyValues() []NetworkPolicy { } } -// NodeOSUpgradeChannel - Manner in which the OS on your nodes is updated. The default is NodeImage. +// NodeOSUpgradeChannel - The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. type NodeOSUpgradeChannel string const ( @@ -483,11 +613,17 @@ const ( // NodeOSUpgradeChannelNone - No attempt to update your machines OS will be made either by OS or by rolling VHDs. This means // you are responsible for your security updates NodeOSUpgradeChannelNone NodeOSUpgradeChannel = "None" + // NodeOSUpgradeChannelSecurityPatch - AKS will update the nodes VHD with patches from the image maintainer labelled "security + // only" on a regular basis. Where possible, patches will also be applied without reimaging to existing nodes. Some patches, + // such as kernel patches, cannot be applied to existing nodes without disruption. For such patches, the VHD will be updated, + // and machines will be rolling reimaged to that VHD following maintenance windows and surge settings. This option incurs + // the extra cost of hosting the VHDs in your node resource group. + NodeOSUpgradeChannelSecurityPatch NodeOSUpgradeChannel = "SecurityPatch" // NodeOSUpgradeChannelUnmanaged - OS updates will be applied automatically through the OS built-in patching infrastructure. - // Newly scaled in machines will be unpatched initially and will be patched at some point by the OS's infrastructure. Behavior - // of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade roughly - // once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option is equivalent - // to None till further notice + // Newly scaled in machines will be unpatched initially, and will be patched at some later time by the OS's infrastructure. + // Behavior of this option depends on the OS in question. Ubuntu and Mariner apply security patches through unattended upgrade + // roughly once a day around 06:00 UTC. Windows does not apply security patches automatically and so for them this option + // is equivalent to None till further notice NodeOSUpgradeChannelUnmanaged NodeOSUpgradeChannel = "Unmanaged" ) @@ -496,6 +632,7 @@ func PossibleNodeOSUpgradeChannelValues() []NodeOSUpgradeChannel { return []NodeOSUpgradeChannel{ NodeOSUpgradeChannelNodeImage, NodeOSUpgradeChannelNone, + NodeOSUpgradeChannelSecurityPatch, NodeOSUpgradeChannelUnmanaged, } } @@ -524,8 +661,9 @@ func PossibleOSDiskTypeValues() []OSDiskType { } } -// OSSKU - Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 -// when Kubernetes = 1.25 if OSType is Windows. +// OSSKU - Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 +// if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 +// after Windows2019 is deprecated. type OSSKU string const ( @@ -534,6 +672,8 @@ const ( OSSKUAzureLinux OSSKU = "AzureLinux" // OSSKUCBLMariner - Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. OSSKUCBLMariner OSSKU = "CBLMariner" + // OSSKUMariner - Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. + OSSKUMariner OSSKU = "Mariner" // OSSKUUbuntu - Use Ubuntu as the OS for node images. OSSKUUbuntu OSSKU = "Ubuntu" // OSSKUWindows2019 - Use Windows2019 as the OS for node images. Unsupported for system node pools. Windows2019 only supports @@ -549,6 +689,7 @@ func PossibleOSSKUValues() []OSSKU { return []OSSKU{ OSSKUAzureLinux, OSSKUCBLMariner, + OSSKUMariner, OSSKUUbuntu, OSSKUWindows2019, OSSKUWindows2022, @@ -623,12 +764,34 @@ func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpoin } } +// Protocol - The network protocol of the port. +type Protocol string + +const ( + // ProtocolTCP - TCP protocol. + ProtocolTCP Protocol = "TCP" + // ProtocolUDP - UDP protocol. + ProtocolUDP Protocol = "UDP" +) + +// PossibleProtocolValues returns the possible values for the Protocol const type. +func PossibleProtocolValues() []Protocol { + return []Protocol{ + ProtocolTCP, + ProtocolUDP, + } +} + // PublicNetworkAccess - Allow or deny public network access for AKS type PublicNetworkAccess string const ( + // PublicNetworkAccessDisabled - Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled" - PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" + // PublicNetworkAccessEnabled - Inbound/Outbound to the managedCluster is allowed. + PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled" + // PublicNetworkAccessSecuredByPerimeter - Inbound/Outbound traffic is managed by Microsoft.Network/NetworkSecurityPerimeters. + PublicNetworkAccessSecuredByPerimeter PublicNetworkAccess = "SecuredByPerimeter" ) // PossiblePublicNetworkAccessValues returns the possible values for the PublicNetworkAccess const type. @@ -636,6 +799,7 @@ func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { return []PublicNetworkAccess{ PublicNetworkAccessDisabled, PublicNetworkAccessEnabled, + PublicNetworkAccessSecuredByPerimeter, } } @@ -664,6 +828,24 @@ func PossibleResourceIdentityTypeValues() []ResourceIdentityType { } } +// RestrictionLevel - The restriction level applied to the cluster's node resource group +type RestrictionLevel string + +const ( + // RestrictionLevelReadOnly - Only */read RBAC permissions allowed on the managed node resource group + RestrictionLevelReadOnly RestrictionLevel = "ReadOnly" + // RestrictionLevelUnrestricted - All RBAC permissions are allowed on the managed node resource group + RestrictionLevelUnrestricted RestrictionLevel = "Unrestricted" +) + +// PossibleRestrictionLevelValues returns the possible values for the RestrictionLevel const type. +func PossibleRestrictionLevelValues() []RestrictionLevel { + return []RestrictionLevel{ + RestrictionLevelReadOnly, + RestrictionLevelUnrestricted, + } +} + // ScaleDownMode - Describes how VMs are added to or removed from Agent Pools. See billing states [https://docs.microsoft.com/azure/virtual-machines/states-billing]. type ScaleDownMode string @@ -724,10 +906,30 @@ 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 const ( + // SnapshotTypeManagedCluster - The snapshot is a snapshot of a managed cluster. + SnapshotTypeManagedCluster SnapshotType = "ManagedCluster" // SnapshotTypeNodePool - The snapshot is a snapshot of a node pool. SnapshotTypeNodePool SnapshotType = "NodePool" ) @@ -735,23 +937,46 @@ const ( // PossibleSnapshotTypeValues returns the possible values for the SnapshotType const type. func PossibleSnapshotTypeValues() []SnapshotType { return []SnapshotType{ + SnapshotTypeManagedCluster, SnapshotTypeNodePool, } } -// Type - Specifies on which week of the month the dayOfWeek applies. +// TrustedAccessRoleBindingProvisioningState - The current provisioning state of trusted access role binding. +type TrustedAccessRoleBindingProvisioningState string + +const ( + TrustedAccessRoleBindingProvisioningStateCanceled TrustedAccessRoleBindingProvisioningState = "Canceled" + TrustedAccessRoleBindingProvisioningStateDeleting TrustedAccessRoleBindingProvisioningState = "Deleting" + TrustedAccessRoleBindingProvisioningStateFailed TrustedAccessRoleBindingProvisioningState = "Failed" + TrustedAccessRoleBindingProvisioningStateSucceeded TrustedAccessRoleBindingProvisioningState = "Succeeded" + TrustedAccessRoleBindingProvisioningStateUpdating TrustedAccessRoleBindingProvisioningState = "Updating" +) + +// PossibleTrustedAccessRoleBindingProvisioningStateValues returns the possible values for the TrustedAccessRoleBindingProvisioningState const type. +func PossibleTrustedAccessRoleBindingProvisioningStateValues() []TrustedAccessRoleBindingProvisioningState { + return []TrustedAccessRoleBindingProvisioningState{ + TrustedAccessRoleBindingProvisioningStateCanceled, + TrustedAccessRoleBindingProvisioningStateDeleting, + TrustedAccessRoleBindingProvisioningStateFailed, + TrustedAccessRoleBindingProvisioningStateSucceeded, + TrustedAccessRoleBindingProvisioningStateUpdating, + } +} + +// Type - Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. type Type string const ( - // TypeFirst - First week of the month. + // TypeFirst - First. TypeFirst Type = "First" - // TypeFourth - Fourth week of the month. + // TypeFourth - Fourth. TypeFourth Type = "Fourth" - // TypeLast - Last week of the month. + // TypeLast - Last. TypeLast Type = "Last" - // TypeSecond - Second week of the month. + // TypeSecond - Second. TypeSecond Type = "Second" - // TypeThird - Third week of the month. + // TypeThird - Third. TypeThird Type = "Third" ) @@ -832,6 +1057,10 @@ func PossibleWeekDayValues() []WeekDay { type WorkloadRuntime string const ( + // WorkloadRuntimeKataMshvVMIsolation - Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). + // Due to the use Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series + // that support Nested Virtualization such as Dv3 series. + WorkloadRuntimeKataMshvVMIsolation WorkloadRuntime = "KataMshvVmIsolation" // WorkloadRuntimeOCIContainer - Nodes will use Kubelet to run standard OCI container workloads. WorkloadRuntimeOCIContainer WorkloadRuntime = "OCIContainer" // WorkloadRuntimeWasmWasi - Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). @@ -841,6 +1070,7 @@ const ( // PossibleWorkloadRuntimeValues returns the possible values for the WorkloadRuntime const type. func PossibleWorkloadRuntimeValues() []WorkloadRuntime { return []WorkloadRuntime{ + WorkloadRuntimeKataMshvVMIsolation, WorkloadRuntimeOCIContainer, WorkloadRuntimeWasmWasi, } diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/machines_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/machines_client.go new file mode 100644 index 000000000000..606091d64663 --- /dev/null +++ b/sdk/resourcemanager/containerservice/armcontainerservice/machines_client.go @@ -0,0 +1,188 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcontainerservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// MachinesClient contains the methods for the Machines group. +// Don't use this type directly, use NewMachinesClient() instead. +type MachinesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewMachinesClient creates a new instance of MachinesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MachinesClient, error) { + cl, err := arm.NewClient(moduleName+".MachinesClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &MachinesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// Get - Get a specific machine in the specified agent pool. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-07-02-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - agentPoolName - The name of the agent pool. +// - machineName - host name of the machine +// - options - MachinesClientGetOptions contains the optional parameters for the MachinesClient.Get method. +func (client *MachinesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machineName string, options *MachinesClientGetOptions) (MachinesClientGetResponse, error) { + var err error + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, machineName, options) + if err != nil { + return MachinesClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MachinesClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return MachinesClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *MachinesClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, machineName string, options *MachinesClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if agentPoolName == "" { + return nil, errors.New("parameter agentPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) + if machineName == "" { + return nil, errors.New("parameter machineName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{machineName}", url.PathEscape(machineName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *MachinesClient) getHandleResponse(resp *http.Response) (MachinesClientGetResponse, error) { + result := MachinesClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.Machine); err != nil { + return MachinesClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of machines in the specified agent pool. +// +// Generated from API version 2023-07-02-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - agentPoolName - The name of the agent pool. +// - options - MachinesClientListOptions contains the optional parameters for the MachinesClient.NewListPager method. +func (client *MachinesClient) NewListPager(resourceGroupName string, resourceName string, agentPoolName string, options *MachinesClientListOptions) *runtime.Pager[MachinesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[MachinesClientListResponse]{ + More: func(page MachinesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *MachinesClientListResponse) (MachinesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, resourceName, agentPoolName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return MachinesClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return MachinesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return MachinesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *MachinesClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, options *MachinesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + if agentPoolName == "" { + return nil, errors.New("parameter agentPoolName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{agentPoolName}", url.PathEscape(agentPoolName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *MachinesClient) listHandleResponse(resp *http.Response) (MachinesClientListResponse, error) { + result := MachinesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.MachineListResult); err != nil { + return MachinesClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/machines_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/machines_client_example_test.go new file mode 100644 index 000000000000..a282e31f448e --- /dev/null +++ b/sdk/resourcemanager/containerservice/armcontainerservice/machines_client_example_test.go @@ -0,0 +1,104 @@ +//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/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/MachineList.json +func ExampleMachinesClient_NewListPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewMachinesClient().NewListPager("rg1", "clustername1", "agentpool1", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.MachineListResult = armcontainerservice.MachineListResult{ + // Value: []*armcontainerservice.Machine{ + // { + // Name: to.Ptr("aks-nodepool1-25481572-vmss000000"), + // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools/machines"), + // ID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.ContainerService/managedClusters/round/agentPools/nodepool1/machines/aks-nodepool1-25481572-vmss000000"), + // Properties: &armcontainerservice.MachineProperties{ + // Network: &armcontainerservice.MachineNetworkProperties{ + // IPAddresses: []*armcontainerservice.MachineIPAddress{ + // { + // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), + // IP: to.Ptr("172.20.2.4"), + // }, + // { + // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), + // IP: to.Ptr("10.0.0.1"), + // }}, + // }, + // ResourceID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-25481572-vmss/virtualMachines/0"), + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/MachineGet.json +func ExampleMachinesClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewMachinesClient().Get(ctx, "rg1", "clustername1", "agentpool1", "aks-nodepool1-42263519-vmss00000t", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.Machine = armcontainerservice.Machine{ + // Name: to.Ptr("aks-nodepool1-25481572-vmss000000"), + // Type: to.Ptr("Microsoft.ContainerService/managedClusters/agentPools/machines"), + // ID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.ContainerService/managedClusters/round/agentPools/nodepool1/machines/aks-nodepool1-25481572-vmss000000"), + // Properties: &armcontainerservice.MachineProperties{ + // Network: &armcontainerservice.MachineNetworkProperties{ + // IPAddresses: []*armcontainerservice.MachineIPAddress{ + // { + // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), + // IP: to.Ptr("172.20.2.4"), + // }, + // { + // Family: to.Ptr(armcontainerservice.IPFamilyIPv4), + // IP: to.Ptr("10.0.0.1"), + // }}, + // }, + // ResourceID: to.Ptr("/subscriptions/26fe00f8-9173-4872-9134-bb1d2e00343a/resourceGroups/dummyRG/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-25481572-vmss/virtualMachines/0"), + // }, + // } +} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client.go index 8e14b59d7376..583b13ef639f 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-07-02-preview // - 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-07-02-preview") 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-07-02-preview // - 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-07-02-preview") 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-07-02-preview // - 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-07-02-preview") 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-07-02-preview // - 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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go index 719e2c68fa81..01515471233e 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/maintenanceconfigurations_client_example_test.go @@ -20,7 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/MaintenanceConfigurationsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/MaintenanceConfigurationsList.json func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMaintenanceConfigurationsByManagedCluster() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMai } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/MaintenanceConfigurationsList_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMaintenanceConfigurationsConfiguredWithMaintenanceWindowByManagedCluster() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -92,7 +92,7 @@ func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMai // Value: []*armcontainerservice.MaintenanceConfiguration{ // { // Name: to.Ptr("aksManagedNodeOSUpgradeSchedule"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default"), // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ // DurationHours: to.Ptr[int32](10), @@ -109,7 +109,7 @@ func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMai // }, // { // Name: to.Ptr("aksManagedAutoUpgradeSchedule"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedAutoUpgradeSchedule"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default"), // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ // DurationHours: to.Ptr[int32](5), @@ -138,7 +138,7 @@ func ExampleMaintenanceConfigurationsClient_NewListByManagedClusterPager_listMai } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/MaintenanceConfigurationsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/MaintenanceConfigurationsGet.json func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -184,7 +184,7 @@ func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfiguration() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfigurationConfiguredWithMaintenanceWindow() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -204,7 +204,7 @@ func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfigurationConfi // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MaintenanceConfiguration = armcontainerservice.MaintenanceConfiguration{ // Name: to.Ptr("aksManagedNodeOSUpgradeSchedule"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedNodeOSUpgradeSchedule"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default"), // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ // DurationHours: to.Ptr[int32](4), @@ -227,10 +227,18 @@ func ExampleMaintenanceConfigurationsClient_Get_getMaintenanceConfigurationConfi // UTCOffset: to.Ptr("-07:00"), // }, // }, + // SystemData: &armcontainerservice.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.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.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/MaintenanceConfigurationsCreate_Update.json func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenanceConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -292,7 +300,7 @@ func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenan // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenanceConfigurationWithMaintenanceWindow() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -337,7 +345,8 @@ func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenan // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.MaintenanceConfiguration = armcontainerservice.MaintenanceConfiguration{ // Name: to.Ptr("aksManagedAutoUpgradeSchedule"), - // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/aksManagedAutoUpgradeSchedule"), + // Type: to.Ptr("Microsoft.ContainerService/managedClusters/maintenanceConfigurations"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/maintenanceConfigurations/default"), // Properties: &armcontainerservice.MaintenanceConfigurationProperties{ // MaintenanceWindow: &armcontainerservice.MaintenanceWindow{ // DurationHours: to.Ptr[int32](10), @@ -361,10 +370,18 @@ func ExampleMaintenanceConfigurationsClient_CreateOrUpdate_createUpdateMaintenan // UTCOffset: to.Ptr("+05:30"), // }, // }, + // SystemData: &armcontainerservice.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.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/MaintenanceConfigurationsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/MaintenanceConfigurationsDelete.json func ExampleMaintenanceConfigurationsClient_Delete_deleteMaintenanceConfiguration() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -381,7 +398,7 @@ func ExampleMaintenanceConfigurationsClient_Delete_deleteMaintenanceConfiguratio } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json func ExampleMaintenanceConfigurationsClient_Delete_deleteMaintenanceConfigurationForNodeOsUpgrade() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go index bf9f59c7ae2e..0124b4e9f377 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client.go @@ -17,6 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" "net/http" "net/url" + "strconv" "strings" ) @@ -45,10 +46,10 @@ func NewManagedClustersClient(subscriptionID string, credential azcore.TokenCred // BeginAbortLatestOperation - Aborts the currently running operation on the managed cluster. The Managed Cluster will be // moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation -// completes before cancellation can take place, a 409 error code is returned. +// completes before cancellation can take place, an error is returned. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2023-07-02-preview // - 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 @@ -70,10 +71,10 @@ func (client *ManagedClustersClient) BeginAbortLatestOperation(ctx context.Conte // AbortLatestOperation - Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved // to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation -// completes before cancellation can take place, a 409 error code is returned. +// completes before cancellation can take place, an error is returned. // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2023-07-02-preview 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 +112,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -120,7 +121,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-07-02-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - parameters - The managed cluster to create or update. @@ -142,7 +143,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-07-02-preview 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 +181,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -192,7 +193,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-07-02-preview // - 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 +214,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-07-02-preview 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 +252,10 @@ 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-07-02-preview") + if options != nil && options.IgnorePodDisruptionBudget != nil { + reqQP.Set("ignore-pod-disruption-budget", strconv.FormatBool(*options.IgnorePodDisruptionBudget)) + } req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -260,7 +264,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-07-02-preview // - 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 +306,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -322,7 +326,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-07-02-preview // - 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 +374,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -388,7 +392,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-07-02-preview // - 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 +440,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -454,10 +458,199 @@ func (client *ManagedClustersClient) getCommandResultHandleResponse(resp *http.R return result, nil } +// GetGuardrailsVersions - Contains Guardrails version along with its support info and whether it is a default version. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-07-02-preview +// - location - The name of Azure region. +// - version - Guardrails version +// - options - ManagedClustersClientGetGuardrailsVersionsOptions contains the optional parameters for the ManagedClustersClient.GetGuardrailsVersions +// method. +func (client *ManagedClustersClient) GetGuardrailsVersions(ctx context.Context, location string, version string, options *ManagedClustersClientGetGuardrailsVersionsOptions) (ManagedClustersClientGetGuardrailsVersionsResponse, error) { + var err error + req, err := client.getGuardrailsVersionsCreateRequest(ctx, location, version, options) + if err != nil { + return ManagedClustersClientGetGuardrailsVersionsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClustersClientGetGuardrailsVersionsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedClustersClientGetGuardrailsVersionsResponse{}, err + } + resp, err := client.getGuardrailsVersionsHandleResponse(httpResp) + return resp, err +} + +// getGuardrailsVersionsCreateRequest creates the GetGuardrailsVersions request. +func (client *ManagedClustersClient) getGuardrailsVersionsCreateRequest(ctx context.Context, location string, version string, options *ManagedClustersClientGetGuardrailsVersionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + if version == "" { + return nil, errors.New("parameter version cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{version}", url.PathEscape(version)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getGuardrailsVersionsHandleResponse handles the GetGuardrailsVersions response. +func (client *ManagedClustersClient) getGuardrailsVersionsHandleResponse(resp *http.Response) (ManagedClustersClientGetGuardrailsVersionsResponse, error) { + result := ManagedClustersClientGetGuardrailsVersionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GuardrailsAvailableVersion); err != nil { + return ManagedClustersClientGetGuardrailsVersionsResponse{}, err + } + return result, nil +} + +// GetMeshRevisionProfile - Contains extra metadata on the revision, including supported revisions, cluster compatibility +// and available upgrades +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-07-02-preview +// - 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-07-02-preview") + 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-07-02-preview +// - 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-07-02-preview") + 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-07-02-preview // - location - The name of Azure region. // - options - ManagedClustersClientGetOSOptionsOptions contains the optional parameters for the ManagedClustersClient.GetOSOptions // method. @@ -495,7 +688,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-07-02-preview") if options != nil && options.ResourceType != nil { reqQP.Set("resource-type", *options.ResourceType) } @@ -516,7 +709,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-07-02-preview // - 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 +752,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -576,7 +769,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-07-02-preview // - options - ManagedClustersClientListOptions contains the optional parameters for the ManagedClustersClient.NewListPager // method. func (client *ManagedClustersClient) NewListPager(options *ManagedClustersClientListOptions) *runtime.Pager[ManagedClustersClientListResponse] { @@ -619,7 +812,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -636,7 +829,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-07-02-preview // - 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 +877,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -702,7 +895,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-07-02-preview // - 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 +938,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-07-02-preview") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -766,7 +959,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-07-02-preview // - 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 +1002,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-07-02-preview") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -830,7 +1023,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-07-02-preview // - 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 +1066,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-07-02-preview") if options != nil && options.ServerFqdn != nil { reqQP.Set("server-fqdn", *options.ServerFqdn) } @@ -894,11 +1087,77 @@ func (client *ManagedClustersClient) listClusterUserCredentialsHandleResponse(re return result, nil } +// NewListGuardrailsVersionsPager - Contains list of Guardrails version along with its support info and whether it is a default +// version. +// +// Generated from API version 2023-07-02-preview +// - location - The name of Azure region. +// - options - ManagedClustersClientListGuardrailsVersionsOptions contains the optional parameters for the ManagedClustersClient.NewListGuardrailsVersionsPager +// method. +func (client *ManagedClustersClient) NewListGuardrailsVersionsPager(location string, options *ManagedClustersClientListGuardrailsVersionsOptions) *runtime.Pager[ManagedClustersClientListGuardrailsVersionsResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedClustersClientListGuardrailsVersionsResponse]{ + More: func(page ManagedClustersClientListGuardrailsVersionsResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedClustersClientListGuardrailsVersionsResponse) (ManagedClustersClientListGuardrailsVersionsResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listGuardrailsVersionsCreateRequest(ctx, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ManagedClustersClientListGuardrailsVersionsResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClustersClientListGuardrailsVersionsResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedClustersClientListGuardrailsVersionsResponse{}, runtime.NewResponseError(resp) + } + return client.listGuardrailsVersionsHandleResponse(resp) + }, + }) +} + +// listGuardrailsVersionsCreateRequest creates the ListGuardrailsVersions request. +func (client *ManagedClustersClient) listGuardrailsVersionsCreateRequest(ctx context.Context, location string, options *ManagedClustersClientListGuardrailsVersionsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if location == "" { + return nil, errors.New("parameter location cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{location}", url.PathEscape(location)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listGuardrailsVersionsHandleResponse handles the ListGuardrailsVersions response. +func (client *ManagedClustersClient) listGuardrailsVersionsHandleResponse(resp *http.Response) (ManagedClustersClientListGuardrailsVersionsResponse, error) { + result := ManagedClustersClientListGuardrailsVersionsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.GuardrailsAvailableVersionsList); err != nil { + return ManagedClustersClientListGuardrailsVersionsResponse{}, err + } + return result, nil +} + // ListKubernetesVersions - Contains extra metadata on the version, including supported patch versions, capabilities, available // upgrades, and details on preview status of the version // If the operation fails it returns an *azcore.ResponseError type. // -// Generated from API version 2023-07-01 +// Generated from API version 2023-07-02-preview // - location - The name of Azure region. // - options - ManagedClustersClientListKubernetesVersionsOptions contains the optional parameters for the ManagedClustersClient.ListKubernetesVersions // method. @@ -936,7 +1195,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -951,10 +1210,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-07-02-preview +// - 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-07-02-preview") + 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-07-02-preview +// - 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-07-02-preview") + 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-07-02-preview // - 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 +1402,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1026,7 +1421,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-07-02-preview // - 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 +1446,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-07-02-preview 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 +1484,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1101,7 +1496,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-07-02-preview // - 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 +1520,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-07-02-preview 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 +1558,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { @@ -1176,7 +1571,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-07-02-preview // - 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 +1595,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-07-02-preview 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 +1633,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1247,7 +1642,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-07-02-preview // - 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 +1665,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-07-02-preview 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 +1703,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1319,7 +1714,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-07-02-preview // - 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 +1740,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-07-02-preview 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 +1778,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, requestPayload); err != nil { @@ -1396,7 +1791,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-07-02-preview // - 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 +1815,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-07-02-preview 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 +1853,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1470,7 +1865,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-07-02-preview // - 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 +1891,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-07-02-preview 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 +1929,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -1543,7 +1938,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-07-02-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - parameters - Parameters supplied to the Update Managed Cluster Tags operation. @@ -1565,7 +1960,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-07-02-preview 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 +1998,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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go index 5d2409a80a1b..92aab642e7dc 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/managedclusters_client_example_test.go @@ -20,7 +20,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/ContainerServiceGetOSOptions.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ContainerServiceGetOSOptions.json func ExampleManagedClustersClient_GetOSOptions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -56,7 +56,7 @@ func ExampleManagedClustersClient_GetOSOptions() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/KubernetesVersions_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/KubernetesVersions_List.json func ExampleManagedClustersClient_ListKubernetesVersions() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -150,7 +150,7 @@ func ExampleManagedClustersClient_ListKubernetesVersions() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/ManagedClustersList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersList.json func ExampleManagedClustersClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -195,7 +195,6 @@ func ExampleManagedClustersClient_NewListPager() { // 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), @@ -228,7 +227,7 @@ func ExampleManagedClustersClient_NewListPager() { } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersListByResourceGroup.json func ExampleManagedClustersClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -273,7 +272,6 @@ func ExampleManagedClustersClient_NewListByResourceGroupPager() { // 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), @@ -306,7 +304,7 @@ func ExampleManagedClustersClient_NewListByResourceGroupPager() { } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersGetUpgradeProfile.json func ExampleManagedClustersClient_GetUpgradeProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -360,7 +358,7 @@ func ExampleManagedClustersClient_GetUpgradeProfile() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersGetAccessProfile.json func ExampleManagedClustersClient_GetAccessProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -389,7 +387,7 @@ func ExampleManagedClustersClient_GetAccessProfile() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersListClusterCredentialResult.json func ExampleManagedClustersClient_ListClusterAdminCredentials() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -416,63 +414,7 @@ func ExampleManagedClustersClient_ListClusterAdminCredentials() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersGet.json func ExampleManagedClustersClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -520,7 +462,6 @@ func ExampleManagedClustersClient_Get() { // 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), @@ -585,7 +526,316 @@ func ExampleManagedClustersClient_Get() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersAssociate_CRG.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_associateManagedClusterWithCapacityReservationGroup() { + 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), + CapacityReservationGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1"), + Count: to.Ptr[int32](3), + EnableNodePublicIP: to.Ptr(true), + Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), + Name: to.Ptr("nodepool1"), + }}, + AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ + ScaleDownDelayAfterAdd: to.Ptr("15m"), + ScanInterval: to.Ptr("20s"), + }, + DiskEncryptionSetID: to.Ptr("/subscriptions/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), + // CapacityReservationGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1"), + // Count: to.Ptr[int32](3), + // CurrentOrchestratorVersion: to.Ptr("1.9.6"), + // EnableNodePublicIP: to.Ptr(true), + // MaxPods: to.Ptr[int32](110), + // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), + // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), + // OrchestratorVersion: to.Ptr("1.9.6"), + // OSType: to.Ptr(armcontainerservice.OSTypeLinux), + // ProvisioningState: to.Ptr("Succeeded"), + // VMSize: to.Ptr("Standard_DS2_v2"), + // Name: to.Ptr("nodepool1"), + // }}, + // AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ + // ScaleDownDelayAfterAdd: to.Ptr("15m"), + // ScanInterval: to.Ptr("20s"), + // }, + // DiskEncryptionSetID: to.Ptr("/subscriptions/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/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_MCSnapshot.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingAManagedClusterSnapshot() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ + Location: to.Ptr("location1"), + Tags: map[string]*string{ + "archv2": to.Ptr(""), + "tier": to.Ptr("production"), + }, + Properties: &armcontainerservice.ManagedClusterProperties{ + AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ + { + Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), + Count: to.Ptr[int32](3), + EnableFIPS: to.Ptr(true), + EnableNodePublicIP: to.Ptr(true), + Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), + Name: to.Ptr("nodepool1"), + }}, + CreationData: &armcontainerservice.CreationData{ + SourceResourceID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), + }, + DNSPrefix: to.Ptr("dnsprefix1"), + KubernetesVersion: to.Ptr(""), + LinuxProfile: &armcontainerservice.LinuxProfile{ + AdminUsername: to.Ptr("azureuser"), + SSH: &armcontainerservice.SSHConfiguration{ + PublicKeys: []*armcontainerservice.SSHPublicKey{ + { + KeyData: to.Ptr("keydata"), + }}, + }, + }, + ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ + ClientID: to.Ptr("clientid"), + Secret: to.Ptr("secret"), + }, + }, + SKU: &armcontainerservice.ManagedClusterSKU{ + Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), + Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + res, err := poller.PollUntilDone(ctx, nil) + if err != nil { + log.Fatalf("failed to pull the result: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.ManagedCluster = armcontainerservice.ManagedCluster{ + // Name: to.Ptr("clustername1"), + // Type: to.Ptr("Microsoft.ContainerService/ManagedClusters"), + // ID: to.Ptr("/subscriptions/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), + // EnableFIPS: to.Ptr(true), + // EnableNodePublicIP: to.Ptr(true), + // MaxPods: to.Ptr[int32](110), + // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), + // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), + // OrchestratorVersion: to.Ptr("1.9.6"), + // OSType: to.Ptr(armcontainerservice.OSTypeLinux), + // ProvisioningState: to.Ptr("Succeeded"), + // VMSize: to.Ptr("Standard_DS2_v2"), + // Name: to.Ptr("nodepool1"), + // }}, + // CreationData: &armcontainerservice.CreationData{ + // SourceResourceID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), + // }, + // DNSPrefix: to.Ptr("dnsprefix1"), + // EnableRBAC: to.Ptr(true), + // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), + // KubernetesVersion: to.Ptr("1.9.6"), + // LinuxProfile: &armcontainerservice.LinuxProfile{ + // AdminUsername: to.Ptr("azureuser"), + // SSH: &armcontainerservice.SSHConfiguration{ + // PublicKeys: []*armcontainerservice.SSHPublicKey{ + // { + // KeyData: to.Ptr("keydata"), + // }}, + // }, + // }, + // MaxAgentPools: to.Ptr[int32](1), + // NetworkProfile: &armcontainerservice.NetworkProfile{ + // DNSServiceIP: to.Ptr("10.0.0.10"), + // IPFamilies: []*armcontainerservice.IPFamily{ + // to.Ptr(armcontainerservice.IPFamilyIPv4)}, + // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ + // AllocatedOutboundPorts: to.Ptr[int32](2000), + // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ + // { + // ID: to.Ptr("/subscriptions/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"), + // }, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_Snapshot.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingAnAgentPoolSnapshot() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -702,7 +952,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA // 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), @@ -759,7 +1008,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterUsingA // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_ManagedNATGateway.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAksManagedNatGatewayAsOutboundType() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -782,7 +1031,173 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAk { Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(false), + 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"), + // }, + // 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/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAzureKeyVaultSecretsProviderAddon() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ + Location: to.Ptr("location1"), + Tags: map[string]*string{ + "archv2": to.Ptr(""), + "tier": to.Ptr("production"), + }, + Properties: &armcontainerservice.ManagedClusterProperties{ + AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{ + "azureKeyvaultSecretsProvider": { + Config: map[string]*string{ + "enableSecretRotation": to.Ptr("true"), + "rotationPollInterval": to.Ptr("2m"), + }, + Enabled: to.Ptr(true), + }, + }, + AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ + { + Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), + Count: to.Ptr[int32](3), + EnableNodePublicIP: to.Ptr(true), Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), OSType: to.Ptr(armcontainerservice.OSTypeLinux), VMSize: to.Ptr("Standard_DS2_v2"), @@ -807,13 +1222,13 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAk }, }, NetworkProfile: &armcontainerservice.NetworkProfile{ - LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), - NatGatewayProfile: &armcontainerservice.ManagedClusterNATGatewayProfile{ - ManagedOutboundIPProfile: &armcontainerservice.ManagedClusterManagedOutboundIPProfile{ + LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ + ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ Count: to.Ptr[int32](2), }, }, - OutboundType: to.Ptr(armcontainerservice.OutboundTypeManagedNATGateway), + LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), + OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), }, ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ ClientID: to.Ptr("clientid"), @@ -849,12 +1264,21 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAk // "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), - // CurrentOrchestratorVersion: to.Ptr("1.9.6"), - // EnableNodePublicIP: to.Ptr(false), + // 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"), @@ -868,7 +1292,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAk // 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), @@ -887,8 +1310,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAk // MaxAgentPools: to.Ptr[int32](1), // NetworkProfile: &armcontainerservice.NetworkProfile{ // DNSServiceIP: to.Ptr("10.0.0.10"), - // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), - // NatGatewayProfile: &armcontainerservice.ManagedClusterNATGatewayProfile{ + // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ + // AllocatedOutboundPorts: to.Ptr[int32](2000), // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ // { // ID: to.Ptr("/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), @@ -896,13 +1319,14 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAk // { // ID: to.Ptr("/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip2"), // }}, - // IdleTimeoutInMinutes: to.Ptr[int32](4), - // ManagedOutboundIPProfile: &armcontainerservice.ManagedClusterManagedOutboundIPProfile{ + // 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.OutboundTypeManagedNATGateway), + // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), // PodCidr: to.Ptr("10.244.0.0/16"), // ServiceCidr: to.Ptr("10.0.0.0/16"), // }, @@ -918,8 +1342,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAk // } } -// 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() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_EnableCustomCATrust.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithCustomCaTrustCertificatesPopulatedAndCustomCaTrustEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -936,24 +1360,17 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAz "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), - }, - }, + AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ { - Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), - Count: to.Ptr[int32](3), - EnableNodePublicIP: to.Ptr(true), - Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), - OSType: to.Ptr(armcontainerservice.OSTypeLinux), - VMSize: to.Ptr("Standard_DS2_v2"), - Name: to.Ptr("nodepool1"), + Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), + Count: to.Ptr[int32](3), + EnableCustomCATrust: to.Ptr(true), + EnableNodePublicIP: to.Ptr(true), + Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), + Name: to.Ptr("nodepool1"), }}, AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ ScaleDownDelayAfterAdd: to.Ptr("15m"), @@ -982,6 +1399,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAz LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), }, + SecurityProfile: &armcontainerservice.ManagedClusterSecurityProfile{ + CustomCATrustCertificates: [][]byte{ + []byte("ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=")}, + }, ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ ClientID: to.Ptr("clientid"), Secret: to.Ptr("secret"), @@ -1016,20 +1437,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAz // "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), + // CurrentOrchestratorVersion: to.Ptr("1.9.6"), + // EnableCustomCATrust: to.Ptr(true), // EnableNodePublicIP: to.Ptr(true), // MaxPods: to.Ptr[int32](110), // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), @@ -1062,39 +1475,49 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithAz // MaxAgentPools: to.Ptr[int32](1), // NetworkProfile: &armcontainerservice.NetworkProfile{ // DNSServiceIP: to.Ptr("10.0.0.10"), - // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ - // AllocatedOutboundPorts: to.Ptr[int32](2000), - // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ - // { - // ID: to.Ptr("/subscriptions/subid1/resourceGroups/MC_rg1/providers/Microsoft.Network/publicIPAddresses/mgdoutboundip1"), + // IPFamilies: []*armcontainerservice.IPFamily{ + // to.Ptr(armcontainerservice.IPFamilyIPv4)}, + // LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ + // AllocatedOutboundPorts: to.Ptr[int32](2000), + // EffectiveOutboundIPs: []*armcontainerservice.ResourceReference{ + // { + // ID: to.Ptr("/subscriptions/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), // }, - // { - // 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"), - // }, - // }, - // } + // 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{ + // CustomCATrustCertificates: [][]byte{ + // []byte("ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=")}, + // }, + // 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_DedicatedHostGroup.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDedicatedHostGroup() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1188,6 +1611,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDe // { // Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), // Count: to.Ptr[int32](3), + // CurrentOrchestratorVersion: to.Ptr("1.9.6"), // EnableNodePublicIP: to.Ptr(true), // HostGroupID: to.Ptr("/subscriptions/subid1/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1"), // MaxPods: to.Ptr[int32](110), @@ -1258,7 +1682,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithDe // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_EnableEncryptionAtHost.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithEncryptionAtHostEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1369,7 +1793,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithEn // 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), @@ -1426,7 +1849,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithEn // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_EnabledFIPS.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithFipsEnabledOs() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1537,7 +1960,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithFi // 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), @@ -1594,7 +2016,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithFi // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_GPUMIG.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithGpumig() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1713,7 +2135,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithGp // 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), @@ -1778,7 +2199,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithGp // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_HTTPProxy.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithHttpProxyConfigured() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -1895,7 +2316,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithHt // 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), @@ -1960,7 +2380,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithHt // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_Premium.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithLongTermSupport() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2138,7 +2558,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithLo // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_NodePublicIPPrefix.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNodePublicIpPrefix() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2249,7 +2669,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo // 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), @@ -2306,7 +2725,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithNo // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_OSSKU.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithOssku() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2425,7 +2844,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithOs // 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), @@ -2490,7 +2908,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithOs // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_PPG.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPpg() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2601,7 +3019,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPp // 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), @@ -2658,7 +3075,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPp // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_PodIdentity.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPodIdentityEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2771,7 +3188,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPo // 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), @@ -2832,7 +3248,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithPo // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_DisableRunCommand.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithRunCommandDisabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -2948,7 +3364,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithRu // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -3006,7 +3421,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithRu // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_SecurityProfile.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithSecurityProfileConfigured() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3061,9 +3476,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithSe Enabled: to.Ptr(true), }, }, - WorkloadIdentity: &armcontainerservice.ManagedClusterSecurityProfileWorkloadIdentity{ - Enabled: to.Ptr(true), - }, }, }, SKU: &armcontainerservice.ManagedClusterSKU{ @@ -3106,7 +3518,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithSe // 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), @@ -3160,9 +3571,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithSe // Enabled: to.Ptr(true), // }, // }, - // WorkloadIdentity: &armcontainerservice.ManagedClusterSecurityProfileWorkloadIdentity{ - // Enabled: to.Ptr(true), - // }, // }, // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ // ClientID: to.Ptr("clientid"), @@ -3174,7 +3582,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithSe // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_EnableUltraSSD.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUltraSsdEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3285,7 +3693,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUl // 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), @@ -3313,36 +3720,194 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUl // 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/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/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_IngressProfile_WebAppRouting.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithWebAppRoutingIngressProfileConfigured() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + poller, err := clientFactory.NewManagedClustersClient().BeginCreateOrUpdate(ctx, "rg1", "clustername1", armcontainerservice.ManagedCluster{ + Location: to.Ptr("location1"), + Tags: map[string]*string{ + "archv2": to.Ptr(""), + "tier": to.Ptr("production"), + }, + Properties: &armcontainerservice.ManagedClusterProperties{ + AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ + { + Type: to.Ptr(armcontainerservice.AgentPoolTypeVirtualMachineScaleSets), + Count: to.Ptr[int32](3), + EnableNodePublicIP: to.Ptr(true), + Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), + OSType: to.Ptr(armcontainerservice.OSTypeLinux), + VMSize: to.Ptr("Standard_DS2_v2"), + Name: to.Ptr("nodepool1"), + }}, + DNSPrefix: to.Ptr("dnsprefix1"), + IngressProfile: &armcontainerservice.ManagedClusterIngressProfile{ + WebAppRouting: &armcontainerservice.ManagedClusterIngressProfileWebAppRouting{ + DNSZoneResourceIDs: []*string{ + to.Ptr("/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.Network/dnszones/DNS_ZONE_NAME")}, + Enabled: to.Ptr(true), + }, + }, + KubernetesVersion: to.Ptr(""), + LinuxProfile: &armcontainerservice.LinuxProfile{ + AdminUsername: to.Ptr("azureuser"), + SSH: &armcontainerservice.SSHConfiguration{ + PublicKeys: []*armcontainerservice.SSHPublicKey{ + { + KeyData: to.Ptr("keydata"), + }}, + }, + }, + NetworkProfile: &armcontainerservice.NetworkProfile{ + LoadBalancerProfile: &armcontainerservice.ManagedClusterLoadBalancerProfile{ + ManagedOutboundIPs: &armcontainerservice.ManagedClusterLoadBalancerProfileManagedOutboundIPs{ + Count: to.Ptr[int32](2), + }, + }, + LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), + OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), + }, + }, + SKU: &armcontainerservice.ManagedClusterSKU{ + Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), + Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), + }, + }, 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), + // MaxPods: to.Ptr[int32](110), + // Mode: to.Ptr(armcontainerservice.AgentPoolModeSystem), + // NodeImageVersion: to.Ptr("AKSUbuntu:1604:2020.03.11"), + // OrchestratorVersion: to.Ptr("1.9.6"), + // OSType: to.Ptr(armcontainerservice.OSTypeLinux), + // ProvisioningState: to.Ptr("Succeeded"), + // VMSize: to.Ptr("Standard_DS2_v2"), + // Name: to.Ptr("nodepool1"), + // }}, + // DiskEncryptionSetID: to.Ptr("/subscriptions/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"), + // IngressProfile: &armcontainerservice.ManagedClusterIngressProfile{ + // WebAppRouting: &armcontainerservice.ManagedClusterIngressProfileWebAppRouting{ + // DNSZoneResourceIDs: []*string{ + // to.Ptr("/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.Network/dnszones/DNS_ZONE_NAME")}, + // Enabled: to.Ptr(true), + // }, + // }, + // KubernetesVersion: to.Ptr("1.9.6"), + // LinuxProfile: &armcontainerservice.LinuxProfile{ + // AdminUsername: to.Ptr("azureuser"), + // SSH: &armcontainerservice.SSHConfiguration{ + // PublicKeys: []*armcontainerservice.SSHPublicKey{ + // { + // KeyData: to.Ptr("keydata"), // }}, - // 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"), + // }, + // 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), + // }, // }, - // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ - // AdminUsername: to.Ptr("azureuser"), + // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUBasic), + // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), + // OutboundType: to.Ptr(armcontainerservice.OutboundTypeLoadBalancer), + // PodCidr: to.Ptr("10.244.0.0/16"), + // PodCidrs: []*string{ + // to.Ptr("10.244.0.0/16")}, + // ServiceCidr: to.Ptr("10.0.0.0/16"), + // ServiceCidrs: []*string{ + // to.Ptr("10.0.0.0/16")}, + // }, + // NodeResourceGroup: to.Ptr("MC_rg1_clustername1_location1"), + // ProvisioningState: to.Ptr("Succeeded"), + // ServicePrincipalProfile: &armcontainerservice.ManagedClusterServicePrincipalProfile{ + // ClientID: to.Ptr("clientid"), + // }, + // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ + // AdminUsername: to.Ptr("azureuser"), + // }, // }, - // }, - // } + // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_UserAssignedNATGateway.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUserAssignedNatGatewayAsOutboundType() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3446,7 +4011,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUs // 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), @@ -3483,7 +4047,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedClusterWithUs // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateClusterWithPublicFqdnSpecified() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3602,7 +4166,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), // DNSPrefix: to.Ptr("dnsprefix1"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), @@ -3659,7 +4222,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateClusterWithFqdnSubdomainSpecified() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3777,7 +4340,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // ScaleDownDelayAfterAdd: to.Ptr("15m"), // ScanInterval: to.Ptr("20s"), // }, - // CurrentKubernetesVersion: to.Ptr("1.9.6"), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), // FqdnSubdomain: to.Ptr("domain1"), @@ -3833,7 +4395,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createManagedPrivateCluste // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClusterWithEnableAzureRbac() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -3871,8 +4433,198 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClus Name: to.Ptr("nodepool1"), }}, AutoScalerProfile: &armcontainerservice.ManagedClusterPropertiesAutoScalerProfile{ - ScaleDownDelayAfterAdd: to.Ptr("15m"), - ScanInterval: to.Ptr("20s"), + 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"), + // }, + // 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/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/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"), @@ -3901,6 +4653,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClus ClientID: to.Ptr("clientid"), Secret: to.Ptr("secret"), }, + 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 }()), + }, + }, WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ AdminPassword: to.Ptr("replacePassword1234$"), AdminUsername: to.Ptr("azureuser"), @@ -3930,12 +4688,16 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClus // "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"), + // 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), @@ -3952,14 +4714,19 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClus // 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), @@ -4009,6 +4776,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClus // 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"), // }, @@ -4016,8 +4789,8 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateAadManagedClus // } } -// 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() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_UpdateWithAHUB.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithEnableAhub() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -4052,18 +4825,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster 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"), + ScaleDownDelayAfterAdd: to.Ptr("15m"), + ScanInterval: to.Ptr("20s"), }, DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), DNSPrefix: to.Ptr("dnsprefix1"), @@ -4092,15 +4859,10 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster 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"), + LicenseType: to.Ptr(armcontainerservice.LicenseTypeWindowsServer), }, }, SKU: &armcontainerservice.ManagedClusterSKU{ @@ -4153,20 +4915,13 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // 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), @@ -4216,21 +4971,16 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // 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"), + // 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_UpdateWithAHUB.json -func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithEnableAhub() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json +func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithEnableNamespaceResources() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -4246,12 +4996,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster "archv2": to.Ptr(""), "tier": to.Ptr("production"), }, - Identity: &armcontainerservice.ManagedClusterIdentity{ - Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), - UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - "/subscriptions/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {}, - }, - }, Properties: &armcontainerservice.ManagedClusterProperties{ AddonProfiles: map[string]*armcontainerservice.ManagedClusterAddonProfile{}, AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ @@ -4272,11 +5016,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster 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(""), + DiskEncryptionSetID: to.Ptr("/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + DNSPrefix: to.Ptr("dnsprefix1"), + EnableNamespaceResources: to.Ptr(true), + EnablePodSecurityPolicy: to.Ptr(true), + EnableRBAC: to.Ptr(true), + KubernetesVersion: to.Ptr(""), LinuxProfile: &armcontainerservice.LinuxProfile{ AdminUsername: to.Ptr("azureuser"), SSH: &armcontainerservice.SSHConfiguration{ @@ -4302,7 +5047,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ AdminPassword: to.Ptr("replacePassword1234$"), AdminUsername: to.Ptr("azureuser"), - LicenseType: to.Ptr(armcontainerservice.LicenseTypeWindowsServer), }, }, SKU: &armcontainerservice.ManagedClusterSKU{ @@ -4329,15 +5073,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // "archv2": to.Ptr(""), // "tier": to.Ptr("production"), // }, - // Identity: &armcontainerservice.ManagedClusterIdentity{ - // Type: to.Ptr(armcontainerservice.ResourceIdentityTypeUserAssigned), - // UserAssignedIdentities: map[string]*armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - // "/subscriptions/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": &armcontainerservice.ManagedServiceIdentityUserAssignedIdentitiesValue{ - // ClientID: to.Ptr("clientId1"), - // PrincipalID: to.Ptr("principalId1"), - // }, - // }, - // }, // Properties: &armcontainerservice.ManagedClusterProperties{ // AgentPoolProfiles: []*armcontainerservice.ManagedClusterAgentPoolProfile{ // { @@ -4362,9 +5097,9 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // 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"), + // EnableNamespaceResources: to.Ptr(true), // EnablePodSecurityPolicy: to.Ptr(true), // EnableRBAC: to.Ptr(true), // Fqdn: to.Ptr("dnsprefix1-abcd1234.hcp.eastus.azmk8s.io"), @@ -4414,13 +5149,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // }, // WindowsProfile: &armcontainerservice.ManagedClusterWindowsProfile{ // AdminUsername: to.Ptr("azureuser"), - // LicenseType: to.Ptr(armcontainerservice.LicenseTypeWindowsServer), // }, // }, // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_UpdateWindowsGmsa.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithWindowsGMsaEnabled() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4555,7 +5289,6 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // 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), @@ -4615,7 +5348,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersCreate_DualStackNetworking.json func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedClusterWithDualStackNetworking() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4741,12 +5474,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // to.Ptr("2"), // to.Ptr("3")}, // Count: to.Ptr[int32](3), - // CurrentOrchestratorVersion: to.Ptr("1.22.1"), + // 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.22.1"), + // OrchestratorVersion: to.Ptr("1.9.6"), // OSType: to.Ptr(armcontainerservice.OSTypeLinux), // ProvisioningState: to.Ptr("Succeeded"), // ScaleDownMode: to.Ptr(armcontainerservice.ScaleDownModeDeallocate), @@ -4762,13 +5495,12 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // 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"), + // KubernetesVersion: to.Ptr("1.9.6"), // LinuxProfile: &armcontainerservice.LinuxProfile{ // AdminUsername: to.Ptr("azureuser"), // SSH: &armcontainerservice.SSHConfiguration{ @@ -4826,7 +5558,7 @@ func ExampleManagedClustersClient_BeginCreateOrUpdate_createUpdateManagedCluster // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersUpdateTags.json func ExampleManagedClustersClient_BeginUpdateTags() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4903,7 +5635,7 @@ func ExampleManagedClustersClient_BeginUpdateTags() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersDelete.json func ExampleManagedClustersClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4914,7 +5646,7 @@ func ExampleManagedClustersClient_BeginDelete() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewManagedClustersClient().BeginDelete(ctx, "rg1", "clustername1", nil) + poller, err := clientFactory.NewManagedClustersClient().BeginDelete(ctx, "rg1", "clustername1", &armcontainerservice.ManagedClustersClientBeginDeleteOptions{IgnorePodDisruptionBudget: nil}) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -4924,7 +5656,7 @@ func ExampleManagedClustersClient_BeginDelete() { } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json func ExampleManagedClustersClient_BeginResetServicePrincipalProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4948,7 +5680,7 @@ func ExampleManagedClustersClient_BeginResetServicePrincipalProfile() { } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersResetAADProfile.json func ExampleManagedClustersClient_BeginResetAADProfile() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -4974,8 +5706,8 @@ func ExampleManagedClustersClient_BeginResetAADProfile() { } } -// 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() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersAbortOperation.json +func ExampleManagedClustersClient_BeginAbortLatestOperation() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -4985,7 +5717,7 @@ func ExampleManagedClustersClient_BeginRotateClusterCertificates() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewManagedClustersClient().BeginRotateClusterCertificates(ctx, "rg1", "clustername1", nil) + poller, err := clientFactory.NewManagedClustersClient().BeginAbortLatestOperation(ctx, "rg1", "clustername1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -4995,8 +5727,8 @@ func ExampleManagedClustersClient_BeginRotateClusterCertificates() { } } -// 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() { +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersRotateClusterCertificates.json +func ExampleManagedClustersClient_BeginRotateClusterCertificates() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) @@ -5006,7 +5738,7 @@ func ExampleManagedClustersClient_BeginAbortLatestOperation() { if err != nil { log.Fatalf("failed to create client: %v", err) } - poller, err := clientFactory.NewManagedClustersClient().BeginAbortLatestOperation(ctx, "rg1", "clustername1", nil) + poller, err := clientFactory.NewManagedClustersClient().BeginRotateClusterCertificates(ctx, "rg1", "clustername1", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } @@ -5016,7 +5748,7 @@ func ExampleManagedClustersClient_BeginAbortLatestOperation() { } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json func ExampleManagedClustersClient_BeginRotateServiceAccountSigningKeys() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5037,7 +5769,7 @@ func ExampleManagedClustersClient_BeginRotateServiceAccountSigningKeys() { } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersStop.json func ExampleManagedClustersClient_BeginStop() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5058,7 +5790,7 @@ func ExampleManagedClustersClient_BeginStop() { } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersStart.json func ExampleManagedClustersClient_BeginStart() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5079,7 +5811,7 @@ func ExampleManagedClustersClient_BeginStart() { } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/RunCommandRequest.json func ExampleManagedClustersClient_BeginRunCommand() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5117,7 +5849,7 @@ func ExampleManagedClustersClient_BeginRunCommand() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/RunCommandResultFailed.json func ExampleManagedClustersClient_GetCommandResult_commandFailedResult() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5144,7 +5876,7 @@ func ExampleManagedClustersClient_GetCommandResult_commandFailedResult() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/RunCommandResultSucceed.json func ExampleManagedClustersClient_GetCommandResult_commandSucceedResult() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5174,7 +5906,7 @@ func ExampleManagedClustersClient_GetCommandResult_commandSucceedResult() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json func ExampleManagedClustersClient_NewListOutboundNetworkDependenciesEndpointsPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -5398,3 +6130,275 @@ func ExampleManagedClustersClient_NewListOutboundNetworkDependenciesEndpointsPag // } } } + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/GetGuardrailsVersions.json +func ExampleManagedClustersClient_GetGuardrailsVersions() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewManagedClustersClient().GetGuardrailsVersions(ctx, "location1", "v1.0.0", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.GuardrailsAvailableVersion = armcontainerservice.GuardrailsAvailableVersion{ + // Name: to.Ptr("v1.0.0"), + // Type: to.Ptr("Microsoft.ContainerService/locations/guardrailsVersions"), + // ID: to.Ptr("/subscriptions/subid1/providers/Microsoft.ContainerService/locations/location1/guardrailsVersions/v1.0.0"), + // Properties: &armcontainerservice.GuardrailsAvailableVersionsProperties{ + // IsDefaultVersion: to.Ptr(true), + // Support: to.Ptr(armcontainerservice.GuardrailsSupportPreview), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ListGuardrailsVersions.json +func ExampleManagedClustersClient_NewListGuardrailsVersionsPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewManagedClustersClient().NewListGuardrailsVersionsPager("location1", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.GuardrailsAvailableVersionsList = armcontainerservice.GuardrailsAvailableVersionsList{ + // Value: []*armcontainerservice.GuardrailsAvailableVersion{ + // { + // Name: to.Ptr("v1.0.0"), + // Type: to.Ptr("Microsoft.ContainerService/locations/guardrailsVersions"), + // ID: to.Ptr("/subscriptions/subid1/providers/Microsoft.ContainerService/locations/location1/guardrailsVersions/v1.0.0"), + // Properties: &armcontainerservice.GuardrailsAvailableVersionsProperties{ + // IsDefaultVersion: to.Ptr(true), + // Support: to.Ptr(armcontainerservice.GuardrailsSupportPreview), + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json +func ExampleManagedClustersClient_NewListMeshRevisionProfilesPager() { + 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().NewListMeshRevisionProfilesPager("location1", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.MeshRevisionProfileList = armcontainerservice.MeshRevisionProfileList{ + // Value: []*armcontainerservice.MeshRevisionProfile{ + // { + // Name: to.Ptr("istio"), + // Type: to.Ptr("Microsoft.ContainerService/locations/meshRevisionProfiles"), + // ID: to.Ptr("/subscriptions/subid1/providers/Microsoft.ContainerService/locations/location1/meshRevisionProfiles/istio"), + // Properties: &armcontainerservice.MeshRevisionProfileProperties{ + // MeshRevisions: []*armcontainerservice.MeshRevision{ + // { + // CompatibleWith: []*armcontainerservice.CompatibleVersions{ + // { + // Name: to.Ptr("kubernetes"), + // Versions: []*string{ + // to.Ptr("1.23"), + // to.Ptr("1.24"), + // to.Ptr("1.25"), + // to.Ptr("1.26")}, + // }}, + // Revision: to.Ptr("asm-1-17"), + // Upgrades: []*string{ + // to.Ptr("1-18")}, + // }, + // { + // CompatibleWith: []*armcontainerservice.CompatibleVersions{ + // { + // Name: to.Ptr("kubernetes"), + // Versions: []*string{ + // to.Ptr("1.24"), + // to.Ptr("1.25"), + // to.Ptr("1.26"), + // to.Ptr("1.27")}, + // }}, + // Revision: to.Ptr("asm-1-18"), + // Upgrades: []*string{ + // }, + // }}, + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json +func ExampleManagedClustersClient_GetMeshRevisionProfile() { + 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().GetMeshRevisionProfile(ctx, "location1", "istio", 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.MeshRevisionProfile = armcontainerservice.MeshRevisionProfile{ + // Name: to.Ptr("istio"), + // Type: to.Ptr("Microsoft.ContainerService/locations/meshRevisionProfiles"), + // ID: to.Ptr("/subscriptions/subid1/providers/Microsoft.ContainerService/locations/location1/meshRevisionProfiles/istio"), + // Properties: &armcontainerservice.MeshRevisionProfileProperties{ + // MeshRevisions: []*armcontainerservice.MeshRevision{ + // { + // CompatibleWith: []*armcontainerservice.CompatibleVersions{ + // { + // Name: to.Ptr("kubernetes"), + // Versions: []*string{ + // to.Ptr("1.23"), + // to.Ptr("1.24"), + // to.Ptr("1.25"), + // to.Ptr("1.26")}, + // }}, + // Revision: to.Ptr("asm-1-17"), + // Upgrades: []*string{ + // to.Ptr("1-18")}, + // }, + // { + // CompatibleWith: []*armcontainerservice.CompatibleVersions{ + // { + // Name: to.Ptr("kubernetes"), + // Versions: []*string{ + // to.Ptr("1.24"), + // to.Ptr("1.25"), + // to.Ptr("1.26"), + // to.Ptr("1.27")}, + // }}, + // Revision: to.Ptr("asm-1-18"), + // Upgrades: []*string{ + // }, + // }}, + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json +func ExampleManagedClustersClient_NewListMeshUpgradeProfilesPager() { + 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().NewListMeshUpgradeProfilesPager("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.MeshUpgradeProfileList = armcontainerservice.MeshUpgradeProfileList{ + // Value: []*armcontainerservice.MeshUpgradeProfile{ + // { + // Name: to.Ptr("istio"), + // Type: to.Ptr("Microsoft.ContainerService/managedClusters/meshUpgradeProfiles"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/meshUpgradeProfiles/istio"), + // Properties: &armcontainerservice.MeshUpgradeProfileProperties{ + // CompatibleWith: []*armcontainerservice.CompatibleVersions{ + // { + // Name: to.Ptr("kubernetes"), + // Versions: []*string{ + // to.Ptr("1.23"), + // to.Ptr("1.24"), + // to.Ptr("1.25"), + // to.Ptr("1.26")}, + // }}, + // Revision: to.Ptr("asm-1-17"), + // Upgrades: []*string{ + // to.Ptr("1-18")}, + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json +func ExampleManagedClustersClient_GetMeshUpgradeProfile() { + 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().GetMeshUpgradeProfile(ctx, "rg1", "clustername1", "istio", 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.MeshUpgradeProfile = armcontainerservice.MeshUpgradeProfile{ + // Name: to.Ptr("istio"), + // Type: to.Ptr("Microsoft.ContainerService/managedClusters/meshUpgradeProfiles"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/meshUpgradeProfiles/istio"), + // Properties: &armcontainerservice.MeshUpgradeProfileProperties{ + // CompatibleWith: []*armcontainerservice.CompatibleVersions{ + // { + // Name: to.Ptr("kubernetes"), + // Versions: []*string{ + // to.Ptr("1.23"), + // to.Ptr("1.24"), + // to.Ptr("1.25"), + // to.Ptr("1.26")}, + // }}, + // Revision: to.Ptr("asm-1-17"), + // Upgrades: []*string{ + // to.Ptr("1-18")}, + // }, + // } +} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client.go new file mode 100644 index 000000000000..96a857e2597c --- /dev/null +++ b/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client.go @@ -0,0 +1,411 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcontainerservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// ManagedClusterSnapshotsClient contains the methods for the ManagedClusterSnapshots group. +// Don't use this type directly, use NewManagedClusterSnapshotsClient() instead. +type ManagedClusterSnapshotsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewManagedClusterSnapshotsClient creates a new instance of ManagedClusterSnapshotsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewManagedClusterSnapshotsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagedClusterSnapshotsClient, error) { + cl, err := arm.NewClient(moduleName+".ManagedClusterSnapshotsClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &ManagedClusterSnapshotsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Creates or updates a managed cluster snapshot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-07-02-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - parameters - The managed cluster snapshot to create or update. +// - options - ManagedClusterSnapshotsClientCreateOrUpdateOptions contains the optional parameters for the ManagedClusterSnapshotsClient.CreateOrUpdate +// method. +func (client *ManagedClusterSnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterSnapshot, options *ManagedClusterSnapshotsClientCreateOrUpdateOptions) (ManagedClusterSnapshotsClientCreateOrUpdateResponse, error) { + var err error + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, parameters, options) + if err != nil { + return ManagedClusterSnapshotsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClusterSnapshotsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return ManagedClusterSnapshotsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *ManagedClusterSnapshotsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterSnapshot, options *ManagedClusterSnapshotsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *ManagedClusterSnapshotsClient) createOrUpdateHandleResponse(resp *http.Response) (ManagedClusterSnapshotsClientCreateOrUpdateResponse, error) { + result := ManagedClusterSnapshotsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedClusterSnapshot); err != nil { + return ManagedClusterSnapshotsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Deletes a managed cluster snapshot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-07-02-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - options - ManagedClusterSnapshotsClientDeleteOptions contains the optional parameters for the ManagedClusterSnapshotsClient.Delete +// method. +func (client *ManagedClusterSnapshotsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClusterSnapshotsClientDeleteOptions) (ManagedClusterSnapshotsClientDeleteResponse, error) { + var err error + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, options) + if err != nil { + return ManagedClusterSnapshotsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClusterSnapshotsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return ManagedClusterSnapshotsClientDeleteResponse{}, err + } + return ManagedClusterSnapshotsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *ManagedClusterSnapshotsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClusterSnapshotsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Gets a managed cluster snapshot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-07-02-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - options - ManagedClusterSnapshotsClientGetOptions contains the optional parameters for the ManagedClusterSnapshotsClient.Get +// method. +func (client *ManagedClusterSnapshotsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClusterSnapshotsClientGetOptions) (ManagedClusterSnapshotsClientGetResponse, error) { + var err error + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, options) + if err != nil { + return ManagedClusterSnapshotsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClusterSnapshotsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedClusterSnapshotsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *ManagedClusterSnapshotsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *ManagedClusterSnapshotsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *ManagedClusterSnapshotsClient) getHandleResponse(resp *http.Response) (ManagedClusterSnapshotsClientGetResponse, error) { + result := ManagedClusterSnapshotsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedClusterSnapshot); err != nil { + return ManagedClusterSnapshotsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - Gets a list of managed cluster snapshots in the specified subscription. +// +// Generated from API version 2023-07-02-preview +// - options - ManagedClusterSnapshotsClientListOptions contains the optional parameters for the ManagedClusterSnapshotsClient.NewListPager +// method. +func (client *ManagedClusterSnapshotsClient) NewListPager(options *ManagedClusterSnapshotsClientListOptions) *runtime.Pager[ManagedClusterSnapshotsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedClusterSnapshotsClientListResponse]{ + More: func(page ManagedClusterSnapshotsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedClusterSnapshotsClientListResponse) (ManagedClusterSnapshotsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ManagedClusterSnapshotsClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClusterSnapshotsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedClusterSnapshotsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *ManagedClusterSnapshotsClient) listCreateRequest(ctx context.Context, options *ManagedClusterSnapshotsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *ManagedClusterSnapshotsClient) listHandleResponse(resp *http.Response) (ManagedClusterSnapshotsClientListResponse, error) { + result := ManagedClusterSnapshotsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedClusterSnapshotListResult); err != nil { + return ManagedClusterSnapshotsClientListResponse{}, err + } + return result, nil +} + +// NewListByResourceGroupPager - Lists managed cluster snapshots in the specified subscription and resource group. +// +// Generated from API version 2023-07-02-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - options - ManagedClusterSnapshotsClientListByResourceGroupOptions contains the optional parameters for the ManagedClusterSnapshotsClient.NewListByResourceGroupPager +// method. +func (client *ManagedClusterSnapshotsClient) NewListByResourceGroupPager(resourceGroupName string, options *ManagedClusterSnapshotsClientListByResourceGroupOptions) *runtime.Pager[ManagedClusterSnapshotsClientListByResourceGroupResponse] { + return runtime.NewPager(runtime.PagingHandler[ManagedClusterSnapshotsClientListByResourceGroupResponse]{ + More: func(page ManagedClusterSnapshotsClientListByResourceGroupResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *ManagedClusterSnapshotsClientListByResourceGroupResponse) (ManagedClusterSnapshotsClientListByResourceGroupResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return ManagedClusterSnapshotsClientListByResourceGroupResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClusterSnapshotsClientListByResourceGroupResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return ManagedClusterSnapshotsClientListByResourceGroupResponse{}, runtime.NewResponseError(resp) + } + return client.listByResourceGroupHandleResponse(resp) + }, + }) +} + +// listByResourceGroupCreateRequest creates the ListByResourceGroup request. +func (client *ManagedClusterSnapshotsClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *ManagedClusterSnapshotsClientListByResourceGroupOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listByResourceGroupHandleResponse handles the ListByResourceGroup response. +func (client *ManagedClusterSnapshotsClient) listByResourceGroupHandleResponse(resp *http.Response) (ManagedClusterSnapshotsClientListByResourceGroupResponse, error) { + result := ManagedClusterSnapshotsClientListByResourceGroupResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedClusterSnapshotListResult); err != nil { + return ManagedClusterSnapshotsClientListByResourceGroupResponse{}, err + } + return result, nil +} + +// UpdateTags - Updates tags on a managed cluster snapshot. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-07-02-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - parameters - Parameters supplied to the Update managed cluster snapshot Tags operation. +// - options - ManagedClusterSnapshotsClientUpdateTagsOptions contains the optional parameters for the ManagedClusterSnapshotsClient.UpdateTags +// method. +func (client *ManagedClusterSnapshotsClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject, options *ManagedClusterSnapshotsClientUpdateTagsOptions) (ManagedClusterSnapshotsClientUpdateTagsResponse, error) { + var err error + req, err := client.updateTagsCreateRequest(ctx, resourceGroupName, resourceName, parameters, options) + if err != nil { + return ManagedClusterSnapshotsClientUpdateTagsResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return ManagedClusterSnapshotsClientUpdateTagsResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return ManagedClusterSnapshotsClientUpdateTagsResponse{}, err + } + resp, err := client.updateTagsHandleResponse(httpResp) + return resp, err +} + +// updateTagsCreateRequest creates the UpdateTags request. +func (client *ManagedClusterSnapshotsClient) updateTagsCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject, options *ManagedClusterSnapshotsClientUpdateTagsOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if resourceName == "" { + return nil, errors.New("parameter resourceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceName}", url.PathEscape(resourceName)) + req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, parameters); err != nil { + return nil, err + } + return req, nil +} + +// updateTagsHandleResponse handles the UpdateTags response. +func (client *ManagedClusterSnapshotsClient) updateTagsHandleResponse(resp *http.Response) (ManagedClusterSnapshotsClientUpdateTagsResponse, error) { + result := ManagedClusterSnapshotsClientUpdateTagsResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.ManagedClusterSnapshot); err != nil { + return ManagedClusterSnapshotsClientUpdateTagsResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client_example_test.go new file mode 100644 index 000000000000..c3e36e4944a8 --- /dev/null +++ b/sdk/resourcemanager/containerservice/armcontainerservice/managedclustersnapshots_client_example_test.go @@ -0,0 +1,343 @@ +//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/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClusterSnapshotsList.json +func ExampleManagedClusterSnapshotsClient_NewListPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewManagedClusterSnapshotsClient().NewListPager(nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.ManagedClusterSnapshotListResult = armcontainerservice.ManagedClusterSnapshotListResult{ + // Value: []*armcontainerservice.ManagedClusterSnapshot{ + // { + // Name: to.Ptr("snapshot1"), + // Type: to.Ptr("Microsoft.ContainerService/ManagedClusterSnapshots"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), + // SystemData: &armcontainerservice.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.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.ManagedClusterSnapshotProperties{ + // CreationData: &armcontainerservice.CreationData{ + // SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), + // }, + // ManagedClusterPropertiesReadOnly: &armcontainerservice.ManagedClusterPropertiesForSnapshot{ + // EnableRbac: to.Ptr(true), + // KubernetesVersion: to.Ptr("1.20.5"), + // NetworkProfile: &armcontainerservice.NetworkProfileForSnapshot{ + // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), + // NetworkMode: to.Ptr(armcontainerservice.NetworkModeBridge), + // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), + // NetworkPolicy: to.Ptr(armcontainerservice.NetworkPolicyCalico), + // }, + // SKU: &armcontainerservice.ManagedClusterSKU{ + // Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), + // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), + // }, + // }, + // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeManagedCluster), + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json +func ExampleManagedClusterSnapshotsClient_NewListByResourceGroupPager() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewManagedClusterSnapshotsClient().NewListByResourceGroupPager("rg1", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page.ManagedClusterSnapshotListResult = armcontainerservice.ManagedClusterSnapshotListResult{ + // Value: []*armcontainerservice.ManagedClusterSnapshot{ + // { + // Name: to.Ptr("snapshot1"), + // Type: to.Ptr("Microsoft.ContainerService/ManagedClusterSnapshots"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), + // SystemData: &armcontainerservice.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.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.ManagedClusterSnapshotProperties{ + // CreationData: &armcontainerservice.CreationData{ + // SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), + // }, + // ManagedClusterPropertiesReadOnly: &armcontainerservice.ManagedClusterPropertiesForSnapshot{ + // EnableRbac: to.Ptr(true), + // KubernetesVersion: to.Ptr("1.20.5"), + // NetworkProfile: &armcontainerservice.NetworkProfileForSnapshot{ + // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), + // NetworkMode: to.Ptr(armcontainerservice.NetworkModeBridge), + // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), + // NetworkPolicy: to.Ptr(armcontainerservice.NetworkPolicyCalico), + // }, + // SKU: &armcontainerservice.ManagedClusterSKU{ + // Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), + // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), + // }, + // }, + // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeManagedCluster), + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClusterSnapshotsGet.json +func ExampleManagedClusterSnapshotsClient_Get() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewManagedClusterSnapshotsClient().Get(ctx, "rg1", "snapshot1", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.ManagedClusterSnapshot = armcontainerservice.ManagedClusterSnapshot{ + // Name: to.Ptr("snapshot1"), + // Type: to.Ptr("Microsoft.ContainerService/ManagedClusterSnapshots"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), + // SystemData: &armcontainerservice.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.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.ManagedClusterSnapshotProperties{ + // CreationData: &armcontainerservice.CreationData{ + // SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), + // }, + // ManagedClusterPropertiesReadOnly: &armcontainerservice.ManagedClusterPropertiesForSnapshot{ + // EnableRbac: to.Ptr(true), + // KubernetesVersion: to.Ptr("1.20.5"), + // NetworkProfile: &armcontainerservice.NetworkProfileForSnapshot{ + // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), + // NetworkMode: to.Ptr(armcontainerservice.NetworkModeBridge), + // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), + // NetworkPolicy: to.Ptr(armcontainerservice.NetworkPolicyCalico), + // }, + // SKU: &armcontainerservice.ManagedClusterSKU{ + // Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), + // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), + // }, + // }, + // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeManagedCluster), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClusterSnapshotsCreate.json +func ExampleManagedClusterSnapshotsClient_CreateOrUpdate() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewManagedClusterSnapshotsClient().CreateOrUpdate(ctx, "rg1", "snapshot1", armcontainerservice.ManagedClusterSnapshot{ + Location: to.Ptr("westus"), + Tags: map[string]*string{ + "key1": to.Ptr("val1"), + "key2": to.Ptr("val2"), + }, + Properties: &armcontainerservice.ManagedClusterSnapshotProperties{ + CreationData: &armcontainerservice.CreationData{ + SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), + }, + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.ManagedClusterSnapshot = armcontainerservice.ManagedClusterSnapshot{ + // Name: to.Ptr("snapshot1"), + // Type: to.Ptr("Microsoft.ContainerService/ManagedClusterSnapshots"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), + // SystemData: &armcontainerservice.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.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.ManagedClusterSnapshotProperties{ + // CreationData: &armcontainerservice.CreationData{ + // SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), + // }, + // ManagedClusterPropertiesReadOnly: &armcontainerservice.ManagedClusterPropertiesForSnapshot{ + // EnableRbac: to.Ptr(true), + // KubernetesVersion: to.Ptr("1.20.5"), + // NetworkProfile: &armcontainerservice.NetworkProfileForSnapshot{ + // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), + // NetworkMode: to.Ptr(armcontainerservice.NetworkModeBridge), + // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), + // NetworkPolicy: to.Ptr(armcontainerservice.NetworkPolicyCalico), + // }, + // SKU: &armcontainerservice.ManagedClusterSKU{ + // Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), + // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), + // }, + // }, + // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeManagedCluster), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json +func ExampleManagedClusterSnapshotsClient_UpdateTags() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + res, err := clientFactory.NewManagedClusterSnapshotsClient().UpdateTags(ctx, "rg1", "snapshot1", armcontainerservice.TagsObject{ + Tags: map[string]*string{ + "key2": to.Ptr("new-val2"), + "key3": to.Ptr("val3"), + }, + }, nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } + // You could use response here. We use blank identifier for just demo purposes. + _ = res + // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // res.ManagedClusterSnapshot = armcontainerservice.ManagedClusterSnapshot{ + // Name: to.Ptr("snapshot1"), + // Type: to.Ptr("Microsoft.ContainerService/ManagedClusterSnapshots"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1"), + // SystemData: &armcontainerservice.SystemData{ + // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-09T20:13:23.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.ManagedClusterSnapshotProperties{ + // CreationData: &armcontainerservice.CreationData{ + // SourceResourceID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1"), + // }, + // ManagedClusterPropertiesReadOnly: &armcontainerservice.ManagedClusterPropertiesForSnapshot{ + // EnableRbac: to.Ptr(true), + // KubernetesVersion: to.Ptr("1.20.5"), + // NetworkProfile: &armcontainerservice.NetworkProfileForSnapshot{ + // LoadBalancerSKU: to.Ptr(armcontainerservice.LoadBalancerSKUStandard), + // NetworkMode: to.Ptr(armcontainerservice.NetworkModeBridge), + // NetworkPlugin: to.Ptr(armcontainerservice.NetworkPluginKubenet), + // NetworkPolicy: to.Ptr(armcontainerservice.NetworkPolicyCalico), + // }, + // SKU: &armcontainerservice.ManagedClusterSKU{ + // Name: to.Ptr(armcontainerservice.ManagedClusterSKUName("Basic")), + // Tier: to.Ptr(armcontainerservice.ManagedClusterSKUTierFree), + // }, + // }, + // SnapshotType: to.Ptr(armcontainerservice.SnapshotTypeManagedCluster), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ManagedClusterSnapshotsDelete.json +func ExampleManagedClusterSnapshotsClient_Delete() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armcontainerservice.NewClientFactory("", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + _, err = clientFactory.NewManagedClusterSnapshotsClient().Delete(ctx, "rg1", "snapshot1", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } +} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/models.go b/sdk/resourcemanager/containerservice/armcontainerservice/models.go index 4c7940a3bec5..70ead4c27872 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/models.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/models.go @@ -81,6 +81,24 @@ type AgentPoolListResult struct { NextLink *string } +// AgentPoolNetworkProfile - Network settings of an agent pool. +type AgentPoolNetworkProfile struct { + // The port ranges that are allowed to access. The specified ranges are allowed to overlap. + AllowedHostPorts []*PortRange + + // The IDs of the application security groups which agent pool will associate when created. + ApplicationSecurityGroups []*string + + // IPTags of instance-level public IPs. + NodePublicIPTags []*IPTag +} + +// AgentPoolSecurityProfile - The security settings of an agent pool. +type AgentPoolSecurityProfile struct { + // SSH access method of an agent pool. + SSHAccess *AgentPoolSSHAccess +} + // AgentPoolUpgradeProfile - The list of available upgrades for an agent pool. type AgentPoolUpgradeProfile struct { // REQUIRED; The properties of the agent pool upgrade profile. @@ -134,6 +152,13 @@ type AgentPoolUpgradeSettings struct { MaxSurge *string } +// AgentPoolWindowsProfile - The Windows agent pool's specific profile. +type AgentPoolWindowsProfile struct { + // The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows + // agent pool does not have node public IP enabled. + DisableOutboundNat *bool +} + // AzureKeyVaultKms - Azure Key Vault key management service settings for the security profile. type AzureKeyVaultKms struct { // Whether to enable Azure Key Vault key management service. The default is false. @@ -182,6 +207,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 +300,124 @@ type ExtendedLocation struct { Type *ExtendedLocationTypes } +// GuardrailsAvailableVersion - Available Guardrails Version +type GuardrailsAvailableVersion struct { + // REQUIRED; Whether the version is default or not and support info. + Properties *GuardrailsAvailableVersionsProperties + + // READ-ONLY; Fully qualified resource ID for the resource. 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 +} + +// GuardrailsAvailableVersionsList - Hold values properties, which is array of GuardrailsVersions +type GuardrailsAvailableVersionsList struct { + // Array of AKS supported Guardrails versions. + Value []*GuardrailsAvailableVersion + + // READ-ONLY; The URL to get the next Guardrails available version. + NextLink *string +} + +// GuardrailsAvailableVersionsProperties - Whether the version is default or not and support info. +type GuardrailsAvailableVersionsProperties struct { + // READ-ONLY + IsDefaultVersion *bool + + // READ-ONLY; Whether the version is preview or stable. + Support *GuardrailsSupport +} + +// GuardrailsProfile - The Guardrails profile. +type GuardrailsProfile struct { + // REQUIRED; The guardrails level to be used. By default, Guardrails is enabled for all namespaces except those that AKS excludes + // via systemExcludedNamespaces + Level *Level + + // List of namespaces excluded from guardrails checks + ExcludedNamespaces []*string + + // The version of constraints to use + Version *string + + // READ-ONLY; List of namespaces specified by AKS to be excluded from Guardrails + SystemExcludedNamespaces []*string +} + +// IPTag - Contains the IPTag associated with the object. +type IPTag struct { + // The IP tag type. Example: RoutingPreference. + IPTagType *string + + // The value of the IP tag associated with the public IP. Example: Internet. + Tag *string +} + +// 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 ingress gateways. + IngressGateways []*IstioIngressGateway +} + +// 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 { @@ -369,6 +521,56 @@ type LinuxProfile struct { SSH *SSHConfiguration } +// Machine - A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl +// get nodes; if so it may be because the machine has not been registered with the +// Kubernetes API Server yet. +type Machine struct { + // READ-ONLY; Resource ID. + ID *string + + // READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource. + Name *string + + // READ-ONLY; The properties of the machine + Properties *MachineProperties + + // READ-ONLY; Resource type + Type *string +} + +// MachineIPAddress - The machine IP address details. +type MachineIPAddress struct { + // READ-ONLY; To determine if address belongs IPv4 or IPv6 family. + Family *IPFamily + + // READ-ONLY; IPv4 or IPv6 address of the machine + IP *string +} + +// MachineListResult - The response from the List Machines operation. +type MachineListResult struct { + // The list of Machines in cluster. + Value []*Machine + + // READ-ONLY; The URL to get the next set of machine results. + NextLink *string +} + +// MachineNetworkProperties - network properties of the machine +type MachineNetworkProperties struct { + // READ-ONLY; IPv4, IPv6 addresses of the machine + IPAddresses []*MachineIPAddress +} + +// MachineProperties - The properties of the machine +type MachineProperties struct { + // READ-ONLY; network properties of the machine + Network *MachineNetworkProperties + + // READ-ONLY; Arm resource id of the machine. It can be used to GET underlying VM Instance + ResourceID *string +} + // MaintenanceConfiguration - See planned maintenance [https://docs.microsoft.com/azure/aks/planned-maintenance] for more // information about planned maintenance. type MaintenanceConfiguration struct { @@ -509,9 +711,16 @@ type ManagedClusterAPIServerAccessProfile struct { // Whether to create additional public FQDN for private cluster or not. EnablePrivateClusterPublicFQDN *bool + // Whether to enable apiserver vnet integration for the cluster or not. + EnableVnetIntegration *bool + // The default is System. For more details see configure private DNS zone [https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone]. // Allowed values are 'system' and 'none'. PrivateDNSZone *string + + // It is required when: 1. creating a new cluster with BYO Vnet; 2. updating an existing cluster to enable apiserver vnet + // integration. + SubnetID *string } // ManagedClusterAccessProfile - Managed cluster Access Profile. @@ -570,6 +779,9 @@ type ManagedClusterAgentPoolProfile struct { // The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. AvailabilityZones []*string + // AKS will associate the specified agent pool with the Capacity Reservation Group. + CapacityReservationGroupID *string + // Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user // pools and in the range of 1 to 1000 (inclusive) for system pools. The default // value is 1. @@ -581,6 +793,11 @@ type ManagedClusterAgentPoolProfile struct { // Whether to enable auto-scaler EnableAutoScaling *bool + // When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with + // host services to sync custom certificate authorities from user-provided list of + // base64 encoded certificates into node trust stores. Defaults to false. + EnableCustomCATrust *bool + // This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption EnableEncryptionAtHost *bool @@ -621,6 +838,11 @@ type ManagedClusterAgentPoolProfile struct { // The maximum number of pods that can run on a node. MaxPods *int32 + // A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of + // the day for Linux nodes. It must not be specified for Windows nodes. It must be a + // static string (i.e., will be printed raw and not be executed as a script). + MessageOfTheDay *string + // The minimum number of nodes for auto-scaling MinCount *int32 @@ -628,6 +850,9 @@ type ManagedClusterAgentPoolProfile struct { // and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools Mode *AgentPoolMode + // Network-related settings of an agent pool. + NetworkProfile *AgentPoolNetworkProfile + // The node labels to be persisted across all nodes in agent pool. NodeLabels map[string]*string @@ -646,20 +871,21 @@ type ManagedClusterAgentPoolProfile struct { // see Ephemeral OS [https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os]. OSDiskType *OSDiskType - // Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when - // Kubernetes = 1.25 if OSType is Windows. + // Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if + // OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 + // after Windows2019 is deprecated. OSSKU *OSSKU // The operating system type. The default is Linux. OSType *OSType - // Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version - // is chosen automatically. Updating the cluster with the same once it has been - // created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, - // you should upgrade all node pools in an AKS cluster to the same Kubernetes - // version. The node pool version must have the same major version as the control plane. The node pool minor version must - // be within two minor versions of the control plane version. The node pool version - // cannot be greater than the control plane version. For more information see upgrading a node pool [https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool]. + // Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating + // the agent pool with the same once it has been created will not trigger an + // upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster + // to the same Kubernetes version. The node pool version must have the same + // major version as the control plane. The node pool minor version must be within two minor versions of the control plane + // version. The node pool version cannot be greater than the control plane version. + // For more information see upgrading a node pool [https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool]. OrchestratorVersion *string // If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: @@ -683,6 +909,9 @@ type ManagedClusterAgentPoolProfile struct { // The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. ScaleSetPriority *ScaleSetPriority + // The security settings of an agent pool. + SecurityProfile *AgentPoolSecurityProfile + // Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. // For more details on spot pricing, see spot VMs pricing // [https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing] @@ -707,11 +936,14 @@ type ManagedClusterAgentPoolProfile struct { // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} VnetSubnetID *string + // The Windows agent pool's specific profile. + WindowsProfile *AgentPoolWindowsProfile + // Determines the type of workload a node can run. WorkloadRuntime *WorkloadRuntime - // READ-ONLY; If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion - // is , this field will contain the full version being used. + // READ-ONLY; If orchestratorVersion was a fully specified version , this field will be exactly equal to it. If orchestratorVersion + // was , this field will contain the full version being used. CurrentOrchestratorVersion *string // READ-ONLY; The version of node image @@ -726,6 +958,9 @@ type ManagedClusterAgentPoolProfileProperties struct { // The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. AvailabilityZones []*string + // AKS will associate the specified agent pool with the Capacity Reservation Group. + CapacityReservationGroupID *string + // Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user // pools and in the range of 1 to 1000 (inclusive) for system pools. The default // value is 1. @@ -737,6 +972,11 @@ type ManagedClusterAgentPoolProfileProperties struct { // Whether to enable auto-scaler EnableAutoScaling *bool + // When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with + // host services to sync custom certificate authorities from user-provided list of + // base64 encoded certificates into node trust stores. Defaults to false. + EnableCustomCATrust *bool + // This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption EnableEncryptionAtHost *bool @@ -777,6 +1017,11 @@ type ManagedClusterAgentPoolProfileProperties struct { // The maximum number of pods that can run on a node. MaxPods *int32 + // A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of + // the day for Linux nodes. It must not be specified for Windows nodes. It must be a + // static string (i.e., will be printed raw and not be executed as a script). + MessageOfTheDay *string + // The minimum number of nodes for auto-scaling MinCount *int32 @@ -784,6 +1029,9 @@ type ManagedClusterAgentPoolProfileProperties struct { // and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools Mode *AgentPoolMode + // Network-related settings of an agent pool. + NetworkProfile *AgentPoolNetworkProfile + // The node labels to be persisted across all nodes in agent pool. NodeLabels map[string]*string @@ -802,20 +1050,21 @@ type ManagedClusterAgentPoolProfileProperties struct { // see Ephemeral OS [https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os]. OSDiskType *OSDiskType - // Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when - // Kubernetes = 1.25 if OSType is Windows. + // Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if + // OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 + // after Windows2019 is deprecated. OSSKU *OSSKU // The operating system type. The default is Linux. OSType *OSType - // Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version - // is chosen automatically. Updating the cluster with the same once it has been - // created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, - // you should upgrade all node pools in an AKS cluster to the same Kubernetes - // version. The node pool version must have the same major version as the control plane. The node pool minor version must - // be within two minor versions of the control plane version. The node pool version - // cannot be greater than the control plane version. For more information see upgrading a node pool [https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool]. + // Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating + // the agent pool with the same once it has been created will not trigger an + // upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster + // to the same Kubernetes version. The node pool version must have the same + // major version as the control plane. The node pool minor version must be within two minor versions of the control plane + // version. The node pool version cannot be greater than the control plane version. + // For more information see upgrading a node pool [https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool]. OrchestratorVersion *string // If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: @@ -839,6 +1088,9 @@ type ManagedClusterAgentPoolProfileProperties struct { // The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. ScaleSetPriority *ScaleSetPriority + // The security settings of an agent pool. + SecurityProfile *AgentPoolSecurityProfile + // Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. // For more details on spot pricing, see spot VMs pricing // [https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing] @@ -863,11 +1115,14 @@ type ManagedClusterAgentPoolProfileProperties struct { // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} VnetSubnetID *string + // The Windows agent pool's specific profile. + WindowsProfile *AgentPoolWindowsProfile + // Determines the type of workload a node can run. WorkloadRuntime *WorkloadRuntime - // READ-ONLY; If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion - // is , this field will contain the full version being used. + // READ-ONLY; If orchestratorVersion was a fully specified version , this field will be exactly equal to it. If orchestratorVersion + // was , this field will contain the full version being used. CurrentOrchestratorVersion *string // READ-ONLY; The version of node image @@ -879,50 +1134,108 @@ type ManagedClusterAgentPoolProfileProperties struct { // ManagedClusterAutoUpgradeProfile - Auto upgrade profile for a managed cluster. type ManagedClusterAutoUpgradeProfile struct { - // Manner in which the OS on your nodes is updated. The default is NodeImage. + // The default is Unmanaged, but may change to either NodeImage or SecurityPatch at GA. NodeOSUpgradeChannel *NodeOSUpgradeChannel // For more information see setting the AKS cluster auto-upgrade channel [https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel]. UpgradeChannel *UpgradeChannel } -// ManagedClusterAzureMonitorProfile - Azure Monitor addon profiles for monitoring the managed cluster. +// ManagedClusterAzureMonitorProfile - Prometheus addon profile for the container service cluster type ManagedClusterAzureMonitorProfile struct { - // Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure - // metrics to send to an Azure Monitor Workspace and configure additional - // scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. + // Logs profile for the Azure Monitor Infrastructure and Application Logs. Collect out-of-the-box Kubernetes infrastructure + // & application logs to send to Azure Monitor. See + // aka.ms/AzureMonitorContainerInsights for an overview. + Logs *ManagedClusterAzureMonitorProfileLogs + + // Metrics profile for the prometheus service addon Metrics *ManagedClusterAzureMonitorProfileMetrics } -// ManagedClusterAzureMonitorProfileKubeStateMetrics - Kube State Metrics profile for the Azure Managed Prometheus addon. -// These optional settings are for the kube-state-metrics pod that is deployed with the addon. See -// aka.ms/AzureManagedPrometheus-optional-parameters for details. +// ManagedClusterAzureMonitorProfileAppMonitoring - Application Monitoring Profile for Kubernetes Application Container. Collects +// application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor OpenTelemetry +// based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. +type ManagedClusterAzureMonitorProfileAppMonitoring struct { + // Indicates if Application Monitoring enabled or not. + Enabled *bool +} + +// ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics - Application Monitoring Open Telemetry Metrics Profile +// for Kubernetes Application Container Metrics. Collects OpenTelemetry metrics through auto-instrumentation of the application +// using Azure Monitor +// OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. +type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics struct { + // Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. + Enabled *bool +} + +// ManagedClusterAzureMonitorProfileContainerInsights - Azure Monitor Container Insights Profile for Kubernetes Events, Inventory +// and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. +type ManagedClusterAzureMonitorProfileContainerInsights struct { + // Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. + Enabled *bool + + // Fully Qualified ARM Resource Id of Azure Log Analytics Workspace for storing Azure Monitor Container Insights Logs. + LogAnalyticsWorkspaceResourceID *string + + // Windows Host Logs Profile for Kubernetes Windows Nodes Log Collection. Collects ETW, Event Logs and Text logs etc. See + // aka.ms/AzureMonitorContainerInsights for an overview. + WindowsHostLogs *ManagedClusterAzureMonitorProfileWindowsHostLogs +} + +// ManagedClusterAzureMonitorProfileKubeStateMetrics - Kube State Metrics for prometheus addon profile for the container service +// cluster type ManagedClusterAzureMonitorProfileKubeStateMetrics struct { - // Comma-separated list of Kubernetes annotation keys that will be used in the resource's labels metric (Example: 'namespaces=[kubernetes.io/team,…],pods=[kubernetes.io/team],…'). - // By default the metric - // contains only resource name and namespace labels. + // Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric. MetricAnnotationsAllowList *string - // Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,…],pods=[app],…'). - // By default the metric - // contains only resource name and namespace labels. + // Comma-separated list of Kubernetes annotations keys that will be used in the resource's labels metric. MetricLabelsAllowlist *string } -// ManagedClusterAzureMonitorProfileMetrics - Metrics profile for the Azure Monitor managed service for Prometheus addon. -// Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional -// scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview. +// ManagedClusterAzureMonitorProfileLogs - Logs profile for the Azure Monitor Infrastructure and Application Logs. Collect +// out-of-the-box Kubernetes infrastructure & application logs to send to Azure Monitor. See +// aka.ms/AzureMonitorContainerInsights for an overview. +type ManagedClusterAzureMonitorProfileLogs struct { + // Application Monitoring Profile for Kubernetes Application Container. Collects application logs, metrics and traces through + // auto-instrumentation of the application using Azure Monitor OpenTelemetry + // based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + AppMonitoring *ManagedClusterAzureMonitorProfileAppMonitoring + + // Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights + // for an overview. + ContainerInsights *ManagedClusterAzureMonitorProfileContainerInsights +} + +// ManagedClusterAzureMonitorProfileMetrics - Metrics profile for the prometheus service addon type ManagedClusterAzureMonitorProfileMetrics struct { - // REQUIRED; Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable - // for details on enabling and disabling. + // REQUIRED; Whether to enable the Prometheus collector Enabled *bool - // Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics - // pod that is deployed with the addon. See - // aka.ms/AzureManagedPrometheus-optional-parameters for details. + // Application Monitoring Open Telemetry Metrics Profile for Kubernetes Application Container Metrics. Collects OpenTelemetry + // metrics through auto-instrumentation of the application using Azure Monitor + // OpenTelemetry based SDKs. See aka.ms/AzureMonitorApplicationMonitoring for an overview. + AppMonitoringOpenTelemetryMetrics *ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics + + // Kube State Metrics for prometheus addon profile for the container service cluster KubeStateMetrics *ManagedClusterAzureMonitorProfileKubeStateMetrics } +// ManagedClusterAzureMonitorProfileWindowsHostLogs - Windows Host Logs Profile for Kubernetes Windows Nodes Log Collection. +// Collects ETW, Event Logs and Text logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. +type ManagedClusterAzureMonitorProfileWindowsHostLogs struct { + // Indicates if Windows Host Log Collection is enabled or not for Azure Monitor Container Insights Logs Addon. + Enabled *bool +} + +// ManagedClusterCostAnalysis - The cost analysis configuration for the cluster +type ManagedClusterCostAnalysis struct { + // The Managed Cluster sku.tier must be set to 'Standard' to enable this feature. Enabling this will add Kubernetes Namespace + // and Deployment details to the Cost Analysis views in the Azure portal. If not + // specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis. + Enabled *bool +} + // ManagedClusterHTTPProxyConfig - Cluster HTTP proxy configuration. type ManagedClusterHTTPProxyConfig struct { // The HTTP proxy server endpoint to use. @@ -936,6 +1249,10 @@ type ManagedClusterHTTPProxyConfig struct { // Alternative CA cert to use for connecting to proxy servers. TrustedCa *string + + // READ-ONLY; A read-only list of all endpoints for which traffic should not be sent to the proxy. This list is a superset + // of noProxy and values injected by AKS. + EffectiveNoProxy []*string } // ManagedClusterIdentity - Identity for the managed cluster. @@ -958,6 +1275,28 @@ type ManagedClusterIdentity struct { TenantID *string } +// ManagedClusterIngressProfile - Ingress profile for the container service cluster. +type ManagedClusterIngressProfile struct { + // Web App Routing settings for the ingress profile. + WebAppRouting *ManagedClusterIngressProfileWebAppRouting +} + +// ManagedClusterIngressProfileWebAppRouting - Web App Routing settings for the ingress profile. +type ManagedClusterIngressProfileWebAppRouting struct { + // Resource IDs of the public DNS zones to be associated with the Web App Routing add-on. Used only when Web App Routing is + // enabled. All public DNS zones must be in the same resource group. + DNSZoneResourceIDs []*string + + // Whether to enable Web App Routing. + Enabled *bool + + // READ-ONLY; Managed identity of the Web Application Routing add-on. This is the identity that should be granted permissions, + // for example, to manage the associated Azure DNS resource and get certificates from + // Azure Key Vault. See this overview of the add-on [https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm] + // for more instructions. + Identity *UserAssignedIdentity +} + // ManagedClusterListResult - The response from the List Managed Clusters operation. type ManagedClusterListResult struct { // The list of managed clusters. @@ -973,6 +1312,9 @@ type ManagedClusterLoadBalancerProfile struct { // value is 0 which results in Azure dynamically allocating ports. AllocatedOutboundPorts *int32 + // The type of the managed inbound Load Balancer BackendPool. + BackendPoolType *BackendPoolType + // The effective outbound IP resources of the cluster load balancer. EffectiveOutboundIPs []*ResourceReference @@ -1024,6 +1366,12 @@ type ManagedClusterManagedOutboundIPProfile struct { Count *int32 } +// ManagedClusterMetricsProfile - The metrics profile for the ManagedCluster. +type ManagedClusterMetricsProfile struct { + // The cost analysis configuration for the cluster + CostAnalysis *ManagedClusterCostAnalysis +} + // ManagedClusterNATGatewayProfile - Profile of the managed cluster NAT gateway. type ManagedClusterNATGatewayProfile struct { // The effective outbound IP resources of the cluster NAT gateway. @@ -1037,6 +1385,12 @@ type ManagedClusterNATGatewayProfile struct { ManagedOutboundIPProfile *ManagedClusterManagedOutboundIPProfile } +// ManagedClusterNodeResourceGroupProfile - Node resource group lockdown profile for a managed cluster. +type ManagedClusterNodeResourceGroupProfile struct { + // The restriction level applied to the cluster's node resource group + RestrictionLevel *RestrictionLevel +} + // ManagedClusterOIDCIssuerProfile - The OIDC issuer profile of the Managed Cluster. type ManagedClusterOIDCIssuerProfile struct { // Whether the OIDC issuer is enabled. @@ -1168,9 +1522,12 @@ type ManagedClusterProperties struct { // The auto upgrade configuration. AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile - // Azure Monitor addon profiles for monitoring the managed cluster. + // Prometheus addon profile for the container service cluster AzureMonitorProfile *ManagedClusterAzureMonitorProfile + // CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot. + CreationData *CreationData + // This cannot be updated once the Managed Cluster has been created. DNSPrefix *string @@ -1182,6 +1539,11 @@ type ManagedClusterProperties struct { // This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' DiskEncryptionSetID *string + // The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. See https://aka.ms/NamespaceARMResource + // [https://aka.ms/NamespaceARMResource] for more details + // on Namespace as a ARM Resource. + EnableNamespaceResources *bool + // (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes // v1.21, and removed from Kubernetes in v1.25. Learn more at // https://aka.ms/k8s/psp and https://aka.ms/aks/psp. @@ -1193,30 +1555,39 @@ type ManagedClusterProperties struct { // This cannot be updated once the Managed Cluster has been created. FqdnSubdomain *string + // The guardrails profile holds all the guardrails information for a given cluster + GuardrailsProfile *GuardrailsProfile + // Configurations for provisioning the cluster with HTTP proxy servers. HTTPProxyConfig *ManagedClusterHTTPProxyConfig // Identities associated with the cluster. IdentityProfile map[string]*UserAssignedIdentity - // Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version - // is chosen automatically. Updating the cluster with the same once it has been - // created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade - // a supported AKS cluster, Kubernetes minor versions cannot be skipped. All - // upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x - // -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See upgrading - // an AKS cluster [https://docs.microsoft.com/azure/aks/upgrade-cluster] for more details. + // Ingress profile for the managed cluster. + IngressProfile *ManagedClusterIngressProfile + + // When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially + // by major version number. For example, upgrades between 1.14.x -> + // 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See upgrading an AKS cluster [https://docs.microsoft.com/azure/aks/upgrade-cluster] + // for more details. KubernetesVersion *string // The profile for Linux VMs in the Managed Cluster. LinuxProfile *LinuxProfile + // Optional cluster metrics configuration. + MetricsProfile *ManagedClusterMetricsProfile + // The network configuration profile. NetworkProfile *NetworkProfile // The name of the resource group containing agent pool nodes. NodeResourceGroup *string + // The node resource group configuration profile. + NodeResourceGroupProfile *ManagedClusterNodeResourceGroupProfile + // The OIDC issuer profile of the Managed Cluster. OidcIssuerProfile *ManagedClusterOIDCIssuerProfile @@ -1233,6 +1604,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 @@ -1256,8 +1630,7 @@ type ManagedClusterProperties struct { // allowing the Azure Portal to function properly. AzurePortalFQDN *string - // READ-ONLY; If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion - // was , this field will contain the full version being used. + // READ-ONLY; The version of Kubernetes the Managed Cluster is running. CurrentKubernetesVersion *string // READ-ONLY; The FQDN of the master pool. @@ -1274,6 +1647,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 @@ -1335,6 +1712,21 @@ type ManagedClusterPropertiesAutoScalerProfile struct { SkipNodesWithSystemPods *string } +// ManagedClusterPropertiesForSnapshot - managed cluster properties for snapshot, these properties are read only. +type ManagedClusterPropertiesForSnapshot struct { + // Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + EnableRbac *bool + + // The current kubernetes version. + KubernetesVersion *string + + // The current managed cluster sku. + SKU *ManagedClusterSKU + + // READ-ONLY; The current network profile. + NetworkProfile *NetworkProfileForSnapshot +} + // ManagedClusterSKU - The SKU of a Managed Cluster. type ManagedClusterSKU struct { // The name of a managed cluster SKU. @@ -1351,12 +1743,26 @@ type ManagedClusterSecurityProfile struct { // the security profile. AzureKeyVaultKms *AzureKeyVaultKms + // A list of up to 10 base64 encoded CAs that will be added to the trust store on nodes with the Custom CA Trust feature enabled. + // For more information see Custom CA Trust Certificates + // [https://learn.microsoft.com/en-us/azure/aks/custom-certificate-authority] + CustomCATrustCertificates [][]byte + // Microsoft Defender settings for the security profile. Defender *ManagedClusterSecurityProfileDefender // Image Cleaner settings for the security profile. ImageCleaner *ManagedClusterSecurityProfileImageCleaner + // Image integrity is a feature that works with Azure Policy to verify image integrity by signature. This will not have any + // effect unless Azure Policy is applied to enforce image signatures. See + // https://aka.ms/aks/image-integrity for how to use this feature via policy. + ImageIntegrity *ManagedClusterSecurityProfileImageIntegrity + + // Node Restriction [https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction] settings + // for the security profile. + NodeRestriction *ManagedClusterSecurityProfileNodeRestriction + // Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access Azure // cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more // details. @@ -1390,6 +1796,18 @@ type ManagedClusterSecurityProfileImageCleaner struct { IntervalHours *int32 } +// ManagedClusterSecurityProfileImageIntegrity - Image integrity related settings for the security profile. +type ManagedClusterSecurityProfileImageIntegrity struct { + // Whether to enable image integrity. The default value is false. + Enabled *bool +} + +// ManagedClusterSecurityProfileNodeRestriction - Node Restriction settings for the security profile. +type ManagedClusterSecurityProfileNodeRestriction struct { + // Whether to enable Node Restriction + Enabled *bool +} + // ManagedClusterSecurityProfileWorkloadIdentity - Workload identity settings for the security profile. type ManagedClusterSecurityProfileWorkloadIdentity struct { // Whether to enable workload identity. @@ -1406,6 +1824,51 @@ type ManagedClusterServicePrincipalProfile struct { Secret *string } +// ManagedClusterSnapshot - A managed cluster snapshot resource. +type ManagedClusterSnapshot struct { + // REQUIRED; The geo-location where the resource lives + Location *string + + // Properties of a managed cluster snapshot. + Properties *ManagedClusterSnapshotProperties + + // Resource tags. + Tags map[string]*string + + // READ-ONLY; Fully qualified resource ID for the resource. 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 +} + +// ManagedClusterSnapshotListResult - The response from the List Managed Cluster Snapshots operation. +type ManagedClusterSnapshotListResult struct { + // The list of managed cluster snapshots. + Value []*ManagedClusterSnapshot + + // READ-ONLY; The URL to get the next set of managed cluster snapshot results. + NextLink *string +} + +// ManagedClusterSnapshotProperties - Properties for a managed cluster snapshot. +type ManagedClusterSnapshotProperties struct { + // CreationData to be used to specify the source resource ID to create this snapshot. + CreationData *CreationData + + // The type of a snapshot. The default is NodePool. + SnapshotType *SnapshotType + + // READ-ONLY; What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. + ManagedClusterPropertiesReadOnly *ManagedClusterPropertiesForSnapshot +} + // ManagedClusterStorageProfile - Storage profile for the container service cluster. type ManagedClusterStorageProfile struct { // AzureBlob CSI Driver settings for the storage profile. @@ -1431,6 +1894,9 @@ type ManagedClusterStorageProfileBlobCSIDriver struct { type ManagedClusterStorageProfileDiskCSIDriver struct { // Whether to enable AzureDisk CSI Driver. The default value is true. Enabled *bool + + // The version of AzureDisk CSI Driver. The default value is v1. + Version *string } // ManagedClusterStorageProfileFileCSIDriver - AzureFile CSI Driver settings for the storage profile. @@ -1506,9 +1972,7 @@ type ManagedClusterWindowsProfile struct { // ManagedClusterWorkloadAutoScalerProfile - Workload Auto-scaler profile for the managed cluster. type ManagedClusterWorkloadAutoScalerProfile struct { // KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. - Keda *ManagedClusterWorkloadAutoScalerProfileKeda - - // VPA (Vertical Pod Autoscaler) settings for the workload auto-scaler profile. + Keda *ManagedClusterWorkloadAutoScalerProfileKeda VerticalPodAutoscaler *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler } @@ -1519,8 +1983,6 @@ type ManagedClusterWorkloadAutoScalerProfileKeda struct { Enabled *bool } -// ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler - VPA (Vertical Pod Autoscaler) settings for the workload -// auto-scaler profile. type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler struct { // REQUIRED; Whether to enable VPA. Default value is false. Enabled *bool @@ -1534,6 +1996,96 @@ 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 +} + +// NetworkMonitoring - This addon can be used to configure network monitoring and generate network monitoring data in Prometheus +// format +type NetworkMonitoring struct { + // Enable or disable the network monitoring plugin on the cluster + Enabled *bool +} + // NetworkProfile - Profile of network configuration. type NetworkProfile struct { // An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified @@ -1544,6 +2096,12 @@ type NetworkProfile struct { // dual-stack, the expected values are IPv4 and IPv6. IPFamilies []*IPFamily + // Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting behavior. + // See https://v + // .docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where is represented by a - string. Kubernetes + // version 1.23 would be '1-23'. + KubeProxyConfig *NetworkProfileKubeProxyConfig + // Profile of the cluster load balancer. LoadBalancerProfile *ManagedClusterLoadBalancerProfile @@ -1551,6 +2109,9 @@ type NetworkProfile struct { // information about the differences between load balancer SKUs. LoadBalancerSKU *LoadBalancerSKU + // This addon can be used to configure network monitoring and generate network monitoring data in Prometheus format + Monitoring *NetworkMonitoring + // Profile of the cluster NAT gateway. NatGatewayProfile *ManagedClusterNATGatewayProfile @@ -1563,7 +2124,7 @@ type NetworkProfile struct { // Network plugin used for building the Kubernetes network. NetworkPlugin *NetworkPlugin - // The mode the network plugin should use. + // Network plugin mode used for building the Kubernetes network. NetworkPluginMode *NetworkPluginMode // Network policy used for building the Kubernetes network. @@ -1588,6 +2149,56 @@ type NetworkProfile struct { ServiceCidrs []*string } +// NetworkProfileForSnapshot - network profile for managed cluster snapshot, these properties are read only. +type NetworkProfileForSnapshot struct { + // loadBalancerSku for managed cluster snapshot. + LoadBalancerSKU *LoadBalancerSKU + + // networkMode for managed cluster snapshot. + NetworkMode *NetworkMode + + // networkPlugin for managed cluster snapshot. + NetworkPlugin *NetworkPlugin + + // NetworkPluginMode for managed cluster snapshot. + NetworkPluginMode *NetworkPluginMode + + // networkPolicy for managed cluster snapshot. + NetworkPolicy *NetworkPolicy +} + +// NetworkProfileKubeProxyConfig - Holds configuration customizations for kube-proxy. Any values not defined will use the +// kube-proxy defaulting behavior. See https://v +// .docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where is represented by a - string. Kubernetes +// version 1.23 would be '1-23'. +type NetworkProfileKubeProxyConfig struct { + // Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by default + // without these customizations). + Enabled *bool + + // Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + IpvsConfig *NetworkProfileKubeProxyConfigIpvsConfig + + // Specify which proxy mode to use ('IPTABLES' or 'IPVS') + Mode *Mode +} + +// NetworkProfileKubeProxyConfigIpvsConfig - Holds configuration customizations for IPVS. May only be specified if 'mode' +// is set to 'IPVS'. +type NetworkProfileKubeProxyConfigIpvsConfig struct { + // IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. + Scheduler *IpvsScheduler + + // The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a positive integer value. + TCPFinTimeoutSeconds *int32 + + // The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. + TCPTimeoutSeconds *int32 + + // The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value. + UDPTimeoutSeconds *int32 +} + // OSOptionProfile - The OS option profile. type OSOptionProfile struct { // REQUIRED; The list of OS options. @@ -1669,6 +2280,18 @@ type OutboundEnvironmentEndpointCollection struct { NextLink *string } +// PortRange - The port range. +type PortRange struct { + // The maximum port that is included in the range. It should be ranged from 1 to 65535, and be greater than or equal to portStart. + PortEnd *int32 + + // The minimum port that is included in the range. It should be ranged from 1 to 65535, and be less than or equal to portEnd. + PortStart *int32 + + // The network protocol of the port. + Protocol *Protocol +} + // PowerState - Describes the Power State of the cluster type PowerState struct { // Tells whether the cluster is Running or Stopped @@ -1759,7 +2382,7 @@ type RelativeMonthlySchedule struct { // REQUIRED; Specifies the number of months between each set of occurrences. IntervalMonths *int32 - // REQUIRED; Specifies on which week of the month the dayOfWeek applies. + // REQUIRED; Specifies on which instance of the allowed days specified in daysOfWeek the maintenance occurs. WeekIndex *Type } @@ -1819,6 +2442,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 @@ -1869,8 +2501,9 @@ type SnapshotProperties struct { // READ-ONLY; The version of node image. NodeImageVersion *string - // READ-ONLY; Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 - // when Kubernetes = 1.25 if OSType is Windows. + // READ-ONLY; Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 + // if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 + // after Windows2019 is deprecated. OSSKU *OSSKU // READ-ONLY; The operating system type. The default is Linux. @@ -2014,6 +2647,84 @@ type TimeSpan struct { Start *time.Time } +// TrustedAccessRole - Trusted access role definition. +type TrustedAccessRole struct { + // READ-ONLY; Name of role, name is unique under a source resource type + Name *string + + // READ-ONLY; List of rules for the role. This maps to 'rules' property of Kubernetes Cluster Role [https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/#ClusterRole]. + Rules []*TrustedAccessRoleRule + + // READ-ONLY; Resource type of Azure resource + SourceResourceType *string +} + +// TrustedAccessRoleBinding - Defines binding between a resource and role +type TrustedAccessRoleBinding struct { + // REQUIRED; Properties for trusted access role binding + Properties *TrustedAccessRoleBindingProperties + + // 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 +} + +// TrustedAccessRoleBindingListResult - List of trusted access role bindings +type TrustedAccessRoleBindingListResult struct { + // Role binding list + Value []*TrustedAccessRoleBinding + + // READ-ONLY; Link to next page of resources. + NextLink *string +} + +// TrustedAccessRoleBindingProperties - Properties for trusted access role binding +type TrustedAccessRoleBindingProperties struct { + // REQUIRED; A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. + Roles []*string + + // REQUIRED; The ARM resource ID of source resource that trusted access is configured for. + SourceResourceID *string + + // READ-ONLY; The current provisioning state of trusted access role binding. + ProvisioningState *TrustedAccessRoleBindingProvisioningState +} + +// TrustedAccessRoleListResult - List of trusted access roles +type TrustedAccessRoleListResult struct { + // READ-ONLY; Link to next page of resources. + NextLink *string + + // READ-ONLY; Role list + Value []*TrustedAccessRole +} + +// TrustedAccessRoleRule - Rule for trusted access role +type TrustedAccessRoleRule struct { + // READ-ONLY; List of allowed apiGroups + APIGroups []*string + + // READ-ONLY; List of allowed nonResourceURLs + NonResourceURLs []*string + + // READ-ONLY; List of allowed names + ResourceNames []*string + + // READ-ONLY; List of allowed resources + Resources []*string + + // READ-ONLY; List of allowed verbs + Verbs []*string +} + // UpgradeOverrideSettings - Settings for overrides when upgrading a cluster. type UpgradeOverrideSettings struct { // Whether to force upgrade the cluster. Note that this option instructs upgrade operation to bypass upgrade protections such diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go b/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go index 506fbd4564be..462ee2c26657 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/models_serde.go @@ -245,6 +245,68 @@ func (a *AgentPoolListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AgentPoolNetworkProfile. +func (a AgentPoolNetworkProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allowedHostPorts", a.AllowedHostPorts) + populate(objectMap, "applicationSecurityGroups", a.ApplicationSecurityGroups) + populate(objectMap, "nodePublicIPTags", a.NodePublicIPTags) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolNetworkProfile. +func (a *AgentPoolNetworkProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allowedHostPorts": + err = unpopulate(val, "AllowedHostPorts", &a.AllowedHostPorts) + delete(rawMsg, key) + case "applicationSecurityGroups": + err = unpopulate(val, "ApplicationSecurityGroups", &a.ApplicationSecurityGroups) + delete(rawMsg, key) + case "nodePublicIPTags": + err = unpopulate(val, "NodePublicIPTags", &a.NodePublicIPTags) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type AgentPoolSecurityProfile. +func (a AgentPoolSecurityProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "sshAccess", a.SSHAccess) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolSecurityProfile. +func (a *AgentPoolSecurityProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "sshAccess": + err = unpopulate(val, "SSHAccess", &a.SSHAccess) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AgentPoolUpgradeProfile. func (a AgentPoolUpgradeProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -385,6 +447,33 @@ func (a *AgentPoolUpgradeSettings) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type AgentPoolWindowsProfile. +func (a AgentPoolWindowsProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "disableOutboundNat", a.DisableOutboundNat) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type AgentPoolWindowsProfile. +func (a *AgentPoolWindowsProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "disableOutboundNat": + err = unpopulate(val, "DisableOutboundNat", &a.DisableOutboundNat) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", a, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type AzureKeyVaultKms. func (a AzureKeyVaultKms) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -498,6 +587,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,591 +901,613 @@ func (e *ExtendedLocation) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type KubeletConfig. -func (k KubeletConfig) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GuardrailsAvailableVersion. +func (g GuardrailsAvailableVersion) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allowedUnsafeSysctls", k.AllowedUnsafeSysctls) - populate(objectMap, "cpuCfsQuota", k.CPUCfsQuota) - populate(objectMap, "cpuCfsQuotaPeriod", k.CPUCfsQuotaPeriod) - populate(objectMap, "cpuManagerPolicy", k.CPUManagerPolicy) - populate(objectMap, "containerLogMaxFiles", k.ContainerLogMaxFiles) - populate(objectMap, "containerLogMaxSizeMB", k.ContainerLogMaxSizeMB) - populate(objectMap, "failSwapOn", k.FailSwapOn) - populate(objectMap, "imageGcHighThreshold", k.ImageGcHighThreshold) - populate(objectMap, "imageGcLowThreshold", k.ImageGcLowThreshold) - populate(objectMap, "podMaxPids", k.PodMaxPids) - populate(objectMap, "topologyManagerPolicy", k.TopologyManagerPolicy) + populate(objectMap, "id", g.ID) + populate(objectMap, "name", g.Name) + populate(objectMap, "properties", g.Properties) + populate(objectMap, "systemData", g.SystemData) + populate(objectMap, "type", g.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubeletConfig. -func (k *KubeletConfig) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GuardrailsAvailableVersion. +func (g *GuardrailsAvailableVersion) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "allowedUnsafeSysctls": - err = unpopulate(val, "AllowedUnsafeSysctls", &k.AllowedUnsafeSysctls) - delete(rawMsg, key) - case "cpuCfsQuota": - err = unpopulate(val, "CPUCfsQuota", &k.CPUCfsQuota) - delete(rawMsg, key) - case "cpuCfsQuotaPeriod": - err = unpopulate(val, "CPUCfsQuotaPeriod", &k.CPUCfsQuotaPeriod) - delete(rawMsg, key) - case "cpuManagerPolicy": - err = unpopulate(val, "CPUManagerPolicy", &k.CPUManagerPolicy) - delete(rawMsg, key) - case "containerLogMaxFiles": - err = unpopulate(val, "ContainerLogMaxFiles", &k.ContainerLogMaxFiles) + case "id": + err = unpopulate(val, "ID", &g.ID) delete(rawMsg, key) - case "containerLogMaxSizeMB": - err = unpopulate(val, "ContainerLogMaxSizeMB", &k.ContainerLogMaxSizeMB) + case "name": + err = unpopulate(val, "Name", &g.Name) delete(rawMsg, key) - case "failSwapOn": - err = unpopulate(val, "FailSwapOn", &k.FailSwapOn) + case "properties": + err = unpopulate(val, "Properties", &g.Properties) delete(rawMsg, key) - case "imageGcHighThreshold": - err = unpopulate(val, "ImageGcHighThreshold", &k.ImageGcHighThreshold) + case "systemData": + err = unpopulate(val, "SystemData", &g.SystemData) delete(rawMsg, key) - case "imageGcLowThreshold": - err = unpopulate(val, "ImageGcLowThreshold", &k.ImageGcLowThreshold) + case "type": + err = unpopulate(val, "Type", &g.Type) delete(rawMsg, key) - case "podMaxPids": - err = unpopulate(val, "PodMaxPids", &k.PodMaxPids) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type GuardrailsAvailableVersionsList. +func (g GuardrailsAvailableVersionsList) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", g.NextLink) + populate(objectMap, "value", g.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type GuardrailsAvailableVersionsList. +func (g *GuardrailsAvailableVersionsList) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", g, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &g.NextLink) delete(rawMsg, key) - case "topologyManagerPolicy": - err = unpopulate(val, "TopologyManagerPolicy", &k.TopologyManagerPolicy) + case "value": + err = unpopulate(val, "Value", &g.Value) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesPatchVersion. -func (k KubernetesPatchVersion) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GuardrailsAvailableVersionsProperties. +func (g GuardrailsAvailableVersionsProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "upgrades", k.Upgrades) + populate(objectMap, "isDefaultVersion", g.IsDefaultVersion) + populate(objectMap, "support", g.Support) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesPatchVersion. -func (k *KubernetesPatchVersion) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GuardrailsAvailableVersionsProperties. +func (g *GuardrailsAvailableVersionsProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "upgrades": - err = unpopulate(val, "Upgrades", &k.Upgrades) + case "isDefaultVersion": + err = unpopulate(val, "IsDefaultVersion", &g.IsDefaultVersion) + delete(rawMsg, key) + case "support": + err = unpopulate(val, "Support", &g.Support) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesVersion. -func (k KubernetesVersion) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type GuardrailsProfile. +func (g GuardrailsProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "capabilities", k.Capabilities) - populate(objectMap, "isPreview", k.IsPreview) - populate(objectMap, "patchVersions", k.PatchVersions) - populate(objectMap, "version", k.Version) + populate(objectMap, "excludedNamespaces", g.ExcludedNamespaces) + populate(objectMap, "level", g.Level) + populate(objectMap, "systemExcludedNamespaces", g.SystemExcludedNamespaces) + populate(objectMap, "version", g.Version) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersion. -func (k *KubernetesVersion) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type GuardrailsProfile. +func (g *GuardrailsProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } for key, val := range rawMsg { var err error switch key { - case "capabilities": - err = unpopulate(val, "Capabilities", &k.Capabilities) + case "excludedNamespaces": + err = unpopulate(val, "ExcludedNamespaces", &g.ExcludedNamespaces) delete(rawMsg, key) - case "isPreview": - err = unpopulate(val, "IsPreview", &k.IsPreview) + case "level": + err = unpopulate(val, "Level", &g.Level) delete(rawMsg, key) - case "patchVersions": - err = unpopulate(val, "PatchVersions", &k.PatchVersions) + case "systemExcludedNamespaces": + err = unpopulate(val, "SystemExcludedNamespaces", &g.SystemExcludedNamespaces) delete(rawMsg, key) case "version": - err = unpopulate(val, "Version", &k.Version) + err = unpopulate(val, "Version", &g.Version) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", g, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesVersionCapabilities. -func (k KubernetesVersionCapabilities) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IPTag. +func (i IPTag) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "supportPlan", k.SupportPlan) + populate(objectMap, "ipTagType", i.IPTagType) + populate(objectMap, "tag", i.Tag) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionCapabilities. -func (k *KubernetesVersionCapabilities) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IPTag. +func (i *IPTag) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "supportPlan": - err = unpopulate(val, "SupportPlan", &k.SupportPlan) + case "ipTagType": + err = unpopulate(val, "IPTagType", &i.IPTagType) + delete(rawMsg, key) + case "tag": + err = unpopulate(val, "Tag", &i.Tag) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type KubernetesVersionListResult. -func (k KubernetesVersionListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IstioCertificateAuthority. +func (i IstioCertificateAuthority) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "values", k.Values) + populate(objectMap, "plugin", i.Plugin) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionListResult. -func (k *KubernetesVersionListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type 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", k, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "values": - err = unpopulate(val, "Values", &k.Values) + case "plugin": + err = unpopulate(val, "Plugin", &i.Plugin) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", k, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LinuxOSConfig. -func (l LinuxOSConfig) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IstioComponents. +func (i IstioComponents) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "swapFileSizeMB", l.SwapFileSizeMB) - populate(objectMap, "sysctls", l.Sysctls) - populate(objectMap, "transparentHugePageDefrag", l.TransparentHugePageDefrag) - populate(objectMap, "transparentHugePageEnabled", l.TransparentHugePageEnabled) + populate(objectMap, "ingressGateways", i.IngressGateways) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxOSConfig. -func (l *LinuxOSConfig) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioComponents. +func (i *IstioComponents) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "swapFileSizeMB": - err = unpopulate(val, "SwapFileSizeMB", &l.SwapFileSizeMB) - delete(rawMsg, key) - case "sysctls": - err = unpopulate(val, "Sysctls", &l.Sysctls) - delete(rawMsg, key) - case "transparentHugePageDefrag": - err = unpopulate(val, "TransparentHugePageDefrag", &l.TransparentHugePageDefrag) - delete(rawMsg, key) - case "transparentHugePageEnabled": - err = unpopulate(val, "TransparentHugePageEnabled", &l.TransparentHugePageEnabled) + case "ingressGateways": + err = unpopulate(val, "IngressGateways", &i.IngressGateways) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type LinuxProfile. -func (l LinuxProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IstioIngressGateway. +func (i IstioIngressGateway) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "adminUsername", l.AdminUsername) - populate(objectMap, "ssh", l.SSH) + populate(objectMap, "enabled", i.Enabled) + populate(objectMap, "mode", i.Mode) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxProfile. -func (l *LinuxProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type 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", l, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "adminUsername": - err = unpopulate(val, "AdminUsername", &l.AdminUsername) + case "enabled": + err = unpopulate(val, "Enabled", &i.Enabled) delete(rawMsg, key) - case "ssh": - err = unpopulate(val, "SSH", &l.SSH) + case "mode": + err = unpopulate(val, "Mode", &i.Mode) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", l, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfiguration. -func (m MaintenanceConfiguration) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IstioPluginCertificateAuthority. +func (i IstioPluginCertificateAuthority) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "type", m.Type) + populate(objectMap, "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 MaintenanceConfiguration. -func (m *MaintenanceConfiguration) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioPluginCertificateAuthority. +func (i *IstioPluginCertificateAuthority) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "id": - err = unpopulate(val, "ID", &m.ID) + case "certChainObjectName": + err = unpopulate(val, "CertChainObjectName", &i.CertChainObjectName) delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) + case "certObjectName": + err = unpopulate(val, "CertObjectName", &i.CertObjectName) delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) + case "keyObjectName": + err = unpopulate(val, "KeyObjectName", &i.KeyObjectName) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) + case "keyVaultId": + err = unpopulate(val, "KeyVaultID", &i.KeyVaultID) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "rootCertObjectName": + err = unpopulate(val, "RootCertObjectName", &i.RootCertObjectName) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfigurationListResult. -func (m MaintenanceConfigurationListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type IstioServiceMesh. +func (i IstioServiceMesh) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) + 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 MaintenanceConfigurationListResult. -func (m *MaintenanceConfigurationListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type IstioServiceMesh. +func (i *IstioServiceMesh) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) + case "certificateAuthority": + err = unpopulate(val, "CertificateAuthority", &i.CertificateAuthority) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + 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", m, err) + return fmt.Errorf("unmarshalling type %T: %v", i, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfigurationProperties. -func (m MaintenanceConfigurationProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubeletConfig. +func (k KubeletConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "maintenanceWindow", m.MaintenanceWindow) - populate(objectMap, "notAllowedTime", m.NotAllowedTime) - populate(objectMap, "timeInWeek", m.TimeInWeek) + populate(objectMap, "allowedUnsafeSysctls", k.AllowedUnsafeSysctls) + populate(objectMap, "cpuCfsQuota", k.CPUCfsQuota) + populate(objectMap, "cpuCfsQuotaPeriod", k.CPUCfsQuotaPeriod) + populate(objectMap, "cpuManagerPolicy", k.CPUManagerPolicy) + populate(objectMap, "containerLogMaxFiles", k.ContainerLogMaxFiles) + populate(objectMap, "containerLogMaxSizeMB", k.ContainerLogMaxSizeMB) + populate(objectMap, "failSwapOn", k.FailSwapOn) + populate(objectMap, "imageGcHighThreshold", k.ImageGcHighThreshold) + populate(objectMap, "imageGcLowThreshold", k.ImageGcLowThreshold) + populate(objectMap, "podMaxPids", k.PodMaxPids) + populate(objectMap, "topologyManagerPolicy", k.TopologyManagerPolicy) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfigurationProperties. -func (m *MaintenanceConfigurationProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KubeletConfig. +func (k *KubeletConfig) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { - case "maintenanceWindow": - err = unpopulate(val, "MaintenanceWindow", &m.MaintenanceWindow) + case "allowedUnsafeSysctls": + err = unpopulate(val, "AllowedUnsafeSysctls", &k.AllowedUnsafeSysctls) delete(rawMsg, key) - case "notAllowedTime": - err = unpopulate(val, "NotAllowedTime", &m.NotAllowedTime) + case "cpuCfsQuota": + err = unpopulate(val, "CPUCfsQuota", &k.CPUCfsQuota) delete(rawMsg, key) - case "timeInWeek": - err = unpopulate(val, "TimeInWeek", &m.TimeInWeek) + case "cpuCfsQuotaPeriod": + err = unpopulate(val, "CPUCfsQuotaPeriod", &k.CPUCfsQuotaPeriod) + delete(rawMsg, key) + case "cpuManagerPolicy": + err = unpopulate(val, "CPUManagerPolicy", &k.CPUManagerPolicy) + delete(rawMsg, key) + case "containerLogMaxFiles": + err = unpopulate(val, "ContainerLogMaxFiles", &k.ContainerLogMaxFiles) + delete(rawMsg, key) + case "containerLogMaxSizeMB": + err = unpopulate(val, "ContainerLogMaxSizeMB", &k.ContainerLogMaxSizeMB) + delete(rawMsg, key) + case "failSwapOn": + err = unpopulate(val, "FailSwapOn", &k.FailSwapOn) + delete(rawMsg, key) + case "imageGcHighThreshold": + err = unpopulate(val, "ImageGcHighThreshold", &k.ImageGcHighThreshold) + delete(rawMsg, key) + case "imageGcLowThreshold": + err = unpopulate(val, "ImageGcLowThreshold", &k.ImageGcLowThreshold) + delete(rawMsg, key) + case "podMaxPids": + err = unpopulate(val, "PodMaxPids", &k.PodMaxPids) + delete(rawMsg, key) + case "topologyManagerPolicy": + err = unpopulate(val, "TopologyManagerPolicy", &k.TopologyManagerPolicy) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindow. -func (m MaintenanceWindow) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubernetesPatchVersion. +func (k KubernetesPatchVersion) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "durationHours", m.DurationHours) - populate(objectMap, "notAllowedDates", m.NotAllowedDates) - populate(objectMap, "schedule", m.Schedule) - populateDateType(objectMap, "startDate", m.StartDate) - populate(objectMap, "startTime", m.StartTime) - populate(objectMap, "utcOffset", m.UTCOffset) + populate(objectMap, "upgrades", k.Upgrades) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindow. -func (m *MaintenanceWindow) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesPatchVersion. +func (k *KubernetesPatchVersion) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { - case "durationHours": - err = unpopulate(val, "DurationHours", &m.DurationHours) - delete(rawMsg, key) - case "notAllowedDates": - err = unpopulate(val, "NotAllowedDates", &m.NotAllowedDates) - delete(rawMsg, key) - case "schedule": - err = unpopulate(val, "Schedule", &m.Schedule) - delete(rawMsg, key) - case "startDate": - err = unpopulateDateType(val, "StartDate", &m.StartDate) - delete(rawMsg, key) - case "startTime": - err = unpopulate(val, "StartTime", &m.StartTime) - delete(rawMsg, key) - case "utcOffset": - err = unpopulate(val, "UTCOffset", &m.UTCOffset) + case "upgrades": + err = unpopulate(val, "Upgrades", &k.Upgrades) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedCluster. -func (m ManagedCluster) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubernetesVersion. +func (k KubernetesVersion) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "extendedLocation", m.ExtendedLocation) - populate(objectMap, "id", m.ID) - populate(objectMap, "identity", m.Identity) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "sku", m.SKU) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) - populate(objectMap, "type", m.Type) + populate(objectMap, "capabilities", k.Capabilities) + populate(objectMap, "isPreview", k.IsPreview) + populate(objectMap, "patchVersions", k.PatchVersions) + populate(objectMap, "version", k.Version) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCluster. -func (m *ManagedCluster) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersion. +func (k *KubernetesVersion) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { - case "extendedLocation": - err = unpopulate(val, "ExtendedLocation", &m.ExtendedLocation) - delete(rawMsg, key) - case "id": - err = unpopulate(val, "ID", &m.ID) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "properties": - err = unpopulate(val, "Properties", &m.Properties) - delete(rawMsg, key) - case "sku": - err = unpopulate(val, "SKU", &m.SKU) + case "capabilities": + err = unpopulate(val, "Capabilities", &k.Capabilities) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) + case "isPreview": + err = unpopulate(val, "IsPreview", &k.IsPreview) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) + case "patchVersions": + err = unpopulate(val, "PatchVersions", &k.PatchVersions) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "version": + err = unpopulate(val, "Version", &k.Version) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAADProfile. -func (m ManagedClusterAADProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubernetesVersionCapabilities. +func (k KubernetesVersionCapabilities) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "adminGroupObjectIDs", m.AdminGroupObjectIDs) - populate(objectMap, "clientAppID", m.ClientAppID) - populate(objectMap, "enableAzureRBAC", m.EnableAzureRBAC) - populate(objectMap, "managed", m.Managed) - populate(objectMap, "serverAppID", m.ServerAppID) - populate(objectMap, "serverAppSecret", m.ServerAppSecret) - populate(objectMap, "tenantID", m.TenantID) + populate(objectMap, "supportPlan", k.SupportPlan) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAADProfile. -func (m *ManagedClusterAADProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionCapabilities. +func (k *KubernetesVersionCapabilities) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { - case "adminGroupObjectIDs": - err = unpopulate(val, "AdminGroupObjectIDs", &m.AdminGroupObjectIDs) - delete(rawMsg, key) - case "clientAppID": - err = unpopulate(val, "ClientAppID", &m.ClientAppID) - delete(rawMsg, key) - case "enableAzureRBAC": - err = unpopulate(val, "EnableAzureRBAC", &m.EnableAzureRBAC) - delete(rawMsg, key) - case "managed": - err = unpopulate(val, "Managed", &m.Managed) - delete(rawMsg, key) - case "serverAppID": - err = unpopulate(val, "ServerAppID", &m.ServerAppID) - delete(rawMsg, key) - case "serverAppSecret": - err = unpopulate(val, "ServerAppSecret", &m.ServerAppSecret) - delete(rawMsg, key) - case "tenantID": - err = unpopulate(val, "TenantID", &m.TenantID) + case "supportPlan": + err = unpopulate(val, "SupportPlan", &k.SupportPlan) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAPIServerAccessProfile. -func (m ManagedClusterAPIServerAccessProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type KubernetesVersionListResult. +func (k KubernetesVersionListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "authorizedIPRanges", m.AuthorizedIPRanges) - populate(objectMap, "disableRunCommand", m.DisableRunCommand) - populate(objectMap, "enablePrivateCluster", m.EnablePrivateCluster) - populate(objectMap, "enablePrivateClusterPublicFQDN", m.EnablePrivateClusterPublicFQDN) - populate(objectMap, "privateDNSZone", m.PrivateDNSZone) + populate(objectMap, "values", k.Values) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAPIServerAccessProfile. -func (m *ManagedClusterAPIServerAccessProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type KubernetesVersionListResult. +func (k *KubernetesVersionListResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } for key, val := range rawMsg { var err error switch key { - case "authorizedIPRanges": - err = unpopulate(val, "AuthorizedIPRanges", &m.AuthorizedIPRanges) - delete(rawMsg, key) - case "disableRunCommand": - err = unpopulate(val, "DisableRunCommand", &m.DisableRunCommand) - delete(rawMsg, key) - case "enablePrivateCluster": - err = unpopulate(val, "EnablePrivateCluster", &m.EnablePrivateCluster) - delete(rawMsg, key) - case "enablePrivateClusterPublicFQDN": - err = unpopulate(val, "EnablePrivateClusterPublicFQDN", &m.EnablePrivateClusterPublicFQDN) - delete(rawMsg, key) - case "privateDNSZone": - err = unpopulate(val, "PrivateDNSZone", &m.PrivateDNSZone) + case "values": + err = unpopulate(val, "Values", &k.Values) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", k, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAccessProfile. -func (m ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type LinuxOSConfig. +func (l LinuxOSConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "id", m.ID) - populate(objectMap, "location", m.Location) - populate(objectMap, "name", m.Name) - populate(objectMap, "properties", m.Properties) - populate(objectMap, "systemData", m.SystemData) - populate(objectMap, "tags", m.Tags) + populate(objectMap, "swapFileSizeMB", l.SwapFileSizeMB) + populate(objectMap, "sysctls", l.Sysctls) + populate(objectMap, "transparentHugePageDefrag", l.TransparentHugePageDefrag) + populate(objectMap, "transparentHugePageEnabled", l.TransparentHugePageEnabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxOSConfig. +func (l *LinuxOSConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "swapFileSizeMB": + err = unpopulate(val, "SwapFileSizeMB", &l.SwapFileSizeMB) + delete(rawMsg, key) + case "sysctls": + err = unpopulate(val, "Sysctls", &l.Sysctls) + delete(rawMsg, key) + case "transparentHugePageDefrag": + err = unpopulate(val, "TransparentHugePageDefrag", &l.TransparentHugePageDefrag) + delete(rawMsg, key) + case "transparentHugePageEnabled": + err = unpopulate(val, "TransparentHugePageEnabled", &l.TransparentHugePageEnabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type LinuxProfile. +func (l LinuxProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "adminUsername", l.AdminUsername) + populate(objectMap, "ssh", l.SSH) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type LinuxProfile. +func (l *LinuxProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "adminUsername": + err = unpopulate(val, "AdminUsername", &l.AdminUsername) + delete(rawMsg, key) + case "ssh": + err = unpopulate(val, "SSH", &l.SSH) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", l, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type Machine. +func (m Machine) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAccessProfile. -func (m *ManagedClusterAccessProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type Machine. +func (m *Machine) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -1376,21 +1518,12 @@ func (m *ManagedClusterAccessProfile) UnmarshalJSON(data []byte) error { case "id": err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "location": - err = unpopulate(val, "Location", &m.Location) - delete(rawMsg, key) case "name": err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) case "properties": err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) - case "systemData": - err = unpopulate(val, "SystemData", &m.SystemData) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) - delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) @@ -1402,17 +1535,16 @@ func (m *ManagedClusterAccessProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAddonProfile. -func (m ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MachineIPAddress. +func (m MachineIPAddress) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "config", m.Config) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "identity", m.Identity) + populate(objectMap, "family", m.Family) + populate(objectMap, "ip", m.IP) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAddonProfile. -func (m *ManagedClusterAddonProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MachineIPAddress. +func (m *MachineIPAddress) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -1420,14 +1552,42 @@ func (m *ManagedClusterAddonProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "config": - err = unpopulate(val, "Config", &m.Config) + case "family": + err = unpopulate(val, "Family", &m.Family) delete(rawMsg, key) - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "ip": + err = unpopulate(val, "IP", &m.IP) delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MachineListResult. +func (m MachineListResult) 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 MachineListResult. +func (m *MachineListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", 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 { @@ -1437,17 +1597,15 @@ func (m *ManagedClusterAddonProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAddonProfileIdentity. -func (m ManagedClusterAddonProfileIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MachineNetworkProperties. +func (m MachineNetworkProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientId", m.ClientID) - populate(objectMap, "objectId", m.ObjectID) - populate(objectMap, "resourceId", m.ResourceID) + populate(objectMap, "ipAddresses", m.IPAddresses) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAddonProfileIdentity. -func (m *ManagedClusterAddonProfileIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MachineNetworkProperties. +func (m *MachineNetworkProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -1455,11 +1613,36 @@ func (m *ManagedClusterAddonProfileIdentity) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &m.ClientID) + case "ipAddresses": + err = unpopulate(val, "IPAddresses", &m.IPAddresses) delete(rawMsg, key) - case "objectId": - err = unpopulate(val, "ObjectID", &m.ObjectID) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MachineProperties. +func (m MachineProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "network", m.Network) + populate(objectMap, "resourceId", m.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MachineProperties. +func (m *MachineProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "network": + err = unpopulate(val, "Network", &m.Network) delete(rawMsg, key) case "resourceId": err = unpopulate(val, "ResourceID", &m.ResourceID) @@ -1472,56 +1655,19 @@ func (m *ManagedClusterAddonProfileIdentity) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAgentPoolProfile. -func (m ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfiguration. +func (m MaintenanceConfiguration) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "availabilityZones", m.AvailabilityZones) - populate(objectMap, "count", m.Count) - populate(objectMap, "creationData", m.CreationData) - populate(objectMap, "currentOrchestratorVersion", m.CurrentOrchestratorVersion) - populate(objectMap, "enableAutoScaling", m.EnableAutoScaling) - populate(objectMap, "enableEncryptionAtHost", m.EnableEncryptionAtHost) - populate(objectMap, "enableFIPS", m.EnableFIPS) - populate(objectMap, "enableNodePublicIP", m.EnableNodePublicIP) - populate(objectMap, "enableUltraSSD", m.EnableUltraSSD) - populate(objectMap, "gpuInstanceProfile", m.GpuInstanceProfile) - populate(objectMap, "hostGroupID", m.HostGroupID) - populate(objectMap, "kubeletConfig", m.KubeletConfig) - populate(objectMap, "kubeletDiskType", m.KubeletDiskType) - populate(objectMap, "linuxOSConfig", m.LinuxOSConfig) - populate(objectMap, "maxCount", m.MaxCount) - populate(objectMap, "maxPods", m.MaxPods) - populate(objectMap, "minCount", m.MinCount) - populate(objectMap, "mode", m.Mode) + populate(objectMap, "id", m.ID) populate(objectMap, "name", m.Name) - populate(objectMap, "nodeImageVersion", m.NodeImageVersion) - populate(objectMap, "nodeLabels", m.NodeLabels) - populate(objectMap, "nodePublicIPPrefixID", m.NodePublicIPPrefixID) - populate(objectMap, "nodeTaints", m.NodeTaints) - populate(objectMap, "osDiskSizeGB", m.OSDiskSizeGB) - populate(objectMap, "osDiskType", m.OSDiskType) - populate(objectMap, "osSKU", m.OSSKU) - populate(objectMap, "osType", m.OSType) - populate(objectMap, "orchestratorVersion", m.OrchestratorVersion) - populate(objectMap, "podSubnetID", m.PodSubnetID) - populate(objectMap, "powerState", m.PowerState) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "proximityPlacementGroupID", m.ProximityPlacementGroupID) - populate(objectMap, "scaleDownMode", m.ScaleDownMode) - populate(objectMap, "scaleSetEvictionPolicy", m.ScaleSetEvictionPolicy) - populate(objectMap, "scaleSetPriority", m.ScaleSetPriority) - populate(objectMap, "spotMaxPrice", m.SpotMaxPrice) - populate(objectMap, "tags", m.Tags) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) populate(objectMap, "type", m.Type) - populate(objectMap, "upgradeSettings", m.UpgradeSettings) - populate(objectMap, "vmSize", m.VMSize) - populate(objectMap, "vnetSubnetID", m.VnetSubnetID) - populate(objectMap, "workloadRuntime", m.WorkloadRuntime) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAgentPoolProfile. -func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfiguration. +func (m *MaintenanceConfiguration) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -1529,131 +1675,133 @@ func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "availabilityZones": - err = unpopulate(val, "AvailabilityZones", &m.AvailabilityZones) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "count": - err = unpopulate(val, "Count", &m.Count) + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "creationData": - err = unpopulate(val, "CreationData", &m.CreationData) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) - case "currentOrchestratorVersion": - err = unpopulate(val, "CurrentOrchestratorVersion", &m.CurrentOrchestratorVersion) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) delete(rawMsg, key) - case "enableAutoScaling": - err = unpopulate(val, "EnableAutoScaling", &m.EnableAutoScaling) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) - case "enableEncryptionAtHost": - err = unpopulate(val, "EnableEncryptionAtHost", &m.EnableEncryptionAtHost) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfigurationListResult. +func (m MaintenanceConfigurationListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfigurationListResult. +func (m *MaintenanceConfigurationListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) delete(rawMsg, key) - case "enableFIPS": - err = unpopulate(val, "EnableFIPS", &m.EnableFIPS) - delete(rawMsg, key) - case "enableNodePublicIP": - err = unpopulate(val, "EnableNodePublicIP", &m.EnableNodePublicIP) - delete(rawMsg, key) - case "enableUltraSSD": - err = unpopulate(val, "EnableUltraSSD", &m.EnableUltraSSD) - delete(rawMsg, key) - case "gpuInstanceProfile": - err = unpopulate(val, "GpuInstanceProfile", &m.GpuInstanceProfile) - delete(rawMsg, key) - case "hostGroupID": - err = unpopulate(val, "HostGroupID", &m.HostGroupID) - delete(rawMsg, key) - case "kubeletConfig": - err = unpopulate(val, "KubeletConfig", &m.KubeletConfig) - delete(rawMsg, key) - case "kubeletDiskType": - err = unpopulate(val, "KubeletDiskType", &m.KubeletDiskType) - delete(rawMsg, key) - case "linuxOSConfig": - err = unpopulate(val, "LinuxOSConfig", &m.LinuxOSConfig) - delete(rawMsg, key) - case "maxCount": - err = unpopulate(val, "MaxCount", &m.MaxCount) - delete(rawMsg, key) - case "maxPods": - err = unpopulate(val, "MaxPods", &m.MaxPods) - delete(rawMsg, key) - case "minCount": - err = unpopulate(val, "MinCount", &m.MinCount) - delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "nodeImageVersion": - err = unpopulate(val, "NodeImageVersion", &m.NodeImageVersion) - delete(rawMsg, key) - case "nodeLabels": - err = unpopulate(val, "NodeLabels", &m.NodeLabels) - delete(rawMsg, key) - case "nodePublicIPPrefixID": - err = unpopulate(val, "NodePublicIPPrefixID", &m.NodePublicIPPrefixID) - delete(rawMsg, key) - case "nodeTaints": - err = unpopulate(val, "NodeTaints", &m.NodeTaints) - delete(rawMsg, key) - case "osDiskSizeGB": - err = unpopulate(val, "OSDiskSizeGB", &m.OSDiskSizeGB) - delete(rawMsg, key) - case "osDiskType": - err = unpopulate(val, "OSDiskType", &m.OSDiskType) - delete(rawMsg, key) - case "osSKU": - err = unpopulate(val, "OSSKU", &m.OSSKU) - delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &m.OSType) - delete(rawMsg, key) - case "orchestratorVersion": - err = unpopulate(val, "OrchestratorVersion", &m.OrchestratorVersion) - delete(rawMsg, key) - case "podSubnetID": - err = unpopulate(val, "PodSubnetID", &m.PodSubnetID) - delete(rawMsg, key) - case "powerState": - err = unpopulate(val, "PowerState", &m.PowerState) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "proximityPlacementGroupID": - err = unpopulate(val, "ProximityPlacementGroupID", &m.ProximityPlacementGroupID) - delete(rawMsg, key) - case "scaleDownMode": - err = unpopulate(val, "ScaleDownMode", &m.ScaleDownMode) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) - case "scaleSetEvictionPolicy": - err = unpopulate(val, "ScaleSetEvictionPolicy", &m.ScaleSetEvictionPolicy) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceConfigurationProperties. +func (m MaintenanceConfigurationProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "maintenanceWindow", m.MaintenanceWindow) + populate(objectMap, "notAllowedTime", m.NotAllowedTime) + populate(objectMap, "timeInWeek", m.TimeInWeek) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceConfigurationProperties. +func (m *MaintenanceConfigurationProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "maintenanceWindow": + err = unpopulate(val, "MaintenanceWindow", &m.MaintenanceWindow) delete(rawMsg, key) - case "scaleSetPriority": - err = unpopulate(val, "ScaleSetPriority", &m.ScaleSetPriority) + case "notAllowedTime": + err = unpopulate(val, "NotAllowedTime", &m.NotAllowedTime) delete(rawMsg, key) - case "spotMaxPrice": - err = unpopulate(val, "SpotMaxPrice", &m.SpotMaxPrice) + case "timeInWeek": + err = unpopulate(val, "TimeInWeek", &m.TimeInWeek) delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type MaintenanceWindow. +func (m MaintenanceWindow) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "durationHours", m.DurationHours) + populate(objectMap, "notAllowedDates", m.NotAllowedDates) + populate(objectMap, "schedule", m.Schedule) + populateDateType(objectMap, "startDate", m.StartDate) + populate(objectMap, "startTime", m.StartTime) + populate(objectMap, "utcOffset", m.UTCOffset) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type MaintenanceWindow. +func (m *MaintenanceWindow) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "durationHours": + err = unpopulate(val, "DurationHours", &m.DurationHours) delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "notAllowedDates": + err = unpopulate(val, "NotAllowedDates", &m.NotAllowedDates) delete(rawMsg, key) - case "upgradeSettings": - err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) + case "schedule": + err = unpopulate(val, "Schedule", &m.Schedule) delete(rawMsg, key) - case "vmSize": - err = unpopulate(val, "VMSize", &m.VMSize) + case "startDate": + err = unpopulateDateType(val, "StartDate", &m.StartDate) delete(rawMsg, key) - case "vnetSubnetID": - err = unpopulate(val, "VnetSubnetID", &m.VnetSubnetID) + case "startTime": + err = unpopulate(val, "StartTime", &m.StartTime) delete(rawMsg, key) - case "workloadRuntime": - err = unpopulate(val, "WorkloadRuntime", &m.WorkloadRuntime) + case "utcOffset": + err = unpopulate(val, "UTCOffset", &m.UTCOffset) delete(rawMsg, key) } if err != nil { @@ -1663,55 +1811,24 @@ func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAgentPoolProfileProperties. -func (m ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedCluster. +func (m ManagedCluster) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "availabilityZones", m.AvailabilityZones) - populate(objectMap, "count", m.Count) - populate(objectMap, "creationData", m.CreationData) - populate(objectMap, "currentOrchestratorVersion", m.CurrentOrchestratorVersion) - populate(objectMap, "enableAutoScaling", m.EnableAutoScaling) - populate(objectMap, "enableEncryptionAtHost", m.EnableEncryptionAtHost) - populate(objectMap, "enableFIPS", m.EnableFIPS) - populate(objectMap, "enableNodePublicIP", m.EnableNodePublicIP) - populate(objectMap, "enableUltraSSD", m.EnableUltraSSD) - populate(objectMap, "gpuInstanceProfile", m.GpuInstanceProfile) - populate(objectMap, "hostGroupID", m.HostGroupID) - populate(objectMap, "kubeletConfig", m.KubeletConfig) - populate(objectMap, "kubeletDiskType", m.KubeletDiskType) - populate(objectMap, "linuxOSConfig", m.LinuxOSConfig) - populate(objectMap, "maxCount", m.MaxCount) - populate(objectMap, "maxPods", m.MaxPods) - populate(objectMap, "minCount", m.MinCount) - populate(objectMap, "mode", m.Mode) - populate(objectMap, "nodeImageVersion", m.NodeImageVersion) - populate(objectMap, "nodeLabels", m.NodeLabels) - populate(objectMap, "nodePublicIPPrefixID", m.NodePublicIPPrefixID) - populate(objectMap, "nodeTaints", m.NodeTaints) - populate(objectMap, "osDiskSizeGB", m.OSDiskSizeGB) - populate(objectMap, "osDiskType", m.OSDiskType) - populate(objectMap, "osSKU", m.OSSKU) - populate(objectMap, "osType", m.OSType) - populate(objectMap, "orchestratorVersion", m.OrchestratorVersion) - populate(objectMap, "podSubnetID", m.PodSubnetID) - populate(objectMap, "powerState", m.PowerState) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "proximityPlacementGroupID", m.ProximityPlacementGroupID) - populate(objectMap, "scaleDownMode", m.ScaleDownMode) - populate(objectMap, "scaleSetEvictionPolicy", m.ScaleSetEvictionPolicy) - populate(objectMap, "scaleSetPriority", m.ScaleSetPriority) - populate(objectMap, "spotMaxPrice", m.SpotMaxPrice) + populate(objectMap, "extendedLocation", m.ExtendedLocation) + populate(objectMap, "id", m.ID) + populate(objectMap, "identity", m.Identity) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "sku", m.SKU) + populate(objectMap, "systemData", m.SystemData) populate(objectMap, "tags", m.Tags) populate(objectMap, "type", m.Type) - populate(objectMap, "upgradeSettings", m.UpgradeSettings) - populate(objectMap, "vmSize", m.VMSize) - populate(objectMap, "vnetSubnetID", m.VnetSubnetID) - populate(objectMap, "workloadRuntime", m.WorkloadRuntime) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAgentPoolProfileProperties. -func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedCluster. +func (m *ManagedCluster) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -1719,128 +1836,1534 @@ func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) er for key, val := range rawMsg { var err error switch key { - case "availabilityZones": - err = unpopulate(val, "AvailabilityZones", &m.AvailabilityZones) + case "extendedLocation": + err = unpopulate(val, "ExtendedLocation", &m.ExtendedLocation) delete(rawMsg, key) - case "count": - err = unpopulate(val, "Count", &m.Count) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "creationData": - err = unpopulate(val, "CreationData", &m.CreationData) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) delete(rawMsg, key) - case "currentOrchestratorVersion": - err = unpopulate(val, "CurrentOrchestratorVersion", &m.CurrentOrchestratorVersion) + case "location": + err = unpopulate(val, "Location", &m.Location) delete(rawMsg, key) - case "enableAutoScaling": - err = unpopulate(val, "EnableAutoScaling", &m.EnableAutoScaling) + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "enableEncryptionAtHost": - err = unpopulate(val, "EnableEncryptionAtHost", &m.EnableEncryptionAtHost) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) - case "enableFIPS": - err = unpopulate(val, "EnableFIPS", &m.EnableFIPS) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) delete(rawMsg, key) - case "enableNodePublicIP": - err = unpopulate(val, "EnableNodePublicIP", &m.EnableNodePublicIP) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAADProfile. +func (m ManagedClusterAADProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "adminGroupObjectIDs", m.AdminGroupObjectIDs) + populate(objectMap, "clientAppID", m.ClientAppID) + populate(objectMap, "enableAzureRBAC", m.EnableAzureRBAC) + populate(objectMap, "managed", m.Managed) + populate(objectMap, "serverAppID", m.ServerAppID) + populate(objectMap, "serverAppSecret", m.ServerAppSecret) + populate(objectMap, "tenantID", m.TenantID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAADProfile. +func (m *ManagedClusterAADProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "adminGroupObjectIDs": + err = unpopulate(val, "AdminGroupObjectIDs", &m.AdminGroupObjectIDs) + delete(rawMsg, key) + case "clientAppID": + err = unpopulate(val, "ClientAppID", &m.ClientAppID) + delete(rawMsg, key) + case "enableAzureRBAC": + err = unpopulate(val, "EnableAzureRBAC", &m.EnableAzureRBAC) + delete(rawMsg, key) + case "managed": + err = unpopulate(val, "Managed", &m.Managed) + delete(rawMsg, key) + case "serverAppID": + err = unpopulate(val, "ServerAppID", &m.ServerAppID) + delete(rawMsg, key) + case "serverAppSecret": + err = unpopulate(val, "ServerAppSecret", &m.ServerAppSecret) + delete(rawMsg, key) + case "tenantID": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAPIServerAccessProfile. +func (m ManagedClusterAPIServerAccessProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "authorizedIPRanges", m.AuthorizedIPRanges) + populate(objectMap, "disableRunCommand", m.DisableRunCommand) + populate(objectMap, "enablePrivateCluster", m.EnablePrivateCluster) + populate(objectMap, "enablePrivateClusterPublicFQDN", m.EnablePrivateClusterPublicFQDN) + populate(objectMap, "enableVnetIntegration", m.EnableVnetIntegration) + populate(objectMap, "privateDNSZone", m.PrivateDNSZone) + populate(objectMap, "subnetId", m.SubnetID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAPIServerAccessProfile. +func (m *ManagedClusterAPIServerAccessProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "authorizedIPRanges": + err = unpopulate(val, "AuthorizedIPRanges", &m.AuthorizedIPRanges) + delete(rawMsg, key) + case "disableRunCommand": + err = unpopulate(val, "DisableRunCommand", &m.DisableRunCommand) + delete(rawMsg, key) + case "enablePrivateCluster": + err = unpopulate(val, "EnablePrivateCluster", &m.EnablePrivateCluster) + delete(rawMsg, key) + case "enablePrivateClusterPublicFQDN": + err = unpopulate(val, "EnablePrivateClusterPublicFQDN", &m.EnablePrivateClusterPublicFQDN) + delete(rawMsg, key) + case "enableVnetIntegration": + err = unpopulate(val, "EnableVnetIntegration", &m.EnableVnetIntegration) + delete(rawMsg, key) + case "privateDNSZone": + err = unpopulate(val, "PrivateDNSZone", &m.PrivateDNSZone) + delete(rawMsg, key) + case "subnetId": + err = unpopulate(val, "SubnetID", &m.SubnetID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAccessProfile. +func (m ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAccessProfile. +func (m *ManagedClusterAccessProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &m.ID) + delete(rawMsg, key) + case "location": + err = unpopulate(val, "Location", &m.Location) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAddonProfile. +func (m ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "config", m.Config) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "identity", m.Identity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAddonProfile. +func (m *ManagedClusterAddonProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "config": + err = unpopulate(val, "Config", &m.Config) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAddonProfileIdentity. +func (m ManagedClusterAddonProfileIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "clientId", m.ClientID) + populate(objectMap, "objectId", m.ObjectID) + populate(objectMap, "resourceId", m.ResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAddonProfileIdentity. +func (m *ManagedClusterAddonProfileIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "clientId": + err = unpopulate(val, "ClientID", &m.ClientID) + delete(rawMsg, key) + case "objectId": + err = unpopulate(val, "ObjectID", &m.ObjectID) + delete(rawMsg, key) + case "resourceId": + err = unpopulate(val, "ResourceID", &m.ResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAgentPoolProfile. +func (m ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availabilityZones", m.AvailabilityZones) + populate(objectMap, "capacityReservationGroupID", m.CapacityReservationGroupID) + populate(objectMap, "count", m.Count) + populate(objectMap, "creationData", m.CreationData) + populate(objectMap, "currentOrchestratorVersion", m.CurrentOrchestratorVersion) + populate(objectMap, "enableAutoScaling", m.EnableAutoScaling) + populate(objectMap, "enableCustomCATrust", m.EnableCustomCATrust) + populate(objectMap, "enableEncryptionAtHost", m.EnableEncryptionAtHost) + populate(objectMap, "enableFIPS", m.EnableFIPS) + populate(objectMap, "enableNodePublicIP", m.EnableNodePublicIP) + populate(objectMap, "enableUltraSSD", m.EnableUltraSSD) + populate(objectMap, "gpuInstanceProfile", m.GpuInstanceProfile) + populate(objectMap, "hostGroupID", m.HostGroupID) + populate(objectMap, "kubeletConfig", m.KubeletConfig) + populate(objectMap, "kubeletDiskType", m.KubeletDiskType) + populate(objectMap, "linuxOSConfig", m.LinuxOSConfig) + populate(objectMap, "maxCount", m.MaxCount) + populate(objectMap, "maxPods", m.MaxPods) + populate(objectMap, "messageOfTheDay", m.MessageOfTheDay) + populate(objectMap, "minCount", m.MinCount) + populate(objectMap, "mode", m.Mode) + populate(objectMap, "name", m.Name) + populate(objectMap, "networkProfile", m.NetworkProfile) + populate(objectMap, "nodeImageVersion", m.NodeImageVersion) + populate(objectMap, "nodeLabels", m.NodeLabels) + populate(objectMap, "nodePublicIPPrefixID", m.NodePublicIPPrefixID) + populate(objectMap, "nodeTaints", m.NodeTaints) + populate(objectMap, "osDiskSizeGB", m.OSDiskSizeGB) + populate(objectMap, "osDiskType", m.OSDiskType) + populate(objectMap, "osSKU", m.OSSKU) + populate(objectMap, "osType", m.OSType) + populate(objectMap, "orchestratorVersion", m.OrchestratorVersion) + populate(objectMap, "podSubnetID", m.PodSubnetID) + populate(objectMap, "powerState", m.PowerState) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "proximityPlacementGroupID", m.ProximityPlacementGroupID) + populate(objectMap, "scaleDownMode", m.ScaleDownMode) + populate(objectMap, "scaleSetEvictionPolicy", m.ScaleSetEvictionPolicy) + populate(objectMap, "scaleSetPriority", m.ScaleSetPriority) + populate(objectMap, "securityProfile", m.SecurityProfile) + populate(objectMap, "spotMaxPrice", m.SpotMaxPrice) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + populate(objectMap, "upgradeSettings", m.UpgradeSettings) + populate(objectMap, "vmSize", m.VMSize) + populate(objectMap, "vnetSubnetID", m.VnetSubnetID) + populate(objectMap, "windowsProfile", m.WindowsProfile) + populate(objectMap, "workloadRuntime", m.WorkloadRuntime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAgentPoolProfile. +func (m *ManagedClusterAgentPoolProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availabilityZones": + err = unpopulate(val, "AvailabilityZones", &m.AvailabilityZones) + delete(rawMsg, key) + case "capacityReservationGroupID": + err = unpopulate(val, "CapacityReservationGroupID", &m.CapacityReservationGroupID) + delete(rawMsg, key) + case "count": + err = unpopulate(val, "Count", &m.Count) + delete(rawMsg, key) + case "creationData": + err = unpopulate(val, "CreationData", &m.CreationData) + delete(rawMsg, key) + case "currentOrchestratorVersion": + err = unpopulate(val, "CurrentOrchestratorVersion", &m.CurrentOrchestratorVersion) + delete(rawMsg, key) + case "enableAutoScaling": + err = unpopulate(val, "EnableAutoScaling", &m.EnableAutoScaling) + delete(rawMsg, key) + case "enableCustomCATrust": + err = unpopulate(val, "EnableCustomCATrust", &m.EnableCustomCATrust) + delete(rawMsg, key) + case "enableEncryptionAtHost": + err = unpopulate(val, "EnableEncryptionAtHost", &m.EnableEncryptionAtHost) + delete(rawMsg, key) + case "enableFIPS": + err = unpopulate(val, "EnableFIPS", &m.EnableFIPS) + delete(rawMsg, key) + case "enableNodePublicIP": + err = unpopulate(val, "EnableNodePublicIP", &m.EnableNodePublicIP) + delete(rawMsg, key) + case "enableUltraSSD": + err = unpopulate(val, "EnableUltraSSD", &m.EnableUltraSSD) + delete(rawMsg, key) + case "gpuInstanceProfile": + err = unpopulate(val, "GpuInstanceProfile", &m.GpuInstanceProfile) + delete(rawMsg, key) + case "hostGroupID": + err = unpopulate(val, "HostGroupID", &m.HostGroupID) + delete(rawMsg, key) + case "kubeletConfig": + err = unpopulate(val, "KubeletConfig", &m.KubeletConfig) + delete(rawMsg, key) + case "kubeletDiskType": + err = unpopulate(val, "KubeletDiskType", &m.KubeletDiskType) + delete(rawMsg, key) + case "linuxOSConfig": + err = unpopulate(val, "LinuxOSConfig", &m.LinuxOSConfig) + delete(rawMsg, key) + case "maxCount": + err = unpopulate(val, "MaxCount", &m.MaxCount) + delete(rawMsg, key) + case "maxPods": + err = unpopulate(val, "MaxPods", &m.MaxPods) + delete(rawMsg, key) + case "messageOfTheDay": + err = unpopulate(val, "MessageOfTheDay", &m.MessageOfTheDay) + delete(rawMsg, key) + case "minCount": + err = unpopulate(val, "MinCount", &m.MinCount) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "networkProfile": + err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) + delete(rawMsg, key) + case "nodeImageVersion": + err = unpopulate(val, "NodeImageVersion", &m.NodeImageVersion) + delete(rawMsg, key) + case "nodeLabels": + err = unpopulate(val, "NodeLabels", &m.NodeLabels) + delete(rawMsg, key) + case "nodePublicIPPrefixID": + err = unpopulate(val, "NodePublicIPPrefixID", &m.NodePublicIPPrefixID) + delete(rawMsg, key) + case "nodeTaints": + err = unpopulate(val, "NodeTaints", &m.NodeTaints) + delete(rawMsg, key) + case "osDiskSizeGB": + err = unpopulate(val, "OSDiskSizeGB", &m.OSDiskSizeGB) + delete(rawMsg, key) + case "osDiskType": + err = unpopulate(val, "OSDiskType", &m.OSDiskType) + delete(rawMsg, key) + case "osSKU": + err = unpopulate(val, "OSSKU", &m.OSSKU) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &m.OSType) + delete(rawMsg, key) + case "orchestratorVersion": + err = unpopulate(val, "OrchestratorVersion", &m.OrchestratorVersion) + delete(rawMsg, key) + case "podSubnetID": + err = unpopulate(val, "PodSubnetID", &m.PodSubnetID) + delete(rawMsg, key) + case "powerState": + err = unpopulate(val, "PowerState", &m.PowerState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "proximityPlacementGroupID": + err = unpopulate(val, "ProximityPlacementGroupID", &m.ProximityPlacementGroupID) + delete(rawMsg, key) + case "scaleDownMode": + err = unpopulate(val, "ScaleDownMode", &m.ScaleDownMode) + delete(rawMsg, key) + case "scaleSetEvictionPolicy": + err = unpopulate(val, "ScaleSetEvictionPolicy", &m.ScaleSetEvictionPolicy) + delete(rawMsg, key) + case "scaleSetPriority": + err = unpopulate(val, "ScaleSetPriority", &m.ScaleSetPriority) + delete(rawMsg, key) + case "securityProfile": + err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) + delete(rawMsg, key) + case "spotMaxPrice": + err = unpopulate(val, "SpotMaxPrice", &m.SpotMaxPrice) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "upgradeSettings": + err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) + delete(rawMsg, key) + case "vmSize": + err = unpopulate(val, "VMSize", &m.VMSize) + delete(rawMsg, key) + case "vnetSubnetID": + err = unpopulate(val, "VnetSubnetID", &m.VnetSubnetID) + delete(rawMsg, key) + case "windowsProfile": + err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) + delete(rawMsg, key) + case "workloadRuntime": + err = unpopulate(val, "WorkloadRuntime", &m.WorkloadRuntime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAgentPoolProfileProperties. +func (m ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "availabilityZones", m.AvailabilityZones) + populate(objectMap, "capacityReservationGroupID", m.CapacityReservationGroupID) + populate(objectMap, "count", m.Count) + populate(objectMap, "creationData", m.CreationData) + populate(objectMap, "currentOrchestratorVersion", m.CurrentOrchestratorVersion) + populate(objectMap, "enableAutoScaling", m.EnableAutoScaling) + populate(objectMap, "enableCustomCATrust", m.EnableCustomCATrust) + populate(objectMap, "enableEncryptionAtHost", m.EnableEncryptionAtHost) + populate(objectMap, "enableFIPS", m.EnableFIPS) + populate(objectMap, "enableNodePublicIP", m.EnableNodePublicIP) + populate(objectMap, "enableUltraSSD", m.EnableUltraSSD) + populate(objectMap, "gpuInstanceProfile", m.GpuInstanceProfile) + populate(objectMap, "hostGroupID", m.HostGroupID) + populate(objectMap, "kubeletConfig", m.KubeletConfig) + populate(objectMap, "kubeletDiskType", m.KubeletDiskType) + populate(objectMap, "linuxOSConfig", m.LinuxOSConfig) + populate(objectMap, "maxCount", m.MaxCount) + populate(objectMap, "maxPods", m.MaxPods) + populate(objectMap, "messageOfTheDay", m.MessageOfTheDay) + populate(objectMap, "minCount", m.MinCount) + populate(objectMap, "mode", m.Mode) + populate(objectMap, "networkProfile", m.NetworkProfile) + populate(objectMap, "nodeImageVersion", m.NodeImageVersion) + populate(objectMap, "nodeLabels", m.NodeLabels) + populate(objectMap, "nodePublicIPPrefixID", m.NodePublicIPPrefixID) + populate(objectMap, "nodeTaints", m.NodeTaints) + populate(objectMap, "osDiskSizeGB", m.OSDiskSizeGB) + populate(objectMap, "osDiskType", m.OSDiskType) + populate(objectMap, "osSKU", m.OSSKU) + populate(objectMap, "osType", m.OSType) + populate(objectMap, "orchestratorVersion", m.OrchestratorVersion) + populate(objectMap, "podSubnetID", m.PodSubnetID) + populate(objectMap, "powerState", m.PowerState) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "proximityPlacementGroupID", m.ProximityPlacementGroupID) + populate(objectMap, "scaleDownMode", m.ScaleDownMode) + populate(objectMap, "scaleSetEvictionPolicy", m.ScaleSetEvictionPolicy) + populate(objectMap, "scaleSetPriority", m.ScaleSetPriority) + populate(objectMap, "securityProfile", m.SecurityProfile) + populate(objectMap, "spotMaxPrice", m.SpotMaxPrice) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) + populate(objectMap, "upgradeSettings", m.UpgradeSettings) + populate(objectMap, "vmSize", m.VMSize) + populate(objectMap, "vnetSubnetID", m.VnetSubnetID) + populate(objectMap, "windowsProfile", m.WindowsProfile) + populate(objectMap, "workloadRuntime", m.WorkloadRuntime) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAgentPoolProfileProperties. +func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "availabilityZones": + err = unpopulate(val, "AvailabilityZones", &m.AvailabilityZones) + delete(rawMsg, key) + case "capacityReservationGroupID": + err = unpopulate(val, "CapacityReservationGroupID", &m.CapacityReservationGroupID) + delete(rawMsg, key) + case "count": + err = unpopulate(val, "Count", &m.Count) + delete(rawMsg, key) + case "creationData": + err = unpopulate(val, "CreationData", &m.CreationData) + delete(rawMsg, key) + case "currentOrchestratorVersion": + err = unpopulate(val, "CurrentOrchestratorVersion", &m.CurrentOrchestratorVersion) + delete(rawMsg, key) + case "enableAutoScaling": + err = unpopulate(val, "EnableAutoScaling", &m.EnableAutoScaling) + delete(rawMsg, key) + case "enableCustomCATrust": + err = unpopulate(val, "EnableCustomCATrust", &m.EnableCustomCATrust) + delete(rawMsg, key) + case "enableEncryptionAtHost": + err = unpopulate(val, "EnableEncryptionAtHost", &m.EnableEncryptionAtHost) + delete(rawMsg, key) + case "enableFIPS": + err = unpopulate(val, "EnableFIPS", &m.EnableFIPS) + delete(rawMsg, key) + case "enableNodePublicIP": + err = unpopulate(val, "EnableNodePublicIP", &m.EnableNodePublicIP) + delete(rawMsg, key) + case "enableUltraSSD": + err = unpopulate(val, "EnableUltraSSD", &m.EnableUltraSSD) + delete(rawMsg, key) + case "gpuInstanceProfile": + err = unpopulate(val, "GpuInstanceProfile", &m.GpuInstanceProfile) + delete(rawMsg, key) + case "hostGroupID": + err = unpopulate(val, "HostGroupID", &m.HostGroupID) + delete(rawMsg, key) + case "kubeletConfig": + err = unpopulate(val, "KubeletConfig", &m.KubeletConfig) + delete(rawMsg, key) + case "kubeletDiskType": + err = unpopulate(val, "KubeletDiskType", &m.KubeletDiskType) + delete(rawMsg, key) + case "linuxOSConfig": + err = unpopulate(val, "LinuxOSConfig", &m.LinuxOSConfig) + delete(rawMsg, key) + case "maxCount": + err = unpopulate(val, "MaxCount", &m.MaxCount) + delete(rawMsg, key) + case "maxPods": + err = unpopulate(val, "MaxPods", &m.MaxPods) + delete(rawMsg, key) + case "messageOfTheDay": + err = unpopulate(val, "MessageOfTheDay", &m.MessageOfTheDay) + delete(rawMsg, key) + case "minCount": + err = unpopulate(val, "MinCount", &m.MinCount) + delete(rawMsg, key) + case "mode": + err = unpopulate(val, "Mode", &m.Mode) + delete(rawMsg, key) + case "networkProfile": + err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) + delete(rawMsg, key) + case "nodeImageVersion": + err = unpopulate(val, "NodeImageVersion", &m.NodeImageVersion) + delete(rawMsg, key) + case "nodeLabels": + err = unpopulate(val, "NodeLabels", &m.NodeLabels) + delete(rawMsg, key) + case "nodePublicIPPrefixID": + err = unpopulate(val, "NodePublicIPPrefixID", &m.NodePublicIPPrefixID) + delete(rawMsg, key) + case "nodeTaints": + err = unpopulate(val, "NodeTaints", &m.NodeTaints) + delete(rawMsg, key) + case "osDiskSizeGB": + err = unpopulate(val, "OSDiskSizeGB", &m.OSDiskSizeGB) + delete(rawMsg, key) + case "osDiskType": + err = unpopulate(val, "OSDiskType", &m.OSDiskType) + delete(rawMsg, key) + case "osSKU": + err = unpopulate(val, "OSSKU", &m.OSSKU) + delete(rawMsg, key) + case "osType": + err = unpopulate(val, "OSType", &m.OSType) + delete(rawMsg, key) + case "orchestratorVersion": + err = unpopulate(val, "OrchestratorVersion", &m.OrchestratorVersion) + delete(rawMsg, key) + case "podSubnetID": + err = unpopulate(val, "PodSubnetID", &m.PodSubnetID) + delete(rawMsg, key) + case "powerState": + err = unpopulate(val, "PowerState", &m.PowerState) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "proximityPlacementGroupID": + err = unpopulate(val, "ProximityPlacementGroupID", &m.ProximityPlacementGroupID) + delete(rawMsg, key) + case "scaleDownMode": + err = unpopulate(val, "ScaleDownMode", &m.ScaleDownMode) + delete(rawMsg, key) + case "scaleSetEvictionPolicy": + err = unpopulate(val, "ScaleSetEvictionPolicy", &m.ScaleSetEvictionPolicy) + delete(rawMsg, key) + case "scaleSetPriority": + err = unpopulate(val, "ScaleSetPriority", &m.ScaleSetPriority) + delete(rawMsg, key) + case "securityProfile": + err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) + delete(rawMsg, key) + case "spotMaxPrice": + err = unpopulate(val, "SpotMaxPrice", &m.SpotMaxPrice) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "upgradeSettings": + err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) + delete(rawMsg, key) + case "vmSize": + err = unpopulate(val, "VMSize", &m.VMSize) + delete(rawMsg, key) + case "vnetSubnetID": + err = unpopulate(val, "VnetSubnetID", &m.VnetSubnetID) + delete(rawMsg, key) + case "windowsProfile": + err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) + delete(rawMsg, key) + case "workloadRuntime": + err = unpopulate(val, "WorkloadRuntime", &m.WorkloadRuntime) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAutoUpgradeProfile. +func (m ManagedClusterAutoUpgradeProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nodeOSUpgradeChannel", m.NodeOSUpgradeChannel) + populate(objectMap, "upgradeChannel", m.UpgradeChannel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAutoUpgradeProfile. +func (m *ManagedClusterAutoUpgradeProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nodeOSUpgradeChannel": + err = unpopulate(val, "NodeOSUpgradeChannel", &m.NodeOSUpgradeChannel) + delete(rawMsg, key) + case "upgradeChannel": + err = unpopulate(val, "UpgradeChannel", &m.UpgradeChannel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfile. +func (m ManagedClusterAzureMonitorProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "logs", m.Logs) + populate(objectMap, "metrics", m.Metrics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfile. +func (m *ManagedClusterAzureMonitorProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "logs": + err = unpopulate(val, "Logs", &m.Logs) + delete(rawMsg, key) + case "metrics": + err = unpopulate(val, "Metrics", &m.Metrics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoring. +func (m ManagedClusterAzureMonitorProfileAppMonitoring) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", m.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoring. +func (m *ManagedClusterAzureMonitorProfileAppMonitoring) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics. +func (m ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", m.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics. +func (m *ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileContainerInsights. +func (m ManagedClusterAzureMonitorProfileContainerInsights) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "logAnalyticsWorkspaceResourceId", m.LogAnalyticsWorkspaceResourceID) + populate(objectMap, "windowsHostLogs", m.WindowsHostLogs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileContainerInsights. +func (m *ManagedClusterAzureMonitorProfileContainerInsights) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + case "logAnalyticsWorkspaceResourceId": + err = unpopulate(val, "LogAnalyticsWorkspaceResourceID", &m.LogAnalyticsWorkspaceResourceID) + delete(rawMsg, key) + case "windowsHostLogs": + err = unpopulate(val, "WindowsHostLogs", &m.WindowsHostLogs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileKubeStateMetrics. +func (m ManagedClusterAzureMonitorProfileKubeStateMetrics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "metricAnnotationsAllowList", m.MetricAnnotationsAllowList) + populate(objectMap, "metricLabelsAllowlist", m.MetricLabelsAllowlist) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileKubeStateMetrics. +func (m *ManagedClusterAzureMonitorProfileKubeStateMetrics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "metricAnnotationsAllowList": + err = unpopulate(val, "MetricAnnotationsAllowList", &m.MetricAnnotationsAllowList) + delete(rawMsg, key) + case "metricLabelsAllowlist": + err = unpopulate(val, "MetricLabelsAllowlist", &m.MetricLabelsAllowlist) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileLogs. +func (m ManagedClusterAzureMonitorProfileLogs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appMonitoring", m.AppMonitoring) + populate(objectMap, "containerInsights", m.ContainerInsights) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileLogs. +func (m *ManagedClusterAzureMonitorProfileLogs) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appMonitoring": + err = unpopulate(val, "AppMonitoring", &m.AppMonitoring) + delete(rawMsg, key) + case "containerInsights": + err = unpopulate(val, "ContainerInsights", &m.ContainerInsights) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileMetrics. +func (m ManagedClusterAzureMonitorProfileMetrics) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "appMonitoringOpenTelemetryMetrics", m.AppMonitoringOpenTelemetryMetrics) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "kubeStateMetrics", m.KubeStateMetrics) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileMetrics. +func (m *ManagedClusterAzureMonitorProfileMetrics) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "appMonitoringOpenTelemetryMetrics": + err = unpopulate(val, "AppMonitoringOpenTelemetryMetrics", &m.AppMonitoringOpenTelemetryMetrics) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + case "kubeStateMetrics": + err = unpopulate(val, "KubeStateMetrics", &m.KubeStateMetrics) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileWindowsHostLogs. +func (m ManagedClusterAzureMonitorProfileWindowsHostLogs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", m.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileWindowsHostLogs. +func (m *ManagedClusterAzureMonitorProfileWindowsHostLogs) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterCostAnalysis. +func (m ManagedClusterCostAnalysis) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", m.Enabled) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterCostAnalysis. +func (m *ManagedClusterCostAnalysis) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterHTTPProxyConfig. +func (m ManagedClusterHTTPProxyConfig) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "effectiveNoProxy", m.EffectiveNoProxy) + populate(objectMap, "httpProxy", m.HTTPProxy) + populate(objectMap, "httpsProxy", m.HTTPSProxy) + populate(objectMap, "noProxy", m.NoProxy) + populate(objectMap, "trustedCa", m.TrustedCa) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterHTTPProxyConfig. +func (m *ManagedClusterHTTPProxyConfig) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "effectiveNoProxy": + err = unpopulate(val, "EffectiveNoProxy", &m.EffectiveNoProxy) + delete(rawMsg, key) + case "httpProxy": + err = unpopulate(val, "HTTPProxy", &m.HTTPProxy) + delete(rawMsg, key) + case "httpsProxy": + err = unpopulate(val, "HTTPSProxy", &m.HTTPSProxy) + delete(rawMsg, key) + case "noProxy": + err = unpopulate(val, "NoProxy", &m.NoProxy) + delete(rawMsg, key) + case "trustedCa": + err = unpopulate(val, "TrustedCa", &m.TrustedCa) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIdentity. +func (m ManagedClusterIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "delegatedResources", m.DelegatedResources) + populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "tenantId", m.TenantID) + populate(objectMap, "type", m.Type) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIdentity. +func (m *ManagedClusterIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "delegatedResources": + err = unpopulate(val, "DelegatedResources", &m.DelegatedResources) + delete(rawMsg, key) + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) + delete(rawMsg, key) + case "tenantId": + err = unpopulate(val, "TenantID", &m.TenantID) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIngressProfile. +func (m ManagedClusterIngressProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "webAppRouting", m.WebAppRouting) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIngressProfile. +func (m *ManagedClusterIngressProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "webAppRouting": + err = unpopulate(val, "WebAppRouting", &m.WebAppRouting) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIngressProfileWebAppRouting. +func (m ManagedClusterIngressProfileWebAppRouting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "dnsZoneResourceIds", m.DNSZoneResourceIDs) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "identity", m.Identity) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIngressProfileWebAppRouting. +func (m *ManagedClusterIngressProfileWebAppRouting) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "dnsZoneResourceIds": + err = unpopulate(val, "DNSZoneResourceIDs", &m.DNSZoneResourceIDs) + delete(rawMsg, key) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterListResult. +func (m ManagedClusterListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterListResult. +func (m *ManagedClusterListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfile. +func (m ManagedClusterLoadBalancerProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "allocatedOutboundPorts", m.AllocatedOutboundPorts) + populate(objectMap, "backendPoolType", m.BackendPoolType) + populate(objectMap, "effectiveOutboundIPs", m.EffectiveOutboundIPs) + populate(objectMap, "enableMultipleStandardLoadBalancers", m.EnableMultipleStandardLoadBalancers) + populate(objectMap, "idleTimeoutInMinutes", m.IdleTimeoutInMinutes) + populate(objectMap, "managedOutboundIPs", m.ManagedOutboundIPs) + populate(objectMap, "outboundIPPrefixes", m.OutboundIPPrefixes) + populate(objectMap, "outboundIPs", m.OutboundIPs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfile. +func (m *ManagedClusterLoadBalancerProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "allocatedOutboundPorts": + err = unpopulate(val, "AllocatedOutboundPorts", &m.AllocatedOutboundPorts) delete(rawMsg, key) - case "enableUltraSSD": - err = unpopulate(val, "EnableUltraSSD", &m.EnableUltraSSD) + case "backendPoolType": + err = unpopulate(val, "BackendPoolType", &m.BackendPoolType) delete(rawMsg, key) - case "gpuInstanceProfile": - err = unpopulate(val, "GpuInstanceProfile", &m.GpuInstanceProfile) + case "effectiveOutboundIPs": + err = unpopulate(val, "EffectiveOutboundIPs", &m.EffectiveOutboundIPs) delete(rawMsg, key) - case "hostGroupID": - err = unpopulate(val, "HostGroupID", &m.HostGroupID) + case "enableMultipleStandardLoadBalancers": + err = unpopulate(val, "EnableMultipleStandardLoadBalancers", &m.EnableMultipleStandardLoadBalancers) delete(rawMsg, key) - case "kubeletConfig": - err = unpopulate(val, "KubeletConfig", &m.KubeletConfig) + case "idleTimeoutInMinutes": + err = unpopulate(val, "IdleTimeoutInMinutes", &m.IdleTimeoutInMinutes) delete(rawMsg, key) - case "kubeletDiskType": - err = unpopulate(val, "KubeletDiskType", &m.KubeletDiskType) + case "managedOutboundIPs": + err = unpopulate(val, "ManagedOutboundIPs", &m.ManagedOutboundIPs) delete(rawMsg, key) - case "linuxOSConfig": - err = unpopulate(val, "LinuxOSConfig", &m.LinuxOSConfig) + case "outboundIPPrefixes": + err = unpopulate(val, "OutboundIPPrefixes", &m.OutboundIPPrefixes) delete(rawMsg, key) - case "maxCount": - err = unpopulate(val, "MaxCount", &m.MaxCount) + case "outboundIPs": + err = unpopulate(val, "OutboundIPs", &m.OutboundIPs) delete(rawMsg, key) - case "maxPods": - err = unpopulate(val, "MaxPods", &m.MaxPods) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileManagedOutboundIPs. +func (m ManagedClusterLoadBalancerProfileManagedOutboundIPs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", m.Count) + populate(objectMap, "countIPv6", m.CountIPv6) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileManagedOutboundIPs. +func (m *ManagedClusterLoadBalancerProfileManagedOutboundIPs) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &m.Count) delete(rawMsg, key) - case "minCount": - err = unpopulate(val, "MinCount", &m.MinCount) + case "countIPv6": + err = unpopulate(val, "CountIPv6", &m.CountIPv6) delete(rawMsg, key) - case "mode": - err = unpopulate(val, "Mode", &m.Mode) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPPrefixes. +func (m ManagedClusterLoadBalancerProfileOutboundIPPrefixes) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "publicIPPrefixes", m.PublicIPPrefixes) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPPrefixes. +func (m *ManagedClusterLoadBalancerProfileOutboundIPPrefixes) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publicIPPrefixes": + err = unpopulate(val, "PublicIPPrefixes", &m.PublicIPPrefixes) delete(rawMsg, key) - case "nodeImageVersion": - err = unpopulate(val, "NodeImageVersion", &m.NodeImageVersion) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPs. +func (m ManagedClusterLoadBalancerProfileOutboundIPs) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "publicIPs", m.PublicIPs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPs. +func (m *ManagedClusterLoadBalancerProfileOutboundIPs) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "publicIPs": + err = unpopulate(val, "PublicIPs", &m.PublicIPs) delete(rawMsg, key) - case "nodeLabels": - err = unpopulate(val, "NodeLabels", &m.NodeLabels) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterManagedOutboundIPProfile. +func (m ManagedClusterManagedOutboundIPProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", m.Count) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterManagedOutboundIPProfile. +func (m *ManagedClusterManagedOutboundIPProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &m.Count) delete(rawMsg, key) - case "nodePublicIPPrefixID": - err = unpopulate(val, "NodePublicIPPrefixID", &m.NodePublicIPPrefixID) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterMetricsProfile. +func (m ManagedClusterMetricsProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "costAnalysis", m.CostAnalysis) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterMetricsProfile. +func (m *ManagedClusterMetricsProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "costAnalysis": + err = unpopulate(val, "CostAnalysis", &m.CostAnalysis) delete(rawMsg, key) - case "nodeTaints": - err = unpopulate(val, "NodeTaints", &m.NodeTaints) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterNATGatewayProfile. +func (m ManagedClusterNATGatewayProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "effectiveOutboundIPs", m.EffectiveOutboundIPs) + populate(objectMap, "idleTimeoutInMinutes", m.IdleTimeoutInMinutes) + populate(objectMap, "managedOutboundIPProfile", m.ManagedOutboundIPProfile) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterNATGatewayProfile. +func (m *ManagedClusterNATGatewayProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "effectiveOutboundIPs": + err = unpopulate(val, "EffectiveOutboundIPs", &m.EffectiveOutboundIPs) delete(rawMsg, key) - case "osDiskSizeGB": - err = unpopulate(val, "OSDiskSizeGB", &m.OSDiskSizeGB) + case "idleTimeoutInMinutes": + err = unpopulate(val, "IdleTimeoutInMinutes", &m.IdleTimeoutInMinutes) + delete(rawMsg, key) + case "managedOutboundIPProfile": + err = unpopulate(val, "ManagedOutboundIPProfile", &m.ManagedOutboundIPProfile) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterNodeResourceGroupProfile. +func (m ManagedClusterNodeResourceGroupProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "restrictionLevel", m.RestrictionLevel) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterNodeResourceGroupProfile. +func (m *ManagedClusterNodeResourceGroupProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "restrictionLevel": + err = unpopulate(val, "RestrictionLevel", &m.RestrictionLevel) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterOIDCIssuerProfile. +func (m ManagedClusterOIDCIssuerProfile) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "issuerURL", m.IssuerURL) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterOIDCIssuerProfile. +func (m *ManagedClusterOIDCIssuerProfile) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) - case "osDiskType": - err = unpopulate(val, "OSDiskType", &m.OSDiskType) + case "issuerURL": + err = unpopulate(val, "IssuerURL", &m.IssuerURL) delete(rawMsg, key) - case "osSKU": - err = unpopulate(val, "OSSKU", &m.OSSKU) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentity. +func (m ManagedClusterPodIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "bindingSelector", m.BindingSelector) + populate(objectMap, "identity", m.Identity) + populate(objectMap, "name", m.Name) + populate(objectMap, "namespace", m.Namespace) + populate(objectMap, "provisioningInfo", m.ProvisioningInfo) + populate(objectMap, "provisioningState", m.ProvisioningState) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentity. +func (m *ManagedClusterPodIdentity) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "bindingSelector": + err = unpopulate(val, "BindingSelector", &m.BindingSelector) delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &m.OSType) + case "identity": + err = unpopulate(val, "Identity", &m.Identity) delete(rawMsg, key) - case "orchestratorVersion": - err = unpopulate(val, "OrchestratorVersion", &m.OrchestratorVersion) + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "podSubnetID": - err = unpopulate(val, "PodSubnetID", &m.PodSubnetID) + case "namespace": + err = unpopulate(val, "Namespace", &m.Namespace) delete(rawMsg, key) - case "powerState": - err = unpopulate(val, "PowerState", &m.PowerState) + case "provisioningInfo": + err = unpopulate(val, "ProvisioningInfo", &m.ProvisioningInfo) delete(rawMsg, key) case "provisioningState": err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) delete(rawMsg, key) - case "proximityPlacementGroupID": - err = unpopulate(val, "ProximityPlacementGroupID", &m.ProximityPlacementGroupID) - delete(rawMsg, key) - case "scaleDownMode": - err = unpopulate(val, "ScaleDownMode", &m.ScaleDownMode) - delete(rawMsg, key) - case "scaleSetEvictionPolicy": - err = unpopulate(val, "ScaleSetEvictionPolicy", &m.ScaleSetEvictionPolicy) - delete(rawMsg, key) - case "scaleSetPriority": - err = unpopulate(val, "ScaleSetPriority", &m.ScaleSetPriority) - delete(rawMsg, key) - case "spotMaxPrice": - err = unpopulate(val, "SpotMaxPrice", &m.SpotMaxPrice) - delete(rawMsg, key) - case "tags": - err = unpopulate(val, "Tags", &m.Tags) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) - delete(rawMsg, key) - case "upgradeSettings": - err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) - delete(rawMsg, key) - case "vmSize": - err = unpopulate(val, "VMSize", &m.VMSize) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityException. +func (m ManagedClusterPodIdentityException) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", m.Name) + populate(objectMap, "namespace", m.Namespace) + populate(objectMap, "podLabels", m.PodLabels) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityException. +func (m *ManagedClusterPodIdentityException) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "vnetSubnetID": - err = unpopulate(val, "VnetSubnetID", &m.VnetSubnetID) + case "namespace": + err = unpopulate(val, "Namespace", &m.Namespace) delete(rawMsg, key) - case "workloadRuntime": - err = unpopulate(val, "WorkloadRuntime", &m.WorkloadRuntime) + case "podLabels": + err = unpopulate(val, "PodLabels", &m.PodLabels) delete(rawMsg, key) } if err != nil { @@ -1850,16 +3373,18 @@ func (m *ManagedClusterAgentPoolProfileProperties) UnmarshalJSON(data []byte) er return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAutoUpgradeProfile. -func (m ManagedClusterAutoUpgradeProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProfile. +func (m ManagedClusterPodIdentityProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nodeOSUpgradeChannel", m.NodeOSUpgradeChannel) - populate(objectMap, "upgradeChannel", m.UpgradeChannel) + populate(objectMap, "allowNetworkPluginKubenet", m.AllowNetworkPluginKubenet) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + populate(objectMap, "userAssignedIdentityExceptions", m.UserAssignedIdentityExceptions) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAutoUpgradeProfile. -func (m *ManagedClusterAutoUpgradeProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProfile. +func (m *ManagedClusterPodIdentityProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -1867,11 +3392,17 @@ func (m *ManagedClusterAutoUpgradeProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nodeOSUpgradeChannel": - err = unpopulate(val, "NodeOSUpgradeChannel", &m.NodeOSUpgradeChannel) + case "allowNetworkPluginKubenet": + err = unpopulate(val, "AllowNetworkPluginKubenet", &m.AllowNetworkPluginKubenet) delete(rawMsg, key) - case "upgradeChannel": - err = unpopulate(val, "UpgradeChannel", &m.UpgradeChannel) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) + delete(rawMsg, key) + case "userAssignedIdentities": + err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + delete(rawMsg, key) + case "userAssignedIdentityExceptions": + err = unpopulate(val, "UserAssignedIdentityExceptions", &m.UserAssignedIdentityExceptions) delete(rawMsg, key) } if err != nil { @@ -1881,15 +3412,15 @@ func (m *ManagedClusterAutoUpgradeProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfile. -func (m ManagedClusterAzureMonitorProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningError. +func (m ManagedClusterPodIdentityProvisioningError) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "metrics", m.Metrics) + populate(objectMap, "error", m.Error) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfile. -func (m *ManagedClusterAzureMonitorProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningError. +func (m *ManagedClusterPodIdentityProvisioningError) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -1897,8 +3428,8 @@ func (m *ManagedClusterAzureMonitorProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "metrics": - err = unpopulate(val, "Metrics", &m.Metrics) + case "error": + err = unpopulate(val, "Error", &m.Error) delete(rawMsg, key) } if err != nil { @@ -1908,16 +3439,18 @@ func (m *ManagedClusterAzureMonitorProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileKubeStateMetrics. -func (m ManagedClusterAzureMonitorProfileKubeStateMetrics) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningErrorBody. +func (m ManagedClusterPodIdentityProvisioningErrorBody) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "metricAnnotationsAllowList", m.MetricAnnotationsAllowList) - populate(objectMap, "metricLabelsAllowlist", m.MetricLabelsAllowlist) + populate(objectMap, "code", m.Code) + populate(objectMap, "details", m.Details) + populate(objectMap, "message", m.Message) + populate(objectMap, "target", m.Target) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileKubeStateMetrics. -func (m *ManagedClusterAzureMonitorProfileKubeStateMetrics) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningErrorBody. +func (m *ManagedClusterPodIdentityProvisioningErrorBody) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -1925,11 +3458,17 @@ func (m *ManagedClusterAzureMonitorProfileKubeStateMetrics) UnmarshalJSON(data [ for key, val := range rawMsg { var err error switch key { - case "metricAnnotationsAllowList": - err = unpopulate(val, "MetricAnnotationsAllowList", &m.MetricAnnotationsAllowList) + case "code": + err = unpopulate(val, "Code", &m.Code) delete(rawMsg, key) - case "metricLabelsAllowlist": - err = unpopulate(val, "MetricLabelsAllowlist", &m.MetricLabelsAllowlist) + case "details": + err = unpopulate(val, "Details", &m.Details) + delete(rawMsg, key) + case "message": + err = unpopulate(val, "Message", &m.Message) + delete(rawMsg, key) + case "target": + err = unpopulate(val, "Target", &m.Target) delete(rawMsg, key) } if err != nil { @@ -1939,16 +3478,15 @@ func (m *ManagedClusterAzureMonitorProfileKubeStateMetrics) UnmarshalJSON(data [ return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterAzureMonitorProfileMetrics. -func (m ManagedClusterAzureMonitorProfileMetrics) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningInfo. +func (m ManagedClusterPodIdentityProvisioningInfo) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "kubeStateMetrics", m.KubeStateMetrics) + populate(objectMap, "error", m.Error) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterAzureMonitorProfileMetrics. -func (m *ManagedClusterAzureMonitorProfileMetrics) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningInfo. +func (m *ManagedClusterPodIdentityProvisioningInfo) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -1956,11 +3494,8 @@ func (m *ManagedClusterAzureMonitorProfileMetrics) UnmarshalJSON(data []byte) er for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) - delete(rawMsg, key) - case "kubeStateMetrics": - err = unpopulate(val, "KubeStateMetrics", &m.KubeStateMetrics) + case "error": + err = unpopulate(val, "Error", &m.Error) delete(rawMsg, key) } if err != nil { @@ -1970,18 +3505,18 @@ func (m *ManagedClusterAzureMonitorProfileMetrics) UnmarshalJSON(data []byte) er return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterHTTPProxyConfig. -func (m ManagedClusterHTTPProxyConfig) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPoolUpgradeProfile. +func (m ManagedClusterPoolUpgradeProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "httpProxy", m.HTTPProxy) - populate(objectMap, "httpsProxy", m.HTTPSProxy) - populate(objectMap, "noProxy", m.NoProxy) - populate(objectMap, "trustedCa", m.TrustedCa) + populate(objectMap, "kubernetesVersion", m.KubernetesVersion) + populate(objectMap, "name", m.Name) + populate(objectMap, "osType", m.OSType) + populate(objectMap, "upgrades", m.Upgrades) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterHTTPProxyConfig. -func (m *ManagedClusterHTTPProxyConfig) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPoolUpgradeProfile. +func (m *ManagedClusterPoolUpgradeProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -1989,17 +3524,17 @@ func (m *ManagedClusterHTTPProxyConfig) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "httpProxy": - err = unpopulate(val, "HTTPProxy", &m.HTTPProxy) + case "kubernetesVersion": + err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) delete(rawMsg, key) - case "httpsProxy": - err = unpopulate(val, "HTTPSProxy", &m.HTTPSProxy) + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "noProxy": - err = unpopulate(val, "NoProxy", &m.NoProxy) + case "osType": + err = unpopulate(val, "OSType", &m.OSType) delete(rawMsg, key) - case "trustedCa": - err = unpopulate(val, "TrustedCa", &m.TrustedCa) + case "upgrades": + err = unpopulate(val, "Upgrades", &m.Upgrades) delete(rawMsg, key) } if err != nil { @@ -2009,19 +3544,16 @@ func (m *ManagedClusterHTTPProxyConfig) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterIdentity. -func (m ManagedClusterIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPoolUpgradeProfileUpgradesItem. +func (m ManagedClusterPoolUpgradeProfileUpgradesItem) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "delegatedResources", m.DelegatedResources) - populate(objectMap, "principalId", m.PrincipalID) - populate(objectMap, "tenantId", m.TenantID) - populate(objectMap, "type", m.Type) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) + populate(objectMap, "isPreview", m.IsPreview) + populate(objectMap, "kubernetesVersion", m.KubernetesVersion) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterIdentity. -func (m *ManagedClusterIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPoolUpgradeProfileUpgradesItem. +func (m *ManagedClusterPoolUpgradeProfileUpgradesItem) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2029,20 +3561,11 @@ func (m *ManagedClusterIdentity) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "delegatedResources": - err = unpopulate(val, "DelegatedResources", &m.DelegatedResources) - delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &m.PrincipalID) - delete(rawMsg, key) - case "tenantId": - err = unpopulate(val, "TenantID", &m.TenantID) - delete(rawMsg, key) - case "type": - err = unpopulate(val, "Type", &m.Type) + case "isPreview": + err = unpopulate(val, "IsPreview", &m.IsPreview) delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) + case "kubernetesVersion": + err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) delete(rawMsg, key) } if err != nil { @@ -2052,16 +3575,59 @@ func (m *ManagedClusterIdentity) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterListResult. -func (m ManagedClusterListResult) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterProperties. +func (m ManagedClusterProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "nextLink", m.NextLink) - populate(objectMap, "value", m.Value) + populate(objectMap, "aadProfile", m.AADProfile) + populate(objectMap, "apiServerAccessProfile", m.APIServerAccessProfile) + populate(objectMap, "addonProfiles", m.AddonProfiles) + populate(objectMap, "agentPoolProfiles", m.AgentPoolProfiles) + populate(objectMap, "autoScalerProfile", m.AutoScalerProfile) + populate(objectMap, "autoUpgradeProfile", m.AutoUpgradeProfile) + populate(objectMap, "azureMonitorProfile", m.AzureMonitorProfile) + populate(objectMap, "azurePortalFQDN", m.AzurePortalFQDN) + populate(objectMap, "creationData", m.CreationData) + populate(objectMap, "currentKubernetesVersion", m.CurrentKubernetesVersion) + populate(objectMap, "dnsPrefix", m.DNSPrefix) + populate(objectMap, "disableLocalAccounts", m.DisableLocalAccounts) + populate(objectMap, "diskEncryptionSetID", m.DiskEncryptionSetID) + populate(objectMap, "enableNamespaceResources", m.EnableNamespaceResources) + populate(objectMap, "enablePodSecurityPolicy", m.EnablePodSecurityPolicy) + populate(objectMap, "enableRBAC", m.EnableRBAC) + populate(objectMap, "fqdn", m.Fqdn) + populate(objectMap, "fqdnSubdomain", m.FqdnSubdomain) + populate(objectMap, "guardrailsProfile", m.GuardrailsProfile) + populate(objectMap, "httpProxyConfig", m.HTTPProxyConfig) + populate(objectMap, "identityProfile", m.IdentityProfile) + populate(objectMap, "ingressProfile", m.IngressProfile) + populate(objectMap, "kubernetesVersion", m.KubernetesVersion) + populate(objectMap, "linuxProfile", m.LinuxProfile) + populate(objectMap, "maxAgentPools", m.MaxAgentPools) + populate(objectMap, "metricsProfile", m.MetricsProfile) + populate(objectMap, "networkProfile", m.NetworkProfile) + populate(objectMap, "nodeResourceGroup", m.NodeResourceGroup) + populate(objectMap, "nodeResourceGroupProfile", m.NodeResourceGroupProfile) + populate(objectMap, "oidcIssuerProfile", m.OidcIssuerProfile) + populate(objectMap, "podIdentityProfile", m.PodIdentityProfile) + populate(objectMap, "powerState", m.PowerState) + populate(objectMap, "privateFQDN", m.PrivateFQDN) + populate(objectMap, "privateLinkResources", m.PrivateLinkResources) + populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "publicNetworkAccess", m.PublicNetworkAccess) + populate(objectMap, "resourceUID", m.ResourceUID) + populate(objectMap, "securityProfile", m.SecurityProfile) + populate(objectMap, "serviceMeshProfile", m.ServiceMeshProfile) + populate(objectMap, "servicePrincipalProfile", m.ServicePrincipalProfile) + populate(objectMap, "storageProfile", m.StorageProfile) + populate(objectMap, "supportPlan", m.SupportPlan) + populate(objectMap, "upgradeSettings", m.UpgradeSettings) + populate(objectMap, "windowsProfile", m.WindowsProfile) + populate(objectMap, "workloadAutoScalerProfile", m.WorkloadAutoScalerProfile) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterListResult. -func (m *ManagedClusterListResult) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterProperties. +func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2069,11 +3635,140 @@ func (m *ManagedClusterListResult) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "nextLink": - err = unpopulate(val, "NextLink", &m.NextLink) + case "aadProfile": + err = unpopulate(val, "AADProfile", &m.AADProfile) delete(rawMsg, key) - case "value": - err = unpopulate(val, "Value", &m.Value) + case "apiServerAccessProfile": + err = unpopulate(val, "APIServerAccessProfile", &m.APIServerAccessProfile) + delete(rawMsg, key) + case "addonProfiles": + err = unpopulate(val, "AddonProfiles", &m.AddonProfiles) + delete(rawMsg, key) + case "agentPoolProfiles": + err = unpopulate(val, "AgentPoolProfiles", &m.AgentPoolProfiles) + delete(rawMsg, key) + case "autoScalerProfile": + err = unpopulate(val, "AutoScalerProfile", &m.AutoScalerProfile) + delete(rawMsg, key) + case "autoUpgradeProfile": + err = unpopulate(val, "AutoUpgradeProfile", &m.AutoUpgradeProfile) + delete(rawMsg, key) + case "azureMonitorProfile": + err = unpopulate(val, "AzureMonitorProfile", &m.AzureMonitorProfile) + delete(rawMsg, key) + case "azurePortalFQDN": + err = unpopulate(val, "AzurePortalFQDN", &m.AzurePortalFQDN) + delete(rawMsg, key) + case "creationData": + err = unpopulate(val, "CreationData", &m.CreationData) + delete(rawMsg, key) + case "currentKubernetesVersion": + err = unpopulate(val, "CurrentKubernetesVersion", &m.CurrentKubernetesVersion) + delete(rawMsg, key) + case "dnsPrefix": + err = unpopulate(val, "DNSPrefix", &m.DNSPrefix) + delete(rawMsg, key) + case "disableLocalAccounts": + err = unpopulate(val, "DisableLocalAccounts", &m.DisableLocalAccounts) + delete(rawMsg, key) + case "diskEncryptionSetID": + err = unpopulate(val, "DiskEncryptionSetID", &m.DiskEncryptionSetID) + delete(rawMsg, key) + case "enableNamespaceResources": + err = unpopulate(val, "EnableNamespaceResources", &m.EnableNamespaceResources) + delete(rawMsg, key) + case "enablePodSecurityPolicy": + err = unpopulate(val, "EnablePodSecurityPolicy", &m.EnablePodSecurityPolicy) + delete(rawMsg, key) + case "enableRBAC": + err = unpopulate(val, "EnableRBAC", &m.EnableRBAC) + delete(rawMsg, key) + case "fqdn": + err = unpopulate(val, "Fqdn", &m.Fqdn) + delete(rawMsg, key) + case "fqdnSubdomain": + err = unpopulate(val, "FqdnSubdomain", &m.FqdnSubdomain) + delete(rawMsg, key) + case "guardrailsProfile": + err = unpopulate(val, "GuardrailsProfile", &m.GuardrailsProfile) + delete(rawMsg, key) + case "httpProxyConfig": + err = unpopulate(val, "HTTPProxyConfig", &m.HTTPProxyConfig) + delete(rawMsg, key) + case "identityProfile": + err = unpopulate(val, "IdentityProfile", &m.IdentityProfile) + delete(rawMsg, key) + case "ingressProfile": + err = unpopulate(val, "IngressProfile", &m.IngressProfile) + delete(rawMsg, key) + case "kubernetesVersion": + err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) + delete(rawMsg, key) + case "linuxProfile": + err = unpopulate(val, "LinuxProfile", &m.LinuxProfile) + delete(rawMsg, key) + case "maxAgentPools": + err = unpopulate(val, "MaxAgentPools", &m.MaxAgentPools) + delete(rawMsg, key) + case "metricsProfile": + err = unpopulate(val, "MetricsProfile", &m.MetricsProfile) + delete(rawMsg, key) + case "networkProfile": + err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) + delete(rawMsg, key) + case "nodeResourceGroup": + err = unpopulate(val, "NodeResourceGroup", &m.NodeResourceGroup) + delete(rawMsg, key) + case "nodeResourceGroupProfile": + err = unpopulate(val, "NodeResourceGroupProfile", &m.NodeResourceGroupProfile) + delete(rawMsg, key) + case "oidcIssuerProfile": + err = unpopulate(val, "OidcIssuerProfile", &m.OidcIssuerProfile) + delete(rawMsg, key) + case "podIdentityProfile": + err = unpopulate(val, "PodIdentityProfile", &m.PodIdentityProfile) + delete(rawMsg, key) + case "powerState": + err = unpopulate(val, "PowerState", &m.PowerState) + delete(rawMsg, key) + case "privateFQDN": + err = unpopulate(val, "PrivateFQDN", &m.PrivateFQDN) + delete(rawMsg, key) + case "privateLinkResources": + err = unpopulate(val, "PrivateLinkResources", &m.PrivateLinkResources) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + delete(rawMsg, key) + case "publicNetworkAccess": + err = unpopulate(val, "PublicNetworkAccess", &m.PublicNetworkAccess) + delete(rawMsg, key) + case "resourceUID": + err = unpopulate(val, "ResourceUID", &m.ResourceUID) + delete(rawMsg, key) + case "securityProfile": + err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) + delete(rawMsg, key) + case "serviceMeshProfile": + err = unpopulate(val, "ServiceMeshProfile", &m.ServiceMeshProfile) + delete(rawMsg, key) + case "servicePrincipalProfile": + err = unpopulate(val, "ServicePrincipalProfile", &m.ServicePrincipalProfile) + delete(rawMsg, key) + case "storageProfile": + err = unpopulate(val, "StorageProfile", &m.StorageProfile) + delete(rawMsg, key) + case "supportPlan": + err = unpopulate(val, "SupportPlan", &m.SupportPlan) + delete(rawMsg, key) + case "upgradeSettings": + err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) + delete(rawMsg, key) + case "windowsProfile": + err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) + delete(rawMsg, key) + case "workloadAutoScalerProfile": + err = unpopulate(val, "WorkloadAutoScalerProfile", &m.WorkloadAutoScalerProfile) delete(rawMsg, key) } if err != nil { @@ -2083,21 +3778,31 @@ func (m *ManagedClusterListResult) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfile. -func (m ManagedClusterLoadBalancerProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPropertiesAutoScalerProfile. +func (m ManagedClusterPropertiesAutoScalerProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allocatedOutboundPorts", m.AllocatedOutboundPorts) - populate(objectMap, "effectiveOutboundIPs", m.EffectiveOutboundIPs) - populate(objectMap, "enableMultipleStandardLoadBalancers", m.EnableMultipleStandardLoadBalancers) - populate(objectMap, "idleTimeoutInMinutes", m.IdleTimeoutInMinutes) - populate(objectMap, "managedOutboundIPs", m.ManagedOutboundIPs) - populate(objectMap, "outboundIPPrefixes", m.OutboundIPPrefixes) - populate(objectMap, "outboundIPs", m.OutboundIPs) + populate(objectMap, "balance-similar-node-groups", m.BalanceSimilarNodeGroups) + populate(objectMap, "expander", m.Expander) + populate(objectMap, "max-empty-bulk-delete", m.MaxEmptyBulkDelete) + populate(objectMap, "max-graceful-termination-sec", m.MaxGracefulTerminationSec) + populate(objectMap, "max-node-provision-time", m.MaxNodeProvisionTime) + populate(objectMap, "max-total-unready-percentage", m.MaxTotalUnreadyPercentage) + populate(objectMap, "new-pod-scale-up-delay", m.NewPodScaleUpDelay) + populate(objectMap, "ok-total-unready-count", m.OkTotalUnreadyCount) + populate(objectMap, "scale-down-delay-after-add", m.ScaleDownDelayAfterAdd) + populate(objectMap, "scale-down-delay-after-delete", m.ScaleDownDelayAfterDelete) + populate(objectMap, "scale-down-delay-after-failure", m.ScaleDownDelayAfterFailure) + populate(objectMap, "scale-down-unneeded-time", m.ScaleDownUnneededTime) + populate(objectMap, "scale-down-unready-time", m.ScaleDownUnreadyTime) + populate(objectMap, "scale-down-utilization-threshold", m.ScaleDownUtilizationThreshold) + populate(objectMap, "scan-interval", m.ScanInterval) + populate(objectMap, "skip-nodes-with-local-storage", m.SkipNodesWithLocalStorage) + populate(objectMap, "skip-nodes-with-system-pods", m.SkipNodesWithSystemPods) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfile. -func (m *ManagedClusterLoadBalancerProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPropertiesAutoScalerProfile. +func (m *ManagedClusterPropertiesAutoScalerProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2105,26 +3810,56 @@ func (m *ManagedClusterLoadBalancerProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "allocatedOutboundPorts": - err = unpopulate(val, "AllocatedOutboundPorts", &m.AllocatedOutboundPorts) + case "balance-similar-node-groups": + err = unpopulate(val, "BalanceSimilarNodeGroups", &m.BalanceSimilarNodeGroups) + delete(rawMsg, key) + case "expander": + err = unpopulate(val, "Expander", &m.Expander) + delete(rawMsg, key) + case "max-empty-bulk-delete": + err = unpopulate(val, "MaxEmptyBulkDelete", &m.MaxEmptyBulkDelete) + delete(rawMsg, key) + case "max-graceful-termination-sec": + err = unpopulate(val, "MaxGracefulTerminationSec", &m.MaxGracefulTerminationSec) + delete(rawMsg, key) + case "max-node-provision-time": + err = unpopulate(val, "MaxNodeProvisionTime", &m.MaxNodeProvisionTime) + delete(rawMsg, key) + case "max-total-unready-percentage": + err = unpopulate(val, "MaxTotalUnreadyPercentage", &m.MaxTotalUnreadyPercentage) + delete(rawMsg, key) + case "new-pod-scale-up-delay": + err = unpopulate(val, "NewPodScaleUpDelay", &m.NewPodScaleUpDelay) delete(rawMsg, key) - case "effectiveOutboundIPs": - err = unpopulate(val, "EffectiveOutboundIPs", &m.EffectiveOutboundIPs) + case "ok-total-unready-count": + err = unpopulate(val, "OkTotalUnreadyCount", &m.OkTotalUnreadyCount) delete(rawMsg, key) - case "enableMultipleStandardLoadBalancers": - err = unpopulate(val, "EnableMultipleStandardLoadBalancers", &m.EnableMultipleStandardLoadBalancers) + case "scale-down-delay-after-add": + err = unpopulate(val, "ScaleDownDelayAfterAdd", &m.ScaleDownDelayAfterAdd) delete(rawMsg, key) - case "idleTimeoutInMinutes": - err = unpopulate(val, "IdleTimeoutInMinutes", &m.IdleTimeoutInMinutes) + case "scale-down-delay-after-delete": + err = unpopulate(val, "ScaleDownDelayAfterDelete", &m.ScaleDownDelayAfterDelete) delete(rawMsg, key) - case "managedOutboundIPs": - err = unpopulate(val, "ManagedOutboundIPs", &m.ManagedOutboundIPs) + case "scale-down-delay-after-failure": + err = unpopulate(val, "ScaleDownDelayAfterFailure", &m.ScaleDownDelayAfterFailure) delete(rawMsg, key) - case "outboundIPPrefixes": - err = unpopulate(val, "OutboundIPPrefixes", &m.OutboundIPPrefixes) + case "scale-down-unneeded-time": + err = unpopulate(val, "ScaleDownUnneededTime", &m.ScaleDownUnneededTime) delete(rawMsg, key) - case "outboundIPs": - err = unpopulate(val, "OutboundIPs", &m.OutboundIPs) + case "scale-down-unready-time": + err = unpopulate(val, "ScaleDownUnreadyTime", &m.ScaleDownUnreadyTime) + delete(rawMsg, key) + case "scale-down-utilization-threshold": + err = unpopulate(val, "ScaleDownUtilizationThreshold", &m.ScaleDownUtilizationThreshold) + delete(rawMsg, key) + case "scan-interval": + err = unpopulate(val, "ScanInterval", &m.ScanInterval) + delete(rawMsg, key) + case "skip-nodes-with-local-storage": + err = unpopulate(val, "SkipNodesWithLocalStorage", &m.SkipNodesWithLocalStorage) + delete(rawMsg, key) + case "skip-nodes-with-system-pods": + err = unpopulate(val, "SkipNodesWithSystemPods", &m.SkipNodesWithSystemPods) delete(rawMsg, key) } if err != nil { @@ -2134,16 +3869,18 @@ func (m *ManagedClusterLoadBalancerProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileManagedOutboundIPs. -func (m ManagedClusterLoadBalancerProfileManagedOutboundIPs) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPropertiesForSnapshot. +func (m ManagedClusterPropertiesForSnapshot) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "count", m.Count) - populate(objectMap, "countIPv6", m.CountIPv6) + populate(objectMap, "enableRbac", m.EnableRbac) + populate(objectMap, "kubernetesVersion", m.KubernetesVersion) + populate(objectMap, "networkProfile", m.NetworkProfile) + populate(objectMap, "sku", m.SKU) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileManagedOutboundIPs. -func (m *ManagedClusterLoadBalancerProfileManagedOutboundIPs) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPropertiesForSnapshot. +func (m *ManagedClusterPropertiesForSnapshot) UnmarshalJSON(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) @@ -2151,11 +3888,17 @@ func (m *ManagedClusterLoadBalancerProfileManagedOutboundIPs) UnmarshalJSON(data for key, val := range rawMsg { var err error switch key { - case "count": - err = unpopulate(val, "Count", &m.Count) + case "enableRbac": + err = unpopulate(val, "EnableRbac", &m.EnableRbac) delete(rawMsg, key) - case "countIPv6": - err = unpopulate(val, "CountIPv6", &m.CountIPv6) + case "kubernetesVersion": + err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) + delete(rawMsg, key) + case "networkProfile": + err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) + delete(rawMsg, key) + case "sku": + err = unpopulate(val, "SKU", &m.SKU) delete(rawMsg, key) } if err != nil { @@ -2165,15 +3908,16 @@ func (m *ManagedClusterLoadBalancerProfileManagedOutboundIPs) UnmarshalJSON(data return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPPrefixes. -func (m ManagedClusterLoadBalancerProfileOutboundIPPrefixes) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSKU. +func (m ManagedClusterSKU) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "publicIPPrefixes", m.PublicIPPrefixes) + populate(objectMap, "name", m.Name) + populate(objectMap, "tier", m.Tier) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPPrefixes. -func (m *ManagedClusterLoadBalancerProfileOutboundIPPrefixes) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSKU. +func (m *ManagedClusterSKU) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2181,8 +3925,11 @@ func (m *ManagedClusterLoadBalancerProfileOutboundIPPrefixes) UnmarshalJSON(data for key, val := range rawMsg { var err error switch key { - case "publicIPPrefixes": - err = unpopulate(val, "PublicIPPrefixes", &m.PublicIPPrefixes) + case "name": + err = unpopulate(val, "Name", &m.Name) + delete(rawMsg, key) + case "tier": + err = unpopulate(val, "Tier", &m.Tier) delete(rawMsg, key) } if err != nil { @@ -2192,15 +3939,21 @@ func (m *ManagedClusterLoadBalancerProfileOutboundIPPrefixes) UnmarshalJSON(data return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPs. -func (m ManagedClusterLoadBalancerProfileOutboundIPs) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfile. +func (m ManagedClusterSecurityProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "publicIPs", m.PublicIPs) + populate(objectMap, "azureKeyVaultKms", m.AzureKeyVaultKms) + populate(objectMap, "customCATrustCertificates", m.CustomCATrustCertificates) + populate(objectMap, "defender", m.Defender) + populate(objectMap, "imageCleaner", m.ImageCleaner) + populate(objectMap, "imageIntegrity", m.ImageIntegrity) + populate(objectMap, "nodeRestriction", m.NodeRestriction) + populate(objectMap, "workloadIdentity", m.WorkloadIdentity) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterLoadBalancerProfileOutboundIPs. -func (m *ManagedClusterLoadBalancerProfileOutboundIPs) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfile. +func (m *ManagedClusterSecurityProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2208,8 +3961,26 @@ func (m *ManagedClusterLoadBalancerProfileOutboundIPs) UnmarshalJSON(data []byte for key, val := range rawMsg { var err error switch key { - case "publicIPs": - err = unpopulate(val, "PublicIPs", &m.PublicIPs) + case "azureKeyVaultKms": + err = unpopulate(val, "AzureKeyVaultKms", &m.AzureKeyVaultKms) + delete(rawMsg, key) + case "customCATrustCertificates": + err = unpopulate(val, "CustomCATrustCertificates", &m.CustomCATrustCertificates) + delete(rawMsg, key) + case "defender": + err = unpopulate(val, "Defender", &m.Defender) + delete(rawMsg, key) + case "imageCleaner": + err = unpopulate(val, "ImageCleaner", &m.ImageCleaner) + delete(rawMsg, key) + case "imageIntegrity": + err = unpopulate(val, "ImageIntegrity", &m.ImageIntegrity) + delete(rawMsg, key) + case "nodeRestriction": + err = unpopulate(val, "NodeRestriction", &m.NodeRestriction) + delete(rawMsg, key) + case "workloadIdentity": + err = unpopulate(val, "WorkloadIdentity", &m.WorkloadIdentity) delete(rawMsg, key) } if err != nil { @@ -2219,15 +3990,16 @@ func (m *ManagedClusterLoadBalancerProfileOutboundIPs) UnmarshalJSON(data []byte return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterManagedOutboundIPProfile. -func (m ManagedClusterManagedOutboundIPProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileDefender. +func (m ManagedClusterSecurityProfileDefender) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "count", m.Count) + populate(objectMap, "logAnalyticsWorkspaceResourceId", m.LogAnalyticsWorkspaceResourceID) + populate(objectMap, "securityMonitoring", m.SecurityMonitoring) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterManagedOutboundIPProfile. -func (m *ManagedClusterManagedOutboundIPProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileDefender. +func (m *ManagedClusterSecurityProfileDefender) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2235,8 +4007,11 @@ func (m *ManagedClusterManagedOutboundIPProfile) UnmarshalJSON(data []byte) erro for key, val := range rawMsg { var err error switch key { - case "count": - err = unpopulate(val, "Count", &m.Count) + case "logAnalyticsWorkspaceResourceId": + err = unpopulate(val, "LogAnalyticsWorkspaceResourceID", &m.LogAnalyticsWorkspaceResourceID) + delete(rawMsg, key) + case "securityMonitoring": + err = unpopulate(val, "SecurityMonitoring", &m.SecurityMonitoring) delete(rawMsg, key) } if err != nil { @@ -2246,17 +4021,15 @@ func (m *ManagedClusterManagedOutboundIPProfile) UnmarshalJSON(data []byte) erro return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterNATGatewayProfile. -func (m ManagedClusterNATGatewayProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileDefenderSecurityMonitoring. +func (m ManagedClusterSecurityProfileDefenderSecurityMonitoring) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "effectiveOutboundIPs", m.EffectiveOutboundIPs) - populate(objectMap, "idleTimeoutInMinutes", m.IdleTimeoutInMinutes) - populate(objectMap, "managedOutboundIPProfile", m.ManagedOutboundIPProfile) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterNATGatewayProfile. -func (m *ManagedClusterNATGatewayProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileDefenderSecurityMonitoring. +func (m *ManagedClusterSecurityProfileDefenderSecurityMonitoring) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2264,14 +4037,8 @@ func (m *ManagedClusterNATGatewayProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "effectiveOutboundIPs": - err = unpopulate(val, "EffectiveOutboundIPs", &m.EffectiveOutboundIPs) - delete(rawMsg, key) - case "idleTimeoutInMinutes": - err = unpopulate(val, "IdleTimeoutInMinutes", &m.IdleTimeoutInMinutes) - delete(rawMsg, key) - case "managedOutboundIPProfile": - err = unpopulate(val, "ManagedOutboundIPProfile", &m.ManagedOutboundIPProfile) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -2281,16 +4048,16 @@ func (m *ManagedClusterNATGatewayProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterOIDCIssuerProfile. -func (m ManagedClusterOIDCIssuerProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileImageCleaner. +func (m ManagedClusterSecurityProfileImageCleaner) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "issuerURL", m.IssuerURL) + populate(objectMap, "intervalHours", m.IntervalHours) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterOIDCIssuerProfile. -func (m *ManagedClusterOIDCIssuerProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileImageCleaner. +func (m *ManagedClusterSecurityProfileImageCleaner) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2301,8 +4068,8 @@ func (m *ManagedClusterOIDCIssuerProfile) UnmarshalJSON(data []byte) error { case "enabled": err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) - case "issuerURL": - err = unpopulate(val, "IssuerURL", &m.IssuerURL) + case "intervalHours": + err = unpopulate(val, "IntervalHours", &m.IntervalHours) delete(rawMsg, key) } if err != nil { @@ -2312,20 +4079,15 @@ func (m *ManagedClusterOIDCIssuerProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentity. -func (m ManagedClusterPodIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileImageIntegrity. +func (m ManagedClusterSecurityProfileImageIntegrity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "bindingSelector", m.BindingSelector) - populate(objectMap, "identity", m.Identity) - populate(objectMap, "name", m.Name) - populate(objectMap, "namespace", m.Namespace) - populate(objectMap, "provisioningInfo", m.ProvisioningInfo) - populate(objectMap, "provisioningState", m.ProvisioningState) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentity. -func (m *ManagedClusterPodIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileImageIntegrity. +func (m *ManagedClusterSecurityProfileImageIntegrity) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2333,23 +4095,8 @@ func (m *ManagedClusterPodIdentity) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "bindingSelector": - err = unpopulate(val, "BindingSelector", &m.BindingSelector) - delete(rawMsg, key) - case "identity": - err = unpopulate(val, "Identity", &m.Identity) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "namespace": - err = unpopulate(val, "Namespace", &m.Namespace) - delete(rawMsg, key) - case "provisioningInfo": - err = unpopulate(val, "ProvisioningInfo", &m.ProvisioningInfo) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -2359,17 +4106,15 @@ func (m *ManagedClusterPodIdentity) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityException. -func (m ManagedClusterPodIdentityException) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileNodeRestriction. +func (m ManagedClusterSecurityProfileNodeRestriction) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", m.Name) - populate(objectMap, "namespace", m.Namespace) - populate(objectMap, "podLabels", m.PodLabels) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityException. -func (m *ManagedClusterPodIdentityException) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileNodeRestriction. +func (m *ManagedClusterSecurityProfileNodeRestriction) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2377,14 +4122,8 @@ func (m *ManagedClusterPodIdentityException) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "namespace": - err = unpopulate(val, "Namespace", &m.Namespace) - delete(rawMsg, key) - case "podLabels": - err = unpopulate(val, "PodLabels", &m.PodLabels) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -2394,18 +4133,15 @@ func (m *ManagedClusterPodIdentityException) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProfile. -func (m ManagedClusterPodIdentityProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileWorkloadIdentity. +func (m ManagedClusterSecurityProfileWorkloadIdentity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "allowNetworkPluginKubenet", m.AllowNetworkPluginKubenet) populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "userAssignedIdentities", m.UserAssignedIdentities) - populate(objectMap, "userAssignedIdentityExceptions", m.UserAssignedIdentityExceptions) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProfile. -func (m *ManagedClusterPodIdentityProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileWorkloadIdentity. +func (m *ManagedClusterSecurityProfileWorkloadIdentity) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2413,18 +4149,9 @@ func (m *ManagedClusterPodIdentityProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "allowNetworkPluginKubenet": - err = unpopulate(val, "AllowNetworkPluginKubenet", &m.AllowNetworkPluginKubenet) - delete(rawMsg, key) case "enabled": err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) - case "userAssignedIdentities": - err = unpopulate(val, "UserAssignedIdentities", &m.UserAssignedIdentities) - delete(rawMsg, key) - case "userAssignedIdentityExceptions": - err = unpopulate(val, "UserAssignedIdentityExceptions", &m.UserAssignedIdentityExceptions) - delete(rawMsg, key) } if err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2433,15 +4160,16 @@ func (m *ManagedClusterPodIdentityProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningError. -func (m ManagedClusterPodIdentityProvisioningError) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterServicePrincipalProfile. +func (m ManagedClusterServicePrincipalProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "error", m.Error) + populate(objectMap, "clientId", m.ClientID) + populate(objectMap, "secret", m.Secret) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningError. -func (m *ManagedClusterPodIdentityProvisioningError) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterServicePrincipalProfile. +func (m *ManagedClusterServicePrincipalProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2449,8 +4177,11 @@ func (m *ManagedClusterPodIdentityProvisioningError) UnmarshalJSON(data []byte) for key, val := range rawMsg { var err error switch key { - case "error": - err = unpopulate(val, "Error", &m.Error) + case "clientId": + err = unpopulate(val, "ClientID", &m.ClientID) + delete(rawMsg, key) + case "secret": + err = unpopulate(val, "Secret", &m.Secret) delete(rawMsg, key) } if err != nil { @@ -2460,18 +4191,21 @@ func (m *ManagedClusterPodIdentityProvisioningError) UnmarshalJSON(data []byte) return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningErrorBody. -func (m ManagedClusterPodIdentityProvisioningErrorBody) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSnapshot. +func (m ManagedClusterSnapshot) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "code", m.Code) - populate(objectMap, "details", m.Details) - populate(objectMap, "message", m.Message) - populate(objectMap, "target", m.Target) + populate(objectMap, "id", m.ID) + populate(objectMap, "location", m.Location) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "systemData", m.SystemData) + populate(objectMap, "tags", m.Tags) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningErrorBody. -func (m *ManagedClusterPodIdentityProvisioningErrorBody) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSnapshot. +func (m *ManagedClusterSnapshot) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2479,17 +4213,26 @@ func (m *ManagedClusterPodIdentityProvisioningErrorBody) UnmarshalJSON(data []by for key, val := range rawMsg { var err error switch key { - case "code": - err = unpopulate(val, "Code", &m.Code) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "details": - err = unpopulate(val, "Details", &m.Details) + case "location": + err = unpopulate(val, "Location", &m.Location) delete(rawMsg, key) - case "message": - err = unpopulate(val, "Message", &m.Message) + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "target": - err = unpopulate(val, "Target", &m.Target) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) + case "tags": + err = unpopulate(val, "Tags", &m.Tags) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { @@ -2499,15 +4242,16 @@ func (m *ManagedClusterPodIdentityProvisioningErrorBody) UnmarshalJSON(data []by return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPodIdentityProvisioningInfo. -func (m ManagedClusterPodIdentityProvisioningInfo) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSnapshotListResult. +func (m ManagedClusterSnapshotListResult) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "error", m.Error) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPodIdentityProvisioningInfo. -func (m *ManagedClusterPodIdentityProvisioningInfo) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSnapshotListResult. +func (m *ManagedClusterSnapshotListResult) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2515,8 +4259,11 @@ func (m *ManagedClusterPodIdentityProvisioningInfo) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "error": - err = unpopulate(val, "Error", &m.Error) + 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 { @@ -2526,18 +4273,17 @@ func (m *ManagedClusterPodIdentityProvisioningInfo) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPoolUpgradeProfile. -func (m ManagedClusterPoolUpgradeProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSnapshotProperties. +func (m ManagedClusterSnapshotProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "kubernetesVersion", m.KubernetesVersion) - populate(objectMap, "name", m.Name) - populate(objectMap, "osType", m.OSType) - populate(objectMap, "upgrades", m.Upgrades) + populate(objectMap, "creationData", m.CreationData) + populate(objectMap, "managedClusterPropertiesReadOnly", m.ManagedClusterPropertiesReadOnly) + populate(objectMap, "snapshotType", m.SnapshotType) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPoolUpgradeProfile. -func (m *ManagedClusterPoolUpgradeProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSnapshotProperties. +func (m *ManagedClusterSnapshotProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2545,17 +4291,14 @@ func (m *ManagedClusterPoolUpgradeProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "kubernetesVersion": - err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) - delete(rawMsg, key) - case "name": - err = unpopulate(val, "Name", &m.Name) + case "creationData": + err = unpopulate(val, "CreationData", &m.CreationData) delete(rawMsg, key) - case "osType": - err = unpopulate(val, "OSType", &m.OSType) + case "managedClusterPropertiesReadOnly": + err = unpopulate(val, "ManagedClusterPropertiesReadOnly", &m.ManagedClusterPropertiesReadOnly) delete(rawMsg, key) - case "upgrades": - err = unpopulate(val, "Upgrades", &m.Upgrades) + case "snapshotType": + err = unpopulate(val, "SnapshotType", &m.SnapshotType) delete(rawMsg, key) } if err != nil { @@ -2565,16 +4308,18 @@ func (m *ManagedClusterPoolUpgradeProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPoolUpgradeProfileUpgradesItem. -func (m ManagedClusterPoolUpgradeProfileUpgradesItem) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfile. +func (m ManagedClusterStorageProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "isPreview", m.IsPreview) - populate(objectMap, "kubernetesVersion", m.KubernetesVersion) + populate(objectMap, "blobCSIDriver", m.BlobCSIDriver) + populate(objectMap, "diskCSIDriver", m.DiskCSIDriver) + populate(objectMap, "fileCSIDriver", m.FileCSIDriver) + populate(objectMap, "snapshotController", m.SnapshotController) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPoolUpgradeProfileUpgradesItem. -func (m *ManagedClusterPoolUpgradeProfileUpgradesItem) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfile. +func (m *ManagedClusterStorageProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2582,11 +4327,17 @@ func (m *ManagedClusterPoolUpgradeProfileUpgradesItem) UnmarshalJSON(data []byte for key, val := range rawMsg { var err error switch key { - case "isPreview": - err = unpopulate(val, "IsPreview", &m.IsPreview) + case "blobCSIDriver": + err = unpopulate(val, "BlobCSIDriver", &m.BlobCSIDriver) delete(rawMsg, key) - case "kubernetesVersion": - err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) + case "diskCSIDriver": + err = unpopulate(val, "DiskCSIDriver", &m.DiskCSIDriver) + delete(rawMsg, key) + case "fileCSIDriver": + err = unpopulate(val, "FileCSIDriver", &m.FileCSIDriver) + delete(rawMsg, key) + case "snapshotController": + err = unpopulate(val, "SnapshotController", &m.SnapshotController) delete(rawMsg, key) } if err != nil { @@ -2596,51 +4347,15 @@ func (m *ManagedClusterPoolUpgradeProfileUpgradesItem) UnmarshalJSON(data []byte return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterProperties. -func (m ManagedClusterProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileBlobCSIDriver. +func (m ManagedClusterStorageProfileBlobCSIDriver) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "aadProfile", m.AADProfile) - populate(objectMap, "apiServerAccessProfile", m.APIServerAccessProfile) - populate(objectMap, "addonProfiles", m.AddonProfiles) - populate(objectMap, "agentPoolProfiles", m.AgentPoolProfiles) - populate(objectMap, "autoScalerProfile", m.AutoScalerProfile) - populate(objectMap, "autoUpgradeProfile", m.AutoUpgradeProfile) - populate(objectMap, "azureMonitorProfile", m.AzureMonitorProfile) - populate(objectMap, "azurePortalFQDN", m.AzurePortalFQDN) - populate(objectMap, "currentKubernetesVersion", m.CurrentKubernetesVersion) - populate(objectMap, "dnsPrefix", m.DNSPrefix) - populate(objectMap, "disableLocalAccounts", m.DisableLocalAccounts) - populate(objectMap, "diskEncryptionSetID", m.DiskEncryptionSetID) - populate(objectMap, "enablePodSecurityPolicy", m.EnablePodSecurityPolicy) - populate(objectMap, "enableRBAC", m.EnableRBAC) - populate(objectMap, "fqdn", m.Fqdn) - populate(objectMap, "fqdnSubdomain", m.FqdnSubdomain) - populate(objectMap, "httpProxyConfig", m.HTTPProxyConfig) - populate(objectMap, "identityProfile", m.IdentityProfile) - populate(objectMap, "kubernetesVersion", m.KubernetesVersion) - populate(objectMap, "linuxProfile", m.LinuxProfile) - populate(objectMap, "maxAgentPools", m.MaxAgentPools) - populate(objectMap, "networkProfile", m.NetworkProfile) - populate(objectMap, "nodeResourceGroup", m.NodeResourceGroup) - populate(objectMap, "oidcIssuerProfile", m.OidcIssuerProfile) - populate(objectMap, "podIdentityProfile", m.PodIdentityProfile) - populate(objectMap, "powerState", m.PowerState) - populate(objectMap, "privateFQDN", m.PrivateFQDN) - populate(objectMap, "privateLinkResources", m.PrivateLinkResources) - populate(objectMap, "provisioningState", m.ProvisioningState) - populate(objectMap, "publicNetworkAccess", m.PublicNetworkAccess) - populate(objectMap, "securityProfile", m.SecurityProfile) - populate(objectMap, "servicePrincipalProfile", m.ServicePrincipalProfile) - populate(objectMap, "storageProfile", m.StorageProfile) - populate(objectMap, "supportPlan", m.SupportPlan) - populate(objectMap, "upgradeSettings", m.UpgradeSettings) - populate(objectMap, "windowsProfile", m.WindowsProfile) - populate(objectMap, "workloadAutoScalerProfile", m.WorkloadAutoScalerProfile) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterProperties. -func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileBlobCSIDriver. +func (m *ManagedClusterStorageProfileBlobCSIDriver) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2648,116 +4363,39 @@ func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "aadProfile": - err = unpopulate(val, "AADProfile", &m.AADProfile) - delete(rawMsg, key) - case "apiServerAccessProfile": - err = unpopulate(val, "APIServerAccessProfile", &m.APIServerAccessProfile) - delete(rawMsg, key) - case "addonProfiles": - err = unpopulate(val, "AddonProfiles", &m.AddonProfiles) - delete(rawMsg, key) - case "agentPoolProfiles": - err = unpopulate(val, "AgentPoolProfiles", &m.AgentPoolProfiles) - delete(rawMsg, key) - case "autoScalerProfile": - err = unpopulate(val, "AutoScalerProfile", &m.AutoScalerProfile) - delete(rawMsg, key) - case "autoUpgradeProfile": - err = unpopulate(val, "AutoUpgradeProfile", &m.AutoUpgradeProfile) - delete(rawMsg, key) - case "azureMonitorProfile": - err = unpopulate(val, "AzureMonitorProfile", &m.AzureMonitorProfile) - delete(rawMsg, key) - case "azurePortalFQDN": - err = unpopulate(val, "AzurePortalFQDN", &m.AzurePortalFQDN) - delete(rawMsg, key) - case "currentKubernetesVersion": - err = unpopulate(val, "CurrentKubernetesVersion", &m.CurrentKubernetesVersion) - delete(rawMsg, key) - case "dnsPrefix": - err = unpopulate(val, "DNSPrefix", &m.DNSPrefix) - delete(rawMsg, key) - case "disableLocalAccounts": - err = unpopulate(val, "DisableLocalAccounts", &m.DisableLocalAccounts) - delete(rawMsg, key) - case "diskEncryptionSetID": - err = unpopulate(val, "DiskEncryptionSetID", &m.DiskEncryptionSetID) - delete(rawMsg, key) - case "enablePodSecurityPolicy": - err = unpopulate(val, "EnablePodSecurityPolicy", &m.EnablePodSecurityPolicy) - delete(rawMsg, key) - case "enableRBAC": - err = unpopulate(val, "EnableRBAC", &m.EnableRBAC) - delete(rawMsg, key) - case "fqdn": - err = unpopulate(val, "Fqdn", &m.Fqdn) - delete(rawMsg, key) - case "fqdnSubdomain": - err = unpopulate(val, "FqdnSubdomain", &m.FqdnSubdomain) - delete(rawMsg, key) - case "httpProxyConfig": - err = unpopulate(val, "HTTPProxyConfig", &m.HTTPProxyConfig) - delete(rawMsg, key) - case "identityProfile": - err = unpopulate(val, "IdentityProfile", &m.IdentityProfile) - delete(rawMsg, key) - case "kubernetesVersion": - err = unpopulate(val, "KubernetesVersion", &m.KubernetesVersion) - delete(rawMsg, key) - case "linuxProfile": - err = unpopulate(val, "LinuxProfile", &m.LinuxProfile) - delete(rawMsg, key) - case "maxAgentPools": - err = unpopulate(val, "MaxAgentPools", &m.MaxAgentPools) - delete(rawMsg, key) - case "networkProfile": - err = unpopulate(val, "NetworkProfile", &m.NetworkProfile) - delete(rawMsg, key) - case "nodeResourceGroup": - err = unpopulate(val, "NodeResourceGroup", &m.NodeResourceGroup) - delete(rawMsg, key) - case "oidcIssuerProfile": - err = unpopulate(val, "OidcIssuerProfile", &m.OidcIssuerProfile) - delete(rawMsg, key) - case "podIdentityProfile": - err = unpopulate(val, "PodIdentityProfile", &m.PodIdentityProfile) - delete(rawMsg, key) - case "powerState": - err = unpopulate(val, "PowerState", &m.PowerState) - delete(rawMsg, key) - case "privateFQDN": - err = unpopulate(val, "PrivateFQDN", &m.PrivateFQDN) - delete(rawMsg, key) - case "privateLinkResources": - err = unpopulate(val, "PrivateLinkResources", &m.PrivateLinkResources) - delete(rawMsg, key) - case "provisioningState": - err = unpopulate(val, "ProvisioningState", &m.ProvisioningState) - delete(rawMsg, key) - case "publicNetworkAccess": - err = unpopulate(val, "PublicNetworkAccess", &m.PublicNetworkAccess) - delete(rawMsg, key) - case "securityProfile": - err = unpopulate(val, "SecurityProfile", &m.SecurityProfile) - delete(rawMsg, key) - case "servicePrincipalProfile": - err = unpopulate(val, "ServicePrincipalProfile", &m.ServicePrincipalProfile) - delete(rawMsg, key) - case "storageProfile": - err = unpopulate(val, "StorageProfile", &m.StorageProfile) - delete(rawMsg, key) - case "supportPlan": - err = unpopulate(val, "SupportPlan", &m.SupportPlan) - delete(rawMsg, key) - case "upgradeSettings": - err = unpopulate(val, "UpgradeSettings", &m.UpgradeSettings) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) - case "windowsProfile": - err = unpopulate(val, "WindowsProfile", &m.WindowsProfile) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileDiskCSIDriver. +func (m ManagedClusterStorageProfileDiskCSIDriver) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "version", m.Version) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileDiskCSIDriver. +func (m *ManagedClusterStorageProfileDiskCSIDriver) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", m, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) - case "workloadAutoScalerProfile": - err = unpopulate(val, "WorkloadAutoScalerProfile", &m.WorkloadAutoScalerProfile) + case "version": + err = unpopulate(val, "Version", &m.Version) delete(rawMsg, key) } if err != nil { @@ -2767,31 +4405,15 @@ func (m *ManagedClusterProperties) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterPropertiesAutoScalerProfile. -func (m ManagedClusterPropertiesAutoScalerProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileFileCSIDriver. +func (m ManagedClusterStorageProfileFileCSIDriver) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "balance-similar-node-groups", m.BalanceSimilarNodeGroups) - populate(objectMap, "expander", m.Expander) - populate(objectMap, "max-empty-bulk-delete", m.MaxEmptyBulkDelete) - populate(objectMap, "max-graceful-termination-sec", m.MaxGracefulTerminationSec) - populate(objectMap, "max-node-provision-time", m.MaxNodeProvisionTime) - populate(objectMap, "max-total-unready-percentage", m.MaxTotalUnreadyPercentage) - populate(objectMap, "new-pod-scale-up-delay", m.NewPodScaleUpDelay) - populate(objectMap, "ok-total-unready-count", m.OkTotalUnreadyCount) - populate(objectMap, "scale-down-delay-after-add", m.ScaleDownDelayAfterAdd) - populate(objectMap, "scale-down-delay-after-delete", m.ScaleDownDelayAfterDelete) - populate(objectMap, "scale-down-delay-after-failure", m.ScaleDownDelayAfterFailure) - populate(objectMap, "scale-down-unneeded-time", m.ScaleDownUnneededTime) - populate(objectMap, "scale-down-unready-time", m.ScaleDownUnreadyTime) - populate(objectMap, "scale-down-utilization-threshold", m.ScaleDownUtilizationThreshold) - populate(objectMap, "scan-interval", m.ScanInterval) - populate(objectMap, "skip-nodes-with-local-storage", m.SkipNodesWithLocalStorage) - populate(objectMap, "skip-nodes-with-system-pods", m.SkipNodesWithSystemPods) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterPropertiesAutoScalerProfile. -func (m *ManagedClusterPropertiesAutoScalerProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileFileCSIDriver. +func (m *ManagedClusterStorageProfileFileCSIDriver) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2799,56 +4421,8 @@ func (m *ManagedClusterPropertiesAutoScalerProfile) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "balance-similar-node-groups": - err = unpopulate(val, "BalanceSimilarNodeGroups", &m.BalanceSimilarNodeGroups) - delete(rawMsg, key) - case "expander": - err = unpopulate(val, "Expander", &m.Expander) - delete(rawMsg, key) - case "max-empty-bulk-delete": - err = unpopulate(val, "MaxEmptyBulkDelete", &m.MaxEmptyBulkDelete) - delete(rawMsg, key) - case "max-graceful-termination-sec": - err = unpopulate(val, "MaxGracefulTerminationSec", &m.MaxGracefulTerminationSec) - delete(rawMsg, key) - case "max-node-provision-time": - err = unpopulate(val, "MaxNodeProvisionTime", &m.MaxNodeProvisionTime) - delete(rawMsg, key) - case "max-total-unready-percentage": - err = unpopulate(val, "MaxTotalUnreadyPercentage", &m.MaxTotalUnreadyPercentage) - delete(rawMsg, key) - case "new-pod-scale-up-delay": - err = unpopulate(val, "NewPodScaleUpDelay", &m.NewPodScaleUpDelay) - delete(rawMsg, key) - case "ok-total-unready-count": - err = unpopulate(val, "OkTotalUnreadyCount", &m.OkTotalUnreadyCount) - delete(rawMsg, key) - case "scale-down-delay-after-add": - err = unpopulate(val, "ScaleDownDelayAfterAdd", &m.ScaleDownDelayAfterAdd) - delete(rawMsg, key) - case "scale-down-delay-after-delete": - err = unpopulate(val, "ScaleDownDelayAfterDelete", &m.ScaleDownDelayAfterDelete) - delete(rawMsg, key) - case "scale-down-delay-after-failure": - err = unpopulate(val, "ScaleDownDelayAfterFailure", &m.ScaleDownDelayAfterFailure) - delete(rawMsg, key) - case "scale-down-unneeded-time": - err = unpopulate(val, "ScaleDownUnneededTime", &m.ScaleDownUnneededTime) - delete(rawMsg, key) - case "scale-down-unready-time": - err = unpopulate(val, "ScaleDownUnreadyTime", &m.ScaleDownUnreadyTime) - delete(rawMsg, key) - case "scale-down-utilization-threshold": - err = unpopulate(val, "ScaleDownUtilizationThreshold", &m.ScaleDownUtilizationThreshold) - delete(rawMsg, key) - case "scan-interval": - err = unpopulate(val, "ScanInterval", &m.ScanInterval) - delete(rawMsg, key) - case "skip-nodes-with-local-storage": - err = unpopulate(val, "SkipNodesWithLocalStorage", &m.SkipNodesWithLocalStorage) - delete(rawMsg, key) - case "skip-nodes-with-system-pods": - err = unpopulate(val, "SkipNodesWithSystemPods", &m.SkipNodesWithSystemPods) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -2858,16 +4432,15 @@ func (m *ManagedClusterPropertiesAutoScalerProfile) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSKU. -func (m ManagedClusterSKU) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileSnapshotController. +func (m ManagedClusterStorageProfileSnapshotController) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "name", m.Name) - populate(objectMap, "tier", m.Tier) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSKU. -func (m *ManagedClusterSKU) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileSnapshotController. +func (m *ManagedClusterStorageProfileSnapshotController) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2875,11 +4448,8 @@ func (m *ManagedClusterSKU) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "name": - err = unpopulate(val, "Name", &m.Name) - delete(rawMsg, key) - case "tier": - err = unpopulate(val, "Tier", &m.Tier) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -2889,18 +4459,18 @@ func (m *ManagedClusterSKU) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfile. -func (m ManagedClusterSecurityProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterUpgradeProfile. +func (m ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "azureKeyVaultKms", m.AzureKeyVaultKms) - populate(objectMap, "defender", m.Defender) - populate(objectMap, "imageCleaner", m.ImageCleaner) - populate(objectMap, "workloadIdentity", m.WorkloadIdentity) + populate(objectMap, "id", m.ID) + populate(objectMap, "name", m.Name) + populate(objectMap, "properties", m.Properties) + populate(objectMap, "type", m.Type) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfile. -func (m *ManagedClusterSecurityProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterUpgradeProfile. +func (m *ManagedClusterUpgradeProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2908,17 +4478,17 @@ func (m *ManagedClusterSecurityProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "azureKeyVaultKms": - err = unpopulate(val, "AzureKeyVaultKms", &m.AzureKeyVaultKms) + case "id": + err = unpopulate(val, "ID", &m.ID) delete(rawMsg, key) - case "defender": - err = unpopulate(val, "Defender", &m.Defender) + case "name": + err = unpopulate(val, "Name", &m.Name) delete(rawMsg, key) - case "imageCleaner": - err = unpopulate(val, "ImageCleaner", &m.ImageCleaner) + case "properties": + err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) - case "workloadIdentity": - err = unpopulate(val, "WorkloadIdentity", &m.WorkloadIdentity) + case "type": + err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) } if err != nil { @@ -2928,16 +4498,16 @@ func (m *ManagedClusterSecurityProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileDefender. -func (m ManagedClusterSecurityProfileDefender) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterUpgradeProfileProperties. +func (m ManagedClusterUpgradeProfileProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "logAnalyticsWorkspaceResourceId", m.LogAnalyticsWorkspaceResourceID) - populate(objectMap, "securityMonitoring", m.SecurityMonitoring) + populate(objectMap, "agentPoolProfiles", m.AgentPoolProfiles) + populate(objectMap, "controlPlaneProfile", m.ControlPlaneProfile) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileDefender. -func (m *ManagedClusterSecurityProfileDefender) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterUpgradeProfileProperties. +func (m *ManagedClusterUpgradeProfileProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2945,11 +4515,11 @@ func (m *ManagedClusterSecurityProfileDefender) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "logAnalyticsWorkspaceResourceId": - err = unpopulate(val, "LogAnalyticsWorkspaceResourceID", &m.LogAnalyticsWorkspaceResourceID) + case "agentPoolProfiles": + err = unpopulate(val, "AgentPoolProfiles", &m.AgentPoolProfiles) delete(rawMsg, key) - case "securityMonitoring": - err = unpopulate(val, "SecurityMonitoring", &m.SecurityMonitoring) + case "controlPlaneProfile": + err = unpopulate(val, "ControlPlaneProfile", &m.ControlPlaneProfile) delete(rawMsg, key) } if err != nil { @@ -2959,15 +4529,19 @@ func (m *ManagedClusterSecurityProfileDefender) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileDefenderSecurityMonitoring. -func (m ManagedClusterSecurityProfileDefenderSecurityMonitoring) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWindowsProfile. +func (m ManagedClusterWindowsProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "adminPassword", m.AdminPassword) + populate(objectMap, "adminUsername", m.AdminUsername) + populate(objectMap, "enableCSIProxy", m.EnableCSIProxy) + populate(objectMap, "gmsaProfile", m.GmsaProfile) + populate(objectMap, "licenseType", m.LicenseType) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileDefenderSecurityMonitoring. -func (m *ManagedClusterSecurityProfileDefenderSecurityMonitoring) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWindowsProfile. +func (m *ManagedClusterWindowsProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -2975,8 +4549,20 @@ func (m *ManagedClusterSecurityProfileDefenderSecurityMonitoring) UnmarshalJSON( for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "adminPassword": + err = unpopulate(val, "AdminPassword", &m.AdminPassword) + delete(rawMsg, key) + case "adminUsername": + err = unpopulate(val, "AdminUsername", &m.AdminUsername) + delete(rawMsg, key) + case "enableCSIProxy": + err = unpopulate(val, "EnableCSIProxy", &m.EnableCSIProxy) + delete(rawMsg, key) + case "gmsaProfile": + err = unpopulate(val, "GmsaProfile", &m.GmsaProfile) + delete(rawMsg, key) + case "licenseType": + err = unpopulate(val, "LicenseType", &m.LicenseType) delete(rawMsg, key) } if err != nil { @@ -2986,16 +4572,16 @@ func (m *ManagedClusterSecurityProfileDefenderSecurityMonitoring) UnmarshalJSON( return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileImageCleaner. -func (m ManagedClusterSecurityProfileImageCleaner) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfile. +func (m ManagedClusterWorkloadAutoScalerProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) - populate(objectMap, "intervalHours", m.IntervalHours) + populate(objectMap, "keda", m.Keda) + populate(objectMap, "verticalPodAutoscaler", m.VerticalPodAutoscaler) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileImageCleaner. -func (m *ManagedClusterSecurityProfileImageCleaner) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfile. +func (m *ManagedClusterWorkloadAutoScalerProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -3003,11 +4589,11 @@ func (m *ManagedClusterSecurityProfileImageCleaner) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "keda": + err = unpopulate(val, "Keda", &m.Keda) delete(rawMsg, key) - case "intervalHours": - err = unpopulate(val, "IntervalHours", &m.IntervalHours) + case "verticalPodAutoscaler": + err = unpopulate(val, "VerticalPodAutoscaler", &m.VerticalPodAutoscaler) delete(rawMsg, key) } if err != nil { @@ -3017,15 +4603,15 @@ func (m *ManagedClusterSecurityProfileImageCleaner) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterSecurityProfileWorkloadIdentity. -func (m ManagedClusterSecurityProfileWorkloadIdentity) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfileKeda. +func (m ManagedClusterWorkloadAutoScalerProfileKeda) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterSecurityProfileWorkloadIdentity. -func (m *ManagedClusterSecurityProfileWorkloadIdentity) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfileKeda. +func (m *ManagedClusterWorkloadAutoScalerProfileKeda) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -3044,16 +4630,15 @@ func (m *ManagedClusterSecurityProfileWorkloadIdentity) UnmarshalJSON(data []byt return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterServicePrincipalProfile. -func (m ManagedClusterServicePrincipalProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. +func (m ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientId", m.ClientID) - populate(objectMap, "secret", m.Secret) + populate(objectMap, "enabled", m.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterServicePrincipalProfile. -func (m *ManagedClusterServicePrincipalProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. +func (m *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -3061,11 +4646,8 @@ func (m *ManagedClusterServicePrincipalProfile) UnmarshalJSON(data []byte) error for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &m.ClientID) - delete(rawMsg, key) - case "secret": - err = unpopulate(val, "Secret", &m.Secret) + case "enabled": + err = unpopulate(val, "Enabled", &m.Enabled) delete(rawMsg, key) } if err != nil { @@ -3075,18 +4657,16 @@ func (m *ManagedClusterServicePrincipalProfile) UnmarshalJSON(data []byte) error return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfile. -func (m ManagedClusterStorageProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentityUserAssignedIdentitiesValue. +func (m ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "blobCSIDriver", m.BlobCSIDriver) - populate(objectMap, "diskCSIDriver", m.DiskCSIDriver) - populate(objectMap, "fileCSIDriver", m.FileCSIDriver) - populate(objectMap, "snapshotController", m.SnapshotController) + populate(objectMap, "clientId", m.ClientID) + populate(objectMap, "principalId", m.PrincipalID) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfile. -func (m *ManagedClusterStorageProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentityUserAssignedIdentitiesValue. +func (m *ManagedServiceIdentityUserAssignedIdentitiesValue) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -3094,17 +4674,11 @@ func (m *ManagedClusterStorageProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "blobCSIDriver": - err = unpopulate(val, "BlobCSIDriver", &m.BlobCSIDriver) - delete(rawMsg, key) - case "diskCSIDriver": - err = unpopulate(val, "DiskCSIDriver", &m.DiskCSIDriver) - delete(rawMsg, key) - case "fileCSIDriver": - err = unpopulate(val, "FileCSIDriver", &m.FileCSIDriver) + case "clientId": + err = unpopulate(val, "ClientID", &m.ClientID) delete(rawMsg, key) - case "snapshotController": - err = unpopulate(val, "SnapshotController", &m.SnapshotController) + case "principalId": + err = unpopulate(val, "PrincipalID", &m.PrincipalID) delete(rawMsg, key) } if err != nil { @@ -3114,15 +4688,17 @@ func (m *ManagedClusterStorageProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileBlobCSIDriver. -func (m ManagedClusterStorageProfileBlobCSIDriver) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshRevision. +func (m MeshRevision) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) + 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 ManagedClusterStorageProfileBlobCSIDriver. -func (m *ManagedClusterStorageProfileBlobCSIDriver) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevision. +func (m *MeshRevision) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -3130,8 +4706,14 @@ func (m *ManagedClusterStorageProfileBlobCSIDriver) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + 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 { @@ -3141,15 +4723,19 @@ func (m *ManagedClusterStorageProfileBlobCSIDriver) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileDiskCSIDriver. -func (m ManagedClusterStorageProfileDiskCSIDriver) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfile. +func (m MeshRevisionProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) + 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 ManagedClusterStorageProfileDiskCSIDriver. -func (m *ManagedClusterStorageProfileDiskCSIDriver) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshRevisionProfile. +func (m *MeshRevisionProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -3157,8 +4743,20 @@ func (m *ManagedClusterStorageProfileDiskCSIDriver) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "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 { @@ -3168,15 +4766,16 @@ func (m *ManagedClusterStorageProfileDiskCSIDriver) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileFileCSIDriver. -func (m ManagedClusterStorageProfileFileCSIDriver) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfileList. +func (m MeshRevisionProfileList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileFileCSIDriver. -func (m *ManagedClusterStorageProfileFileCSIDriver) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type 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) @@ -3184,8 +4783,11 @@ func (m *ManagedClusterStorageProfileFileCSIDriver) UnmarshalJSON(data []byte) e for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { @@ -3195,15 +4797,15 @@ func (m *ManagedClusterStorageProfileFileCSIDriver) UnmarshalJSON(data []byte) e return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterStorageProfileSnapshotController. -func (m ManagedClusterStorageProfileSnapshotController) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshRevisionProfileProperties. +func (m MeshRevisionProfileProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "meshRevisions", m.MeshRevisions) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterStorageProfileSnapshotController. -func (m *ManagedClusterStorageProfileSnapshotController) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type 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) @@ -3211,8 +4813,8 @@ func (m *ManagedClusterStorageProfileSnapshotController) UnmarshalJSON(data []by for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "meshRevisions": + err = unpopulate(val, "MeshRevisions", &m.MeshRevisions) delete(rawMsg, key) } if err != nil { @@ -3222,18 +4824,19 @@ func (m *ManagedClusterStorageProfileSnapshotController) UnmarshalJSON(data []by return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterUpgradeProfile. -func (m ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type 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 ManagedClusterUpgradeProfile. -func (m *ManagedClusterUpgradeProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshUpgradeProfile. +func (m *MeshUpgradeProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -3250,6 +4853,9 @@ func (m *ManagedClusterUpgradeProfile) UnmarshalJSON(data []byte) error { case "properties": err = unpopulate(val, "Properties", &m.Properties) delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &m.SystemData) + delete(rawMsg, key) case "type": err = unpopulate(val, "Type", &m.Type) delete(rawMsg, key) @@ -3261,16 +4867,16 @@ func (m *ManagedClusterUpgradeProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterUpgradeProfileProperties. -func (m ManagedClusterUpgradeProfileProperties) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshUpgradeProfileList. +func (m MeshUpgradeProfileList) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "agentPoolProfiles", m.AgentPoolProfiles) - populate(objectMap, "controlPlaneProfile", m.ControlPlaneProfile) + populate(objectMap, "nextLink", m.NextLink) + populate(objectMap, "value", m.Value) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterUpgradeProfileProperties. -func (m *ManagedClusterUpgradeProfileProperties) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type 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) @@ -3278,11 +4884,11 @@ func (m *ManagedClusterUpgradeProfileProperties) UnmarshalJSON(data []byte) erro for key, val := range rawMsg { var err error switch key { - case "agentPoolProfiles": - err = unpopulate(val, "AgentPoolProfiles", &m.AgentPoolProfiles) + case "nextLink": + err = unpopulate(val, "NextLink", &m.NextLink) delete(rawMsg, key) - case "controlPlaneProfile": - err = unpopulate(val, "ControlPlaneProfile", &m.ControlPlaneProfile) + case "value": + err = unpopulate(val, "Value", &m.Value) delete(rawMsg, key) } if err != nil { @@ -3292,19 +4898,17 @@ func (m *ManagedClusterUpgradeProfileProperties) UnmarshalJSON(data []byte) erro return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWindowsProfile. -func (m ManagedClusterWindowsProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type MeshUpgradeProfileProperties. +func (m MeshUpgradeProfileProperties) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "adminPassword", m.AdminPassword) - populate(objectMap, "adminUsername", m.AdminUsername) - populate(objectMap, "enableCSIProxy", m.EnableCSIProxy) - populate(objectMap, "gmsaProfile", m.GmsaProfile) - populate(objectMap, "licenseType", m.LicenseType) + populate(objectMap, "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 ManagedClusterWindowsProfile. -func (m *ManagedClusterWindowsProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type MeshUpgradeProfileProperties. +func (m *MeshUpgradeProfileProperties) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", m, err) @@ -3312,20 +4916,14 @@ func (m *ManagedClusterWindowsProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "adminPassword": - err = unpopulate(val, "AdminPassword", &m.AdminPassword) - delete(rawMsg, key) - case "adminUsername": - err = unpopulate(val, "AdminUsername", &m.AdminUsername) - delete(rawMsg, key) - case "enableCSIProxy": - err = unpopulate(val, "EnableCSIProxy", &m.EnableCSIProxy) + case "compatibleWith": + err = unpopulate(val, "CompatibleWith", &m.CompatibleWith) delete(rawMsg, key) - case "gmsaProfile": - err = unpopulate(val, "GmsaProfile", &m.GmsaProfile) + case "revision": + err = unpopulate(val, "Revision", &m.Revision) delete(rawMsg, key) - case "licenseType": - err = unpopulate(val, "LicenseType", &m.LicenseType) + case "upgrades": + err = unpopulate(val, "Upgrades", &m.Upgrades) delete(rawMsg, key) } if err != nil { @@ -3335,145 +4933,214 @@ func (m *ManagedClusterWindowsProfile) UnmarshalJSON(data []byte) error { return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfile. -func (m ManagedClusterWorkloadAutoScalerProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkMonitoring. +func (n NetworkMonitoring) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "keda", m.Keda) - populate(objectMap, "verticalPodAutoscaler", m.VerticalPodAutoscaler) + populate(objectMap, "enabled", n.Enabled) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfile. -func (m *ManagedClusterWorkloadAutoScalerProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkMonitoring. +func (n *NetworkMonitoring) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "keda": - err = unpopulate(val, "Keda", &m.Keda) - delete(rawMsg, key) - case "verticalPodAutoscaler": - err = unpopulate(val, "VerticalPodAutoscaler", &m.VerticalPodAutoscaler) + case "enabled": + err = unpopulate(val, "Enabled", &n.Enabled) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfileKeda. -func (m ManagedClusterWorkloadAutoScalerProfileKeda) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkProfile. +func (n NetworkProfile) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "dnsServiceIP", n.DNSServiceIP) + populate(objectMap, "ipFamilies", n.IPFamilies) + populate(objectMap, "kubeProxyConfig", n.KubeProxyConfig) + populate(objectMap, "loadBalancerProfile", n.LoadBalancerProfile) + populate(objectMap, "loadBalancerSku", n.LoadBalancerSKU) + populate(objectMap, "monitoring", n.Monitoring) + populate(objectMap, "natGatewayProfile", n.NatGatewayProfile) + populate(objectMap, "networkDataplane", n.NetworkDataplane) + populate(objectMap, "networkMode", n.NetworkMode) + populate(objectMap, "networkPlugin", n.NetworkPlugin) + populate(objectMap, "networkPluginMode", n.NetworkPluginMode) + populate(objectMap, "networkPolicy", n.NetworkPolicy) + populate(objectMap, "outboundType", n.OutboundType) + populate(objectMap, "podCidr", n.PodCidr) + populate(objectMap, "podCidrs", n.PodCidrs) + populate(objectMap, "serviceCidr", n.ServiceCidr) + populate(objectMap, "serviceCidrs", n.ServiceCidrs) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfileKeda. -func (m *ManagedClusterWorkloadAutoScalerProfileKeda) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile. +func (n *NetworkProfile) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "dnsServiceIP": + err = unpopulate(val, "DNSServiceIP", &n.DNSServiceIP) + delete(rawMsg, key) + case "ipFamilies": + err = unpopulate(val, "IPFamilies", &n.IPFamilies) + delete(rawMsg, key) + case "kubeProxyConfig": + err = unpopulate(val, "KubeProxyConfig", &n.KubeProxyConfig) + delete(rawMsg, key) + case "loadBalancerProfile": + err = unpopulate(val, "LoadBalancerProfile", &n.LoadBalancerProfile) + delete(rawMsg, key) + case "loadBalancerSku": + err = unpopulate(val, "LoadBalancerSKU", &n.LoadBalancerSKU) + delete(rawMsg, key) + case "monitoring": + err = unpopulate(val, "Monitoring", &n.Monitoring) + delete(rawMsg, key) + case "natGatewayProfile": + err = unpopulate(val, "NatGatewayProfile", &n.NatGatewayProfile) + delete(rawMsg, key) + case "networkDataplane": + err = unpopulate(val, "NetworkDataplane", &n.NetworkDataplane) + delete(rawMsg, key) + case "networkMode": + err = unpopulate(val, "NetworkMode", &n.NetworkMode) + delete(rawMsg, key) + case "networkPlugin": + err = unpopulate(val, "NetworkPlugin", &n.NetworkPlugin) + delete(rawMsg, key) + case "networkPluginMode": + err = unpopulate(val, "NetworkPluginMode", &n.NetworkPluginMode) + delete(rawMsg, key) + case "networkPolicy": + err = unpopulate(val, "NetworkPolicy", &n.NetworkPolicy) + delete(rawMsg, key) + case "outboundType": + err = unpopulate(val, "OutboundType", &n.OutboundType) + delete(rawMsg, key) + case "podCidr": + err = unpopulate(val, "PodCidr", &n.PodCidr) + delete(rawMsg, key) + case "podCidrs": + err = unpopulate(val, "PodCidrs", &n.PodCidrs) + delete(rawMsg, key) + case "serviceCidr": + err = unpopulate(val, "ServiceCidr", &n.ServiceCidr) + delete(rawMsg, key) + case "serviceCidrs": + err = unpopulate(val, "ServiceCidrs", &n.ServiceCidrs) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. -func (m ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkProfileForSnapshot. +func (n NetworkProfileForSnapshot) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "enabled", m.Enabled) + populate(objectMap, "loadBalancerSku", n.LoadBalancerSKU) + populate(objectMap, "networkMode", n.NetworkMode) + populate(objectMap, "networkPlugin", n.NetworkPlugin) + populate(objectMap, "networkPluginMode", n.NetworkPluginMode) + populate(objectMap, "networkPolicy", n.NetworkPolicy) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler. -func (m *ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileForSnapshot. +func (n *NetworkProfileForSnapshot) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "enabled": - err = unpopulate(val, "Enabled", &m.Enabled) + case "loadBalancerSku": + err = unpopulate(val, "LoadBalancerSKU", &n.LoadBalancerSKU) + delete(rawMsg, key) + case "networkMode": + err = unpopulate(val, "NetworkMode", &n.NetworkMode) + delete(rawMsg, key) + case "networkPlugin": + err = unpopulate(val, "NetworkPlugin", &n.NetworkPlugin) + delete(rawMsg, key) + case "networkPluginMode": + err = unpopulate(val, "NetworkPluginMode", &n.NetworkPluginMode) + delete(rawMsg, key) + case "networkPolicy": + err = unpopulate(val, "NetworkPolicy", &n.NetworkPolicy) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type ManagedServiceIdentityUserAssignedIdentitiesValue. -func (m ManagedServiceIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkProfileKubeProxyConfig. +func (n NetworkProfileKubeProxyConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "clientId", m.ClientID) - populate(objectMap, "principalId", m.PrincipalID) + populate(objectMap, "enabled", n.Enabled) + populate(objectMap, "ipvsConfig", n.IpvsConfig) + populate(objectMap, "mode", n.Mode) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type ManagedServiceIdentityUserAssignedIdentitiesValue. -func (m *ManagedServiceIdentityUserAssignedIdentitiesValue) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileKubeProxyConfig. +func (n *NetworkProfileKubeProxyConfig) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } for key, val := range rawMsg { var err error switch key { - case "clientId": - err = unpopulate(val, "ClientID", &m.ClientID) + case "enabled": + err = unpopulate(val, "Enabled", &n.Enabled) + delete(rawMsg, key) + case "ipvsConfig": + err = unpopulate(val, "IpvsConfig", &n.IpvsConfig) delete(rawMsg, key) - case "principalId": - err = unpopulate(val, "PrincipalID", &m.PrincipalID) + case "mode": + err = unpopulate(val, "Mode", &n.Mode) delete(rawMsg, key) } if err != nil { - return fmt.Errorf("unmarshalling type %T: %v", m, err) + return fmt.Errorf("unmarshalling type %T: %v", n, err) } } return nil } -// MarshalJSON implements the json.Marshaller interface for type NetworkProfile. -func (n NetworkProfile) MarshalJSON() ([]byte, error) { +// MarshalJSON implements the json.Marshaller interface for type NetworkProfileKubeProxyConfigIpvsConfig. +func (n NetworkProfileKubeProxyConfigIpvsConfig) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) - populate(objectMap, "dnsServiceIP", n.DNSServiceIP) - populate(objectMap, "ipFamilies", n.IPFamilies) - populate(objectMap, "loadBalancerProfile", n.LoadBalancerProfile) - populate(objectMap, "loadBalancerSku", n.LoadBalancerSKU) - populate(objectMap, "natGatewayProfile", n.NatGatewayProfile) - populate(objectMap, "networkDataplane", n.NetworkDataplane) - populate(objectMap, "networkMode", n.NetworkMode) - populate(objectMap, "networkPlugin", n.NetworkPlugin) - populate(objectMap, "networkPluginMode", n.NetworkPluginMode) - populate(objectMap, "networkPolicy", n.NetworkPolicy) - populate(objectMap, "outboundType", n.OutboundType) - populate(objectMap, "podCidr", n.PodCidr) - populate(objectMap, "podCidrs", n.PodCidrs) - populate(objectMap, "serviceCidr", n.ServiceCidr) - populate(objectMap, "serviceCidrs", n.ServiceCidrs) + populate(objectMap, "scheduler", n.Scheduler) + populate(objectMap, "tcpFinTimeoutSeconds", n.TCPFinTimeoutSeconds) + populate(objectMap, "tcpTimeoutSeconds", n.TCPTimeoutSeconds) + populate(objectMap, "udpTimeoutSeconds", n.UDPTimeoutSeconds) return json.Marshal(objectMap) } -// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile. -func (n *NetworkProfile) UnmarshalJSON(data []byte) error { +// UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfileKubeProxyConfigIpvsConfig. +func (n *NetworkProfileKubeProxyConfigIpvsConfig) UnmarshalJSON(data []byte) error { var rawMsg map[string]json.RawMessage if err := json.Unmarshal(data, &rawMsg); err != nil { return fmt.Errorf("unmarshalling type %T: %v", n, err) @@ -3481,50 +5148,17 @@ func (n *NetworkProfile) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { - case "dnsServiceIP": - err = unpopulate(val, "DNSServiceIP", &n.DNSServiceIP) - delete(rawMsg, key) - case "ipFamilies": - err = unpopulate(val, "IPFamilies", &n.IPFamilies) - delete(rawMsg, key) - case "loadBalancerProfile": - err = unpopulate(val, "LoadBalancerProfile", &n.LoadBalancerProfile) + case "scheduler": + err = unpopulate(val, "Scheduler", &n.Scheduler) delete(rawMsg, key) - case "loadBalancerSku": - err = unpopulate(val, "LoadBalancerSKU", &n.LoadBalancerSKU) - delete(rawMsg, key) - case "natGatewayProfile": - err = unpopulate(val, "NatGatewayProfile", &n.NatGatewayProfile) - delete(rawMsg, key) - case "networkDataplane": - err = unpopulate(val, "NetworkDataplane", &n.NetworkDataplane) - delete(rawMsg, key) - case "networkMode": - err = unpopulate(val, "NetworkMode", &n.NetworkMode) - delete(rawMsg, key) - case "networkPlugin": - err = unpopulate(val, "NetworkPlugin", &n.NetworkPlugin) - delete(rawMsg, key) - case "networkPluginMode": - err = unpopulate(val, "NetworkPluginMode", &n.NetworkPluginMode) - delete(rawMsg, key) - case "networkPolicy": - err = unpopulate(val, "NetworkPolicy", &n.NetworkPolicy) - delete(rawMsg, key) - case "outboundType": - err = unpopulate(val, "OutboundType", &n.OutboundType) - delete(rawMsg, key) - case "podCidr": - err = unpopulate(val, "PodCidr", &n.PodCidr) - delete(rawMsg, key) - case "podCidrs": - err = unpopulate(val, "PodCidrs", &n.PodCidrs) + case "tcpFinTimeoutSeconds": + err = unpopulate(val, "TCPFinTimeoutSeconds", &n.TCPFinTimeoutSeconds) delete(rawMsg, key) - case "serviceCidr": - err = unpopulate(val, "ServiceCidr", &n.ServiceCidr) + case "tcpTimeoutSeconds": + err = unpopulate(val, "TCPTimeoutSeconds", &n.TCPTimeoutSeconds) delete(rawMsg, key) - case "serviceCidrs": - err = unpopulate(val, "ServiceCidrs", &n.ServiceCidrs) + case "udpTimeoutSeconds": + err = unpopulate(val, "UDPTimeoutSeconds", &n.UDPTimeoutSeconds) delete(rawMsg, key) } if err != nil { @@ -3794,6 +5428,41 @@ func (o *OutboundEnvironmentEndpointCollection) UnmarshalJSON(data []byte) error return nil } +// MarshalJSON implements the json.Marshaller interface for type PortRange. +func (p PortRange) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "portEnd", p.PortEnd) + populate(objectMap, "portStart", p.PortStart) + populate(objectMap, "protocol", p.Protocol) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PortRange. +func (p *PortRange) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "portEnd": + err = unpopulate(val, "PortEnd", &p.PortEnd) + delete(rawMsg, key) + case "portStart": + err = unpopulate(val, "PortStart", &p.PortStart) + delete(rawMsg, key) + case "protocol": + err = unpopulate(val, "Protocol", &p.Protocol) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", p, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type PowerState. func (p PowerState) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -4275,6 +5944,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) @@ -4683,6 +6383,224 @@ func (t *TimeSpan) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type TrustedAccessRole. +func (t TrustedAccessRole) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "name", t.Name) + populate(objectMap, "rules", t.Rules) + populate(objectMap, "sourceResourceType", t.SourceResourceType) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrustedAccessRole. +func (t *TrustedAccessRole) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "rules": + err = unpopulate(val, "Rules", &t.Rules) + delete(rawMsg, key) + case "sourceResourceType": + err = unpopulate(val, "SourceResourceType", &t.SourceResourceType) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrustedAccessRoleBinding. +func (t TrustedAccessRoleBinding) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", t.ID) + populate(objectMap, "name", t.Name) + populate(objectMap, "properties", t.Properties) + populate(objectMap, "systemData", t.SystemData) + populate(objectMap, "type", t.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrustedAccessRoleBinding. +func (t *TrustedAccessRoleBinding) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &t.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &t.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &t.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &t.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &t.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrustedAccessRoleBindingListResult. +func (t TrustedAccessRoleBindingListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrustedAccessRoleBindingListResult. +func (t *TrustedAccessRoleBindingListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrustedAccessRoleBindingProperties. +func (t TrustedAccessRoleBindingProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", t.ProvisioningState) + populate(objectMap, "roles", t.Roles) + populate(objectMap, "sourceResourceId", t.SourceResourceID) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrustedAccessRoleBindingProperties. +func (t *TrustedAccessRoleBindingProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &t.ProvisioningState) + delete(rawMsg, key) + case "roles": + err = unpopulate(val, "Roles", &t.Roles) + delete(rawMsg, key) + case "sourceResourceId": + err = unpopulate(val, "SourceResourceID", &t.SourceResourceID) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrustedAccessRoleListResult. +func (t TrustedAccessRoleListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", t.NextLink) + populate(objectMap, "value", t.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrustedAccessRoleListResult. +func (t *TrustedAccessRoleListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &t.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &t.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type TrustedAccessRoleRule. +func (t TrustedAccessRoleRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "apiGroups", t.APIGroups) + populate(objectMap, "nonResourceURLs", t.NonResourceURLs) + populate(objectMap, "resourceNames", t.ResourceNames) + populate(objectMap, "resources", t.Resources) + populate(objectMap, "verbs", t.Verbs) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type TrustedAccessRoleRule. +func (t *TrustedAccessRoleRule) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + for key, val := range rawMsg { + var err error + switch key { + case "apiGroups": + err = unpopulate(val, "APIGroups", &t.APIGroups) + delete(rawMsg, key) + case "nonResourceURLs": + err = unpopulate(val, "NonResourceURLs", &t.NonResourceURLs) + delete(rawMsg, key) + case "resourceNames": + err = unpopulate(val, "ResourceNames", &t.ResourceNames) + delete(rawMsg, key) + case "resources": + err = unpopulate(val, "Resources", &t.Resources) + delete(rawMsg, key) + case "verbs": + err = unpopulate(val, "Verbs", &t.Verbs) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %v", t, err) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type UpgradeOverrideSettings. func (u UpgradeOverrideSettings) 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..74be0a5d11b9 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-07-02-preview // - 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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go index e31ef4d5fcef..2243b4ae8cb3 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/operations_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/Operation_List.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/Operation_List.json func ExampleOperationsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/options.go b/sdk/resourcemanager/containerservice/armcontainerservice/options.go index 83203afcc4d0..c74e0306c8c6 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/options.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/options.go @@ -24,6 +24,9 @@ type AgentPoolsClientBeginCreateOrUpdateOptions struct { // AgentPoolsClientBeginDeleteOptions contains the optional parameters for the AgentPoolsClient.BeginDelete method. type AgentPoolsClientBeginDeleteOptions struct { + // ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget + IgnorePodDisruptionBudget *bool + // Resumes the LRO from the provided token. ResumeToken string } @@ -56,6 +59,16 @@ type AgentPoolsClientListOptions struct { // placeholder for future optional parameters } +// MachinesClientGetOptions contains the optional parameters for the MachinesClient.Get method. +type MachinesClientGetOptions struct { + // placeholder for future optional parameters +} + +// MachinesClientListOptions contains the optional parameters for the MachinesClient.NewListPager method. +type MachinesClientListOptions struct { + // placeholder for future optional parameters +} + // MaintenanceConfigurationsClientCreateOrUpdateOptions contains the optional parameters for the MaintenanceConfigurationsClient.CreateOrUpdate // method. type MaintenanceConfigurationsClientCreateOrUpdateOptions struct { @@ -80,6 +93,41 @@ type MaintenanceConfigurationsClientListByManagedClusterOptions struct { // placeholder for future optional parameters } +// ManagedClusterSnapshotsClientCreateOrUpdateOptions contains the optional parameters for the ManagedClusterSnapshotsClient.CreateOrUpdate +// method. +type ManagedClusterSnapshotsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// ManagedClusterSnapshotsClientDeleteOptions contains the optional parameters for the ManagedClusterSnapshotsClient.Delete +// method. +type ManagedClusterSnapshotsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// ManagedClusterSnapshotsClientGetOptions contains the optional parameters for the ManagedClusterSnapshotsClient.Get method. +type ManagedClusterSnapshotsClientGetOptions struct { + // placeholder for future optional parameters +} + +// ManagedClusterSnapshotsClientListByResourceGroupOptions contains the optional parameters for the ManagedClusterSnapshotsClient.NewListByResourceGroupPager +// method. +type ManagedClusterSnapshotsClientListByResourceGroupOptions struct { + // placeholder for future optional parameters +} + +// ManagedClusterSnapshotsClientListOptions contains the optional parameters for the ManagedClusterSnapshotsClient.NewListPager +// method. +type ManagedClusterSnapshotsClientListOptions struct { + // placeholder for future optional parameters +} + +// ManagedClusterSnapshotsClientUpdateTagsOptions contains the optional parameters for the ManagedClusterSnapshotsClient.UpdateTags +// method. +type ManagedClusterSnapshotsClientUpdateTagsOptions struct { + // placeholder for future optional parameters +} + // ManagedClustersClientBeginAbortLatestOperationOptions contains the optional parameters for the ManagedClustersClient.BeginAbortLatestOperation // method. type ManagedClustersClientBeginAbortLatestOperationOptions struct { @@ -96,6 +144,9 @@ type ManagedClustersClientBeginCreateOrUpdateOptions struct { // ManagedClustersClientBeginDeleteOptions contains the optional parameters for the ManagedClustersClient.BeginDelete method. type ManagedClustersClientBeginDeleteOptions struct { + // ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget + IgnorePodDisruptionBudget *bool + // Resumes the LRO from the provided token. ResumeToken string } @@ -166,6 +217,24 @@ type ManagedClustersClientGetCommandResultOptions struct { // placeholder for future optional parameters } +// ManagedClustersClientGetGuardrailsVersionsOptions contains the optional parameters for the ManagedClustersClient.GetGuardrailsVersions +// method. +type ManagedClustersClientGetGuardrailsVersionsOptions struct { + // placeholder for future optional parameters +} + +// ManagedClustersClientGetMeshRevisionProfileOptions contains the optional parameters for the ManagedClustersClient.GetMeshRevisionProfile +// method. +type ManagedClustersClientGetMeshRevisionProfileOptions struct { + // 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 @@ -215,12 +284,30 @@ type ManagedClustersClientListClusterUserCredentialsOptions struct { ServerFqdn *string } +// ManagedClustersClientListGuardrailsVersionsOptions contains the optional parameters for the ManagedClustersClient.NewListGuardrailsVersionsPager +// method. +type ManagedClustersClientListGuardrailsVersionsOptions struct { + // placeholder for future optional parameters +} + // ManagedClustersClientListKubernetesVersionsOptions contains the optional parameters for the ManagedClustersClient.ListKubernetesVersions // method. type ManagedClustersClientListKubernetesVersionsOptions struct { // 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 @@ -303,3 +390,32 @@ type SnapshotsClientListOptions struct { type SnapshotsClientUpdateTagsOptions struct { // placeholder for future optional parameters } + +// TrustedAccessRoleBindingsClientCreateOrUpdateOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.CreateOrUpdate +// method. +type TrustedAccessRoleBindingsClientCreateOrUpdateOptions struct { + // placeholder for future optional parameters +} + +// TrustedAccessRoleBindingsClientDeleteOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.Delete +// method. +type TrustedAccessRoleBindingsClientDeleteOptions struct { + // placeholder for future optional parameters +} + +// TrustedAccessRoleBindingsClientGetOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.Get +// method. +type TrustedAccessRoleBindingsClientGetOptions struct { + // placeholder for future optional parameters +} + +// TrustedAccessRoleBindingsClientListOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.NewListPager +// method. +type TrustedAccessRoleBindingsClientListOptions struct { + // placeholder for future optional parameters +} + +// TrustedAccessRolesClientListOptions contains the optional parameters for the TrustedAccessRolesClient.NewListPager method. +type TrustedAccessRolesClientListOptions 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..5c2afda346e4 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-07-02-preview // - 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-07-02-preview 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-07-02-preview") 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-07-02-preview // - 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-07-02-preview") 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-07-02-preview // - 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-07-02-preview") 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-07-02-preview // - 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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client_example_test.go index 2d67a5e34c6d..7ca5d278e57e 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/privateendpointconnections_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/PrivateEndpointConnectionsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/PrivateEndpointConnectionsList.json func ExamplePrivateEndpointConnectionsClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -55,7 +55,7 @@ func ExamplePrivateEndpointConnectionsClient_List() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/PrivateEndpointConnectionsGet.json func ExamplePrivateEndpointConnectionsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -89,7 +89,7 @@ func ExamplePrivateEndpointConnectionsClient_Get() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/PrivateEndpointConnectionsUpdate.json func ExamplePrivateEndpointConnectionsClient_Update() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -129,7 +129,7 @@ func ExamplePrivateEndpointConnectionsClient_Update() { // } } -// 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 +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/PrivateEndpointConnectionsDelete.json func ExamplePrivateEndpointConnectionsClient_BeginDelete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client.go index 3f5942c19616..fb10615bd05e 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-07-02-preview // - 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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} return req, nil diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go index 0cca1ad01d32..84edaf92c465 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/privatelinkresources_client_example_test.go @@ -17,7 +17,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/PrivateLinkResourcesList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/PrivateLinkResourcesList.json func ExamplePrivateLinkResourcesClient_List() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client.go index 3a85ee711d8b..0b531c34794b 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-07-02-preview // - 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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client_example_test.go index d02eeda31d39..cbfb8f51e264 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/resolveprivatelinkserviceid_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/ResolvePrivateLinkServiceId.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/ResolvePrivateLinkServiceId.json func ExampleResolvePrivateLinkServiceIDClient_POST() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/response_types.go b/sdk/resourcemanager/containerservice/armcontainerservice/response_types.go index cdf20508551a..9e7f361a9281 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/response_types.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/response_types.go @@ -54,6 +54,19 @@ type AgentPoolsClientUpgradeNodeImageVersionResponse struct { AgentPool } +// MachinesClientGetResponse contains the response from method MachinesClient.Get. +type MachinesClientGetResponse struct { + // A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get + // nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet. + Machine +} + +// MachinesClientListResponse contains the response from method MachinesClient.NewListPager. +type MachinesClientListResponse struct { + // The response from the List Machines operation. + MachineListResult +} + // MaintenanceConfigurationsClientCreateOrUpdateResponse contains the response from method MaintenanceConfigurationsClient.CreateOrUpdate. type MaintenanceConfigurationsClientCreateOrUpdateResponse struct { // See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned @@ -79,6 +92,41 @@ type MaintenanceConfigurationsClientListByManagedClusterResponse struct { MaintenanceConfigurationListResult } +// ManagedClusterSnapshotsClientCreateOrUpdateResponse contains the response from method ManagedClusterSnapshotsClient.CreateOrUpdate. +type ManagedClusterSnapshotsClientCreateOrUpdateResponse struct { + // A managed cluster snapshot resource. + ManagedClusterSnapshot +} + +// ManagedClusterSnapshotsClientDeleteResponse contains the response from method ManagedClusterSnapshotsClient.Delete. +type ManagedClusterSnapshotsClientDeleteResponse struct { + // placeholder for future response values +} + +// ManagedClusterSnapshotsClientGetResponse contains the response from method ManagedClusterSnapshotsClient.Get. +type ManagedClusterSnapshotsClientGetResponse struct { + // A managed cluster snapshot resource. + ManagedClusterSnapshot +} + +// ManagedClusterSnapshotsClientListByResourceGroupResponse contains the response from method ManagedClusterSnapshotsClient.NewListByResourceGroupPager. +type ManagedClusterSnapshotsClientListByResourceGroupResponse struct { + // The response from the List Managed Cluster Snapshots operation. + ManagedClusterSnapshotListResult +} + +// ManagedClusterSnapshotsClientListResponse contains the response from method ManagedClusterSnapshotsClient.NewListPager. +type ManagedClusterSnapshotsClientListResponse struct { + // The response from the List Managed Cluster Snapshots operation. + ManagedClusterSnapshotListResult +} + +// ManagedClusterSnapshotsClientUpdateTagsResponse contains the response from method ManagedClusterSnapshotsClient.UpdateTags. +type ManagedClusterSnapshotsClientUpdateTagsResponse struct { + // A managed cluster snapshot resource. + ManagedClusterSnapshot +} + // ManagedClustersClientAbortLatestOperationResponse contains the response from method ManagedClustersClient.BeginAbortLatestOperation. type ManagedClustersClientAbortLatestOperationResponse struct { // placeholder for future response values @@ -110,6 +158,24 @@ type ManagedClustersClientGetCommandResultResponse struct { Location *string } +// ManagedClustersClientGetGuardrailsVersionsResponse contains the response from method ManagedClustersClient.GetGuardrailsVersions. +type ManagedClustersClientGetGuardrailsVersionsResponse struct { + // Available Guardrails Version + GuardrailsAvailableVersion +} + +// ManagedClustersClientGetMeshRevisionProfileResponse contains the response from method ManagedClustersClient.GetMeshRevisionProfile. +type ManagedClustersClientGetMeshRevisionProfileResponse struct { + // Mesh revision profile for a mesh. + 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. @@ -152,12 +218,30 @@ type ManagedClustersClientListClusterUserCredentialsResponse struct { CredentialResults } +// ManagedClustersClientListGuardrailsVersionsResponse contains the response from method ManagedClustersClient.NewListGuardrailsVersionsPager. +type ManagedClustersClientListGuardrailsVersionsResponse struct { + // Hold values properties, which is array of GuardrailsVersions + GuardrailsAvailableVersionsList +} + // ManagedClustersClientListKubernetesVersionsResponse contains the response from method ManagedClustersClient.ListKubernetesVersions. type ManagedClustersClientListKubernetesVersionsResponse struct { // Hold values properties, which is array of KubernetesVersion 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 @@ -287,3 +371,32 @@ type SnapshotsClientUpdateTagsResponse struct { // A node pool snapshot resource. Snapshot } + +// TrustedAccessRoleBindingsClientCreateOrUpdateResponse contains the response from method TrustedAccessRoleBindingsClient.CreateOrUpdate. +type TrustedAccessRoleBindingsClientCreateOrUpdateResponse struct { + // Defines binding between a resource and role + TrustedAccessRoleBinding +} + +// TrustedAccessRoleBindingsClientDeleteResponse contains the response from method TrustedAccessRoleBindingsClient.Delete. +type TrustedAccessRoleBindingsClientDeleteResponse struct { + // placeholder for future response values +} + +// TrustedAccessRoleBindingsClientGetResponse contains the response from method TrustedAccessRoleBindingsClient.Get. +type TrustedAccessRoleBindingsClientGetResponse struct { + // Defines binding between a resource and role + TrustedAccessRoleBinding +} + +// TrustedAccessRoleBindingsClientListResponse contains the response from method TrustedAccessRoleBindingsClient.NewListPager. +type TrustedAccessRoleBindingsClientListResponse struct { + // List of trusted access role bindings + TrustedAccessRoleBindingListResult +} + +// TrustedAccessRolesClientListResponse contains the response from method TrustedAccessRolesClient.NewListPager. +type TrustedAccessRolesClientListResponse struct { + // List of trusted access roles + TrustedAccessRoleListResult +} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client.go index 77f874e4e102..dea85b2926ab 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-07-02-preview // - 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-07-02-preview") 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-07-02-preview // - 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-07-02-preview") 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-07-02-preview // - 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-07-02-preview") 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-07-02-preview // - 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-07-02-preview") 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-07-02-preview // - 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-07-02-preview") 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-07-02-preview // - resourceGroupName - The name of the resource group. The name is case insensitive. // - resourceName - The name of the managed cluster resource. // - parameters - Parameters supplied to the Update 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-07-02-preview") req.Raw().URL.RawQuery = reqQP.Encode() req.Raw().Header["Accept"] = []string{"application/json"} if err := runtime.MarshalAsJSON(req, parameters); err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client_example_test.go index 257fc6400032..0d4751aff92b 100644 --- a/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client_example_test.go +++ b/sdk/resourcemanager/containerservice/armcontainerservice/snapshots_client_example_test.go @@ -18,7 +18,7 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice/v4" ) -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/SnapshotsList.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/SnapshotsList.json func ExampleSnapshotsClient_NewListPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -73,7 +73,7 @@ func ExampleSnapshotsClient_NewListPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/SnapshotsListByResourceGroup.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/SnapshotsListByResourceGroup.json func ExampleSnapshotsClient_NewListByResourceGroupPager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -128,7 +128,7 @@ func ExampleSnapshotsClient_NewListByResourceGroupPager() { } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/SnapshotsGet.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/SnapshotsGet.json func ExampleSnapshotsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -175,7 +175,7 @@ func ExampleSnapshotsClient_Get() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/SnapshotsCreate.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/SnapshotsCreate.json func ExampleSnapshotsClient_CreateOrUpdate() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -233,7 +233,7 @@ func ExampleSnapshotsClient_CreateOrUpdate() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/SnapshotsUpdateTags.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/SnapshotsUpdateTags.json func ExampleSnapshotsClient_UpdateTags() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -285,7 +285,7 @@ func ExampleSnapshotsClient_UpdateTags() { // } } -// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/1d2b8c05b55be5dd98ce94c835d7e96ee1ea7f5d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-07-01/examples/SnapshotsDelete.json +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/SnapshotsDelete.json func ExampleSnapshotsClient_Delete() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client.go new file mode 100644 index 000000000000..9346d9d13142 --- /dev/null +++ b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client.go @@ -0,0 +1,306 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcontainerservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// TrustedAccessRoleBindingsClient contains the methods for the TrustedAccessRoleBindings group. +// Don't use this type directly, use NewTrustedAccessRoleBindingsClient() instead. +type TrustedAccessRoleBindingsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTrustedAccessRoleBindingsClient creates a new instance of TrustedAccessRoleBindingsClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTrustedAccessRoleBindingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TrustedAccessRoleBindingsClient, error) { + cl, err := arm.NewClient(moduleName+".TrustedAccessRoleBindingsClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TrustedAccessRoleBindingsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// CreateOrUpdate - Create or update a trusted access role binding +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-07-02-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - trustedAccessRoleBindingName - The name of trusted access role binding. +// - trustedAccessRoleBinding - A trusted access role binding +// - options - TrustedAccessRoleBindingsClientCreateOrUpdateOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.CreateOrUpdate +// method. +func (client *TrustedAccessRoleBindingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, trustedAccessRoleBindingName string, trustedAccessRoleBinding TrustedAccessRoleBinding, options *TrustedAccessRoleBindingsClientCreateOrUpdateOptions) (TrustedAccessRoleBindingsClientCreateOrUpdateResponse, error) { + var err error + req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, resourceName, trustedAccessRoleBindingName, trustedAccessRoleBinding, options) + if err != nil { + return TrustedAccessRoleBindingsClientCreateOrUpdateResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TrustedAccessRoleBindingsClientCreateOrUpdateResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusCreated) { + err = runtime.NewResponseError(httpResp) + return TrustedAccessRoleBindingsClientCreateOrUpdateResponse{}, err + } + resp, err := client.createOrUpdateHandleResponse(httpResp) + return resp, err +} + +// createOrUpdateCreateRequest creates the CreateOrUpdate request. +func (client *TrustedAccessRoleBindingsClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, trustedAccessRoleBindingName string, trustedAccessRoleBinding TrustedAccessRoleBinding, options *TrustedAccessRoleBindingsClientCreateOrUpdateOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + 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 trustedAccessRoleBindingName == "" { + return nil, errors.New("parameter trustedAccessRoleBindingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{trustedAccessRoleBindingName}", url.PathEscape(trustedAccessRoleBindingName)) + req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + if err := runtime.MarshalAsJSON(req, trustedAccessRoleBinding); err != nil { + return nil, err + } + return req, nil +} + +// createOrUpdateHandleResponse handles the CreateOrUpdate response. +func (client *TrustedAccessRoleBindingsClient) createOrUpdateHandleResponse(resp *http.Response) (TrustedAccessRoleBindingsClientCreateOrUpdateResponse, error) { + result := TrustedAccessRoleBindingsClientCreateOrUpdateResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TrustedAccessRoleBinding); err != nil { + return TrustedAccessRoleBindingsClientCreateOrUpdateResponse{}, err + } + return result, nil +} + +// Delete - Delete a trusted access role binding. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-07-02-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - trustedAccessRoleBindingName - The name of trusted access role binding. +// - options - TrustedAccessRoleBindingsClientDeleteOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.Delete +// method. +func (client *TrustedAccessRoleBindingsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, trustedAccessRoleBindingName string, options *TrustedAccessRoleBindingsClientDeleteOptions) (TrustedAccessRoleBindingsClientDeleteResponse, error) { + var err error + req, err := client.deleteCreateRequest(ctx, resourceGroupName, resourceName, trustedAccessRoleBindingName, options) + if err != nil { + return TrustedAccessRoleBindingsClientDeleteResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TrustedAccessRoleBindingsClientDeleteResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK, http.StatusNoContent) { + err = runtime.NewResponseError(httpResp) + return TrustedAccessRoleBindingsClientDeleteResponse{}, err + } + return TrustedAccessRoleBindingsClientDeleteResponse{}, nil +} + +// deleteCreateRequest creates the Delete request. +func (client *TrustedAccessRoleBindingsClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, trustedAccessRoleBindingName string, options *TrustedAccessRoleBindingsClientDeleteOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + 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 trustedAccessRoleBindingName == "" { + return nil, errors.New("parameter trustedAccessRoleBindingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{trustedAccessRoleBindingName}", url.PathEscape(trustedAccessRoleBindingName)) + req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + if err != nil { + return nil, err + } + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", "2023-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// Get - Get a trusted access role binding. +// If the operation fails it returns an *azcore.ResponseError type. +// +// Generated from API version 2023-07-02-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - trustedAccessRoleBindingName - The name of trusted access role binding. +// - options - TrustedAccessRoleBindingsClientGetOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.Get +// method. +func (client *TrustedAccessRoleBindingsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, trustedAccessRoleBindingName string, options *TrustedAccessRoleBindingsClientGetOptions) (TrustedAccessRoleBindingsClientGetResponse, error) { + var err error + req, err := client.getCreateRequest(ctx, resourceGroupName, resourceName, trustedAccessRoleBindingName, options) + if err != nil { + return TrustedAccessRoleBindingsClientGetResponse{}, err + } + httpResp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TrustedAccessRoleBindingsClientGetResponse{}, err + } + if !runtime.HasStatusCode(httpResp, http.StatusOK) { + err = runtime.NewResponseError(httpResp) + return TrustedAccessRoleBindingsClientGetResponse{}, err + } + resp, err := client.getHandleResponse(httpResp) + return resp, err +} + +// getCreateRequest creates the Get request. +func (client *TrustedAccessRoleBindingsClient) getCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, trustedAccessRoleBindingName string, options *TrustedAccessRoleBindingsClientGetOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings/{trustedAccessRoleBindingName}" + 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 trustedAccessRoleBindingName == "" { + return nil, errors.New("parameter trustedAccessRoleBindingName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{trustedAccessRoleBindingName}", url.PathEscape(trustedAccessRoleBindingName)) + 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-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// getHandleResponse handles the Get response. +func (client *TrustedAccessRoleBindingsClient) getHandleResponse(resp *http.Response) (TrustedAccessRoleBindingsClientGetResponse, error) { + result := TrustedAccessRoleBindingsClientGetResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TrustedAccessRoleBinding); err != nil { + return TrustedAccessRoleBindingsClientGetResponse{}, err + } + return result, nil +} + +// NewListPager - List trusted access role bindings. +// +// Generated from API version 2023-07-02-preview +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - resourceName - The name of the managed cluster resource. +// - options - TrustedAccessRoleBindingsClientListOptions contains the optional parameters for the TrustedAccessRoleBindingsClient.NewListPager +// method. +func (client *TrustedAccessRoleBindingsClient) NewListPager(resourceGroupName string, resourceName string, options *TrustedAccessRoleBindingsClientListOptions) *runtime.Pager[TrustedAccessRoleBindingsClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[TrustedAccessRoleBindingsClientListResponse]{ + More: func(page TrustedAccessRoleBindingsClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TrustedAccessRoleBindingsClientListResponse) (TrustedAccessRoleBindingsClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, resourceGroupName, resourceName, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return TrustedAccessRoleBindingsClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TrustedAccessRoleBindingsClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return TrustedAccessRoleBindingsClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *TrustedAccessRoleBindingsClient) listCreateRequest(ctx context.Context, resourceGroupName string, resourceName string, options *TrustedAccessRoleBindingsClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/trustedAccessRoleBindings" + 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-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *TrustedAccessRoleBindingsClient) listHandleResponse(resp *http.Response) (TrustedAccessRoleBindingsClientListResponse, error) { + result := TrustedAccessRoleBindingsClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TrustedAccessRoleBindingListResult); err != nil { + return TrustedAccessRoleBindingsClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client_example_test.go new file mode 100644 index 000000000000..b61a6a971569 --- /dev/null +++ b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessrolebindings_client_example_test.go @@ -0,0 +1,144 @@ +//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/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/TrustedAccessRoleBindings_List.json +func ExampleTrustedAccessRoleBindingsClient_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.NewTrustedAccessRoleBindingsClient().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.TrustedAccessRoleBindingListResult = armcontainerservice.TrustedAccessRoleBindingListResult{ + // Value: []*armcontainerservice.TrustedAccessRoleBinding{ + // { + // Name: to.Ptr("binding1"), + // Type: to.Ptr("Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/trustedAccessRoleBindings/binding1"), + // Properties: &armcontainerservice.TrustedAccessRoleBindingProperties{ + // Roles: []*string{ + // to.Ptr("Microsoft.MachineLearningServices/workspaces/reader"), + // to.Ptr("Microsoft.MachineLearningServices/workspaces/writer")}, + // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/b/providers/Microsoft.MachineLearningServices/workspaces/c"), + // }, + // }}, + // } + } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/TrustedAccessRoleBindings_Get.json +func ExampleTrustedAccessRoleBindingsClient_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.NewTrustedAccessRoleBindingsClient().Get(ctx, "rg1", "clustername1", "binding1", 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.TrustedAccessRoleBinding = armcontainerservice.TrustedAccessRoleBinding{ + // Name: to.Ptr("binding1"), + // Type: to.Ptr("Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/trustedAccessRoleBindings/binding1"), + // Properties: &armcontainerservice.TrustedAccessRoleBindingProperties{ + // Roles: []*string{ + // to.Ptr("Microsoft.MachineLearningServices/workspaces/reader"), + // to.Ptr("Microsoft.MachineLearningServices/workspaces/writer")}, + // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/b/providers/Microsoft.MachineLearningServices/workspaces/c"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json +func ExampleTrustedAccessRoleBindingsClient_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.NewTrustedAccessRoleBindingsClient().CreateOrUpdate(ctx, "rg1", "clustername1", "binding1", armcontainerservice.TrustedAccessRoleBinding{ + Properties: &armcontainerservice.TrustedAccessRoleBindingProperties{ + Roles: []*string{ + to.Ptr("Microsoft.MachineLearningServices/workspaces/reader"), + to.Ptr("Microsoft.MachineLearningServices/workspaces/writer")}, + SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/b/providers/Microsoft.MachineLearningServices/workspaces/c"), + }, + }, 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.TrustedAccessRoleBinding = armcontainerservice.TrustedAccessRoleBinding{ + // Name: to.Ptr("binding1"), + // Type: to.Ptr("Microsoft.ContainerService/managedClusters/trustedAccessRoleBindings"), + // ID: to.Ptr("/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/clustername1/trustedAccessRoleBindings/binding1"), + // Properties: &armcontainerservice.TrustedAccessRoleBindingProperties{ + // Roles: []*string{ + // to.Ptr("Microsoft.MachineLearningServices/workspaces/reader"), + // to.Ptr("Microsoft.MachineLearningServices/workspaces/writer")}, + // SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/b/providers/Microsoft.MachineLearningServices/workspaces/c"), + // }, + // } +} + +// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/TrustedAccessRoleBindings_Delete.json +func ExampleTrustedAccessRoleBindingsClient_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.NewTrustedAccessRoleBindingsClient().Delete(ctx, "rg1", "clustername1", "binding1", nil) + if err != nil { + log.Fatalf("failed to finish the request: %v", err) + } +} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client.go b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client.go new file mode 100644 index 000000000000..52ed712899df --- /dev/null +++ b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client.go @@ -0,0 +1,109 @@ +//go:build go1.18 +// +build go1.18 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +package armcontainerservice + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// TrustedAccessRolesClient contains the methods for the TrustedAccessRoles group. +// Don't use this type directly, use NewTrustedAccessRolesClient() instead. +type TrustedAccessRolesClient struct { + internal *arm.Client + subscriptionID string +} + +// NewTrustedAccessRolesClient creates a new instance of TrustedAccessRolesClient with the specified values. +// - subscriptionID - The ID of the target subscription. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - pass nil to accept the default values. +func NewTrustedAccessRolesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*TrustedAccessRolesClient, error) { + cl, err := arm.NewClient(moduleName+".TrustedAccessRolesClient", moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &TrustedAccessRolesClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListPager - List supported trusted access roles. +// +// Generated from API version 2023-07-02-preview +// - location - The name of Azure region. +// - options - TrustedAccessRolesClientListOptions contains the optional parameters for the TrustedAccessRolesClient.NewListPager +// method. +func (client *TrustedAccessRolesClient) NewListPager(location string, options *TrustedAccessRolesClientListOptions) *runtime.Pager[TrustedAccessRolesClientListResponse] { + return runtime.NewPager(runtime.PagingHandler[TrustedAccessRolesClientListResponse]{ + More: func(page TrustedAccessRolesClientListResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *TrustedAccessRolesClientListResponse) (TrustedAccessRolesClientListResponse, error) { + var req *policy.Request + var err error + if page == nil { + req, err = client.listCreateRequest(ctx, location, options) + } else { + req, err = runtime.NewRequest(ctx, http.MethodGet, *page.NextLink) + } + if err != nil { + return TrustedAccessRolesClientListResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return TrustedAccessRolesClientListResponse{}, err + } + if !runtime.HasStatusCode(resp, http.StatusOK) { + return TrustedAccessRolesClientListResponse{}, runtime.NewResponseError(resp) + } + return client.listHandleResponse(resp) + }, + }) +} + +// listCreateRequest creates the List request. +func (client *TrustedAccessRolesClient) listCreateRequest(ctx context.Context, location string, options *TrustedAccessRolesClientListOptions) (*policy.Request, error) { + urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles" + 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-07-02-preview") + req.Raw().URL.RawQuery = reqQP.Encode() + req.Raw().Header["Accept"] = []string{"application/json"} + return req, nil +} + +// listHandleResponse handles the List response. +func (client *TrustedAccessRolesClient) listHandleResponse(resp *http.Response) (TrustedAccessRolesClientListResponse, error) { + result := TrustedAccessRolesClientListResponse{} + if err := runtime.UnmarshalAsJSON(resp, &result.TrustedAccessRoleListResult); err != nil { + return TrustedAccessRolesClientListResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client_example_test.go b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client_example_test.go new file mode 100644 index 000000000000..f3857717f13c --- /dev/null +++ b/sdk/resourcemanager/containerservice/armcontainerservice/trustedaccessroles_client_example_test.go @@ -0,0 +1,63 @@ +//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/80c21c17b4a7aa57f637ee594f7cfd653255a7e0/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2023-07-02-preview/examples/TrustedAccessRoles_List.json +func ExampleTrustedAccessRolesClient_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.NewTrustedAccessRolesClient().NewListPager("westus2", 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.TrustedAccessRoleListResult = armcontainerservice.TrustedAccessRoleListResult{ + // Value: []*armcontainerservice.TrustedAccessRole{ + // { + // Name: to.Ptr("reader"), + // Rules: []*armcontainerservice.TrustedAccessRoleRule{ + // { + // APIGroups: []*string{ + // to.Ptr("")}, + // NonResourceURLs: []*string{ + // }, + // ResourceNames: []*string{ + // }, + // Resources: []*string{ + // to.Ptr("pods")}, + // Verbs: []*string{ + // to.Ptr("get")}, + // }}, + // SourceResourceType: to.Ptr("Microsoft.MachineLearningServices/workspaces"), + // }}, + // } + } +}