diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md index a511c809d59c..a3710f01aa95 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/CHANGELOG.md @@ -1,15 +1,17 @@ # Release History -## 2.60.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes +## 2.60.0-beta.1 (2026-04-21) ### Bugs Fixed +- Fixed bug that `nodeImageVersion` was not settable in `ManagedClusterAgentPoolProfileProperties`. + ### Other Changes +#### Dependency Updates + +- Updated `api-version` to `2026-02-02-preview`. + ## 2.59.0 (2026-04-20) ### Other Changes diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/README.md b/sdk/containerservice/azure-resourcemanager-containerservice/README.md index 9dad3602ab9a..af00bdc97fdd 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/README.md +++ b/sdk/containerservice/azure-resourcemanager-containerservice/README.md @@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra com.azure.resourcemanager azure-resourcemanager-containerservice - 2.59.0 + 2.60.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml index 5e00ab62b328..647ec95f9bd2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml +++ b/sdk/containerservice/azure-resourcemanager-containerservice/pom.xml @@ -42,6 +42,7 @@ --add-opens com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED + true diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java index b2a610735e62..4f377830d98b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java @@ -559,6 +559,122 @@ SyncPoller, Void> beginAbortLatestOperation(String resourceGrou @ServiceMethod(returns = ReturnType.SINGLE) void abortLatestOperation(String resourceGroupName, String resourceName, String agentPoolName, Context context); + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> completeUpgradeWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName, Context context); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName); + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName, Context context); + /** * Deletes specific machines in an agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java index adb22e304ca4..0e8a13116c44 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java @@ -95,6 +95,13 @@ public interface ContainerServiceManagementClient { */ SnapshotsClient getSnapshots(); + /** + * Gets the ManagedClusterSnapshotsClient object to access its operations. + * + * @return the ManagedClusterSnapshotsClient object. + */ + ManagedClusterSnapshotsClient getManagedClusterSnapshots(); + /** * Gets the TrustedAccessRoleBindingsClient object to access its operations. * @@ -102,6 +109,34 @@ public interface ContainerServiceManagementClient { */ TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings(); + /** + * Gets the LoadBalancersClient object to access its operations. + * + * @return the LoadBalancersClient object. + */ + LoadBalancersClient getLoadBalancers(); + + /** + * Gets the IdentityBindingsClient object to access its operations. + * + * @return the IdentityBindingsClient object. + */ + IdentityBindingsClient getIdentityBindings(); + + /** + * Gets the JWTAuthenticatorsClient object to access its operations. + * + * @return the JWTAuthenticatorsClient object. + */ + JWTAuthenticatorsClient getJWTAuthenticators(); + + /** + * Gets the MeshMembershipsClient object to access its operations. + * + * @return the MeshMembershipsClient object. + */ + MeshMembershipsClient getMeshMemberships(); + /** * Gets the OperationsClient object to access its operations. * @@ -109,6 +144,13 @@ public interface ContainerServiceManagementClient { */ OperationsClient getOperations(); + /** + * Gets the OperationStatusResultsClient object to access its operations. + * + * @return the OperationStatusResultsClient object. + */ + OperationStatusResultsClient getOperationStatusResults(); + /** * Gets the PrivateLinkResourcesClient object to access its operations. * @@ -129,4 +171,11 @@ public interface ContainerServiceManagementClient { * @return the TrustedAccessRolesClient object. */ TrustedAccessRolesClient getTrustedAccessRoles(); + + /** + * Gets the VmSkusClient object to access its operations. + * + * @return the VmSkusClient object. + */ + VmSkusClient getVmSkus(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java new file mode 100644 index 000000000000..8d38a54ea193 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.IdentityBindingInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in IdentityBindingsClient. + */ +public interface IdentityBindingsClient { + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName); + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String identityBindingName); + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String identityBindingName, Context context); + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentityBindingInner get(String resourceGroupName, String resourceName, String identityBindingName); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, IdentityBindingInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IdentityBindingInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String identityBindingName, IdentityBindingInner parameters); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, IdentityBindingInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String identityBindingName, IdentityBindingInner parameters, Context context); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, String identityBindingName, + IdentityBindingInner parameters); + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, String identityBindingName, + IdentityBindingInner parameters, Context context); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String identityBindingName); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String identityBindingName); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String identityBindingName, Context context); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String identityBindingName); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String identityBindingName); + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String identityBindingName, Context context); + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JWTAuthenticatorsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JWTAuthenticatorsClient.java new file mode 100644 index 000000000000..53512b9a8a2f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/JWTAuthenticatorsClient.java @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.JWTAuthenticatorInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in JWTAuthenticatorsClient. + */ +public interface JWTAuthenticatorsClient { + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context); + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JWTAuthenticatorInner get(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, JWTAuthenticatorInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, JWTAuthenticatorInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, JWTAuthenticatorInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters, Context context); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JWTAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, String jwtAuthenticatorName, + JWTAuthenticatorInner parameters); + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JWTAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, String jwtAuthenticatorName, + JWTAuthenticatorInner parameters, Context context); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName); + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName, Context context); + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java new file mode 100644 index 000000000000..8ea00137dede --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in LoadBalancersClient. + */ +public interface LoadBalancersClient { + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, String loadBalancerName, + Context context); + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LoadBalancerInner get(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String loadBalancerName, + LoadBalancerInner parameters); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters, Context context); + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LoadBalancerInner createOrUpdate(String resourceGroupName, String resourceName, String loadBalancerName, + LoadBalancerInner parameters); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName, Context context); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String loadBalancerName); + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String loadBalancerName, Context context); + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java index 9a9d7edbf868..ab05fe893168 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java @@ -9,8 +9,13 @@ import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -82,6 +87,173 @@ Response getWithResponse(String resourceGroupName, String resource @ServiceMethod(returns = ReturnType.SINGLE) MachineInner get(String resourceGroupName, String resourceName, String agentPoolName, String machineName); + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String agentPoolName, String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, String machineName, + MachineInner parameters); + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, String machineName, + MachineInner parameters, String ifMatch, String ifNoneMatch, Context context); + /** * Gets a list of machines in the specified agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java new file mode 100644 index 000000000000..f9298cecaeaa --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedClusterSnapshotsClient. + */ +public interface ManagedClusterSnapshotsClient extends InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete { + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName); + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByResourceGroupAsync(String resourceGroupName, String resourceName); + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner getByResourceGroup(String resourceGroupName, String resourceName); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters, Context context); + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateTagsWithResponseAsync(String resourceGroupName, + String resourceName, TagsObject parameters); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateTagsWithResponse(String resourceGroupName, String resourceName, + TagsObject parameters, Context context); + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedClusterSnapshotInner updateTags(String resourceGroupName, String resourceName, TagsObject parameters); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName); + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java index a512c37ee51f..438f59d48203 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java @@ -14,18 +14,22 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterUpgradeProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.MeshRevisionProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; import com.azure.resourcemanager.containerservice.models.Format; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; import com.azure.resourcemanager.containerservice.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservice.models.RebalanceLoadBalancersRequestBody; import com.azure.resourcemanager.containerservice.models.RunCommandRequest; import com.azure.resourcemanager.containerservice.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; @@ -387,6 +391,8 @@ ManagedClusterInner updateTags(String resourceGroupName, String resourceName, Ta * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -394,7 +400,7 @@ ManagedClusterInner updateTags(String resourceGroupName, String resourceName, Ta */ @ServiceMethod(returns = ReturnType.SINGLE) Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch); + String ifMatch, Boolean ignorePodDisruptionBudget); /** * Deletes a managed cluster. @@ -402,13 +408,16 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, String ifMatch); + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget); /** * Deletes a managed cluster. @@ -442,6 +451,8 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -450,7 +461,7 @@ Mono>> deleteWithResponseAsync(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, - Context context); + Boolean ignorePodDisruptionBudget, Context context); /** * Deletes a managed cluster. @@ -458,13 +469,16 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch); + Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget); /** * Deletes a managed cluster. @@ -497,13 +511,16 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String ifMatch, Context context); + void delete(String resourceGroupName, String resourceName, String ifMatch, Boolean ignorePodDisruptionBudget, + Context context); /** * Lists managed clusters in the specified subscription and resource group. @@ -1913,6 +1930,118 @@ PagedIterable listOutboundNetworkDependenciesE PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String resourceName, Context context); + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters); + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context); + /** * Gets the upgrade profile of a managed cluster. * @@ -1969,6 +2098,258 @@ Response getUpgradeProfileWithResponse(String @ServiceMethod(returns = ReturnType.SINGLE) ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName); + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getGuardrailsVersionsWithResponseAsync(String location, + String version); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getGuardrailsVersionsAsync(String location, String version); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getGuardrailsVersionsWithResponse(String location, String version, + Context context); + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GuardrailsAvailableVersionInner getGuardrailsVersions(String location, String version); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listGuardrailsVersionsAsync(String location); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGuardrailsVersions(String location); + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGuardrailsVersions(String location, Context context); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getSafeguardsVersionsWithResponseAsync(String location, + String version); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getSafeguardsVersionsAsync(String location, String version); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSafeguardsVersionsWithResponse(String location, String version, + Context context); + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SafeguardsAvailableVersionInner getSafeguardsVersions(String location, String version); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listSafeguardsVersionsAsync(String location); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSafeguardsVersions(String location); + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSafeguardsVersions(String location, Context context); + /** * Gets a mesh revision profile for a specified mesh in the specified location. * @@ -2267,4 +2648,59 @@ PagedIterable listMeshUpgradeProfiles(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) KubernetesVersionListResultInner listKubernetesVersions(String location); + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listNodeImageVersionsAsync(String location); + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listNodeImageVersions(String location); + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listNodeImageVersions(String location, Context context); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java new file mode 100644 index 000000000000..0efc90f7dbca --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MeshMembershipsClient. + */ +public interface MeshMembershipsClient { + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String meshMembershipName, Context context); + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshMembershipInner get(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, MeshMembershipInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MeshMembershipInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MeshMembershipInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters, Context context); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters); + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters, Context context); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName, Context context); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String meshMembershipName); + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String meshMembershipName, Context context); + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName); + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName); + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java new file mode 100644 index 000000000000..a8babb50652c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationStatusResultsClient. + */ +public interface OperationStatusResultsClient { + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByAgentPoolWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String operationId); + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName, String operationId); + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByAgentPoolWithResponse(String resourceGroupName, String resourceName, + String agentPoolName, String operationId, Context context); + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner getByAgentPool(String resourceGroupName, String resourceName, String agentPoolName, + String operationId); + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String resourceGroupName, String resourceName); + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String operationId); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getAsync(String resourceGroupName, String resourceName, String operationId); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String operationId, Context context); + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner get(String resourceGroupName, String resourceName, String operationId); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/VmSkusClient.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/VmSkusClient.java new file mode 100644 index 000000000000..09ad3c0c5e98 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/VmSkusClient.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.containerservice.fluent.models.ResourceSkuInner; + +/** + * An instance of this class provides access to all the operations defined in VmSkusClient. + */ +public interface VmSkusClient { + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String location, Boolean includeExtendedLocations); + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String location); + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, Boolean includeExtendedLocations, Context context); +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java index 110f4b3cc19d..51a33be1d4d9 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java @@ -10,6 +10,8 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolArtifactStreamingProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolBlueGreenUpgradeSettings; import com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; import com.azure.resourcemanager.containerservice.models.AgentPoolMode; import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; @@ -30,9 +32,11 @@ import com.azure.resourcemanager.containerservice.models.OSType; import com.azure.resourcemanager.containerservice.models.PodIpAllocationMode; import com.azure.resourcemanager.containerservice.models.PowerState; +import com.azure.resourcemanager.containerservice.models.PreparedImageSpecificationProfile; import com.azure.resourcemanager.containerservice.models.ScaleDownMode; import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservice.models.UpgradeStrategy; import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; @@ -678,6 +682,70 @@ public String nodeImageVersion() { return this.innerProperties() == null ? null : this.innerProperties().nodeImageVersion(); } + /** + * Set the nodeImageVersion property: The version of node image. + * + * @param nodeImageVersion the nodeImageVersion value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeImageVersion(String nodeImageVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodeImageVersion(nodeImageVersion); + return this; + } + + /** + * Get the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @return the upgradeStrategy value. + */ + public UpgradeStrategy upgradeStrategy() { + return this.innerProperties() == null ? null : this.innerProperties().upgradeStrategy(); + } + + /** + * Set the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @param upgradeStrategy the upgradeStrategy value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withUpgradeStrategy(upgradeStrategy); + return this; + } + + /** + * Get the enableOSDiskFullCaching property: Whether to enable the full-cache ephemeral OS disk feature. When this + * feature is enabled, the entire operating system will be locally cached on the ephemeral OS disk, preventing E17 + * events caused by network failures. + * + * @return the enableOSDiskFullCaching value. + */ + public Boolean enableOSDiskFullCaching() { + return this.innerProperties() == null ? null : this.innerProperties().enableOSDiskFullCaching(); + } + + /** + * Set the enableOSDiskFullCaching property: Whether to enable the full-cache ephemeral OS disk feature. When this + * feature is enabled, the entire operating system will be locally cached on the ephemeral OS disk, preventing E17 + * events caused by network failures. + * + * @param enableOSDiskFullCaching the enableOSDiskFullCaching value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withEnableOSDiskFullCaching(Boolean enableOSDiskFullCaching) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withEnableOSDiskFullCaching(enableOSDiskFullCaching); + return this; + } + /** * Get the upgradeSettings property: Settings for upgrading the agentpool. * @@ -701,6 +769,31 @@ public AgentPoolInner withUpgradeSettings(AgentPoolUpgradeSettings upgradeSettin return this; } + /** + * Get the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @return the upgradeSettingsBlueGreen value. + */ + public AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen() { + return this.innerProperties() == null ? null : this.innerProperties().upgradeSettingsBlueGreen(); + } + + /** + * Set the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @param upgradeSettingsBlueGreen the upgradeSettingsBlueGreen value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withUpgradeSettingsBlueGreen(upgradeSettingsBlueGreen); + return this; + } + /** * Get the provisioningState property: The current deployment or provisioning state. * @@ -976,6 +1069,39 @@ public AgentPoolInner withNodeTaints(List nodeTaints) { return this; } + /** + * Get the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + public List nodeInitializationTaints() { + return this.innerProperties() == null ? null : this.innerProperties().nodeInitializationTaints(); + } + + /** + * Set the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints the nodeInitializationTaints value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withNodeInitializationTaints(List nodeInitializationTaints) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withNodeInitializationTaints(nodeInitializationTaints); + return this; + } + /** * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. * @@ -1351,6 +1477,29 @@ public AgentPoolInner withGatewayProfile(AgentPoolGatewayProfile gatewayProfile) return this; } + /** + * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @return the artifactStreamingProfile value. + */ + public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { + return this.innerProperties() == null ? null : this.innerProperties().artifactStreamingProfile(); + } + + /** + * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @param artifactStreamingProfile the artifactStreamingProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withArtifactStreamingProfile(artifactStreamingProfile); + return this; + } + /** * Get the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. * @@ -1447,6 +1596,32 @@ public AgentPoolInner withLocalDnsProfile(LocalDnsProfile localDnsProfile) { return this; } + /** + * Get the preparedImageSpecificationProfile property: Settings to determine the prepared image specification used + * to provision nodes in a pool. + * + * @return the preparedImageSpecificationProfile value. + */ + public PreparedImageSpecificationProfile preparedImageSpecificationProfile() { + return this.innerProperties() == null ? null : this.innerProperties().preparedImageSpecificationProfile(); + } + + /** + * Set the preparedImageSpecificationProfile property: Settings to determine the prepared image specification used + * to provision nodes in a pool. + * + * @param preparedImageSpecificationProfile the preparedImageSpecificationProfile value to set. + * @return the AgentPoolInner object itself. + */ + public AgentPoolInner + withPreparedImageSpecificationProfile(PreparedImageSpecificationProfile preparedImageSpecificationProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterAgentPoolProfileProperties(); + } + this.innerProperties().withPreparedImageSpecificationProfile(preparedImageSpecificationProfile); + return this; + } + /** * Validates the instance. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java index 1a3a8e515ad3..c9b4dd9c985d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java @@ -11,7 +11,9 @@ import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolRecentlyUsedVersion; import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservice.models.ComponentsByRelease; import com.azure.resourcemanager.containerservice.models.OSType; import java.io.IOException; import java.util.List; @@ -127,6 +129,24 @@ public List upgrades() { return this.innerProperties() == null ? null : this.innerProperties().upgrades(); } + /** + * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @return the componentsByReleases value. + */ + public List componentsByReleases() { + return this.innerProperties() == null ? null : this.innerProperties().componentsByReleases(); + } + + /** + * Get the recentlyUsedVersions property: List of historical good versions for rollback operations. + * + * @return the recentlyUsedVersions value. + */ + public List recentlyUsedVersions() { + return this.innerProperties() == null ? null : this.innerProperties().recentlyUsedVersions(); + } + /** * Get the latestNodeImageVersion property: The latest AKS supported node image version. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java index 1836eca428c1..678f925ed564 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java @@ -10,7 +10,9 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolRecentlyUsedVersion; import com.azure.resourcemanager.containerservice.models.AgentPoolUpgradeProfilePropertiesUpgradesItem; +import com.azure.resourcemanager.containerservice.models.ComponentsByRelease; import com.azure.resourcemanager.containerservice.models.OSType; import java.io.IOException; import java.util.List; @@ -35,6 +37,16 @@ public final class AgentPoolUpgradeProfileProperties implements JsonSerializable */ private List upgrades; + /* + * List of components grouped by kubernetes major.minor version. + */ + private List componentsByReleases; + + /* + * List of historical good versions for rollback operations. + */ + private List recentlyUsedVersions; + /* * The latest AKS supported node image version. */ @@ -73,6 +85,24 @@ public List upgrades() { return this.upgrades; } + /** + * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @return the componentsByReleases value. + */ + public List componentsByReleases() { + return this.componentsByReleases; + } + + /** + * Get the recentlyUsedVersions property: List of historical good versions for rollback operations. + * + * @return the recentlyUsedVersions value. + */ + public List recentlyUsedVersions() { + return this.recentlyUsedVersions; + } + /** * Get the latestNodeImageVersion property: The latest AKS supported node image version. * @@ -101,6 +131,12 @@ public void validate() { if (upgrades() != null) { upgrades().forEach(e -> e.validate()); } + if (componentsByReleases() != null) { + componentsByReleases().forEach(e -> e.validate()); + } + if (recentlyUsedVersions() != null) { + recentlyUsedVersions().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(AgentPoolUpgradeProfileProperties.class); @@ -114,6 +150,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("componentsByReleases", this.componentsByReleases, + (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("latestNodeImageVersion", this.latestNodeImageVersion); return jsonWriter.writeEndObject(); } @@ -143,6 +181,14 @@ public static AgentPoolUpgradeProfileProperties fromJson(JsonReader jsonReader) List upgrades = reader.readArray(reader1 -> AgentPoolUpgradeProfilePropertiesUpgradesItem.fromJson(reader1)); deserializedAgentPoolUpgradeProfileProperties.upgrades = upgrades; + } else if ("componentsByReleases".equals(fieldName)) { + List componentsByReleases + = reader.readArray(reader1 -> ComponentsByRelease.fromJson(reader1)); + deserializedAgentPoolUpgradeProfileProperties.componentsByReleases = componentsByReleases; + } else if ("recentlyUsedVersions".equals(fieldName)) { + List recentlyUsedVersions + = reader.readArray(reader1 -> AgentPoolRecentlyUsedVersion.fromJson(reader1)); + deserializedAgentPoolUpgradeProfileProperties.recentlyUsedVersions = recentlyUsedVersions; } else if ("latestNodeImageVersion".equals(fieldName)) { deserializedAgentPoolUpgradeProfileProperties.latestNodeImageVersion = reader.getString(); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java new file mode 100644 index 000000000000..20cc0a1d4cd5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.GuardrailsAvailableVersionsProperties; +import java.io.IOException; + +/** + * Available Guardrails Version. + */ +@Immutable +public final class GuardrailsAvailableVersionInner extends ProxyResource { + /* + * Whether the version is default or not and support info. + */ + private GuardrailsAvailableVersionsProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of GuardrailsAvailableVersionInner class. + */ + private GuardrailsAvailableVersionInner() { + } + + /** + * Get the properties property: Whether the version is default or not and support info. + * + * @return the properties value. + */ + public GuardrailsAvailableVersionsProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model GuardrailsAvailableVersionInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GuardrailsAvailableVersionInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GuardrailsAvailableVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GuardrailsAvailableVersionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionInner. + */ + public static GuardrailsAvailableVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GuardrailsAvailableVersionInner deserializedGuardrailsAvailableVersionInner + = new GuardrailsAvailableVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.properties + = GuardrailsAvailableVersionsProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedGuardrailsAvailableVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGuardrailsAvailableVersionInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java new file mode 100644 index 000000000000..6680c341c330 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.IdentityBindingProperties; +import java.io.IOException; + +/** + * The IdentityBinding resource. + */ +@Fluent +public final class IdentityBindingInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private IdentityBindingProperties properties; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of IdentityBindingInner class. + */ + public IdentityBindingInner() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public IdentityBindingProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the IdentityBindingInner object itself. + */ + public IdentityBindingInner withProperties(IdentityBindingProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityBindingInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityBindingInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IdentityBindingInner. + */ + public static IdentityBindingInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityBindingInner deserializedIdentityBindingInner = new IdentityBindingInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedIdentityBindingInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedIdentityBindingInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedIdentityBindingInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedIdentityBindingInner.properties = IdentityBindingProperties.fromJson(reader); + } else if ("eTag".equals(fieldName)) { + deserializedIdentityBindingInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedIdentityBindingInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityBindingInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JWTAuthenticatorInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JWTAuthenticatorInner.java new file mode 100644 index 000000000000..790178f25c23 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JWTAuthenticatorInner.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorProperties; +import java.io.IOException; + +/** + * Configuration for JWT authenticator in the managed cluster. + */ +@Fluent +public final class JWTAuthenticatorInner extends ProxyResource { + /* + * The properties of JWTAuthenticator. For details on how to configure the properties of a JWT authenticator, please + * refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. + * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For + * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. + */ + private JWTAuthenticatorProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of JWTAuthenticatorInner class. + */ + public JWTAuthenticatorInner() { + } + + /** + * Get the properties property: The properties of JWTAuthenticator. For details on how to configure the properties + * of a JWT authenticator, please refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. + * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For + * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. + * + * @return the properties value. + */ + public JWTAuthenticatorProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of JWTAuthenticator. For details on how to configure the properties + * of a JWT authenticator, please refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. + * Please note that not all fields available in the Kubernetes documentation are supported by AKS. For + * troubleshooting, please see https://aka.ms/aks-external-issuers-docs. + * + * @param properties the properties value to set. + * @return the JWTAuthenticatorInner object itself. + */ + public JWTAuthenticatorInner withProperties(JWTAuthenticatorProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model JWTAuthenticatorInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorInner. + */ + public static JWTAuthenticatorInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorInner deserializedJWTAuthenticatorInner = new JWTAuthenticatorInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedJWTAuthenticatorInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedJWTAuthenticatorInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedJWTAuthenticatorInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedJWTAuthenticatorInner.properties = JWTAuthenticatorProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedJWTAuthenticatorInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java new file mode 100644 index 000000000000..ed5ded707a81 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.LabelSelector; +import java.io.IOException; + +/** + * The configurations regarding multiple standard load balancers. If not supplied, single load balancer mode will be + * used. Multiple standard load balancers mode will be used if at lease one configuration is supplied. There has to be a + * configuration named `kubernetes`. The name field will be the name of the corresponding public load balancer. There + * will be an internal load balancer created if needed, and the name will be `<name>-internal`. The internal lb + * shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer + * list. + */ +@Fluent +public final class LoadBalancerInner extends ProxyResource { + /* + * The properties of the load balancer. + */ + private LoadBalancerProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of LoadBalancerInner class. + */ + public LoadBalancerInner() { + } + + /** + * Get the innerProperties property: The properties of the load balancer. + * + * @return the innerProperties value. + */ + private LoadBalancerProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @return the primaryAgentPoolName value. + */ + public String primaryAgentPoolName() { + return this.innerProperties() == null ? null : this.innerProperties().primaryAgentPoolName(); + } + + /** + * Set the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @param primaryAgentPoolName the primaryAgentPoolName value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withPrimaryAgentPoolName(String primaryAgentPoolName) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withPrimaryAgentPoolName(primaryAgentPoolName); + return this; + } + + /** + * Get the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @return the allowServicePlacement value. + */ + public Boolean allowServicePlacement() { + return this.innerProperties() == null ? null : this.innerProperties().allowServicePlacement(); + } + + /** + * Set the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @param allowServicePlacement the allowServicePlacement value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withAllowServicePlacement(Boolean allowServicePlacement) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withAllowServicePlacement(allowServicePlacement); + return this; + } + + /** + * Get the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @return the serviceLabelSelector value. + */ + public LabelSelector serviceLabelSelector() { + return this.innerProperties() == null ? null : this.innerProperties().serviceLabelSelector(); + } + + /** + * Set the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @param serviceLabelSelector the serviceLabelSelector value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withServiceLabelSelector(LabelSelector serviceLabelSelector) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withServiceLabelSelector(serviceLabelSelector); + return this; + } + + /** + * Get the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @return the serviceNamespaceSelector value. + */ + public LabelSelector serviceNamespaceSelector() { + return this.innerProperties() == null ? null : this.innerProperties().serviceNamespaceSelector(); + } + + /** + * Set the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @param serviceNamespaceSelector the serviceNamespaceSelector value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withServiceNamespaceSelector(LabelSelector serviceNamespaceSelector) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withServiceNamespaceSelector(serviceNamespaceSelector); + return this; + } + + /** + * Get the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @return the nodeSelector value. + */ + public LabelSelector nodeSelector() { + return this.innerProperties() == null ? null : this.innerProperties().nodeSelector(); + } + + /** + * Set the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @param nodeSelector the nodeSelector value to set. + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withNodeSelector(LabelSelector nodeSelector) { + if (this.innerProperties() == null) { + this.innerProperties = new LoadBalancerProperties(); + } + this.innerProperties().withNodeSelector(nodeSelector); + return this; + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerInner. + */ + public static LoadBalancerInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerInner deserializedLoadBalancerInner = new LoadBalancerInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedLoadBalancerInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedLoadBalancerInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedLoadBalancerInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedLoadBalancerInner.innerProperties = LoadBalancerProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedLoadBalancerInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java new file mode 100644 index 000000000000..5425a3eec21f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.LabelSelector; +import java.io.IOException; + +/** + * Properties for a load balancer resource. + */ +@Fluent +public final class LoadBalancerProperties implements JsonSerializable { + /* + * Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool + * will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for + * autoscaling operations. An agent pool can only be the primary pool for a single load balancer. + */ + private String primaryAgentPoolName; + + /* + * Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set + * to false manually, both of the external and the internal load balancer will not be selected for services unless + * they explicitly target it. + */ + private Boolean allowServicePlacement; + + /* + * Only services that must match this selector can be placed on this load balancer. + */ + private LabelSelector serviceLabelSelector; + + /* + * Services created in namespaces that match the selector can be placed on this load balancer. + */ + private LabelSelector serviceNamespaceSelector; + + /* + * Nodes that match this selector will be possible members of this load balancer. + */ + private LabelSelector nodeSelector; + + /* + * The current provisioning state. + */ + private String provisioningState; + + /** + * Creates an instance of LoadBalancerProperties class. + */ + public LoadBalancerProperties() { + } + + /** + * Get the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @return the primaryAgentPoolName value. + */ + public String primaryAgentPoolName() { + return this.primaryAgentPoolName; + } + + /** + * Set the primaryAgentPoolName property: Required field. A string value that must specify the ID of an existing + * agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at + * least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a + * single load balancer. + * + * @param primaryAgentPoolName the primaryAgentPoolName value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withPrimaryAgentPoolName(String primaryAgentPoolName) { + this.primaryAgentPoolName = primaryAgentPoolName; + return this; + } + + /** + * Get the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @return the allowServicePlacement value. + */ + public Boolean allowServicePlacement() { + return this.allowServicePlacement; + } + + /** + * Set the allowServicePlacement property: Whether to automatically place services on the load balancer. If not + * supplied, the default value is true. If set to false manually, both of the external and the internal load + * balancer will not be selected for services unless they explicitly target it. + * + * @param allowServicePlacement the allowServicePlacement value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withAllowServicePlacement(Boolean allowServicePlacement) { + this.allowServicePlacement = allowServicePlacement; + return this; + } + + /** + * Get the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @return the serviceLabelSelector value. + */ + public LabelSelector serviceLabelSelector() { + return this.serviceLabelSelector; + } + + /** + * Set the serviceLabelSelector property: Only services that must match this selector can be placed on this load + * balancer. + * + * @param serviceLabelSelector the serviceLabelSelector value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withServiceLabelSelector(LabelSelector serviceLabelSelector) { + this.serviceLabelSelector = serviceLabelSelector; + return this; + } + + /** + * Get the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @return the serviceNamespaceSelector value. + */ + public LabelSelector serviceNamespaceSelector() { + return this.serviceNamespaceSelector; + } + + /** + * Set the serviceNamespaceSelector property: Services created in namespaces that match the selector can be placed + * on this load balancer. + * + * @param serviceNamespaceSelector the serviceNamespaceSelector value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withServiceNamespaceSelector(LabelSelector serviceNamespaceSelector) { + this.serviceNamespaceSelector = serviceNamespaceSelector; + return this; + } + + /** + * Get the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @return the nodeSelector value. + */ + public LabelSelector nodeSelector() { + return this.nodeSelector; + } + + /** + * Set the nodeSelector property: Nodes that match this selector will be possible members of this load balancer. + * + * @param nodeSelector the nodeSelector value to set. + * @return the LoadBalancerProperties object itself. + */ + public LoadBalancerProperties withNodeSelector(LabelSelector nodeSelector) { + this.nodeSelector = nodeSelector; + return this; + } + + /** + * Get the provisioningState property: The current provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (primaryAgentPoolName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property primaryAgentPoolName in model LoadBalancerProperties")); + } + if (serviceLabelSelector() != null) { + serviceLabelSelector().validate(); + } + if (serviceNamespaceSelector() != null) { + serviceNamespaceSelector().validate(); + } + if (nodeSelector() != null) { + nodeSelector().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LoadBalancerProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("primaryAgentPoolName", this.primaryAgentPoolName); + jsonWriter.writeBooleanField("allowServicePlacement", this.allowServicePlacement); + jsonWriter.writeJsonField("serviceLabelSelector", this.serviceLabelSelector); + jsonWriter.writeJsonField("serviceNamespaceSelector", this.serviceNamespaceSelector); + jsonWriter.writeJsonField("nodeSelector", this.nodeSelector); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerProperties. + */ + public static LoadBalancerProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerProperties deserializedLoadBalancerProperties = new LoadBalancerProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primaryAgentPoolName".equals(fieldName)) { + deserializedLoadBalancerProperties.primaryAgentPoolName = reader.getString(); + } else if ("allowServicePlacement".equals(fieldName)) { + deserializedLoadBalancerProperties.allowServicePlacement + = reader.getNullable(JsonReader::getBoolean); + } else if ("serviceLabelSelector".equals(fieldName)) { + deserializedLoadBalancerProperties.serviceLabelSelector = LabelSelector.fromJson(reader); + } else if ("serviceNamespaceSelector".equals(fieldName)) { + deserializedLoadBalancerProperties.serviceNamespaceSelector = LabelSelector.fromJson(reader); + } else if ("nodeSelector".equals(fieldName)) { + deserializedLoadBalancerProperties.nodeSelector = LabelSelector.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedLoadBalancerProperties.provisioningState = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java index 348ec6777350..7d21daf092d2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.containerservice.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.json.JsonReader; @@ -18,7 +18,7 @@ * 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. */ -@Immutable +@Fluent public final class MachineInner extends ProxyResource { /* * The properties of the machine @@ -53,7 +53,7 @@ public final class MachineInner extends ProxyResource { /** * Creates an instance of MachineInner class. */ - private MachineInner() { + public MachineInner() { } /** @@ -65,6 +65,17 @@ public MachineProperties properties() { return this.properties; } + /** + * Set the properties property: The properties of the machine. + * + * @param properties the properties value to set. + * @return the MachineInner object itself. + */ + public MachineInner withProperties(MachineProperties properties) { + this.properties = properties; + return this; + } + /** * Get the zones property: The Availability zone in which machine is located. * @@ -74,6 +85,17 @@ public List zones() { return this.zones; } + /** + * Set the zones property: The Availability zone in which machine is located. + * + * @param zones the zones value to set. + * @return the MachineInner object itself. + */ + public MachineInner withZones(List zones) { + this.zones = zones; + return this; + } + /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -131,6 +153,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeArrayField("zones", this.zones, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java index 1f9316f563ef..c608bc975309 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java @@ -9,6 +9,8 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.AgentPoolArtifactStreamingProfile; +import com.azure.resourcemanager.containerservice.models.AgentPoolBlueGreenUpgradeSettings; import com.azure.resourcemanager.containerservice.models.AgentPoolGatewayProfile; import com.azure.resourcemanager.containerservice.models.AgentPoolMode; import com.azure.resourcemanager.containerservice.models.AgentPoolNetworkProfile; @@ -29,9 +31,11 @@ import com.azure.resourcemanager.containerservice.models.OSType; import com.azure.resourcemanager.containerservice.models.PodIpAllocationMode; import com.azure.resourcemanager.containerservice.models.PowerState; +import com.azure.resourcemanager.containerservice.models.PreparedImageSpecificationProfile; import com.azure.resourcemanager.containerservice.models.ScaleDownMode; import com.azure.resourcemanager.containerservice.models.ScaleSetEvictionPolicy; import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import com.azure.resourcemanager.containerservice.models.UpgradeStrategy; import com.azure.resourcemanager.containerservice.models.VirtualMachineNodes; import com.azure.resourcemanager.containerservice.models.VirtualMachinesProfile; import com.azure.resourcemanager.containerservice.models.WorkloadRuntime; @@ -192,11 +196,27 @@ public class ManagedClusterAgentPoolProfileProperties */ private String nodeImageVersion; + /* + * Defines the upgrade strategy for the agent pool. The default is Rolling. + */ + private UpgradeStrategy upgradeStrategy; + + /* + * Whether to enable the full-cache ephemeral OS disk feature. When this feature is enabled, the entire operating + * system will be locally cached on the ephemeral OS disk, preventing E17 events caused by network failures. + */ + private Boolean enableOSDiskFullCaching; + /* * Settings for upgrading the agentpool */ private AgentPoolUpgradeSettings upgradeSettings; + /* + * Settings for Blue-Green upgrade on the agentpool. Applies when upgrade strategy is set to BlueGreen. + */ + private AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen; + /* * The current deployment or provisioning state. */ @@ -267,6 +287,16 @@ public class ManagedClusterAgentPoolProfileProperties */ private List nodeTaints; + /* + * Taints added on the nodes during creation that will not be reconciled by AKS. These taints will not be reconciled + * by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes + * will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) + * happens. These taints allow for required configuration to run before the node is ready to accept workloads, for + * example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 + * key1=value1:NoSchedule-` + */ + private List nodeInitializationTaints; + /* * The ID for Proximity Placement Group. */ @@ -356,6 +386,11 @@ public class ManagedClusterAgentPoolProfileProperties */ private AgentPoolGatewayProfile gatewayProfile; + /* + * Configuration for using artifact streaming on AKS. + */ + private AgentPoolArtifactStreamingProfile artifactStreamingProfile; + /* * Specifications on VirtualMachines agent pool. */ @@ -377,6 +412,11 @@ public class ManagedClusterAgentPoolProfileProperties */ private LocalDnsProfile localDnsProfile; + /* + * Settings to determine the prepared image specification used to provision nodes in a pool. + */ + private PreparedImageSpecificationProfile preparedImageSpecificationProfile; + /** * Creates an instance of ManagedClusterAgentPoolProfileProperties class. */ @@ -910,11 +950,55 @@ public String nodeImageVersion() { * @param nodeImageVersion the nodeImageVersion value to set. * @return the ManagedClusterAgentPoolProfileProperties object itself. */ - ManagedClusterAgentPoolProfileProperties withNodeImageVersion(String nodeImageVersion) { + public ManagedClusterAgentPoolProfileProperties withNodeImageVersion(String nodeImageVersion) { this.nodeImageVersion = nodeImageVersion; return this; } + /** + * Get the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @return the upgradeStrategy value. + */ + public UpgradeStrategy upgradeStrategy() { + return this.upgradeStrategy; + } + + /** + * Set the upgradeStrategy property: Defines the upgrade strategy for the agent pool. The default is Rolling. + * + * @param upgradeStrategy the upgradeStrategy value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { + this.upgradeStrategy = upgradeStrategy; + return this; + } + + /** + * Get the enableOSDiskFullCaching property: Whether to enable the full-cache ephemeral OS disk feature. When this + * feature is enabled, the entire operating system will be locally cached on the ephemeral OS disk, preventing E17 + * events caused by network failures. + * + * @return the enableOSDiskFullCaching value. + */ + public Boolean enableOSDiskFullCaching() { + return this.enableOSDiskFullCaching; + } + + /** + * Set the enableOSDiskFullCaching property: Whether to enable the full-cache ephemeral OS disk feature. When this + * feature is enabled, the entire operating system will be locally cached on the ephemeral OS disk, preventing E17 + * events caused by network failures. + * + * @param enableOSDiskFullCaching the enableOSDiskFullCaching value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties withEnableOSDiskFullCaching(Boolean enableOSDiskFullCaching) { + this.enableOSDiskFullCaching = enableOSDiskFullCaching; + return this; + } + /** * Get the upgradeSettings property: Settings for upgrading the agentpool. * @@ -935,6 +1019,29 @@ public ManagedClusterAgentPoolProfileProperties withUpgradeSettings(AgentPoolUpg return this; } + /** + * Get the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @return the upgradeSettingsBlueGreen value. + */ + public AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen() { + return this.upgradeSettingsBlueGreen; + } + + /** + * Set the upgradeSettingsBlueGreen property: Settings for Blue-Green upgrade on the agentpool. Applies when upgrade + * strategy is set to BlueGreen. + * + * @param upgradeSettingsBlueGreen the upgradeSettingsBlueGreen value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { + this.upgradeSettingsBlueGreen = upgradeSettingsBlueGreen; + return this; + } + /** * Get the provisioningState property: The current deployment or provisioning state. * @@ -1192,6 +1299,37 @@ public ManagedClusterAgentPoolProfileProperties withNodeTaints(List node return this; } + /** + * Get the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + public List nodeInitializationTaints() { + return this.nodeInitializationTaints; + } + + /** + * Set the nodeInitializationTaints property: Taints added on the nodes during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be + * modified after node pool is created, but nodes will not be recreated with new taints until another operation that + * requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run + * before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with + * `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints the nodeInitializationTaints value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withNodeInitializationTaints(List nodeInitializationTaints) { + this.nodeInitializationTaints = nodeInitializationTaints; + return this; + } + /** * Get the proximityPlacementGroupId property: The ID for Proximity Placement Group. * @@ -1522,6 +1660,27 @@ public ManagedClusterAgentPoolProfileProperties withGatewayProfile(AgentPoolGate return this; } + /** + * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @return the artifactStreamingProfile value. + */ + public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { + return this.artifactStreamingProfile; + } + + /** + * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @param artifactStreamingProfile the artifactStreamingProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + this.artifactStreamingProfile = artifactStreamingProfile; + return this; + } + /** * Get the virtualMachinesProfile property: Specifications on VirtualMachines agent pool. * @@ -1608,6 +1767,29 @@ public ManagedClusterAgentPoolProfileProperties withLocalDnsProfile(LocalDnsProf return this; } + /** + * Get the preparedImageSpecificationProfile property: Settings to determine the prepared image specification used + * to provision nodes in a pool. + * + * @return the preparedImageSpecificationProfile value. + */ + public PreparedImageSpecificationProfile preparedImageSpecificationProfile() { + return this.preparedImageSpecificationProfile; + } + + /** + * Set the preparedImageSpecificationProfile property: Settings to determine the prepared image specification used + * to provision nodes in a pool. + * + * @param preparedImageSpecificationProfile the preparedImageSpecificationProfile value to set. + * @return the ManagedClusterAgentPoolProfileProperties object itself. + */ + public ManagedClusterAgentPoolProfileProperties + withPreparedImageSpecificationProfile(PreparedImageSpecificationProfile preparedImageSpecificationProfile) { + this.preparedImageSpecificationProfile = preparedImageSpecificationProfile; + return this; + } + /** * Validates the instance. * @@ -1617,6 +1799,9 @@ public void validate() { if (upgradeSettings() != null) { upgradeSettings().validate(); } + if (upgradeSettingsBlueGreen() != null) { + upgradeSettingsBlueGreen().validate(); + } if (powerState() != null) { powerState().validate(); } @@ -1644,6 +1829,9 @@ public void validate() { if (gatewayProfile() != null) { gatewayProfile().validate(); } + if (artifactStreamingProfile() != null) { + artifactStreamingProfile().validate(); + } if (virtualMachinesProfile() != null) { virtualMachinesProfile().validate(); } @@ -1656,6 +1844,9 @@ public void validate() { if (localDnsProfile() != null) { localDnsProfile().validate(); } + if (preparedImageSpecificationProfile() != null) { + preparedImageSpecificationProfile().validate(); + } } /** @@ -1687,7 +1878,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); + jsonWriter.writeStringField("nodeImageVersion", this.nodeImageVersion); + jsonWriter.writeStringField("upgradeStrategy", + this.upgradeStrategy == null ? null : this.upgradeStrategy.toString()); + jsonWriter.writeBooleanField("enableOSDiskFullCaching", this.enableOSDiskFullCaching); jsonWriter.writeJsonField("upgradeSettings", this.upgradeSettings); + jsonWriter.writeJsonField("upgradeSettingsBlueGreen", this.upgradeSettingsBlueGreen); jsonWriter.writeJsonField("powerState", this.powerState); jsonWriter.writeArrayField("availabilityZones", this.availabilityZones, (writer, element) -> writer.writeString(element)); @@ -1701,6 +1897,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("nodeLabels", this.nodeLabels, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("nodeTaints", this.nodeTaints, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("nodeInitializationTaints", this.nodeInitializationTaints, + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("proximityPlacementGroupID", this.proximityPlacementGroupId); jsonWriter.writeJsonField("kubeletConfig", this.kubeletConfig); jsonWriter.writeJsonField("linuxOSConfig", this.linuxOSConfig); @@ -1717,11 +1915,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("securityProfile", this.securityProfile); jsonWriter.writeJsonField("gpuProfile", this.gpuProfile); jsonWriter.writeJsonField("gatewayProfile", this.gatewayProfile); + jsonWriter.writeJsonField("artifactStreamingProfile", this.artifactStreamingProfile); jsonWriter.writeJsonField("virtualMachinesProfile", this.virtualMachinesProfile); jsonWriter.writeArrayField("virtualMachineNodesStatus", this.virtualMachineNodesStatus, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("status", this.status); jsonWriter.writeJsonField("localDNSProfile", this.localDnsProfile); + jsonWriter.writeJsonField("preparedImageSpecificationProfile", this.preparedImageSpecificationProfile); return jsonWriter.writeEndObject(); } @@ -1800,9 +2000,18 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR = reader.getString(); } else if ("nodeImageVersion".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.nodeImageVersion = reader.getString(); + } else if ("upgradeStrategy".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.upgradeStrategy + = UpgradeStrategy.fromString(reader.getString()); + } else if ("enableOSDiskFullCaching".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.enableOSDiskFullCaching + = reader.getNullable(JsonReader::getBoolean); } else if ("upgradeSettings".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.upgradeSettings = AgentPoolUpgradeSettings.fromJson(reader); + } else if ("upgradeSettingsBlueGreen".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.upgradeSettingsBlueGreen + = AgentPoolBlueGreenUpgradeSettings.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { @@ -1833,6 +2042,10 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR } else if ("nodeTaints".equals(fieldName)) { List nodeTaints = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterAgentPoolProfileProperties.nodeTaints = nodeTaints; + } else if ("nodeInitializationTaints".equals(fieldName)) { + List nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfileProperties.nodeInitializationTaints + = nodeInitializationTaints; } else if ("proximityPlacementGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.proximityPlacementGroupId = reader.getString(); } else if ("kubeletConfig".equals(fieldName)) { @@ -1872,6 +2085,9 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR } else if ("gatewayProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.gatewayProfile = AgentPoolGatewayProfile.fromJson(reader); + } else if ("artifactStreamingProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.artifactStreamingProfile + = AgentPoolArtifactStreamingProfile.fromJson(reader); } else if ("virtualMachinesProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.virtualMachinesProfile = VirtualMachinesProfile.fromJson(reader); @@ -1885,6 +2101,9 @@ public static ManagedClusterAgentPoolProfileProperties fromJson(JsonReader jsonR } else if ("localDNSProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfileProperties.localDnsProfile = LocalDnsProfile.fromJson(reader); + } else if ("preparedImageSpecificationProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfileProperties.preparedImageSpecificationProfile + = PreparedImageSpecificationProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java index 97a5a4217b2a..19248ae17af7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java @@ -13,6 +13,7 @@ import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservice.models.CreationData; import com.azure.resourcemanager.containerservice.models.ExtendedLocation; import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; @@ -23,6 +24,8 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterControlPlaneScalingProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterHealthMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHostedSystemProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; import com.azure.resourcemanager.containerservice.models.ManagedClusterIdentity; @@ -42,6 +45,7 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; import com.azure.resourcemanager.containerservice.models.PowerState; import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservice.models.SchedulerProfile; import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; import java.io.IOException; @@ -290,6 +294,31 @@ public PowerState powerState() { return this.innerProperties() == null ? null : this.innerProperties().powerState(); } + /** + * Get the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be + * created/upgraded using a snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.innerProperties() == null ? null : this.innerProperties().creationData(); + } + + /** + * Set the creationData property: CreationData to be used to specify the source Snapshot ID if the cluster will be + * created/upgraded using a snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withCreationData(creationData); + return this; + } + /** * Get the maxAgentPools property: The max number of agent pools for the managed cluster. * @@ -691,6 +720,35 @@ public ManagedClusterInner withSupportPlan(KubernetesSupportPlan supportPlan) { return this; } + /** + * Get the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can + * be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM + * Resource. + * + * @return the enableNamespaceResources value. + */ + public Boolean enableNamespaceResources() { + return this.innerProperties() == null ? null : this.innerProperties().enableNamespaceResources(); + } + + /** + * Set the enableNamespaceResources property: Enable namespace as Azure resource. The default value is false. It can + * be enabled/disabled on creation and updating of the managed cluster. See + * [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM + * Resource. + * + * @param enableNamespaceResources the enableNamespaceResources value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withEnableNamespaceResources(Boolean enableNamespaceResources) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withEnableNamespaceResources(enableNamespaceResources); + return this; + } + /** * Get the networkProfile property: The network configuration profile. * @@ -1228,6 +1286,29 @@ public ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile() { return this; } + /** + * Get the schedulerProfile property: Profile of the pod scheduler configuration. + * + * @return the schedulerProfile value. + */ + public SchedulerProfile schedulerProfile() { + return this.innerProperties() == null ? null : this.innerProperties().schedulerProfile(); + } + + /** + * Set the schedulerProfile property: Profile of the pod scheduler configuration. + * + * @param schedulerProfile the schedulerProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withSchedulerProfile(SchedulerProfile schedulerProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withSchedulerProfile(schedulerProfile); + return this; + } + /** * Get the hostedSystemProfile property: Settings for hosted system addons. For more information, see * https://aka.ms/aks/automatic/systemcomponents. @@ -1253,6 +1334,57 @@ public ManagedClusterInner withHostedSystemProfile(ManagedClusterHostedSystemPro return this; } + /** + * Get the healthMonitorProfile property: Health monitor profile for the managed cluster. + * + * @return the healthMonitorProfile value. + */ + public ManagedClusterHealthMonitorProfile healthMonitorProfile() { + return this.innerProperties() == null ? null : this.innerProperties().healthMonitorProfile(); + } + + /** + * Set the healthMonitorProfile property: Health monitor profile for the managed cluster. + * + * @param healthMonitorProfile the healthMonitorProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner withHealthMonitorProfile(ManagedClusterHealthMonitorProfile healthMonitorProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withHealthMonitorProfile(healthMonitorProfile); + return this; + } + + /** + * Get the controlPlaneScalingProfile property: Profile for providing scaled and performance guaranteed control + * plane capacity to deliver consistent performance under high workload. Requires Kubernetes version 1.33.0 or + * later. + * + * @return the controlPlaneScalingProfile value. + */ + public ManagedClusterControlPlaneScalingProfile controlPlaneScalingProfile() { + return this.innerProperties() == null ? null : this.innerProperties().controlPlaneScalingProfile(); + } + + /** + * Set the controlPlaneScalingProfile property: Profile for providing scaled and performance guaranteed control + * plane capacity to deliver consistent performance under high workload. Requires Kubernetes version 1.33.0 or + * later. + * + * @param controlPlaneScalingProfile the controlPlaneScalingProfile value to set. + * @return the ManagedClusterInner object itself. + */ + public ManagedClusterInner + withControlPlaneScalingProfile(ManagedClusterControlPlaneScalingProfile controlPlaneScalingProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterProperties(); + } + this.innerProperties().withControlPlaneScalingProfile(controlPlaneScalingProfile); + return this; + } + /** * Get the status property: Contains read-only information about the Managed Cluster. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java index 5137a2c13c3a..506ba29905c5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.containerservice.models.ClusterUpgradeSettings; import com.azure.resourcemanager.containerservice.models.ContainerServiceLinuxProfile; import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; +import com.azure.resourcemanager.containerservice.models.CreationData; import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; @@ -21,6 +22,8 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterAutoUpgradeProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAzureMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterBootstrapProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterControlPlaneScalingProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterHealthMonitorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHostedSystemProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; @@ -38,6 +41,7 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterWorkloadAutoScalerProfile; import com.azure.resourcemanager.containerservice.models.PowerState; import com.azure.resourcemanager.containerservice.models.PublicNetworkAccess; +import com.azure.resourcemanager.containerservice.models.SchedulerProfile; import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; import java.io.IOException; @@ -59,6 +63,12 @@ public final class ManagedClusterProperties implements JsonSerializable e.validate()); } @@ -1296,9 +1445,18 @@ public void validate() { if (aiToolchainOperatorProfile() != null) { aiToolchainOperatorProfile().validate(); } + if (schedulerProfile() != null) { + schedulerProfile().validate(); + } if (hostedSystemProfile() != null) { hostedSystemProfile().validate(); } + if (healthMonitorProfile() != null) { + healthMonitorProfile().validate(); + } + if (controlPlaneScalingProfile() != null) { + controlPlaneScalingProfile().validate(); + } if (status() != null) { status().validate(); } @@ -1310,6 +1468,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("creationData", this.creationData); jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeStringField("dnsPrefix", this.dnsPrefix); jsonWriter.writeStringField("fqdnSubdomain", this.fqdnSubdomain); @@ -1325,6 +1484,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("nodeResourceGroupProfile", this.nodeResourceGroupProfile); jsonWriter.writeBooleanField("enableRBAC", this.enableRbac); jsonWriter.writeStringField("supportPlan", this.supportPlan == null ? null : this.supportPlan.toString()); + jsonWriter.writeBooleanField("enableNamespaceResources", this.enableNamespaceResources); jsonWriter.writeJsonField("networkProfile", this.networkProfile); jsonWriter.writeJsonField("aadProfile", this.aadProfile); jsonWriter.writeJsonField("autoUpgradeProfile", this.autoUpgradeProfile); @@ -1350,7 +1510,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("nodeProvisioningProfile", this.nodeProvisioningProfile); jsonWriter.writeJsonField("bootstrapProfile", this.bootstrapProfile); jsonWriter.writeJsonField("aiToolchainOperatorProfile", this.aiToolchainOperatorProfile); + jsonWriter.writeJsonField("schedulerProfile", this.schedulerProfile); jsonWriter.writeJsonField("hostedSystemProfile", this.hostedSystemProfile); + jsonWriter.writeJsonField("healthMonitorProfile", this.healthMonitorProfile); + jsonWriter.writeJsonField("controlPlaneScalingProfile", this.controlPlaneScalingProfile); jsonWriter.writeJsonField("status", this.status); return jsonWriter.writeEndObject(); } @@ -1374,6 +1537,8 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO deserializedManagedClusterProperties.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { deserializedManagedClusterProperties.powerState = PowerState.fromJson(reader); + } else if ("creationData".equals(fieldName)) { + deserializedManagedClusterProperties.creationData = CreationData.fromJson(reader); } else if ("maxAgentPools".equals(fieldName)) { deserializedManagedClusterProperties.maxAgentPools = reader.getNullable(JsonReader::getInt); } else if ("kubernetesVersion".equals(fieldName)) { @@ -1421,6 +1586,9 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO } else if ("supportPlan".equals(fieldName)) { deserializedManagedClusterProperties.supportPlan = KubernetesSupportPlan.fromString(reader.getString()); + } else if ("enableNamespaceResources".equals(fieldName)) { + deserializedManagedClusterProperties.enableNamespaceResources + = reader.getNullable(JsonReader::getBoolean); } else if ("networkProfile".equals(fieldName)) { deserializedManagedClusterProperties.networkProfile = ContainerServiceNetworkProfile.fromJson(reader); @@ -1484,9 +1652,17 @@ public static ManagedClusterProperties fromJson(JsonReader jsonReader) throws IO } else if ("aiToolchainOperatorProfile".equals(fieldName)) { deserializedManagedClusterProperties.aiToolchainOperatorProfile = ManagedClusterAIToolchainOperatorProfile.fromJson(reader); + } else if ("schedulerProfile".equals(fieldName)) { + deserializedManagedClusterProperties.schedulerProfile = SchedulerProfile.fromJson(reader); } else if ("hostedSystemProfile".equals(fieldName)) { deserializedManagedClusterProperties.hostedSystemProfile = ManagedClusterHostedSystemProfile.fromJson(reader); + } else if ("healthMonitorProfile".equals(fieldName)) { + deserializedManagedClusterProperties.healthMonitorProfile + = ManagedClusterHealthMonitorProfile.fromJson(reader); + } else if ("controlPlaneScalingProfile".equals(fieldName)) { + deserializedManagedClusterProperties.controlPlaneScalingProfile + = ManagedClusterControlPlaneScalingProfile.fromJson(reader); } else if ("status".equals(fieldName)) { deserializedManagedClusterProperties.status = ManagedClusterStatus.fromJson(reader); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java new file mode 100644 index 000000000000..ad04226937af --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesForSnapshot; +import com.azure.resourcemanager.containerservice.models.SnapshotType; +import java.io.IOException; +import java.util.Map; + +/** + * A managed cluster snapshot resource. + */ +@Fluent +public final class ManagedClusterSnapshotInner extends Resource { + /* + * Properties of a managed cluster snapshot. + */ + private ManagedClusterSnapshotProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of ManagedClusterSnapshotInner class. + */ + public ManagedClusterSnapshotInner() { + } + + /** + * Get the innerProperties property: Properties of a managed cluster snapshot. + * + * @return the innerProperties value. + */ + private ManagedClusterSnapshotProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterSnapshotInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterSnapshotInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.innerProperties() == null ? null : this.innerProperties().creationData(); + } + + /** + * Set the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterSnapshotInner object itself. + */ + public ManagedClusterSnapshotInner withCreationData(CreationData creationData) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterSnapshotProperties(); + } + this.innerProperties().withCreationData(creationData); + return this; + } + + /** + * Get the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + public SnapshotType snapshotType() { + return this.innerProperties() == null ? null : this.innerProperties().snapshotType(); + } + + /** + * Set the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @param snapshotType the snapshotType value to set. + * @return the ManagedClusterSnapshotInner object itself. + */ + public ManagedClusterSnapshotInner withSnapshotType(SnapshotType snapshotType) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedClusterSnapshotProperties(); + } + this.innerProperties().withSnapshotType(snapshotType); + return this; + } + + /** + * Get the managedClusterPropertiesReadOnly property: What the properties will be showed when getting managed + * cluster snapshot. Those properties are read-only. + * + * @return the managedClusterPropertiesReadOnly value. + */ + public ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly() { + return this.innerProperties() == null ? null : this.innerProperties().managedClusterPropertiesReadOnly(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSnapshotInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSnapshotInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedClusterSnapshotInner. + */ + public static ManagedClusterSnapshotInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSnapshotInner deserializedManagedClusterSnapshotInner = new ManagedClusterSnapshotInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedClusterSnapshotInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.innerProperties + = ManagedClusterSnapshotProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedManagedClusterSnapshotInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSnapshotInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java new file mode 100644 index 000000000000..e1a44d06f3a7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.CreationData; +import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesForSnapshot; +import com.azure.resourcemanager.containerservice.models.SnapshotType; +import java.io.IOException; + +/** + * Properties for a managed cluster snapshot. + */ +@Fluent +public final class ManagedClusterSnapshotProperties implements JsonSerializable { + /* + * CreationData to be used to specify the source resource ID to create this snapshot. + */ + private CreationData creationData; + + /* + * The type of a snapshot. The default is NodePool. + */ + private SnapshotType snapshotType; + + /* + * What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. + */ + private ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly; + + /** + * Creates an instance of ManagedClusterSnapshotProperties class. + */ + public ManagedClusterSnapshotProperties() { + } + + /** + * Get the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @return the creationData value. + */ + public CreationData creationData() { + return this.creationData; + } + + /** + * Set the creationData property: CreationData to be used to specify the source resource ID to create this snapshot. + * + * @param creationData the creationData value to set. + * @return the ManagedClusterSnapshotProperties object itself. + */ + public ManagedClusterSnapshotProperties withCreationData(CreationData creationData) { + this.creationData = creationData; + return this; + } + + /** + * Get the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @return the snapshotType value. + */ + public SnapshotType snapshotType() { + return this.snapshotType; + } + + /** + * Set the snapshotType property: The type of a snapshot. The default is NodePool. + * + * @param snapshotType the snapshotType value to set. + * @return the ManagedClusterSnapshotProperties object itself. + */ + public ManagedClusterSnapshotProperties withSnapshotType(SnapshotType snapshotType) { + this.snapshotType = snapshotType; + return this; + } + + /** + * Get the managedClusterPropertiesReadOnly property: What the properties will be showed when getting managed + * cluster snapshot. Those properties are read-only. + * + * @return the managedClusterPropertiesReadOnly value. + */ + public ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly() { + return this.managedClusterPropertiesReadOnly; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (creationData() != null) { + creationData().validate(); + } + if (managedClusterPropertiesReadOnly() != null) { + managedClusterPropertiesReadOnly().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("creationData", this.creationData); + jsonWriter.writeStringField("snapshotType", this.snapshotType == null ? null : this.snapshotType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSnapshotProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSnapshotProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSnapshotProperties. + */ + public static ManagedClusterSnapshotProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSnapshotProperties deserializedManagedClusterSnapshotProperties + = new ManagedClusterSnapshotProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("creationData".equals(fieldName)) { + deserializedManagedClusterSnapshotProperties.creationData = CreationData.fromJson(reader); + } else if ("snapshotType".equals(fieldName)) { + deserializedManagedClusterSnapshotProperties.snapshotType + = SnapshotType.fromString(reader.getString()); + } else if ("managedClusterPropertiesReadOnly".equals(fieldName)) { + deserializedManagedClusterSnapshotProperties.managedClusterPropertiesReadOnly + = ManagedClusterPropertiesForSnapshot.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSnapshotProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java new file mode 100644 index 000000000000..ead228ed0798 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.MeshMembershipProperties; +import java.io.IOException; + +/** + * Mesh membership of a managed cluster. + */ +@Fluent +public final class MeshMembershipInner extends ProxyResource { + /* + * Mesh membership properties of a managed cluster. + */ + private MeshMembershipProperties properties; + + /* + * The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed + * by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is + * removed from the template since it is managed by another resource. + */ + private String managedBy; + + /* + * If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. + * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity + * tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section + * 14.27) header fields. + */ + private String eTag; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of MeshMembershipInner class. + */ + public MeshMembershipInner() { + } + + /** + * Get the properties property: Mesh membership properties of a managed cluster. + * + * @return the properties value. + */ + public MeshMembershipProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Mesh membership properties of a managed cluster. + * + * @param properties the properties value to set. + * @return the MeshMembershipInner object itself. + */ + public MeshMembershipInner withProperties(MeshMembershipProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. + * + * @return the managedBy value. + */ + public String managedBy() { + return this.managedBy; + } + + /** + * Set the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. + * + * @param managedBy the managedBy value to set. + * @return the MeshMembershipInner object itself. + */ + public MeshMembershipInner withManagedBy(String managedBy) { + this.managedBy = managedBy; + return this; + } + + /** + * Get the eTag property: If eTag is provided in the response body, it may also be provided as a header per the + * normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. + * HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), + * and If-Range (section 14.27) header fields. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("managedBy", this.managedBy); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshMembershipInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshMembershipInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MeshMembershipInner. + */ + public static MeshMembershipInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshMembershipInner deserializedMeshMembershipInner = new MeshMembershipInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMeshMembershipInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMeshMembershipInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMeshMembershipInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedMeshMembershipInner.properties = MeshMembershipProperties.fromJson(reader); + } else if ("managedBy".equals(fieldName)) { + deserializedMeshMembershipInner.managedBy = reader.getString(); + } else if ("eTag".equals(fieldName)) { + deserializedMeshMembershipInner.eTag = reader.getString(); + } else if ("systemData".equals(fieldName)) { + deserializedMeshMembershipInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshMembershipInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java new file mode 100644 index 000000000000..50dab7b1d2a6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * node image version profile for given major.minor.patch release. + */ +@Immutable +public final class NodeImageVersionInner implements JsonSerializable { + /* + * The operating system of the node image. Example: AKSUbuntu + */ + private String os; + + /* + * The SKU or flavor of the node image. Example: 2004gen2containerd + */ + private String sku; + + /* + * major.minor.patch version of the node image version release. Example: 2024.02.02 + */ + private String version; + + /* + * The OS + SKU + version of the node image. Example: AKSUbuntu-1804gen2containerd-2024.02.02 + */ + private String fullName; + + /** + * Creates an instance of NodeImageVersionInner class. + */ + private NodeImageVersionInner() { + } + + /** + * Get the os property: The operating system of the node image. Example: AKSUbuntu. + * + * @return the os value. + */ + public String os() { + return this.os; + } + + /** + * Get the sku property: The SKU or flavor of the node image. Example: 2004gen2containerd. + * + * @return the sku value. + */ + public String sku() { + return this.sku; + } + + /** + * Get the version property: major.minor.patch version of the node image version release. Example: 2024.02.02. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the fullName property: The OS + SKU + version of the node image. Example: + * AKSUbuntu-1804gen2containerd-2024.02.02. + * + * @return the fullName value. + */ + public String fullName() { + return this.fullName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("os", this.os); + jsonWriter.writeStringField("sku", this.sku); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeStringField("fullName", this.fullName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NodeImageVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeImageVersionInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NodeImageVersionInner. + */ + public static NodeImageVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeImageVersionInner deserializedNodeImageVersionInner = new NodeImageVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("os".equals(fieldName)) { + deserializedNodeImageVersionInner.os = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedNodeImageVersionInner.sku = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedNodeImageVersionInner.version = reader.getString(); + } else if ("fullName".equals(fieldName)) { + deserializedNodeImageVersionInner.fullName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeImageVersionInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java new file mode 100644 index 000000000000..66a673ace75f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The current status of an async operation. + */ +@Immutable +public final class OperationStatusResultInner implements JsonSerializable { + /* + * Fully qualified ID for the async operation. + */ + private String id; + + /* + * Name of the async operation. + */ + private String name; + + /* + * Operation status. + */ + private String status; + + /* + * Percent of the operation that is complete. + */ + private Double percentComplete; + + /* + * The start time of the operation. + */ + private OffsetDateTime startTime; + + /* + * The end time of the operation. + */ + private OffsetDateTime endTime; + + /* + * The operations list. + */ + private List operations; + + /* + * If present, details of the operation error. + */ + private ManagementError error; + + /* + * Fully qualified ID of the resource against which the original async operation was started. + */ + private String resourceId; + + /** + * Creates an instance of OperationStatusResultInner class. + */ + private OperationStatusResultInner() { + } + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the percentComplete property: Percent of the operation that is complete. + * + * @return the percentComplete value. + */ + public Double percentComplete() { + return this.percentComplete; + } + + /** + * Get the startTime property: The start time of the operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: The end time of the operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the operations property: The operations list. + * + * @return the operations value. + */ + public List operations() { + return this.operations; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Get the resourceId property: Fully qualified ID of the resource against which the original async operation was + * started. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (status() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property status in model OperationStatusResultInner")); + } + if (operations() != null) { + operations().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResultInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("percentComplete", this.percentComplete); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("operations", this.operations, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationStatusResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStatusResultInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationStatusResultInner. + */ + public static OperationStatusResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationStatusResultInner deserializedOperationStatusResultInner = new OperationStatusResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedOperationStatusResultInner.status = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedOperationStatusResultInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationStatusResultInner.name = reader.getString(); + } else if ("percentComplete".equals(fieldName)) { + deserializedOperationStatusResultInner.percentComplete = reader.getNullable(JsonReader::getDouble); + } else if ("startTime".equals(fieldName)) { + deserializedOperationStatusResultInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedOperationStatusResultInner.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("operations".equals(fieldName)) { + List operations + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedOperationStatusResultInner.operations = operations; + } else if ("error".equals(fieldName)) { + deserializedOperationStatusResultInner.error = ManagementError.fromJson(reader); + } else if ("resourceId".equals(fieldName)) { + deserializedOperationStatusResultInner.resourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationStatusResultInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ResourceSkuInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ResourceSkuInner.java new file mode 100644 index 000000000000..37c271dfea79 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ResourceSkuInner.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.ResourceSkuCapabilities; +import com.azure.resourcemanager.containerservice.models.ResourceSkuCapacity; +import com.azure.resourcemanager.containerservice.models.ResourceSkuCosts; +import com.azure.resourcemanager.containerservice.models.ResourceSkuLocationInfo; +import com.azure.resourcemanager.containerservice.models.ResourceSkuRestrictions; +import java.io.IOException; +import java.util.List; + +/** + * Describes an available Compute SKU. + */ +@Immutable +public final class ResourceSkuInner implements JsonSerializable { + /* + * The type of resource the SKU applies to. + */ + private String resourceType; + + /* + * The name of SKU. + */ + private String name; + + /* + * Specifies the tier of virtual machines in a scale set.

Possible Values:

**Standard**

**Basic** + */ + private String tier; + + /* + * The Size of the SKU. + */ + private String size; + + /* + * The Family of this particular SKU. + */ + private String family; + + /* + * The Kind of resources that are supported in this SKU. + */ + private String kind; + + /* + * Specifies the number of virtual machines in the scale set. + */ + private ResourceSkuCapacity capacity; + + /* + * The set of locations that the SKU is available. + */ + private List locations; + + /* + * A list of locations and availability zones in those locations where the SKU is available. + */ + private List locationInfo; + + /* + * The api versions that support this SKU. + */ + private List apiVersions; + + /* + * Metadata for retrieving price info. + */ + private List costs; + + /* + * A name value pair to describe the capability. + */ + private List capabilities; + + /* + * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + */ + private List restrictions; + + /** + * Creates an instance of ResourceSkuInner class. + */ + private ResourceSkuInner() { + } + + /** + * Get the resourceType property: The type of resource the SKU applies to. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the name property: The name of SKU. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the tier property: Specifies the tier of virtual machines in a scale set.<br /><br /> Possible + * Values:<br /><br /> **Standard**<br /><br /> **Basic**. + * + * @return the tier value. + */ + public String tier() { + return this.tier; + } + + /** + * Get the size property: The Size of the SKU. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Get the family property: The Family of this particular SKU. + * + * @return the family value. + */ + public String family() { + return this.family; + } + + /** + * Get the kind property: The Kind of resources that are supported in this SKU. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Get the capacity property: Specifies the number of virtual machines in the scale set. + * + * @return the capacity value. + */ + public ResourceSkuCapacity capacity() { + return this.capacity; + } + + /** + * Get the locations property: The set of locations that the SKU is available. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Get the locationInfo property: A list of locations and availability zones in those locations where the SKU is + * available. + * + * @return the locationInfo value. + */ + public List locationInfo() { + return this.locationInfo; + } + + /** + * Get the apiVersions property: The api versions that support this SKU. + * + * @return the apiVersions value. + */ + public List apiVersions() { + return this.apiVersions; + } + + /** + * Get the costs property: Metadata for retrieving price info. + * + * @return the costs value. + */ + public List costs() { + return this.costs; + } + + /** + * Get the capabilities property: A name value pair to describe the capability. + * + * @return the capabilities value. + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Get the restrictions property: The restrictions because of which SKU cannot be used. This is empty if there are + * no restrictions. + * + * @return the restrictions value. + */ + public List restrictions() { + return this.restrictions; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capacity() != null) { + capacity().validate(); + } + if (locationInfo() != null) { + locationInfo().forEach(e -> e.validate()); + } + if (costs() != null) { + costs().forEach(e -> e.validate()); + } + if (capabilities() != null) { + capabilities().forEach(e -> e.validate()); + } + if (restrictions() != null) { + restrictions().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuInner. + */ + public static ResourceSkuInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuInner deserializedResourceSkuInner = new ResourceSkuInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceType".equals(fieldName)) { + deserializedResourceSkuInner.resourceType = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedResourceSkuInner.name = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedResourceSkuInner.tier = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedResourceSkuInner.size = reader.getString(); + } else if ("family".equals(fieldName)) { + deserializedResourceSkuInner.family = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedResourceSkuInner.kind = reader.getString(); + } else if ("capacity".equals(fieldName)) { + deserializedResourceSkuInner.capacity = ResourceSkuCapacity.fromJson(reader); + } else if ("locations".equals(fieldName)) { + List locations = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuInner.locations = locations; + } else if ("locationInfo".equals(fieldName)) { + List locationInfo + = reader.readArray(reader1 -> ResourceSkuLocationInfo.fromJson(reader1)); + deserializedResourceSkuInner.locationInfo = locationInfo; + } else if ("apiVersions".equals(fieldName)) { + List apiVersions = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuInner.apiVersions = apiVersions; + } else if ("costs".equals(fieldName)) { + List costs = reader.readArray(reader1 -> ResourceSkuCosts.fromJson(reader1)); + deserializedResourceSkuInner.costs = costs; + } else if ("capabilities".equals(fieldName)) { + List capabilities + = reader.readArray(reader1 -> ResourceSkuCapabilities.fromJson(reader1)); + deserializedResourceSkuInner.capabilities = capabilities; + } else if ("restrictions".equals(fieldName)) { + List restrictions + = reader.readArray(reader1 -> ResourceSkuRestrictions.fromJson(reader1)); + deserializedResourceSkuInner.restrictions = restrictions; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java new file mode 100644 index 000000000000..edfa11b669ba --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.models.SafeguardsAvailableVersionsProperties; +import java.io.IOException; + +/** + * Available Safeguards Version. + */ +@Immutable +public final class SafeguardsAvailableVersionInner extends ProxyResource { + /* + * Whether the version is default or not and support info. + */ + private SafeguardsAvailableVersionsProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SafeguardsAvailableVersionInner class. + */ + private SafeguardsAvailableVersionInner() { + } + + /** + * Get the properties property: Whether the version is default or not and support info. + * + * @return the properties value. + */ + public SafeguardsAvailableVersionsProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model SafeguardsAvailableVersionInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SafeguardsAvailableVersionInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SafeguardsAvailableVersionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SafeguardsAvailableVersionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionInner. + */ + public static SafeguardsAvailableVersionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SafeguardsAvailableVersionInner deserializedSafeguardsAvailableVersionInner + = new SafeguardsAvailableVersionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.properties + = SafeguardsAvailableVersionsProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSafeguardsAvailableVersionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSafeguardsAvailableVersionInner; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java index b6fe3e48afd6..0d6e4e6f01a5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java @@ -123,6 +123,15 @@ Mono>> abortLatestOperation(@HostParam("endpoint") Str @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("agentPoolName") String agentPoolName, Context context); + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/completeUpgrade") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> completeUpgrade(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, Context context); + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines") @ExpectedResponses({ 202 }) @@ -1326,6 +1335,246 @@ public void abortLatestOperation(String resourceGroupName, String resourceName, abortLatestOperationAsync(resourceGroupName, resourceName, agentPoolName, context).block(); } + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> completeUpgradeWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.completeUpgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> completeUpgradeWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.completeUpgrade(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, context); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, + String agentPoolName) { + Mono>> mono + = completeUpgradeWithResponseAsync(resourceGroupName, resourceName, agentPoolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginCompleteUpgradeAsync(String resourceGroupName, String resourceName, + String agentPoolName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = completeUpgradeWithResponseAsync(resourceGroupName, resourceName, agentPoolName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName) { + return this.beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName).getSyncPoller(); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCompleteUpgrade(String resourceGroupName, String resourceName, + String agentPoolName, Context context) { + return this.beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).getSyncPoller(); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName) { + return beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono completeUpgradeAsync(String resourceGroupName, String resourceName, String agentPoolName, + Context context) { + return beginCompleteUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName) { + completeUpgradeAsync(resourceGroupName, resourceName, agentPoolName).block(); + } + + /** + * Completes the upgrade of an agent pool. + * + * Completes the upgrade operation for the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void completeUpgrade(String resourceGroupName, String resourceName, String agentPoolName, Context context) { + completeUpgradeAsync(resourceGroupName, resourceName, agentPoolName, context).block(); + } + /** * Deletes specific machines in an agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java index 9f6128adfc79..570f29259f74 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java @@ -10,10 +10,16 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.resourcemanager.containerservice.fluent.AgentPoolsClient; import com.azure.resourcemanager.containerservice.fluent.ContainerServiceManagementClient; +import com.azure.resourcemanager.containerservice.fluent.IdentityBindingsClient; +import com.azure.resourcemanager.containerservice.fluent.JWTAuthenticatorsClient; +import com.azure.resourcemanager.containerservice.fluent.LoadBalancersClient; import com.azure.resourcemanager.containerservice.fluent.MachinesClient; import com.azure.resourcemanager.containerservice.fluent.MaintenanceConfigurationsClient; +import com.azure.resourcemanager.containerservice.fluent.ManagedClusterSnapshotsClient; import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; import com.azure.resourcemanager.containerservice.fluent.ManagedNamespacesClient; +import com.azure.resourcemanager.containerservice.fluent.MeshMembershipsClient; +import com.azure.resourcemanager.containerservice.fluent.OperationStatusResultsClient; import com.azure.resourcemanager.containerservice.fluent.OperationsClient; import com.azure.resourcemanager.containerservice.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.containerservice.fluent.PrivateLinkResourcesClient; @@ -21,6 +27,7 @@ import com.azure.resourcemanager.containerservice.fluent.SnapshotsClient; import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRoleBindingsClient; import com.azure.resourcemanager.containerservice.fluent.TrustedAccessRolesClient; +import com.azure.resourcemanager.containerservice.fluent.VmSkusClient; import com.azure.resourcemanager.resources.fluentcore.AzureServiceClient; import java.time.Duration; @@ -212,6 +219,20 @@ public SnapshotsClient getSnapshots() { return this.snapshots; } + /** + * The ManagedClusterSnapshotsClient object to access its operations. + */ + private final ManagedClusterSnapshotsClient managedClusterSnapshots; + + /** + * Gets the ManagedClusterSnapshotsClient object to access its operations. + * + * @return the ManagedClusterSnapshotsClient object. + */ + public ManagedClusterSnapshotsClient getManagedClusterSnapshots() { + return this.managedClusterSnapshots; + } + /** * The TrustedAccessRoleBindingsClient object to access its operations. */ @@ -226,6 +247,62 @@ public TrustedAccessRoleBindingsClient getTrustedAccessRoleBindings() { return this.trustedAccessRoleBindings; } + /** + * The LoadBalancersClient object to access its operations. + */ + private final LoadBalancersClient loadBalancers; + + /** + * Gets the LoadBalancersClient object to access its operations. + * + * @return the LoadBalancersClient object. + */ + public LoadBalancersClient getLoadBalancers() { + return this.loadBalancers; + } + + /** + * The IdentityBindingsClient object to access its operations. + */ + private final IdentityBindingsClient identityBindings; + + /** + * Gets the IdentityBindingsClient object to access its operations. + * + * @return the IdentityBindingsClient object. + */ + public IdentityBindingsClient getIdentityBindings() { + return this.identityBindings; + } + + /** + * The JWTAuthenticatorsClient object to access its operations. + */ + private final JWTAuthenticatorsClient jWTAuthenticators; + + /** + * Gets the JWTAuthenticatorsClient object to access its operations. + * + * @return the JWTAuthenticatorsClient object. + */ + public JWTAuthenticatorsClient getJWTAuthenticators() { + return this.jWTAuthenticators; + } + + /** + * The MeshMembershipsClient object to access its operations. + */ + private final MeshMembershipsClient meshMemberships; + + /** + * Gets the MeshMembershipsClient object to access its operations. + * + * @return the MeshMembershipsClient object. + */ + public MeshMembershipsClient getMeshMemberships() { + return this.meshMemberships; + } + /** * The OperationsClient object to access its operations. */ @@ -240,6 +317,20 @@ public OperationsClient getOperations() { return this.operations; } + /** + * The OperationStatusResultsClient object to access its operations. + */ + private final OperationStatusResultsClient operationStatusResults; + + /** + * Gets the OperationStatusResultsClient object to access its operations. + * + * @return the OperationStatusResultsClient object. + */ + public OperationStatusResultsClient getOperationStatusResults() { + return this.operationStatusResults; + } + /** * The PrivateLinkResourcesClient object to access its operations. */ @@ -282,6 +373,20 @@ public TrustedAccessRolesClient getTrustedAccessRoles() { return this.trustedAccessRoles; } + /** + * The VmSkusClient object to access its operations. + */ + private final VmSkusClient vmSkus; + + /** + * Gets the VmSkusClient object to access its operations. + * + * @return the VmSkusClient object. + */ + public VmSkusClient getVmSkus() { + return this.vmSkus; + } + /** * Initializes an instance of ContainerServiceManagementClient client. * @@ -300,7 +405,7 @@ public TrustedAccessRolesClient getTrustedAccessRoles() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2026-02-01"; + this.apiVersion = "2026-02-02-preview"; this.agentPools = new AgentPoolsClientImpl(this); this.managedClusters = new ManagedClustersClientImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsClientImpl(this); @@ -308,10 +413,17 @@ public TrustedAccessRolesClient getTrustedAccessRoles() { this.machines = new MachinesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.snapshots = new SnapshotsClientImpl(this); + this.managedClusterSnapshots = new ManagedClusterSnapshotsClientImpl(this); this.trustedAccessRoleBindings = new TrustedAccessRoleBindingsClientImpl(this); + this.loadBalancers = new LoadBalancersClientImpl(this); + this.identityBindings = new IdentityBindingsClientImpl(this); + this.jWTAuthenticators = new JWTAuthenticatorsClientImpl(this); + this.meshMemberships = new MeshMembershipsClientImpl(this); this.operations = new OperationsClientImpl(this); + this.operationStatusResults = new OperationStatusResultsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.resolvePrivateLinkServiceIds = new ResolvePrivateLinkServiceIdsClientImpl(this); this.trustedAccessRoles = new TrustedAccessRolesClientImpl(this); + this.vmSkus = new VmSkusClientImpl(this); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java new file mode 100644 index 000000000000..b9020d4cdd3b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java @@ -0,0 +1,934 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.IdentityBindingsClient; +import com.azure.resourcemanager.containerservice.fluent.models.IdentityBindingInner; +import com.azure.resourcemanager.containerservice.implementation.models.IdentityBindingListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in IdentityBindingsClient. + */ +public final class IdentityBindingsClientImpl implements IdentityBindingsClient { + /** + * The proxy service used to perform REST calls. + */ + private final IdentityBindingsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of IdentityBindingsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + IdentityBindingsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(IdentityBindingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientIdentityBindings to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientIdentityBindings") + public interface IdentityBindingsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("identityBindingName") String identityBindingName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("identityBindingName") String identityBindingName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") IdentityBindingInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings/{identityBindingName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("identityBindingName") String identityBindingName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/identityBindings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, identityBindingName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, identityBindingName, accept, context); + } + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String identityBindingName) { + return getWithResponseAsync(resourceGroupName, resourceName, identityBindingName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String identityBindingName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, identityBindingName, context).block(); + } + + /** + * Gets the specified Identity Binding. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Identity Binding. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentityBindingInner get(String resourceGroupName, String resourceName, String identityBindingName) { + return getWithResponse(resourceGroupName, resourceName, identityBindingName, Context.NONE).getValue(); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String identityBindingName, IdentityBindingInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, identityBindingName, contentType, + accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String identityBindingName, IdentityBindingInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, identityBindingName, contentType, accept, + parameters, context); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, IdentityBindingInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, identityBindingName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + IdentityBindingInner.class, IdentityBindingInner.class, this.client.getContext()); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, IdentityBindingInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + identityBindingName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + IdentityBindingInner.class, IdentityBindingInner.class, context); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IdentityBindingInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, IdentityBindingInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String identityBindingName, IdentityBindingInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters).block(); + } + + /** + * Creates or updates an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param parameters The identity binding to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the IdentityBinding resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentityBindingInner createOrUpdate(String resourceGroupName, String resourceName, + String identityBindingName, IdentityBindingInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, identityBindingName, parameters, context).block(); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, identityBindingName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String identityBindingName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (identityBindingName == null) { + return Mono + .error(new IllegalArgumentException("Parameter identityBindingName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, identityBindingName, context); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String identityBindingName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, identityBindingName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String identityBindingName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, identityBindingName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String identityBindingName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, identityBindingName).getSyncPoller(); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String identityBindingName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, identityBindingName, context).getSyncPoller(); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String identityBindingName) { + return beginDeleteAsync(resourceGroupName, resourceName, identityBindingName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String identityBindingName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, identityBindingName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String identityBindingName) { + deleteAsync(resourceGroupName, resourceName, identityBindingName).block(); + } + + /** + * Deletes an identity binding in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param identityBindingName The name of the identity binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String identityBindingName, Context context) { + deleteAsync(resourceGroupName, resourceName, identityBindingName, context).block(); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of identity bindings in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of identity bindings in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JWTAuthenticatorsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JWTAuthenticatorsClientImpl.java new file mode 100644 index 000000000000..5ddc2c107c15 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/JWTAuthenticatorsClientImpl.java @@ -0,0 +1,948 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.JWTAuthenticatorsClient; +import com.azure.resourcemanager.containerservice.fluent.models.JWTAuthenticatorInner; +import com.azure.resourcemanager.containerservice.implementation.models.JWTAuthenticatorListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in JWTAuthenticatorsClient. + */ +public final class JWTAuthenticatorsClientImpl implements JWTAuthenticatorsClient { + /** + * The proxy service used to perform REST calls. + */ + private final JWTAuthenticatorsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of JWTAuthenticatorsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + JWTAuthenticatorsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(JWTAuthenticatorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientJWTAuthenticators to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientJWTAuthenticators") + public interface JWTAuthenticatorsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") JWTAuthenticatorInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators/{jwtAuthenticatorName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("jwtAuthenticatorName") String jwtAuthenticatorName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/jwtAuthenticators") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, jwtAuthenticatorName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, jwtAuthenticatorName, accept, context); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + return getWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).block(); + } + + /** + * Gets the specified JWT authenticator of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified JWT authenticator of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JWTAuthenticatorInner get(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { + return getWithResponse(resourceGroupName, resourceName, jwtAuthenticatorName, Context.NONE).getValue(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, jwtAuthenticatorName, contentType, + accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, jwtAuthenticatorName, contentType, accept, + parameters, context); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, JWTAuthenticatorInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), JWTAuthenticatorInner.class, JWTAuthenticatorInner.class, + this.client.getContext()); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, JWTAuthenticatorInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + jwtAuthenticatorName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), JWTAuthenticatorInner.class, JWTAuthenticatorInner.class, context); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JWTAuthenticatorInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JWTAuthenticatorInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String jwtAuthenticatorName, JWTAuthenticatorInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JWTAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters).block(); + } + + /** + * Creates or updates JWT authenticator in the managed cluster and updates the managed cluster to apply the + * settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param parameters The JWT authenticator to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration for JWT authenticator in the managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JWTAuthenticatorInner createOrUpdate(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, JWTAuthenticatorInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, jwtAuthenticatorName, parameters, context).block(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, jwtAuthenticatorName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (jwtAuthenticatorName == null) { + return Mono + .error(new IllegalArgumentException("Parameter jwtAuthenticatorName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, jwtAuthenticatorName, context); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).getSyncPoller(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String jwtAuthenticatorName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).getSyncPoller(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { + return beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String jwtAuthenticatorName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName) { + deleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName).block(); + } + + /** + * Deletes a JWT authenticator and updates the managed cluster to apply the settings. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param jwtAuthenticatorName The name of the JWT authenticator. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String jwtAuthenticatorName, Context context) { + deleteAsync(resourceGroupName, resourceName, jwtAuthenticatorName, context).block(); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of JWT authenticators in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of JWT authenticators in the specified managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java index 98f4dba163a5..131d56004c31 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/KubernetesClusterAgentPoolImpl.java @@ -294,7 +294,7 @@ AgentPoolInner getAgentPoolInner() { agentPoolInner.withTypePropertiesType(innerModel().type()); agentPoolInner.withMode(innerModel().mode()); agentPoolInner.withOrchestratorVersion(innerModel().orchestratorVersion()); - // agentPoolInner.withNodeImageVersion(innerModel().nodeImageVersion()); // nodeImageVersion is readOnly now + agentPoolInner.withNodeImageVersion(innerModel().nodeImageVersion()); agentPoolInner.withUpgradeSettings(innerModel().upgradeSettings()); agentPoolInner.withPowerState(innerModel().powerState()); agentPoolInner.withAvailabilityZones(innerModel().availabilityZones()); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java new file mode 100644 index 000000000000..de9578b677a3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java @@ -0,0 +1,829 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.LoadBalancersClient; +import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; +import com.azure.resourcemanager.containerservice.implementation.models.LoadBalancerListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in LoadBalancersClient. + */ +public final class LoadBalancersClientImpl implements LoadBalancersClient { + /** + * The proxy service used to perform REST calls. + */ + private final LoadBalancersService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of LoadBalancersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LoadBalancersClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(LoadBalancersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientLoadBalancers to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientLoadBalancers") + public interface LoadBalancersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("loadBalancerName") String loadBalancerName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") LoadBalancerInner parameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("loadBalancerName") String loadBalancerName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, loadBalancerName, accept, context); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, String loadBalancerName) { + return getWithResponseAsync(resourceGroupName, resourceName, loadBalancerName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, context).block(); + } + + /** + * Gets the specified load balancer. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified load balancer. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadBalancerInner get(String resourceGroupName, String resourceName, String loadBalancerName) { + return getWithResponse(resourceGroupName, resourceName, loadBalancerName, Context.NONE).getValue(); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String loadBalancerName, LoadBalancerInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, contentType, accept, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String loadBalancerName, LoadBalancerInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, contentType, accept, + parameters, context); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + String loadBalancerName, LoadBalancerInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, parameters, context) + .block(); + } + + /** + * Creates or updates a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param parameters The load balancer to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the configurations regarding multiple standard load balancers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadBalancerInner createOrUpdate(String resourceGroupName, String resourceName, String loadBalancerName, + LoadBalancerInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, loadBalancerName, parameters, Context.NONE) + .getValue(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, loadBalancerName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (loadBalancerName == null) { + return Mono + .error(new IllegalArgumentException("Parameter loadBalancerName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, loadBalancerName, context); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String loadBalancerName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, loadBalancerName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, loadBalancerName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName).getSyncPoller(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String loadBalancerName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName, context).getSyncPoller(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName) { + return beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String loadBalancerName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, loadBalancerName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String loadBalancerName) { + deleteAsync(resourceGroupName, resourceName, loadBalancerName).block(); + } + + /** + * Deletes a load balancer in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param loadBalancerName The name of the load balancer. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String loadBalancerName, Context context) { + deleteAsync(resourceGroupName, resourceName, loadBalancerName, context).block(); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of load balancers in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of load balancers in the specified managed cluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java index b04845e1f389..cf7047e2dd15 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.containerservice.implementation; +import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.Get; import com.azure.core.annotation.HeaderParam; @@ -11,6 +12,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -23,11 +25,16 @@ import com.azure.core.http.rest.Response; import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.MachinesClient; import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; import com.azure.resourcemanager.containerservice.implementation.models.MachineListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -71,6 +78,17 @@ Mono> get(@HostParam("endpoint") String endpoint, @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @PathParam("machineName") String machineName, + @HeaderParam("if-match") String ifMatch, @HeaderParam("if-none-match") String ifNoneMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") MachineInner parameters, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines") @ExpectedResponses({ 200 }) @@ -232,6 +250,352 @@ public MachineInner get(String resourceGroupName, String resourceName, String ag return getWithResponse(resourceGroupName, resourceName, agentPoolName, machineName, Context.NONE).getValue(); } + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machineName, ifMatch, + ifNoneMatch, contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, machineName, ifMatch, + ifNoneMatch, contentType, accept, parameters, context); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, machineName, parameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MachineInner.class, MachineInner.class, this.client.getContext()); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, machineName, parameters, ifMatch, ifNoneMatch); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MachineInner.class, MachineInner.class, this.client.getContext()); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MachineInner> beginCreateOrUpdateAsync(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, + agentPoolName, machineName, parameters, ifMatch, ifNoneMatch, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MachineInner.class, MachineInner.class, context); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch) + .getSyncPoller(); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of a machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MachineInner> beginCreateOrUpdate(String resourceGroupName, + String resourceName, String agentPoolName, String machineName, MachineInner parameters, String ifMatch, + String ifNoneMatch, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch, context) + .getSyncPoller(); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, + ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, + ifMatch, ifNoneMatch).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, + ifMatch, ifNoneMatch, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters) { + final String ifMatch = null; + final String ifNoneMatch = null; + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch).block(); + } + + /** + * Creates or updates a machine in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param machineName Host name of the machine. + * @param parameters The machine to create or update. + * @param ifMatch The request should only proceed if an entity matches this string. + * @param ifNoneMatch The request should only proceed if no entity matches this string. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineInner createOrUpdate(String resourceGroupName, String resourceName, String agentPoolName, + String machineName, MachineInner parameters, String ifMatch, String ifNoneMatch, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, agentPoolName, machineName, parameters, ifMatch, + ifNoneMatch, context).block(); + } + /** * Gets a list of machines in the specified agent pool. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java new file mode 100644 index 000000000000..a9b71c874a99 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java @@ -0,0 +1,1000 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.ManagedClusterSnapshotsClient; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservice.implementation.models.ManagedClusterSnapshotListResult; +import com.azure.resourcemanager.containerservice.models.TagsObject; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet; +import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedClusterSnapshotsClient. + */ +public final class ManagedClusterSnapshotsClientImpl implements InnerSupportsGet, + InnerSupportsListing, InnerSupportsDelete, ManagedClusterSnapshotsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ManagedClusterSnapshotsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of ManagedClusterSnapshotsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedClusterSnapshotsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(ManagedClusterSnapshotsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientManagedClusterSnapshots to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientManagedClusterSnapshots") + public interface ManagedClusterSnapshotsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedClusterSnapshotInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateTags(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") TagsObject parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String resourceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String resourceName, ManagedClusterSnapshotInner parameters, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Creates or updates a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The managed cluster snapshot to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner createOrUpdate(String resourceGroupName, String resourceName, + ManagedClusterSnapshotInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateTagsWithResponseAsync(String resourceGroupName, + String resourceName, TagsObject parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String resourceName, TagsObject parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateTagsAsync(String resourceGroupName, String resourceName, + TagsObject parameters) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, String resourceName, + TagsObject parameters, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Updates tags on a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a managed cluster snapshot resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterSnapshotInner updateTags(String resourceGroupName, String resourceName, + TagsObject parameters) { + return updateTagsWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, context); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName) { + return deleteWithResponseAsync(resourceGroupName, resourceName).flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Deletes a managed cluster snapshot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName) { + deleteWithResponse(resourceGroupName, resourceName, Context.NONE); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Lists managed cluster snapshots in the specified subscription and resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Gets a list of managed cluster snapshots in the specified subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a ManagedClusterSnapshot list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of managed cluster snapshots in the specified subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java index 8329456913d3..bbbcac840bfe 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java @@ -35,22 +35,29 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.containerservice.fluent.ManagedClustersClient; import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner; +import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.KubernetesVersionListResultInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterAccessProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterInner; import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterUpgradeProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.MeshRevisionProfileInner; import com.azure.resourcemanager.containerservice.fluent.models.MeshUpgradeProfileInner; +import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; import com.azure.resourcemanager.containerservice.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.containerservice.fluent.models.RunCommandResultInner; +import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; +import com.azure.resourcemanager.containerservice.implementation.models.GuardrailsAvailableVersionsList; import com.azure.resourcemanager.containerservice.implementation.models.ManagedClusterListResult; import com.azure.resourcemanager.containerservice.implementation.models.MeshRevisionProfileList; import com.azure.resourcemanager.containerservice.implementation.models.MeshUpgradeProfileList; +import com.azure.resourcemanager.containerservice.implementation.models.NodeImageVersionsListResult; import com.azure.resourcemanager.containerservice.implementation.models.OutboundEnvironmentEndpointCollection; +import com.azure.resourcemanager.containerservice.implementation.models.SafeguardsAvailableVersionsList; import com.azure.resourcemanager.containerservice.models.Format; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; import com.azure.resourcemanager.containerservice.models.ManagedClustersGetCommandResultResponse; +import com.azure.resourcemanager.containerservice.models.RebalanceLoadBalancersRequestBody; import com.azure.resourcemanager.containerservice.models.RunCommandRequest; import com.azure.resourcemanager.containerservice.models.TagsObject; import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsDelete; @@ -129,7 +136,8 @@ Mono>> updateTags(@HostParam("endpoint") String endpoi Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("if-match") String ifMatch, Context context); + @HeaderParam("if-match") String ifMatch, + @QueryParam("ignore-pod-disruption-budget") Boolean ignorePodDisruptionBudget, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters") @@ -279,6 +287,16 @@ Mono> listOutboundNetworkDepende @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> rebalanceLoadBalancers(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RebalanceLoadBalancersRequestBody parameters, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default") @ExpectedResponses({ 200 }) @@ -288,6 +306,40 @@ Mono> getUpgradeProfile(@HostParam(" @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getGuardrailsVersions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listGuardrailsVersions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSafeguardsVersions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSafeguardsVersions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/meshRevisionProfiles/{mode}") @ExpectedResponses({ 200 }) @@ -331,6 +383,14 @@ Mono> listKubernetesVersions(@HostPar @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/nodeImageVersions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNodeImageVersions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -355,6 +415,22 @@ Mono> listOutboundNetworkDepende @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listGuardrailsVersionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSafeguardsVersionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -370,6 +446,14 @@ Mono> listMeshRevisionProfilesNext( Mono> listMeshUpgradeProfilesNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNodeImageVersionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -1083,6 +1167,8 @@ public ManagedClusterInner updateTags(String resourceGroupName, String resourceN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1090,7 +1176,7 @@ public ManagedClusterInner updateTags(String resourceGroupName, String resourceN */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch) { + String ifMatch, Boolean ignorePodDisruptionBudget) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1108,7 +1194,8 @@ public Mono>> deleteWithResponseAsync(String resourceG } return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, context)) + this.client.getSubscriptionId(), resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1118,6 +1205,8 @@ public Mono>> deleteWithResponseAsync(String resourceG * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1126,7 +1215,7 @@ public Mono>> deleteWithResponseAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String ifMatch, Context context) { + String ifMatch, Boolean ignorePodDisruptionBudget, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1144,7 +1233,7 @@ private Mono>> deleteWithResponseAsync(String resource } context = this.client.mergeContext(context); return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, ifMatch, context); + resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context); } /** @@ -1153,6 +1242,8 @@ private Mono>> deleteWithResponseAsync(String resource * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1160,8 +1251,9 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); + String ifMatch, Boolean ignorePodDisruptionBudget) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -1179,7 +1271,9 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { final String ifMatch = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch); + final Boolean ignorePodDisruptionBudget = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } @@ -1190,6 +1284,8 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1198,10 +1294,10 @@ public PollerFlux, Void> beginDeleteAsync(String resourceGroupN */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - String ifMatch, Context context) { + String ifMatch, Boolean ignorePodDisruptionBudget, Context context) { context = this.client.mergeContext(context); Mono>> mono - = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, context); + = deleteWithResponseAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); } @@ -1219,7 +1315,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { final String ifMatch = null; - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch).getSyncPoller(); + final Boolean ignorePodDisruptionBudget = null; + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget) + .getSyncPoller(); } /** @@ -1228,6 +1326,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1236,8 +1336,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, String ifMatch, - Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).getSyncPoller(); + Boolean ignorePodDisruptionBudget, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context) + .getSyncPoller(); } /** @@ -1246,14 +1347,17 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() + public Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1270,7 +1374,8 @@ public Mono deleteAsync(String resourceGroupName, String resourceName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAsync(String resourceGroupName, String resourceName) { final String ifMatch = null; - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch).last() + final Boolean ignorePodDisruptionBudget = null; + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1280,6 +1385,8 @@ public Mono deleteAsync(String resourceGroupName, String resourceName) { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1287,8 +1394,9 @@ public Mono deleteAsync(String resourceGroupName, String resourceName) { * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, context).last() + private Mono deleteAsync(String resourceGroupName, String resourceName, String ifMatch, + Boolean ignorePodDisruptionBudget, Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1304,7 +1412,8 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String resourceName) { final String ifMatch = null; - deleteAsync(resourceGroupName, resourceName, ifMatch).block(); + final Boolean ignorePodDisruptionBudget = null; + deleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget).block(); } /** @@ -1313,14 +1422,17 @@ public void delete(String resourceGroupName, String resourceName) { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. * @param ifMatch The request should only proceed if an entity matches this string. + * @param ignorePodDisruptionBudget ignore-pod-disruption-budget=true to delete those pods on a node without + * considering Pod Disruption Budget. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String ifMatch, Context context) { - deleteAsync(resourceGroupName, resourceName, ifMatch, context).block(); + public void delete(String resourceGroupName, String resourceName, String ifMatch, Boolean ignorePodDisruptionBudget, + Context context) { + deleteAsync(resourceGroupName, resourceName, ifMatch, ignorePodDisruptionBudget, context).block(); } /** @@ -4381,19 +4493,20 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r } /** - * Gets the upgrade profile of a managed cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName) { + public Mono>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4409,28 +4522,35 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String accept = "application/json"; + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .withContext( + context -> service.rebalanceLoadBalancers(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the upgrade profile of a managed cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName, Context context) { + private Mono>> rebalanceLoadBalancersWithResponseAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4446,80 +4566,187 @@ public RunCommandResultInner getCommandResult(String resourceGroupName, String r if (resourceName == null) { return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } - final String accept = "application/json"; + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; context = this.client.mergeContext(context); - return service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + return service.rebalanceLoadBalancers(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, parameters, context); } /** - * Gets the upgrade profile of a managed cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getUpgradeProfileAsync(String resourceGroupName, - String resourceName) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters) { + Mono>> mono + = rebalanceLoadBalancersWithResponseAsync(resourceGroupName, resourceName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Gets the upgrade profile of a managed cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster along with {@link Response}. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRebalanceLoadBalancersAsync(String resourceGroupName, + String resourceName, RebalanceLoadBalancersRequestBody parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = rebalanceLoadBalancersWithResponseAsync(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters) { + return this.beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context) { + return this.beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context) + .getSyncPoller(); + } + + /** + * Rebalance nodes across specific load balancers. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getUpgradeProfileWithResponse(String resourceGroupName, - String resourceName, Context context) { - return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, context).block(); + public Mono rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters) { + return beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets the upgrade profile of a managed cluster. + * Rebalance nodes across specific load balancers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade profile of a managed cluster. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName) { - return getUpgradeProfileWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + private Mono rebalanceLoadBalancersAsync(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context) { + return beginRebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. + * Rebalance nodes across specific load balancers. * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters) { + rebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters).block(); + } + + /** + * Rebalance nodes across specific load balancers. * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param parameters The names of the load balancers to be rebalanced. If set to empty, all load balancers will be + * rebalanced. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a mesh revision profile for a specified mesh in the specified location. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void rebalanceLoadBalancers(String resourceGroupName, String resourceName, + RebalanceLoadBalancersRequestBody parameters, Context context) { + rebalanceLoadBalancersAsync(resourceGroupName, resourceName, parameters, context).block(); + } + + /** + * Gets the upgrade profile of a managed cluster. * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades along with {@link Response} on successful completion of {@link Mono}. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getMeshRevisionProfileWithResponseAsync(String location, - String mode) { + public Mono> + getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4528,39 +4755,35 @@ public Mono> getMeshRevisionProfileWithRespon return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), location, mode, accept, context)) + .withContext(context -> service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Gets the upgrade profile of a managed cluster. * - * @param location The name of the Azure region. - * @param mode The mode of the mesh. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades along with {@link Response} on successful completion of {@link Mono}. + * @return the upgrade profile of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getMeshRevisionProfileWithResponseAsync(String location, - String mode, Context context) { + private Mono> + getUpgradeProfileWithResponseAsync(String resourceGroupName, String resourceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -4569,23 +4792,743 @@ private Mono> getMeshRevisionProfileWithRespo return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } - if (mode == null) { - return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.getMeshRevisionProfile(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, mode, accept, context); + return service.getUpgradeProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** - * Gets a mesh revision profile for a specified mesh in the specified location. - * - * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available - * upgrades. + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getUpgradeProfileAsync(String resourceGroupName, + String resourceName) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getUpgradeProfileWithResponse(String resourceGroupName, + String resourceName, Context context) { + return getUpgradeProfileWithResponseAsync(resourceGroupName, resourceName, context).block(); + } + + /** + * Gets the upgrade profile of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the upgrade profile of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedClusterUpgradeProfileInner getUpgradeProfile(String resourceGroupName, String resourceName) { + return getUpgradeProfileWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getGuardrailsVersionsWithResponseAsync(String location, + String version) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getGuardrailsVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, version, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getGuardrailsVersionsWithResponseAsync(String location, + String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getGuardrailsVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, version, accept, context); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getGuardrailsVersionsAsync(String location, String version) { + return getGuardrailsVersionsWithResponseAsync(location, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getGuardrailsVersionsWithResponse(String location, String version, + Context context) { + return getGuardrailsVersionsWithResponseAsync(location, version, context).block(); + } + + /** + * Gets supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Guardrails version in the specified subscription and location. + * + * Contains Guardrails version along with its support info and whether it is a default version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GuardrailsAvailableVersionInner getGuardrailsVersions(String location, String version) { + return getGuardrailsVersionsWithResponse(location, version, Context.NONE).getValue(); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listGuardrailsVersionsSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listGuardrailsVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGuardrailsVersionsSinglePageAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listGuardrailsVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listGuardrailsVersionsAsync(String location) { + return new PagedFlux<>(() -> listGuardrailsVersionsSinglePageAsync(location), + nextLink -> listGuardrailsVersionsNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listGuardrailsVersionsAsync(String location, Context context) { + return new PagedFlux<>(() -> listGuardrailsVersionsSinglePageAsync(location, context), + nextLink -> listGuardrailsVersionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGuardrailsVersions(String location) { + return new PagedIterable<>(listGuardrailsVersionsAsync(location)); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGuardrailsVersions(String location, Context context) { + return new PagedIterable<>(listGuardrailsVersionsAsync(location, context)); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getSafeguardsVersionsWithResponseAsync(String location, + String version) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getSafeguardsVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, version, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSafeguardsVersionsWithResponseAsync(String location, + String version, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getSafeguardsVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, version, accept, context); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getSafeguardsVersionsAsync(String location, String version) { + return getSafeguardsVersionsWithResponseAsync(location, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSafeguardsVersionsWithResponse(String location, String version, + Context context) { + return getSafeguardsVersionsWithResponseAsync(location, version, context).block(); + } + + /** + * Gets supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param version Safeguards version. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return supported Safeguards version in the specified subscription and location. + * + * Contains Safeguards version along with its support info and whether it is a default version. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SafeguardsAvailableVersionInner getSafeguardsVersions(String location, String version) { + return getSafeguardsVersionsWithResponse(location, version, Context.NONE).getValue(); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSafeguardsVersionsSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSafeguardsVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSafeguardsVersionsSinglePageAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSafeguardsVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listSafeguardsVersionsAsync(String location) { + return new PagedFlux<>(() -> listSafeguardsVersionsSinglePageAsync(location), + nextLink -> listSafeguardsVersionsNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSafeguardsVersionsAsync(String location, Context context) { + return new PagedFlux<>(() -> listSafeguardsVersionsSinglePageAsync(location, context), + nextLink -> listSafeguardsVersionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSafeguardsVersions(String location) { + return new PagedIterable<>(listSafeguardsVersionsAsync(location)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version as paginated + * response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSafeguardsVersions(String location, Context context) { + return new PagedIterable<>(listSafeguardsVersionsAsync(location, context)); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMeshRevisionProfileWithResponseAsync(String location, + String mode) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getMeshRevisionProfile(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, mode, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. + * + * @param location The name of the Azure region. + * @param mode The mode of the mesh. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMeshRevisionProfileWithResponseAsync(String location, + String mode, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (mode == null) { + return Mono.error(new IllegalArgumentException("Parameter mode is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getMeshRevisionProfile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, mode, accept, context); + } + + /** + * Gets a mesh revision profile for a specified mesh in the specified location. + * + * Contains extra metadata on the revision, including supported revisions, cluster compatibility and available + * upgrades. * * @param location The name of the Azure region. * @param mode The mode of the mesh. @@ -5053,20 +5996,133 @@ public PagedIterable listMeshUpgradeProfiles(String res } /** - * Lists available upgrades for all service meshes in a specific cluster. + * Lists available upgrades for all service meshes in a specific cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> listKubernetesVersionsWithResponseAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listKubernetesVersions(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKubernetesVersionsWithResponseAsync(String location, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listKubernetesVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono listKubernetesVersionsAsync(String location) { + return listKubernetesVersionsWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a list of supported Kubernetes versions in the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version. + * + * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return holds an array of MeshUpgradeProfiles as paginated response with {@link PagedIterable}. + * @return a list of supported Kubernetes versions in the specified subscription. + * + * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and + * details on preview status of the version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMeshUpgradeProfiles(String resourceGroupName, String resourceName, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKubernetesVersionsWithResponse(String location, Context context) { - return new PagedIterable<>(listMeshUpgradeProfilesAsync(resourceGroupName, resourceName, context)); + return listKubernetesVersionsWithResponseAsync(location, context).block(); } /** @@ -5082,10 +6138,31 @@ public PagedIterable listMeshUpgradeProfiles(String res * @return a list of supported Kubernetes versions in the specified subscription. * * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version along with {@link Response} on successful completion of {@link Mono}. + * details on preview status of the version. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listKubernetesVersionsWithResponseAsync(String location) { + public KubernetesVersionListResultInner listKubernetesVersions(String location) { + return listKubernetesVersionsWithResponse(location, Context.NONE).getValue(); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNodeImageVersionsSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -5099,29 +6176,32 @@ public Mono> listKubernetesVersionsWi } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listKubernetesVersions(this.client.getEndpoint(), + .withContext(context -> service.listNodeImageVersions(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. + * Gets a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported Kubernetes versions in the specified subscription. + * @return a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version along with {@link Response} on successful completion of {@link Mono}. + * Only returns the latest version of each node image along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKubernetesVersionsWithResponseAsync(String location, + private Mono> listNodeImageVersionsSinglePageAsync(String location, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -5136,70 +6216,95 @@ private Mono> listKubernetesVersionsW } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listKubernetesVersions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), location, accept, context); + return service + .listNodeImageVersions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. + * Gets a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported Kubernetes versions in the specified subscription. + * @return a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version on successful completion of {@link Mono}. + * Only returns the latest version of each node image as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono listKubernetesVersionsAsync(String location) { - return listKubernetesVersionsWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listNodeImageVersionsAsync(String location) { + return new PagedFlux<>(() -> listNodeImageVersionsSinglePageAsync(location), + nextLink -> listNodeImageVersionsNextSinglePageAsync(nextLink)); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. + * Gets a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported Kubernetes versions in the specified subscription. + * @return a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version along with {@link Response}. + * Only returns the latest version of each node image as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKubernetesVersionsWithResponse(String location, - Context context) { - return listKubernetesVersionsWithResponseAsync(location, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listNodeImageVersionsAsync(String location, Context context) { + return new PagedFlux<>(() -> listNodeImageVersionsSinglePageAsync(location, context), + nextLink -> listNodeImageVersionsNextSinglePageAsync(nextLink, context)); } /** - * Gets a list of supported Kubernetes versions in the specified subscription. + * Gets a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of supported Kubernetes versions in the specified subscription. + * @return a list of supported NodeImage versions in the specified subscription. * - * Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and - * details on preview status of the version. + * Only returns the latest version of each node image as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public KubernetesVersionListResultInner listKubernetesVersions(String location) { - return listKubernetesVersionsWithResponse(location, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNodeImageVersions(String location) { + return new PagedIterable<>(listNodeImageVersionsAsync(location)); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image. For example there may be an + * AKSUbuntu-1804gen2containerd-2024.01.26, but only AKSUbuntu-1804gen2containerd-2024.02.02 is visible in this + * list. + * + * @param location The name of the Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNodeImageVersions(String location, Context context) { + return new PagedIterable<>(listNodeImageVersionsAsync(location, context)); } /** @@ -5381,6 +6486,136 @@ private Mono> listNextSinglePageAsync(String res.getValue().value(), res.getValue().nextLink(), null)); } + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listGuardrailsVersionsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listGuardrailsVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Guardrails versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Guardrails versions in the specified subscription and location. + * + * Contains list of Guardrails version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listGuardrailsVersionsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listGuardrailsVersionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSafeguardsVersionsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listSafeguardsVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported Safeguards versions in the specified subscription and location. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported Safeguards versions in the specified subscription and location. + * + * Contains list of Safeguards version along with its support info and whether it is a default version along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSafeguardsVersionsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listSafeguardsVersionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + /** * Lists mesh revision profiles for all meshes in the specified location. * @@ -5496,4 +6731,68 @@ private Mono> listMeshUpgradeProfilesNext .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)); } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNodeImageVersionsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listNodeImageVersionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of supported NodeImage versions in the specified subscription. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of supported NodeImage versions in the specified subscription. + * + * Only returns the latest version of each node image along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNodeImageVersionsNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNodeImageVersionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java new file mode 100644 index 000000000000..49a4f5a67f1d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java @@ -0,0 +1,937 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.containerservice.fluent.MeshMembershipsClient; +import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; +import com.azure.resourcemanager.containerservice.implementation.models.MeshMembershipsListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MeshMembershipsClient. + */ +public final class MeshMembershipsClientImpl implements MeshMembershipsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MeshMembershipsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of MeshMembershipsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MeshMembershipsClientImpl(ContainerServiceManagementClientImpl client) { + this.service + = RestProxy.create(MeshMembershipsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientMeshMemberships to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientMeshMemberships") + public interface MeshMembershipsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("meshMembershipName") String meshMembershipName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("meshMembershipName") String meshMembershipName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MeshMembershipInner parameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships/{meshMembershipName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("meshMembershipName") String meshMembershipName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/meshMemberships") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedCluster(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByManagedClusterNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, meshMembershipName, accept, context); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + return getWithResponseAsync(resourceGroupName, resourceName, meshMembershipName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, context).block(); + } + + /** + * Gets the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshMembershipInner get(String resourceGroupName, String resourceName, String meshMembershipName) { + return getWithResponse(resourceGroupName, resourceName, meshMembershipName, Context.NONE).getValue(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, contentType, + accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String resourceName, String meshMembershipName, MeshMembershipInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, contentType, accept, + parameters, context); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, MeshMembershipInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MeshMembershipInner.class, MeshMembershipInner.class, this.client.getContext()); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MeshMembershipInner> beginCreateOrUpdateAsync( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + MeshMembershipInner.class, MeshMembershipInner.class, context); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MeshMembershipInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters) + .getSyncPoller(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MeshMembershipInner> beginCreateOrUpdate( + String resourceGroupName, String resourceName, String meshMembershipName, MeshMembershipInner parameters, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context) + .getSyncPoller(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, + String meshMembershipName, MeshMembershipInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters) { + return createOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters).block(); + } + + /** + * Creates or updates the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param parameters The mesh membership to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mesh membership of a managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MeshMembershipInner createOrUpdate(String resourceGroupName, String resourceName, String meshMembershipName, + MeshMembershipInner parameters, Context context) { + return createOrUpdateAsync(resourceGroupName, resourceName, meshMembershipName, parameters, context).block(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, meshMembershipName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (meshMembershipName == null) { + return Mono + .error(new IllegalArgumentException("Parameter meshMembershipName is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, meshMembershipName, context); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String meshMembershipName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, meshMembershipName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, resourceName, meshMembershipName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName) { + return this.beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName).getSyncPoller(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, + String meshMembershipName, Context context) { + return this.beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName, context).getSyncPoller(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName) { + return beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, String meshMembershipName, + Context context) { + return beginDeleteAsync(resourceGroupName, resourceName, meshMembershipName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String meshMembershipName) { + deleteAsync(resourceGroupName, resourceName, meshMembershipName).block(); + } + + /** + * Deletes the mesh membership of a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param meshMembershipName The name of the mesh membership. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String meshMembershipName, Context context) { + deleteAsync(resourceGroupName, resourceName, meshMembershipName, context).block(); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByManagedCluster(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByManagedClusterAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listByManagedClusterSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listByManagedClusterNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName)); + } + + /** + * Lists mesh memberships in a managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByManagedCluster(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listByManagedClusterAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of a request to list mesh memberships in a managed cluster along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByManagedClusterNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByManagedClusterNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java new file mode 100644 index 000000000000..f9b9532ab63d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java @@ -0,0 +1,578 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.OperationStatusResultsClient; +import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.containerservice.implementation.models.OperationStatusResultList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationStatusResultsClient. + */ +public final class OperationStatusResultsClientImpl implements OperationStatusResultsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationStatusResultsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of OperationStatusResultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationStatusResultsClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(OperationStatusResultsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientOperationStatusResults to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientOperationStatusResults") + public interface OperationStatusResultsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByAgentPool(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("agentPoolName") String agentPoolName, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("operationId") String operationId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByAgentPoolWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByAgentPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, operationId, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByAgentPoolWithResponseAsync(String resourceGroupName, + String resourceName, String agentPoolName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (agentPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter agentPoolName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByAgentPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, agentPoolName, operationId, accept, + context); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByAgentPoolAsync(String resourceGroupName, String resourceName, + String agentPoolName, String operationId) { + return getByAgentPoolWithResponseAsync(resourceGroupName, resourceName, agentPoolName, operationId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByAgentPoolWithResponse(String resourceGroupName, + String resourceName, String agentPoolName, String operationId, Context context) { + return getByAgentPoolWithResponseAsync(resourceGroupName, resourceName, agentPoolName, operationId, context) + .block(); + } + + /** + * Get the status of a specific operation in the specified agent pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param agentPoolName The name of the agent pool. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified agent pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner getByAgentPool(String resourceGroupName, String resourceName, + String agentPoolName, String operationId) { + return getByAgentPoolWithResponse(resourceGroupName, resourceName, agentPoolName, operationId, Context.NONE) + .getValue(); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String resourceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String resourceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName)); + } + + /** + * Gets a list of operations in the specified managedCluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context)); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, operationId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (resourceName == null) { + return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, operationId, accept, context); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAsync(String resourceGroupName, String resourceName, + String operationId) { + return getWithResponseAsync(resourceGroupName, resourceName, operationId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String operationId, Context context) { + return getWithResponseAsync(resourceGroupName, resourceName, operationId, context).block(); + } + + /** + * Get the status of a specific operation in the specified managed cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the managed cluster resource. + * @param operationId The ID of an ongoing async operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a specific operation in the specified managed cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner get(String resourceGroupName, String resourceName, String operationId) { + return getWithResponse(resourceGroupName, resourceName, operationId, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of operations in the specified managedCluster along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/VmSkusClientImpl.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/VmSkusClientImpl.java new file mode 100644 index 000000000000..16cc1f0d4250 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/VmSkusClientImpl.java @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.containerservice.fluent.VmSkusClient; +import com.azure.resourcemanager.containerservice.fluent.models.ResourceSkuInner; +import com.azure.resourcemanager.containerservice.implementation.models.VmSkusListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in VmSkusClient. + */ +public final class VmSkusClientImpl implements VmSkusClient { + /** + * The proxy service used to perform REST calls. + */ + private final VmSkusService service; + + /** + * The service client containing this operation class. + */ + private final ContainerServiceManagementClientImpl client; + + /** + * Initializes an instance of VmSkusClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + VmSkusClientImpl(ContainerServiceManagementClientImpl client) { + this.service = RestProxy.create(VmSkusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerServiceManagementClientVmSkus to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "ContainerServiceManagementClientVmSkus") + public interface VmSkusService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/vmSkus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("includeExtendedLocations") Boolean includeExtendedLocations, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, + Boolean includeExtendedLocations) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, includeExtendedLocations, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, Boolean includeExtendedLocations, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, + includeExtendedLocations, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String location, Boolean includeExtendedLocations) { + return new PagedFlux<>(() -> listSinglePageAsync(location, includeExtendedLocations), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String location) { + final Boolean includeExtendedLocations = null; + return new PagedFlux<>(() -> listSinglePageAsync(location, includeExtendedLocations), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, Boolean includeExtendedLocations, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(location, includeExtendedLocations, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + final Boolean includeExtendedLocations = null; + return new PagedIterable<>(listAsync(location, includeExtendedLocations)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location. AKS will perform a + * best effort approach to provision the requested VM SKUs, but availability is not guaranteed. + * + * @param location The name of the Azure region. + * @param includeExtendedLocations To Include Extended Locations information or not in the response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Boolean includeExtendedLocations, Context context) { + return new PagedIterable<>(listAsync(location, includeExtendedLocations, context)); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the list of VM SKUs accepted by AKS. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of VM SKUs accepted by AKS. + * + * Gets the list of VM SKUs accepted by AKS when creating node pools in a specified location along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/GuardrailsAvailableVersionsList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/GuardrailsAvailableVersionsList.java new file mode 100644 index 000000000000..67284e004857 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/GuardrailsAvailableVersionsList.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.GuardrailsAvailableVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * Hold values properties, which is array of GuardrailsVersions. + */ +@Immutable +public final class GuardrailsAvailableVersionsList implements JsonSerializable { + /* + * The GuardrailsAvailableVersion items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of GuardrailsAvailableVersionsList class. + */ + private GuardrailsAvailableVersionsList() { + } + + /** + * Get the value property: The GuardrailsAvailableVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model GuardrailsAvailableVersionsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GuardrailsAvailableVersionsList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GuardrailsAvailableVersionsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GuardrailsAvailableVersionsList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionsList. + */ + public static GuardrailsAvailableVersionsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GuardrailsAvailableVersionsList deserializedGuardrailsAvailableVersionsList + = new GuardrailsAvailableVersionsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> GuardrailsAvailableVersionInner.fromJson(reader1)); + deserializedGuardrailsAvailableVersionsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedGuardrailsAvailableVersionsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGuardrailsAvailableVersionsList; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/IdentityBindingListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/IdentityBindingListResult.java new file mode 100644 index 000000000000..53f4fd1ca514 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/IdentityBindingListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.IdentityBindingInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a IdentityBinding list operation. + */ +@Immutable +public final class IdentityBindingListResult implements JsonSerializable { + /* + * The IdentityBinding items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of IdentityBindingListResult class. + */ + private IdentityBindingListResult() { + } + + /** + * Get the value property: The IdentityBinding items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model IdentityBindingListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IdentityBindingListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityBindingListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityBindingListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IdentityBindingListResult. + */ + public static IdentityBindingListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityBindingListResult deserializedIdentityBindingListResult = new IdentityBindingListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> IdentityBindingInner.fromJson(reader1)); + deserializedIdentityBindingListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedIdentityBindingListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityBindingListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/JWTAuthenticatorListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/JWTAuthenticatorListResult.java new file mode 100644 index 000000000000..accd2113e84e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/JWTAuthenticatorListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.JWTAuthenticatorInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a JWTAuthenticator list operation. + */ +@Immutable +public final class JWTAuthenticatorListResult implements JsonSerializable { + /* + * The JWTAuthenticator items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of JWTAuthenticatorListResult class. + */ + private JWTAuthenticatorListResult() { + } + + /** + * Get the value property: The JWTAuthenticator items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model JWTAuthenticatorListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorListResult. + */ + public static JWTAuthenticatorListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorListResult deserializedJWTAuthenticatorListResult = new JWTAuthenticatorListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> JWTAuthenticatorInner.fromJson(reader1)); + deserializedJWTAuthenticatorListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedJWTAuthenticatorListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/LoadBalancerListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/LoadBalancerListResult.java new file mode 100644 index 000000000000..b430434b4774 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/LoadBalancerListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a LoadBalancer list operation. + */ +@Immutable +public final class LoadBalancerListResult implements JsonSerializable { + /* + * The LoadBalancer items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of LoadBalancerListResult class. + */ + private LoadBalancerListResult() { + } + + /** + * Get the value property: The LoadBalancer items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model LoadBalancerListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LoadBalancerListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LoadBalancerListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LoadBalancerListResult if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the LoadBalancerListResult. + */ + public static LoadBalancerListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LoadBalancerListResult deserializedLoadBalancerListResult = new LoadBalancerListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> LoadBalancerInner.fromJson(reader1)); + deserializedLoadBalancerListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedLoadBalancerListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedLoadBalancerListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterSnapshotListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterSnapshotListResult.java new file mode 100644 index 000000000000..dfb3d9174e49 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterSnapshotListResult.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; +import java.io.IOException; +import java.util.List; + +/** + * The response of a ManagedClusterSnapshot list operation. + */ +@Immutable +public final class ManagedClusterSnapshotListResult implements JsonSerializable { + /* + * The ManagedClusterSnapshot items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ManagedClusterSnapshotListResult class. + */ + private ManagedClusterSnapshotListResult() { + } + + /** + * Get the value property: The ManagedClusterSnapshot items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ManagedClusterSnapshotListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterSnapshotListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSnapshotListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSnapshotListResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedClusterSnapshotListResult. + */ + public static ManagedClusterSnapshotListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSnapshotListResult deserializedManagedClusterSnapshotListResult + = new ManagedClusterSnapshotListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> ManagedClusterSnapshotInner.fromJson(reader1)); + deserializedManagedClusterSnapshotListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedClusterSnapshotListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSnapshotListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshMembershipsListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshMembershipsListResult.java new file mode 100644 index 000000000000..b2a16df0fdf6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshMembershipsListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; +import java.io.IOException; +import java.util.List; + +/** + * The result of a request to list mesh memberships in a managed cluster. + */ +@Immutable +public final class MeshMembershipsListResult implements JsonSerializable { + /* + * The list of mesh memberships. + */ + private List value; + + /* + * The URL to get the next set of mesh membership results. + */ + private String nextLink; + + /** + * Creates an instance of MeshMembershipsListResult class. + */ + private MeshMembershipsListResult() { + } + + /** + * Get the value property: The list of mesh memberships. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The URL to get the next set of mesh membership results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model MeshMembershipsListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MeshMembershipsListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshMembershipsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshMembershipsListResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MeshMembershipsListResult. + */ + public static MeshMembershipsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshMembershipsListResult deserializedMeshMembershipsListResult = new MeshMembershipsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MeshMembershipInner.fromJson(reader1)); + deserializedMeshMembershipsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMeshMembershipsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshMembershipsListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/NodeImageVersionsListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/NodeImageVersionsListResult.java new file mode 100644 index 000000000000..ac867ee39124 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/NodeImageVersionsListResult.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.NodeImageVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * Holds an array NodeImageVersions. + */ +@Immutable +public final class NodeImageVersionsListResult implements JsonSerializable { + /* + * The NodeImageVersion items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NodeImageVersionsListResult class. + */ + private NodeImageVersionsListResult() { + } + + /** + * Get the value property: The NodeImageVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model NodeImageVersionsListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(NodeImageVersionsListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NodeImageVersionsListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NodeImageVersionsListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NodeImageVersionsListResult. + */ + public static NodeImageVersionsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NodeImageVersionsListResult deserializedNodeImageVersionsListResult = new NodeImageVersionsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NodeImageVersionInner.fromJson(reader1)); + deserializedNodeImageVersionsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNodeImageVersionsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNodeImageVersionsListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationStatusResultList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationStatusResultList.java new file mode 100644 index 000000000000..4fe8ca992b84 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationStatusResultList.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.OperationStatusResultInner; +import java.io.IOException; +import java.util.List; + +/** + * The operations list. It contains an URL link to get the next set of results. + */ +@Immutable +public final class OperationStatusResultList implements JsonSerializable { + /* + * The OperationStatusResult items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of OperationStatusResultList class. + */ + private OperationStatusResultList() { + } + + /** + * Get the value property: The OperationStatusResult items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model OperationStatusResultList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(OperationStatusResultList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationStatusResultList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStatusResultList if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationStatusResultList. + */ + public static OperationStatusResultList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationStatusResultList deserializedOperationStatusResultList = new OperationStatusResultList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> OperationStatusResultInner.fromJson(reader1)); + deserializedOperationStatusResultList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationStatusResultList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationStatusResultList; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SafeguardsAvailableVersionsList.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SafeguardsAvailableVersionsList.java new file mode 100644 index 000000000000..11aeae71b7c1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SafeguardsAvailableVersionsList.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.SafeguardsAvailableVersionInner; +import java.io.IOException; +import java.util.List; + +/** + * Hold values properties, which is array of SafeguardsVersions. + */ +@Immutable +public final class SafeguardsAvailableVersionsList implements JsonSerializable { + /* + * The SafeguardsAvailableVersion items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of SafeguardsAvailableVersionsList class. + */ + private SafeguardsAvailableVersionsList() { + } + + /** + * Get the value property: The SafeguardsAvailableVersion items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model SafeguardsAvailableVersionsList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SafeguardsAvailableVersionsList.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SafeguardsAvailableVersionsList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SafeguardsAvailableVersionsList if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionsList. + */ + public static SafeguardsAvailableVersionsList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SafeguardsAvailableVersionsList deserializedSafeguardsAvailableVersionsList + = new SafeguardsAvailableVersionsList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> SafeguardsAvailableVersionInner.fromJson(reader1)); + deserializedSafeguardsAvailableVersionsList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedSafeguardsAvailableVersionsList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSafeguardsAvailableVersionsList; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/VmSkusListResult.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/VmSkusListResult.java new file mode 100644 index 000000000000..d4a44608a95e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/models/VmSkusListResult.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.containerservice.fluent.models.ResourceSkuInner; +import java.io.IOException; +import java.util.List; + +/** + * The List Resource Skus operation response. + */ +@Immutable +public final class VmSkusListResult implements JsonSerializable { + /* + * The ResourceSku items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of VmSkusListResult class. + */ + private VmSkusListResult() { + } + + /** + * Get the value property: The ResourceSku items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model VmSkusListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(VmSkusListResult.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VmSkusListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VmSkusListResult if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the VmSkusListResult. + */ + public static VmSkusListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VmSkusListResult deserializedVmSkusListResult = new VmSkusListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> ResourceSkuInner.fromJson(reader1)); + deserializedVmSkusListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedVmSkusListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVmSkusListResult; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java new file mode 100644 index 000000000000..8a0059faf37c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + */ +public final class AddonAutoscaling extends ExpandableStringEnum { + /** + * Feature to autoscale AKS-managed add-ons is enabled. The default VPA update mode is Initial mode. + */ + public static final AddonAutoscaling ENABLED = fromString("Enabled"); + + /** + * Feature to autoscale AKS-managed add-ons is disabled. + */ + public static final AddonAutoscaling DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of AddonAutoscaling value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AddonAutoscaling() { + } + + /** + * Creates or finds a AddonAutoscaling from its string representation. + * + * @param name a name to look for. + * @return the corresponding AddonAutoscaling. + */ + public static AddonAutoscaling fromString(String name) { + return fromString(name, AddonAutoscaling.class); + } + + /** + * Gets known AddonAutoscaling values. + * + * @return known AddonAutoscaling values. + */ + public static Collection values() { + return values(AddonAutoscaling.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java new file mode 100644 index 000000000000..43c4ab093db2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Artifact streaming profile for the agent pool. + */ +@Fluent +public final class AgentPoolArtifactStreamingProfile implements JsonSerializable { + /* + * Artifact streaming speeds up the cold-start of containers on a node through on-demand image loading. To use this + * feature, container images must also enable artifact streaming on ACR. If not specified, the default is false. + */ + private Boolean enabled; + + /** + * Creates an instance of AgentPoolArtifactStreamingProfile class. + */ + public AgentPoolArtifactStreamingProfile() { + } + + /** + * Get the enabled property: Artifact streaming speeds up the cold-start of containers on a node through on-demand + * image loading. To use this feature, container images must also enable artifact streaming on ACR. If not + * specified, the default is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Artifact streaming speeds up the cold-start of containers on a node through on-demand + * image loading. To use this feature, container images must also enable artifact streaming on ACR. If not + * specified, the default is false. + * + * @param enabled the enabled value to set. + * @return the AgentPoolArtifactStreamingProfile object itself. + */ + public AgentPoolArtifactStreamingProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolArtifactStreamingProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolArtifactStreamingProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolArtifactStreamingProfile. + */ + public static AgentPoolArtifactStreamingProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolArtifactStreamingProfile deserializedAgentPoolArtifactStreamingProfile + = new AgentPoolArtifactStreamingProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedAgentPoolArtifactStreamingProfile.enabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolArtifactStreamingProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java new file mode 100644 index 000000000000..27c951e6e74c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Settings for blue-green upgrade on an agentpool. + */ +@Fluent +public final class AgentPoolBlueGreenUpgradeSettings implements JsonSerializable { + /* + * The number or percentage of nodes to drain in batch during blue-green upgrade. Must be a non-zero number. This + * can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the + * percentage of the total number of blue nodes of the initial upgrade operation. For percentages, fractional nodes + * are rounded up. If not specified, the default is 10%. For more information, including best practices, see: + * https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster + */ + private String drainBatchSize; + + /* + * The drain timeout for a node, i.e., the amount of time (in minutes) to wait on eviction of pods and graceful + * termination per node. This eviction wait time honors waiting on pod disruption budgets. If this time is exceeded, + * the upgrade fails. If not specified, the default is 30 minutes. + */ + private Integer drainTimeoutInMinutes; + + /* + * The soak duration after draining a batch of nodes, i.e., the amount of time (in minutes) to wait after draining a + * batch of nodes before moving on the next batch. If not specified, the default is 15 minutes. + */ + private Integer batchSoakDurationInMinutes; + + /* + * The soak duration for a node pool, i.e., the amount of time (in minutes) to wait after all old nodes are drained + * before we remove the old nodes. If not specified, the default is 60 minutes. Only applicable for blue-green + * upgrade strategy. + */ + private Integer finalSoakDurationInMinutes; + + /** + * Creates an instance of AgentPoolBlueGreenUpgradeSettings class. + */ + public AgentPoolBlueGreenUpgradeSettings() { + } + + /** + * Get the drainBatchSize property: The number or percentage of nodes to drain in batch during blue-green upgrade. + * Must be a non-zero number. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a + * percentage is specified, it is the percentage of the total number of blue nodes of the initial upgrade operation. + * For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + * including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @return the drainBatchSize value. + */ + public String drainBatchSize() { + return this.drainBatchSize; + } + + /** + * Set the drainBatchSize property: The number or percentage of nodes to drain in batch during blue-green upgrade. + * Must be a non-zero number. This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a + * percentage is specified, it is the percentage of the total number of blue nodes of the initial upgrade operation. + * For percentages, fractional nodes are rounded up. If not specified, the default is 10%. For more information, + * including best practices, see: https://learn.microsoft.com/en-us/azure/aks/upgrade-cluster. + * + * @param drainBatchSize the drainBatchSize value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withDrainBatchSize(String drainBatchSize) { + this.drainBatchSize = drainBatchSize; + return this; + } + + /** + * Get the drainTimeoutInMinutes property: The drain timeout for a node, i.e., the amount of time (in minutes) to + * wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod + * disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. + * + * @return the drainTimeoutInMinutes value. + */ + public Integer drainTimeoutInMinutes() { + return this.drainTimeoutInMinutes; + } + + /** + * Set the drainTimeoutInMinutes property: The drain timeout for a node, i.e., the amount of time (in minutes) to + * wait on eviction of pods and graceful termination per node. This eviction wait time honors waiting on pod + * disruption budgets. If this time is exceeded, the upgrade fails. If not specified, the default is 30 minutes. + * + * @param drainTimeoutInMinutes the drainTimeoutInMinutes value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withDrainTimeoutInMinutes(Integer drainTimeoutInMinutes) { + this.drainTimeoutInMinutes = drainTimeoutInMinutes; + return this; + } + + /** + * Get the batchSoakDurationInMinutes property: The soak duration after draining a batch of nodes, i.e., the amount + * of time (in minutes) to wait after draining a batch of nodes before moving on the next batch. If not specified, + * the default is 15 minutes. + * + * @return the batchSoakDurationInMinutes value. + */ + public Integer batchSoakDurationInMinutes() { + return this.batchSoakDurationInMinutes; + } + + /** + * Set the batchSoakDurationInMinutes property: The soak duration after draining a batch of nodes, i.e., the amount + * of time (in minutes) to wait after draining a batch of nodes before moving on the next batch. If not specified, + * the default is 15 minutes. + * + * @param batchSoakDurationInMinutes the batchSoakDurationInMinutes value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withBatchSoakDurationInMinutes(Integer batchSoakDurationInMinutes) { + this.batchSoakDurationInMinutes = batchSoakDurationInMinutes; + return this; + } + + /** + * Get the finalSoakDurationInMinutes property: The soak duration for a node pool, i.e., the amount of time (in + * minutes) to wait after all old nodes are drained before we remove the old nodes. If not specified, the default is + * 60 minutes. Only applicable for blue-green upgrade strategy. + * + * @return the finalSoakDurationInMinutes value. + */ + public Integer finalSoakDurationInMinutes() { + return this.finalSoakDurationInMinutes; + } + + /** + * Set the finalSoakDurationInMinutes property: The soak duration for a node pool, i.e., the amount of time (in + * minutes) to wait after all old nodes are drained before we remove the old nodes. If not specified, the default is + * 60 minutes. Only applicable for blue-green upgrade strategy. + * + * @param finalSoakDurationInMinutes the finalSoakDurationInMinutes value to set. + * @return the AgentPoolBlueGreenUpgradeSettings object itself. + */ + public AgentPoolBlueGreenUpgradeSettings withFinalSoakDurationInMinutes(Integer finalSoakDurationInMinutes) { + this.finalSoakDurationInMinutes = finalSoakDurationInMinutes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("drainBatchSize", this.drainBatchSize); + jsonWriter.writeNumberField("drainTimeoutInMinutes", this.drainTimeoutInMinutes); + jsonWriter.writeNumberField("batchSoakDurationInMinutes", this.batchSoakDurationInMinutes); + jsonWriter.writeNumberField("finalSoakDurationInMinutes", this.finalSoakDurationInMinutes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolBlueGreenUpgradeSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolBlueGreenUpgradeSettings if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolBlueGreenUpgradeSettings. + */ + public static AgentPoolBlueGreenUpgradeSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolBlueGreenUpgradeSettings deserializedAgentPoolBlueGreenUpgradeSettings + = new AgentPoolBlueGreenUpgradeSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("drainBatchSize".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.drainBatchSize = reader.getString(); + } else if ("drainTimeoutInMinutes".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.drainTimeoutInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("batchSoakDurationInMinutes".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.batchSoakDurationInMinutes + = reader.getNullable(JsonReader::getInt); + } else if ("finalSoakDurationInMinutes".equals(fieldName)) { + deserializedAgentPoolBlueGreenUpgradeSettings.finalSoakDurationInMinutes + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolBlueGreenUpgradeSettings; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java index 41ce870f4514..cf33ad8ddfb8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java @@ -30,6 +30,19 @@ public final class AgentPoolMode extends ExpandableStringEnum { */ public static final AgentPoolMode GATEWAY = fromString("Gateway"); + /** + * ManagedSystem is a system pool managed by AKS. The pool scales dynamically according to cluster usage, and has + * additional automated monitoring and healing capabilities. There can only be one ManagedSystem pool, and it is + * recommended to delete all other system pools for the best experience. + */ + public static final AgentPoolMode MANAGED_SYSTEM = fromString("ManagedSystem"); + + /** + * Machines agent pools are dedicated to hosting machines. Only limited operations, such as creation and deletion, + * are allowed at the pool level. Please use the machine APIs to manage the full machine lifecycle. + */ + public static final AgentPoolMode MACHINES = fromString("Machines"); + /** * Creates a new instance of AgentPoolMode value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java new file mode 100644 index 000000000000..e507a046138f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * A historical version that can be used for rollback operations. + */ +@Immutable +public final class AgentPoolRecentlyUsedVersion implements JsonSerializable { + /* + * The Kubernetes version (major.minor.patch) available for rollback. + */ + private String orchestratorVersion; + + /* + * The node image version available for rollback. + */ + private String nodeImageVersion; + + /* + * The timestamp when this version was last used. + */ + private OffsetDateTime timestamp; + + /** + * Creates an instance of AgentPoolRecentlyUsedVersion class. + */ + private AgentPoolRecentlyUsedVersion() { + } + + /** + * Get the orchestratorVersion property: The Kubernetes version (major.minor.patch) available for rollback. + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Get the nodeImageVersion property: The node image version available for rollback. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Get the timestamp property: The timestamp when this version was last used. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); + jsonWriter.writeStringField("nodeImageVersion", this.nodeImageVersion); + jsonWriter.writeStringField("timestamp", + this.timestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timestamp)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AgentPoolRecentlyUsedVersion from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AgentPoolRecentlyUsedVersion if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AgentPoolRecentlyUsedVersion. + */ + public static AgentPoolRecentlyUsedVersion fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AgentPoolRecentlyUsedVersion deserializedAgentPoolRecentlyUsedVersion = new AgentPoolRecentlyUsedVersion(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("orchestratorVersion".equals(fieldName)) { + deserializedAgentPoolRecentlyUsedVersion.orchestratorVersion = reader.getString(); + } else if ("nodeImageVersion".equals(fieldName)) { + deserializedAgentPoolRecentlyUsedVersion.nodeImageVersion = reader.getString(); + } else if ("timestamp".equals(fieldName)) { + deserializedAgentPoolRecentlyUsedVersion.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedAgentPoolRecentlyUsedVersion; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java index fb672ce29788..095d3190a7f5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java @@ -21,6 +21,11 @@ public final class AgentPoolSshAccess extends ExpandableStringEnum { + /* + * VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', 'Standard_E16s_v3' or + * 'Standard_D16s_v5'. + */ + private String size; + + /* + * The minimum number of nodes of the specified sizes. + */ + private Integer minCount; + + /* + * The maximum number of nodes of the specified sizes. + */ + private Integer maxCount; + + /** + * Creates an instance of AutoScaleProfile class. + */ + public AutoScaleProfile() { + } + + /** + * Get the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + * 'Standard_E16s_v3' or 'Standard_D16s_v5'. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: VM size that AKS will use when creating and scaling e.g. 'Standard_E4s_v3', + * 'Standard_E16s_v3' or 'Standard_D16s_v5'. + * + * @param size the size value to set. + * @return the AutoScaleProfile object itself. + */ + public AutoScaleProfile withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the minCount property: The minimum number of nodes of the specified sizes. + * + * @return the minCount value. + */ + public Integer minCount() { + return this.minCount; + } + + /** + * Set the minCount property: The minimum number of nodes of the specified sizes. + * + * @param minCount the minCount value to set. + * @return the AutoScaleProfile object itself. + */ + public AutoScaleProfile withMinCount(Integer minCount) { + this.minCount = minCount; + return this; + } + + /** + * Get the maxCount property: The maximum number of nodes of the specified sizes. + * + * @return the maxCount value. + */ + public Integer maxCount() { + return this.maxCount; + } + + /** + * Set the maxCount property: The maximum number of nodes of the specified sizes. + * + * @param maxCount the maxCount value to set. + * @return the AutoScaleProfile object itself. + */ + public AutoScaleProfile withMaxCount(Integer maxCount) { + this.maxCount = maxCount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("size", this.size); + jsonWriter.writeNumberField("minCount", this.minCount); + jsonWriter.writeNumberField("maxCount", this.maxCount); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AutoScaleProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AutoScaleProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AutoScaleProfile. + */ + public static AutoScaleProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AutoScaleProfile deserializedAutoScaleProfile = new AutoScaleProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("size".equals(fieldName)) { + deserializedAutoScaleProfile.size = reader.getString(); + } else if ("minCount".equals(fieldName)) { + deserializedAutoScaleProfile.minCount = reader.getNullable(JsonReader::getInt); + } else if ("maxCount".equals(fieldName)) { + deserializedAutoScaleProfile.maxCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAutoScaleProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java new file mode 100644 index 000000000000..121a5242a214 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The health probing behavior for External Traffic Policy Cluster services. + */ +public final class ClusterServiceLoadBalancerHealthProbeMode + extends ExpandableStringEnum { + /** + * Each External Traffic Policy Cluster service will have its own health probe targeting service nodePort. + */ + public static final ClusterServiceLoadBalancerHealthProbeMode SERVICE_NODE_PORT = fromString("ServiceNodePort"); + + /** + * All External Traffic Policy Cluster services in a Standard Load Balancer will have a dedicated health probe + * targeting the backend nodes' kube-proxy health check port 10256. + */ + public static final ClusterServiceLoadBalancerHealthProbeMode SHARED = fromString("Shared"); + + /** + * Creates a new instance of ClusterServiceLoadBalancerHealthProbeMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterServiceLoadBalancerHealthProbeMode() { + } + + /** + * Creates or finds a ClusterServiceLoadBalancerHealthProbeMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterServiceLoadBalancerHealthProbeMode. + */ + public static ClusterServiceLoadBalancerHealthProbeMode fromString(String name) { + return fromString(name, ClusterServiceLoadBalancerHealthProbeMode.class); + } + + /** + * Gets known ClusterServiceLoadBalancerHealthProbeMode values. + * + * @return known ClusterServiceLoadBalancerHealthProbeMode values. + */ + public static Collection values() { + return values(ClusterServiceLoadBalancerHealthProbeMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java new file mode 100644 index 000000000000..2da09fcf6909 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Component.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Component information for a Kubernetes version. + */ +@Immutable +public final class Component implements JsonSerializable { + /* + * Component name. + */ + private String name; + + /* + * Component version. + */ + private String version; + + /* + * If upgraded component version contains breaking changes from the current version. To see a detailed description + * of what the breaking changes are, visit + * https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking- + * changes-by-version. + */ + private Boolean hasBreakingChanges; + + /** + * Creates an instance of Component class. + */ + private Component() { + } + + /** + * Get the name property: Component name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the version property: Component version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the hasBreakingChanges property: If upgraded component version contains breaking changes from the current + * version. To see a detailed description of what the breaking changes are, visit + * https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version. + * + * @return the hasBreakingChanges value. + */ + public Boolean hasBreakingChanges() { + return this.hasBreakingChanges; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("version", this.version); + jsonWriter.writeBooleanField("hasBreakingChanges", this.hasBreakingChanges); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Component from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Component if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Component. + */ + public static Component fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Component deserializedComponent = new Component(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedComponent.name = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedComponent.version = reader.getString(); + } else if ("hasBreakingChanges".equals(fieldName)) { + deserializedComponent.hasBreakingChanges = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedComponent; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java new file mode 100644 index 000000000000..79a7f0ef9245 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * components of given Kubernetes version. + */ +@Immutable +public final class ComponentsByRelease implements JsonSerializable { + /* + * The Kubernetes version (major.minor). + */ + private String kubernetesVersion; + + /* + * components of current or upgraded Kubernetes version in the cluster. + */ + private List components; + + /** + * Creates an instance of ComponentsByRelease class. + */ + private ComponentsByRelease() { + } + + /** + * Get the kubernetesVersion property: The Kubernetes version (major.minor). + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Get the components property: components of current or upgraded Kubernetes version in the cluster. + * + * @return the components value. + */ + public List components() { + return this.components; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (components() != null) { + components().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); + jsonWriter.writeArrayField("components", this.components, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ComponentsByRelease from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ComponentsByRelease if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ComponentsByRelease. + */ + public static ComponentsByRelease fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ComponentsByRelease deserializedComponentsByRelease = new ComponentsByRelease(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubernetesVersion".equals(fieldName)) { + deserializedComponentsByRelease.kubernetesVersion = reader.getString(); + } else if ("components".equals(fieldName)) { + List components = reader.readArray(reader1 -> Component.fromJson(reader1)); + deserializedComponentsByRelease.components = components; + } else { + reader.skipChildren(); + } + } + + return deserializedComponentsByRelease; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerNetworkLogs.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerNetworkLogs.java new file mode 100644 index 000000000000..b18055496046 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerNetworkLogs.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Configures container network logs ingestion with Azure Monitor. Which network logs to ingest is controlled by the CRD + * found in the following links. No network logs are ingested by default. More information on container network logs can + * be found at https://aka.ms/ContainerNetworkLogsDoc. More information on configuring container network log can be + * found at https://aka.ms/acns/howtoenablecnl. If not specified, the default is Disabled. + */ +public final class ContainerNetworkLogs extends ExpandableStringEnum { + /** + * Azure monitor ingestion of container network logs is disabled. + */ + public static final ContainerNetworkLogs DISABLED = fromString("Disabled"); + + /** + * Azure monitor ingestion of container network logs is enabled. + */ + public static final ContainerNetworkLogs ENABLED = fromString("Enabled"); + + /** + * Creates a new instance of ContainerNetworkLogs value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ContainerNetworkLogs() { + } + + /** + * Creates or finds a ContainerNetworkLogs from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerNetworkLogs. + */ + public static ContainerNetworkLogs fromString(String name) { + return fromString(name, ContainerNetworkLogs.class); + } + + /** + * Gets known ContainerNetworkLogs values. + * + * @return known ContainerNetworkLogs values. + */ + public static Collection values() { + return values(ContainerNetworkLogs.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java index 1ae8f9a7a33c..79dbb34afa1e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java @@ -114,6 +114,19 @@ public final class ContainerServiceNetworkProfile implements JsonSerializable ipFamilies; + /* + * Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods with + * hostNetwork=false. if not specified, the default is 'IMDS'. + */ + private PodLinkLocalAccess podLinkLocalAccess; + + /* + * 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'. + */ + private ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig; + /** * Creates an instance of ContainerServiceNetworkProfile class. */ @@ -492,6 +505,57 @@ public ContainerServiceNetworkProfile withIpFamilies(List ipFamilies) return this; } + /** + * Get the podLinkLocalAccess property: Defines access to special link local addresses (Azure Instance Metadata + * Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is 'IMDS'. + * + * @return the podLinkLocalAccess value. + */ + public PodLinkLocalAccess podLinkLocalAccess() { + return this.podLinkLocalAccess; + } + + /** + * Set the podLinkLocalAccess property: Defines access to special link local addresses (Azure Instance Metadata + * Service, aka IMDS) for pods with hostNetwork=false. if not specified, the default is 'IMDS'. + * + * @param podLinkLocalAccess the podLinkLocalAccess value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile withPodLinkLocalAccess(PodLinkLocalAccess podLinkLocalAccess) { + this.podLinkLocalAccess = podLinkLocalAccess; + return this; + } + + /** + * Get the kubeProxyConfig property: Holds configuration customizations for kube-proxy. Any values not defined will + * use the kube-proxy defaulting behavior. See + * https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where + * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 + * would be '1-23'. + * + * @return the kubeProxyConfig value. + */ + public ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig() { + return this.kubeProxyConfig; + } + + /** + * Set the kubeProxyConfig property: Holds configuration customizations for kube-proxy. Any values not defined will + * use the kube-proxy defaulting behavior. See + * https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ where + * <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 + * would be '1-23'. + * + * @param kubeProxyConfig the kubeProxyConfig value to set. + * @return the ContainerServiceNetworkProfile object itself. + */ + public ContainerServiceNetworkProfile + withKubeProxyConfig(ContainerServiceNetworkProfileKubeProxyConfig kubeProxyConfig) { + this.kubeProxyConfig = kubeProxyConfig; + return this; + } + /** * Validates the instance. * @@ -510,6 +574,9 @@ public void validate() { if (staticEgressGatewayProfile() != null) { staticEgressGatewayProfile().validate(); } + if (kubeProxyConfig() != null) { + kubeProxyConfig().validate(); + } } /** @@ -539,6 +606,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("serviceCidrs", this.serviceCidrs, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("ipFamilies", this.ipFamilies, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("podLinkLocalAccess", + this.podLinkLocalAccess == null ? null : this.podLinkLocalAccess.toString()); + jsonWriter.writeJsonField("kubeProxyConfig", this.kubeProxyConfig); return jsonWriter.writeEndObject(); } @@ -604,6 +674,12 @@ public static ContainerServiceNetworkProfile fromJson(JsonReader jsonReader) thr } else if ("ipFamilies".equals(fieldName)) { List ipFamilies = reader.readArray(reader1 -> IpFamily.fromString(reader1.getString())); deserializedContainerServiceNetworkProfile.ipFamilies = ipFamilies; + } else if ("podLinkLocalAccess".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.podLinkLocalAccess + = PodLinkLocalAccess.fromString(reader.getString()); + } else if ("kubeProxyConfig".equals(fieldName)) { + deserializedContainerServiceNetworkProfile.kubeProxyConfig + = ContainerServiceNetworkProfileKubeProxyConfig.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java new file mode 100644 index 000000000000..de14147a2529 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Holds configuration customizations for kube-proxy. Any values not defined will use the kube-proxy defaulting + * behavior. See https://v<version>.docs.kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/ + * where <version> is represented by a <major version>-<minor version> string. Kubernetes version 1.23 + * would be '1-23'. + */ +@Fluent +public final class ContainerServiceNetworkProfileKubeProxyConfig + implements JsonSerializable { + /* + * Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, kube-proxy is enabled in AKS by + * default without these customizations). + */ + private Boolean enabled; + + /* + * Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES') + */ + private Mode mode; + + /* + * Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + */ + private ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig; + + /** + * Creates an instance of ContainerServiceNetworkProfileKubeProxyConfig class. + */ + public ContainerServiceNetworkProfileKubeProxyConfig() { + } + + /** + * Get the enabled property: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, + * kube-proxy is enabled in AKS by default without these customizations). + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable on kube-proxy on the cluster (if no 'kubeProxyConfig' exists, + * kube-proxy is enabled in AKS by default without these customizations). + * + * @param enabled the enabled value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the mode property: Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). + * + * @return the mode value. + */ + public Mode mode() { + return this.mode; + } + + /** + * Set the mode property: Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). + * + * @param mode the mode value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig withMode(Mode mode) { + this.mode = mode; + return this; + } + + /** + * Get the ipvsConfig property: Holds configuration customizations for IPVS. May only be specified if 'mode' is set + * to 'IPVS'. + * + * @return the ipvsConfig value. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig() { + return this.ipvsConfig; + } + + /** + * Set the ipvsConfig property: Holds configuration customizations for IPVS. May only be specified if 'mode' is set + * to 'IPVS'. + * + * @param ipvsConfig the ipvsConfig value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfig + withIpvsConfig(ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig ipvsConfig) { + this.ipvsConfig = ipvsConfig; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipvsConfig() != null) { + ipvsConfig().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeJsonField("ipvsConfig", this.ipvsConfig); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContainerServiceNetworkProfileKubeProxyConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContainerServiceNetworkProfileKubeProxyConfig if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ContainerServiceNetworkProfileKubeProxyConfig. + */ + public static ContainerServiceNetworkProfileKubeProxyConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContainerServiceNetworkProfileKubeProxyConfig deserializedContainerServiceNetworkProfileKubeProxyConfig + = new ContainerServiceNetworkProfileKubeProxyConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfig.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("mode".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfig.mode + = Mode.fromString(reader.getString()); + } else if ("ipvsConfig".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfig.ipvsConfig + = ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedContainerServiceNetworkProfileKubeProxyConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java new file mode 100644 index 000000000000..b459f51c5030 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Holds configuration customizations for IPVS. May only be specified if 'mode' is set to 'IPVS'. + */ +@Fluent +public final class ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + implements JsonSerializable { + /* + * IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. + */ + private IpvsScheduler scheduler; + + /* + * The timeout value used for idle IPVS TCP sessions in seconds. Must be a positive integer value. + */ + private Integer tcpTimeoutSeconds; + + /* + * The timeout value used for IPVS TCP sessions after receiving a FIN in seconds. Must be a positive integer value. + */ + private Integer tcpFinTimeoutSeconds; + + /* + * The timeout value used for IPVS UDP packets in seconds. Must be a positive integer value. + */ + private Integer udpTimeoutSeconds; + + /** + * Creates an instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig class. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig() { + } + + /** + * Get the scheduler property: IPVS scheduler, for more information please see + * http://www.linuxvirtualserver.org/docs/scheduling.html. + * + * @return the scheduler value. + */ + public IpvsScheduler scheduler() { + return this.scheduler; + } + + /** + * Set the scheduler property: IPVS scheduler, for more information please see + * http://www.linuxvirtualserver.org/docs/scheduling.html. + * + * @param scheduler the scheduler value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withScheduler(IpvsScheduler scheduler) { + this.scheduler = scheduler; + return this; + } + + /** + * Get the tcpTimeoutSeconds property: The timeout value used for idle IPVS TCP sessions in seconds. Must be a + * positive integer value. + * + * @return the tcpTimeoutSeconds value. + */ + public Integer tcpTimeoutSeconds() { + return this.tcpTimeoutSeconds; + } + + /** + * Set the tcpTimeoutSeconds property: The timeout value used for idle IPVS TCP sessions in seconds. Must be a + * positive integer value. + * + * @param tcpTimeoutSeconds the tcpTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withTcpTimeoutSeconds(Integer tcpTimeoutSeconds) { + this.tcpTimeoutSeconds = tcpTimeoutSeconds; + return this; + } + + /** + * Get the tcpFinTimeoutSeconds property: The timeout value used for IPVS TCP sessions after receiving a FIN in + * seconds. Must be a positive integer value. + * + * @return the tcpFinTimeoutSeconds value. + */ + public Integer tcpFinTimeoutSeconds() { + return this.tcpFinTimeoutSeconds; + } + + /** + * Set the tcpFinTimeoutSeconds property: The timeout value used for IPVS TCP sessions after receiving a FIN in + * seconds. Must be a positive integer value. + * + * @param tcpFinTimeoutSeconds the tcpFinTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + withTcpFinTimeoutSeconds(Integer tcpFinTimeoutSeconds) { + this.tcpFinTimeoutSeconds = tcpFinTimeoutSeconds; + return this; + } + + /** + * Get the udpTimeoutSeconds property: The timeout value used for IPVS UDP packets in seconds. Must be a positive + * integer value. + * + * @return the udpTimeoutSeconds value. + */ + public Integer udpTimeoutSeconds() { + return this.udpTimeoutSeconds; + } + + /** + * Set the udpTimeoutSeconds property: The timeout value used for IPVS UDP packets in seconds. Must be a positive + * integer value. + * + * @param udpTimeoutSeconds the udpTimeoutSeconds value to set. + * @return the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig object itself. + */ + public ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig withUdpTimeoutSeconds(Integer udpTimeoutSeconds) { + this.udpTimeoutSeconds = udpTimeoutSeconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scheduler", this.scheduler == null ? null : this.scheduler.toString()); + jsonWriter.writeNumberField("tcpTimeoutSeconds", this.tcpTimeoutSeconds); + jsonWriter.writeNumberField("tcpFinTimeoutSeconds", this.tcpFinTimeoutSeconds); + jsonWriter.writeNumberField("udpTimeoutSeconds", this.udpTimeoutSeconds); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig if the JsonReader was pointing to + * an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig. + */ + public static ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig + = new ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scheduler".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.scheduler + = IpvsScheduler.fromString(reader.getString()); + } else if ("tcpTimeoutSeconds".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.tcpTimeoutSeconds + = reader.getNullable(JsonReader::getInt); + } else if ("tcpFinTimeoutSeconds".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.tcpFinTimeoutSeconds + = reader.getNullable(JsonReader::getInt); + } else if ("udpTimeoutSeconds".equals(fieldName)) { + deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.udpTimeoutSeconds + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedContainerServiceNetworkProfileKubeProxyConfigIpvsConfig; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ControlPlaneScalingSize.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ControlPlaneScalingSize.java new file mode 100644 index 000000000000..a7d8c41a0573 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ControlPlaneScalingSize.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The scaling size of the control plane. Scaling sizes offer guaranteed capacity and predictable Kubernetes performance + * beyond standard tier defaults. Higher H sizes provide increased performance guarantees. See + * https://aka.ms/aks/hyperscale for performance metrics details for each size. + */ +public final class ControlPlaneScalingSize extends ExpandableStringEnum { + /** + * H2 is the smallest scaling size with guaranteed capacity and predictable performance beyond standard tier + * defaults. + */ + public static final ControlPlaneScalingSize H2 = fromString("H2"); + + /** + * H4 scaling size provides increased guaranteed performance over H2. + */ + public static final ControlPlaneScalingSize H4 = fromString("H4"); + + /** + * H8 scaling size provides increased guaranteed performance over H4. + */ + public static final ControlPlaneScalingSize H8 = fromString("H8"); + + /** + * Creates a new instance of ControlPlaneScalingSize value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ControlPlaneScalingSize() { + } + + /** + * Creates or finds a ControlPlaneScalingSize from its string representation. + * + * @param name a name to look for. + * @return the corresponding ControlPlaneScalingSize. + */ + public static ControlPlaneScalingSize fromString(String name) { + return fromString(name, ControlPlaneScalingSize.class); + } + + /** + * Gets known ControlPlaneScalingSize values. + * + * @return known ControlPlaneScalingSize values. + */ + public static Collection values() { + return values(ControlPlaneScalingSize.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java new file mode 100644 index 000000000000..2729e4cb9f6b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The drift action of the machine. Indicates whether a machine has deviated from its expected state due to changes in + * managed cluster properties, requiring corrective action. + */ +public final class DriftAction extends ExpandableStringEnum { + /** + * The machine is up to date. + */ + public static final DriftAction SYNCED = fromString("Synced"); + + /** + * The machine has drifted and needs to be deleted and recreated. + */ + public static final DriftAction RECREATE = fromString("Recreate"); + + /** + * Creates a new instance of DriftAction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DriftAction() { + } + + /** + * Creates or finds a DriftAction from its string representation. + * + * @param name a name to look for. + * @return the corresponding DriftAction. + */ + public static DriftAction fromString(String name) { + return fromString(name, DriftAction.class); + } + + /** + * Gets known DriftAction values. + * + * @return known DriftAction values. + */ + public static Collection values() { + return values(DriftAction.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java new file mode 100644 index 000000000000..28c7b06815e3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify the type of GPU driver to install when creating Windows agent pools. If not provided, AKS selects the driver + * based on system compatibility. This cannot be changed once the AgentPool has been created. This cannot be set on + * Linux AgentPools. For Linux AgentPools, the driver is selected based on system compatibility. + */ +public final class DriverType extends ExpandableStringEnum { + /** + * Install the GRID driver for the GPU, suitable for applications requiring virtualization support. + */ + public static final DriverType GRID = fromString("GRID"); + + /** + * Install the CUDA driver for the GPU, optimized for computational tasks in scientific computing and data-intensive + * applications. + */ + public static final DriverType CUDA = fromString("CUDA"); + + /** + * Creates a new instance of DriverType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DriverType() { + } + + /** + * Creates or finds a DriverType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DriverType. + */ + public static DriverType fromString(String name) { + return fromString(name, DriverType.class); + } + + /** + * Gets known DriverType values. + * + * @return known DriverType values. + */ + public static Collection values() { + return values(DriverType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java index f57ce925de53..5b4c63125714 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java @@ -21,6 +21,18 @@ public final class GpuProfile implements JsonSerializable { */ private GpuDriver driver; + /* + * Specify the type of GPU driver to install when creating Windows agent pools. If not provided, AKS selects the + * driver based on system compatibility. This cannot be changed once the AgentPool has been created. This cannot be + * set on Linux AgentPools. For Linux AgentPools, the driver is selected based on system compatibility. + */ + private DriverType driverType; + + /* + * NVIDIA-specific GPU settings. + */ + private NvidiaGPUProfile nvidia; + /** * Creates an instance of GpuProfile class. */ @@ -47,12 +59,61 @@ public GpuProfile withDriver(GpuDriver driver) { return this; } + /** + * Get the driverType property: Specify the type of GPU driver to install when creating Windows agent pools. If not + * provided, AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool has + * been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is selected based on + * system compatibility. + * + * @return the driverType value. + */ + public DriverType driverType() { + return this.driverType; + } + + /** + * Set the driverType property: Specify the type of GPU driver to install when creating Windows agent pools. If not + * provided, AKS selects the driver based on system compatibility. This cannot be changed once the AgentPool has + * been created. This cannot be set on Linux AgentPools. For Linux AgentPools, the driver is selected based on + * system compatibility. + * + * @param driverType the driverType value to set. + * @return the GpuProfile object itself. + */ + public GpuProfile withDriverType(DriverType driverType) { + this.driverType = driverType; + return this; + } + + /** + * Get the nvidia property: NVIDIA-specific GPU settings. + * + * @return the nvidia value. + */ + public NvidiaGPUProfile nvidia() { + return this.nvidia; + } + + /** + * Set the nvidia property: NVIDIA-specific GPU settings. + * + * @param nvidia the nvidia value to set. + * @return the GpuProfile object itself. + */ + public GpuProfile withNvidia(NvidiaGPUProfile nvidia) { + this.nvidia = nvidia; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (nvidia() != null) { + nvidia().validate(); + } } /** @@ -62,6 +123,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("driver", this.driver == null ? null : this.driver.toString()); + jsonWriter.writeStringField("driverType", this.driverType == null ? null : this.driverType.toString()); + jsonWriter.writeJsonField("nvidia", this.nvidia); return jsonWriter.writeEndObject(); } @@ -82,6 +145,10 @@ public static GpuProfile fromJson(JsonReader jsonReader) throws IOException { if ("driver".equals(fieldName)) { deserializedGpuProfile.driver = GpuDriver.fromString(reader.getString()); + } else if ("driverType".equals(fieldName)) { + deserializedGpuProfile.driverType = DriverType.fromString(reader.getString()); + } else if ("nvidia".equals(fieldName)) { + deserializedGpuProfile.nvidia = NvidiaGPUProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java new file mode 100644 index 000000000000..22968b6ccdec --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Whether the version is default or not and support info. + */ +@Immutable +public final class GuardrailsAvailableVersionsProperties + implements JsonSerializable { + /* + * Whether this is the default version. + */ + private Boolean isDefaultVersion; + + /* + * Whether the version is preview or stable. + */ + private GuardrailsSupport support; + + /** + * Creates an instance of GuardrailsAvailableVersionsProperties class. + */ + private GuardrailsAvailableVersionsProperties() { + } + + /** + * Get the isDefaultVersion property: Whether this is the default version. + * + * @return the isDefaultVersion value. + */ + public Boolean isDefaultVersion() { + return this.isDefaultVersion; + } + + /** + * Get the support property: Whether the version is preview or stable. + * + * @return the support value. + */ + public GuardrailsSupport support() { + return this.support; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GuardrailsAvailableVersionsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GuardrailsAvailableVersionsProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GuardrailsAvailableVersionsProperties. + */ + public static GuardrailsAvailableVersionsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GuardrailsAvailableVersionsProperties deserializedGuardrailsAvailableVersionsProperties + = new GuardrailsAvailableVersionsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isDefaultVersion".equals(fieldName)) { + deserializedGuardrailsAvailableVersionsProperties.isDefaultVersion + = reader.getNullable(JsonReader::getBoolean); + } else if ("support".equals(fieldName)) { + deserializedGuardrailsAvailableVersionsProperties.support + = GuardrailsSupport.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedGuardrailsAvailableVersionsProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java new file mode 100644 index 000000000000..c32023e93a49 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether the version is preview or stable. + */ +public final class GuardrailsSupport extends ExpandableStringEnum { + /** + * 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. + */ + public static final GuardrailsSupport PREVIEW = fromString("Preview"); + + /** + * The version is stable and can be used on critical production clusters. + */ + public static final GuardrailsSupport STABLE = fromString("Stable"); + + /** + * Creates a new instance of GuardrailsSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GuardrailsSupport() { + } + + /** + * Creates or finds a GuardrailsSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding GuardrailsSupport. + */ + public static GuardrailsSupport fromString(String name) { + return fromString(name, GuardrailsSupport.class); + } + + /** + * Gets known GuardrailsSupport values. + * + * @return known GuardrailsSupport values. + */ + public static Collection values() { + return values(GuardrailsSupport.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java new file mode 100644 index 000000000000..fb18886e8a6f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Managed identity profile for the identity binding. + */ +@Fluent +public final class IdentityBindingManagedIdentityProfile + implements JsonSerializable { + /* + * The resource ID of the managed identity. + */ + private String resourceId; + + /* + * The object ID of the managed identity. + */ + private String objectId; + + /* + * The client ID of the managed identity. + */ + private String clientId; + + /* + * The tenant ID of the managed identity. + */ + private String tenantId; + + /** + * Creates an instance of IdentityBindingManagedIdentityProfile class. + */ + public IdentityBindingManagedIdentityProfile() { + } + + /** + * Get the resourceId property: The resource ID of the managed identity. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The resource ID of the managed identity. + * + * @param resourceId the resourceId value to set. + * @return the IdentityBindingManagedIdentityProfile object itself. + */ + public IdentityBindingManagedIdentityProfile withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the objectId property: The object ID of the managed identity. + * + * @return the objectId value. + */ + public String objectId() { + return this.objectId; + } + + /** + * Get the clientId property: The client ID of the managed identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Get the tenantId property: The tenant ID of the managed identity. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (resourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property resourceId in model IdentityBindingManagedIdentityProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IdentityBindingManagedIdentityProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("resourceId", this.resourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityBindingManagedIdentityProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityBindingManagedIdentityProfile if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IdentityBindingManagedIdentityProfile. + */ + public static IdentityBindingManagedIdentityProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityBindingManagedIdentityProfile deserializedIdentityBindingManagedIdentityProfile + = new IdentityBindingManagedIdentityProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("resourceId".equals(fieldName)) { + deserializedIdentityBindingManagedIdentityProfile.resourceId = reader.getString(); + } else if ("objectId".equals(fieldName)) { + deserializedIdentityBindingManagedIdentityProfile.objectId = reader.getString(); + } else if ("clientId".equals(fieldName)) { + deserializedIdentityBindingManagedIdentityProfile.clientId = reader.getString(); + } else if ("tenantId".equals(fieldName)) { + deserializedIdentityBindingManagedIdentityProfile.tenantId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityBindingManagedIdentityProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java new file mode 100644 index 000000000000..4c7b72b84bc9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IdentityBinding OIDC issuer profile. + */ +@Immutable +public final class IdentityBindingOidcIssuerProfile implements JsonSerializable { + /* + * The OIDC issuer URL of the IdentityBinding. + */ + private String oidcIssuerUrl; + + /** + * Creates an instance of IdentityBindingOidcIssuerProfile class. + */ + private IdentityBindingOidcIssuerProfile() { + } + + /** + * Get the oidcIssuerUrl property: The OIDC issuer URL of the IdentityBinding. + * + * @return the oidcIssuerUrl value. + */ + public String oidcIssuerUrl() { + return this.oidcIssuerUrl; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityBindingOidcIssuerProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityBindingOidcIssuerProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the IdentityBindingOidcIssuerProfile. + */ + public static IdentityBindingOidcIssuerProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityBindingOidcIssuerProfile deserializedIdentityBindingOidcIssuerProfile + = new IdentityBindingOidcIssuerProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("oidcIssuerUrl".equals(fieldName)) { + deserializedIdentityBindingOidcIssuerProfile.oidcIssuerUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityBindingOidcIssuerProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java new file mode 100644 index 000000000000..29c4711af8ef --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * IdentityBinding properties. + */ +@Fluent +public final class IdentityBindingProperties implements JsonSerializable { + /* + * Managed identity profile for the identity binding. + */ + private IdentityBindingManagedIdentityProfile managedIdentity; + + /* + * The OIDC issuer URL of the IdentityBinding. + */ + private IdentityBindingOidcIssuerProfile oidcIssuer; + + /* + * The status of the last operation. + */ + private IdentityBindingProvisioningState provisioningState; + + /** + * Creates an instance of IdentityBindingProperties class. + */ + public IdentityBindingProperties() { + } + + /** + * Get the managedIdentity property: Managed identity profile for the identity binding. + * + * @return the managedIdentity value. + */ + public IdentityBindingManagedIdentityProfile managedIdentity() { + return this.managedIdentity; + } + + /** + * Set the managedIdentity property: Managed identity profile for the identity binding. + * + * @param managedIdentity the managedIdentity value to set. + * @return the IdentityBindingProperties object itself. + */ + public IdentityBindingProperties withManagedIdentity(IdentityBindingManagedIdentityProfile managedIdentity) { + this.managedIdentity = managedIdentity; + return this; + } + + /** + * Get the oidcIssuer property: The OIDC issuer URL of the IdentityBinding. + * + * @return the oidcIssuer value. + */ + public IdentityBindingOidcIssuerProfile oidcIssuer() { + return this.oidcIssuer; + } + + /** + * Get the provisioningState property: The status of the last operation. + * + * @return the provisioningState value. + */ + public IdentityBindingProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (managedIdentity() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property managedIdentity in model IdentityBindingProperties")); + } else { + managedIdentity().validate(); + } + if (oidcIssuer() != null) { + oidcIssuer().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IdentityBindingProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("managedIdentity", this.managedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdentityBindingProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdentityBindingProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the IdentityBindingProperties. + */ + public static IdentityBindingProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdentityBindingProperties deserializedIdentityBindingProperties = new IdentityBindingProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managedIdentity".equals(fieldName)) { + deserializedIdentityBindingProperties.managedIdentity + = IdentityBindingManagedIdentityProfile.fromJson(reader); + } else if ("oidcIssuer".equals(fieldName)) { + deserializedIdentityBindingProperties.oidcIssuer + = IdentityBindingOidcIssuerProfile.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedIdentityBindingProperties.provisioningState + = IdentityBindingProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedIdentityBindingProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java new file mode 100644 index 000000000000..4efcaeff0386 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the last accepted operation. + */ +public final class IdentityBindingProvisioningState extends ExpandableStringEnum { + /** + * Resource has been created. + */ + public static final IdentityBindingProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Resource creation failed. + */ + public static final IdentityBindingProvisioningState FAILED = fromString("Failed"); + + /** + * Resource creation was canceled. + */ + public static final IdentityBindingProvisioningState CANCELED = fromString("Canceled"); + + /** + * The identity binding is being created. + */ + public static final IdentityBindingProvisioningState CREATING = fromString("Creating"); + + /** + * The identity binding is being updated. + */ + public static final IdentityBindingProvisioningState UPDATING = fromString("Updating"); + + /** + * The identity binding is being deleted. + */ + public static final IdentityBindingProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of IdentityBindingProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IdentityBindingProvisioningState() { + } + + /** + * Creates or finds a IdentityBindingProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding IdentityBindingProvisioningState. + */ + public static IdentityBindingProvisioningState fromString(String name) { + return fromString(name, IdentityBindingProvisioningState.class); + } + + /** + * Gets known IdentityBindingProvisioningState values. + * + * @return known IdentityBindingProvisioningState values. + */ + public static Collection values() { + return values(IdentityBindingProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java new file mode 100644 index 000000000000..26ce656a054a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. More information on + * this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. + */ +public final class InfrastructureEncryption extends ExpandableStringEnum { + /** + * Encryption at rest of Kubernetes resource objects using service-managed keys is enabled. More information on this + * can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. + */ + public static final InfrastructureEncryption ENABLED = fromString("Enabled"); + + /** + * Encryption at rest of Kubernetes resource objects using service-managed keys is disabled. More information on + * this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. + */ + public static final InfrastructureEncryption DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of InfrastructureEncryption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public InfrastructureEncryption() { + } + + /** + * Creates or finds a InfrastructureEncryption from its string representation. + * + * @param name a name to look for. + * @return the corresponding InfrastructureEncryption. + */ + public static InfrastructureEncryption fromString(String name) { + return fromString(name, InfrastructureEncryption.class); + } + + /** + * Gets known InfrastructureEncryption values. + * + * @return known InfrastructureEncryption values. + */ + public static Collection values() { + return values(InfrastructureEncryption.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java new file mode 100644 index 000000000000..9cadce7b0ef2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * IPVS scheduler, for more information please see http://www.linuxvirtualserver.org/docs/scheduling.html. + */ +public final class IpvsScheduler extends ExpandableStringEnum { + /** + * Round Robin. + */ + public static final IpvsScheduler ROUND_ROBIN = fromString("RoundRobin"); + + /** + * Least Connection. + */ + public static final IpvsScheduler LEAST_CONNECTION = fromString("LeastConnection"); + + /** + * Creates a new instance of IpvsScheduler value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IpvsScheduler() { + } + + /** + * Creates or finds a IpvsScheduler from its string representation. + * + * @param name a name to look for. + * @return the corresponding IpvsScheduler. + */ + public static IpvsScheduler fromString(String name) { + return fromString(name, IpvsScheduler.class); + } + + /** + * Gets known IpvsScheduler values. + * + * @return known IpvsScheduler values. + */ + public static Collection values() { + return values(IpvsScheduler.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappingExpression.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappingExpression.java new file mode 100644 index 000000000000..493002409c82 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappingExpression.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The claim mapping expression for JWTAuthenticator. + */ +@Fluent +public final class JWTAuthenticatorClaimMappingExpression + implements JsonSerializable { + /* + * The CEL expression used to access token claims. + */ + private String expression; + + /** + * Creates an instance of JWTAuthenticatorClaimMappingExpression class. + */ + public JWTAuthenticatorClaimMappingExpression() { + } + + /** + * Get the expression property: The CEL expression used to access token claims. + * + * @return the expression value. + */ + public String expression() { + return this.expression; + } + + /** + * Set the expression property: The CEL expression used to access token claims. + * + * @param expression the expression value to set. + * @return the JWTAuthenticatorClaimMappingExpression object itself. + */ + public JWTAuthenticatorClaimMappingExpression withExpression(String expression) { + this.expression = expression; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (expression() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property expression in model JWTAuthenticatorClaimMappingExpression")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorClaimMappingExpression.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("expression", this.expression); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorClaimMappingExpression from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorClaimMappingExpression if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorClaimMappingExpression. + */ + public static JWTAuthenticatorClaimMappingExpression fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorClaimMappingExpression deserializedJWTAuthenticatorClaimMappingExpression + = new JWTAuthenticatorClaimMappingExpression(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expression".equals(fieldName)) { + deserializedJWTAuthenticatorClaimMappingExpression.expression = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorClaimMappingExpression; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappings.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappings.java new file mode 100644 index 000000000000..8be5ddc596ff --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappings.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The claim mappings for JWTAuthenticator. + */ +@Fluent +public final class JWTAuthenticatorClaimMappings implements JsonSerializable { + /* + * The expression to extract username attribute from the token claims. + */ + private JWTAuthenticatorClaimMappingExpression username; + + /* + * The expression to extract groups attribute from the token claims. When not provided, no groups are extracted from + * the token claims. + */ + private JWTAuthenticatorClaimMappingExpression groups; + + /* + * The expression to extract uid attribute from the token claims. When not provided, no uid is extracted from the + * token claims. + */ + private JWTAuthenticatorClaimMappingExpression uid; + + /* + * The expression to extract extra attribute from the token claims. When not provided, no extra attributes are + * extracted from the token claims. + */ + private List extra; + + /** + * Creates an instance of JWTAuthenticatorClaimMappings class. + */ + public JWTAuthenticatorClaimMappings() { + } + + /** + * Get the username property: The expression to extract username attribute from the token claims. + * + * @return the username value. + */ + public JWTAuthenticatorClaimMappingExpression username() { + return this.username; + } + + /** + * Set the username property: The expression to extract username attribute from the token claims. + * + * @param username the username value to set. + * @return the JWTAuthenticatorClaimMappings object itself. + */ + public JWTAuthenticatorClaimMappings withUsername(JWTAuthenticatorClaimMappingExpression username) { + this.username = username; + return this; + } + + /** + * Get the groups property: The expression to extract groups attribute from the token claims. When not provided, no + * groups are extracted from the token claims. + * + * @return the groups value. + */ + public JWTAuthenticatorClaimMappingExpression groups() { + return this.groups; + } + + /** + * Set the groups property: The expression to extract groups attribute from the token claims. When not provided, no + * groups are extracted from the token claims. + * + * @param groups the groups value to set. + * @return the JWTAuthenticatorClaimMappings object itself. + */ + public JWTAuthenticatorClaimMappings withGroups(JWTAuthenticatorClaimMappingExpression groups) { + this.groups = groups; + return this; + } + + /** + * Get the uid property: The expression to extract uid attribute from the token claims. When not provided, no uid is + * extracted from the token claims. + * + * @return the uid value. + */ + public JWTAuthenticatorClaimMappingExpression uid() { + return this.uid; + } + + /** + * Set the uid property: The expression to extract uid attribute from the token claims. When not provided, no uid is + * extracted from the token claims. + * + * @param uid the uid value to set. + * @return the JWTAuthenticatorClaimMappings object itself. + */ + public JWTAuthenticatorClaimMappings withUid(JWTAuthenticatorClaimMappingExpression uid) { + this.uid = uid; + return this; + } + + /** + * Get the extra property: The expression to extract extra attribute from the token claims. When not provided, no + * extra attributes are extracted from the token claims. + * + * @return the extra value. + */ + public List extra() { + return this.extra; + } + + /** + * Set the extra property: The expression to extract extra attribute from the token claims. When not provided, no + * extra attributes are extracted from the token claims. + * + * @param extra the extra value to set. + * @return the JWTAuthenticatorClaimMappings object itself. + */ + public JWTAuthenticatorClaimMappings withExtra(List extra) { + this.extra = extra; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (username() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property username in model JWTAuthenticatorClaimMappings")); + } else { + username().validate(); + } + if (groups() != null) { + groups().validate(); + } + if (uid() != null) { + uid().validate(); + } + if (extra() != null) { + extra().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorClaimMappings.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("username", this.username); + jsonWriter.writeJsonField("groups", this.groups); + jsonWriter.writeJsonField("uid", this.uid); + jsonWriter.writeArrayField("extra", this.extra, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorClaimMappings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorClaimMappings if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorClaimMappings. + */ + public static JWTAuthenticatorClaimMappings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorClaimMappings deserializedJWTAuthenticatorClaimMappings + = new JWTAuthenticatorClaimMappings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("username".equals(fieldName)) { + deserializedJWTAuthenticatorClaimMappings.username + = JWTAuthenticatorClaimMappingExpression.fromJson(reader); + } else if ("groups".equals(fieldName)) { + deserializedJWTAuthenticatorClaimMappings.groups + = JWTAuthenticatorClaimMappingExpression.fromJson(reader); + } else if ("uid".equals(fieldName)) { + deserializedJWTAuthenticatorClaimMappings.uid + = JWTAuthenticatorClaimMappingExpression.fromJson(reader); + } else if ("extra".equals(fieldName)) { + List extra + = reader.readArray(reader1 -> JWTAuthenticatorExtraClaimMappingExpression.fromJson(reader1)); + deserializedJWTAuthenticatorClaimMappings.extra = extra; + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorClaimMappings; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorExtraClaimMappingExpression.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorExtraClaimMappingExpression.java new file mode 100644 index 000000000000..ea33ba837a84 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorExtraClaimMappingExpression.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The extra claim mapping expression for JWTAuthenticator. + */ +@Fluent +public final class JWTAuthenticatorExtraClaimMappingExpression + implements JsonSerializable { + /* + * The key of the extra attribute. + */ + private String key; + + /* + * The CEL expression used to extract the value of the extra attribute. + */ + private String valueExpression; + + /** + * Creates an instance of JWTAuthenticatorExtraClaimMappingExpression class. + */ + public JWTAuthenticatorExtraClaimMappingExpression() { + } + + /** + * Get the key property: The key of the extra attribute. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The key of the extra attribute. + * + * @param key the key value to set. + * @return the JWTAuthenticatorExtraClaimMappingExpression object itself. + */ + public JWTAuthenticatorExtraClaimMappingExpression withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the valueExpression property: The CEL expression used to extract the value of the extra attribute. + * + * @return the valueExpression value. + */ + public String valueExpression() { + return this.valueExpression; + } + + /** + * Set the valueExpression property: The CEL expression used to extract the value of the extra attribute. + * + * @param valueExpression the valueExpression value to set. + * @return the JWTAuthenticatorExtraClaimMappingExpression object itself. + */ + public JWTAuthenticatorExtraClaimMappingExpression withValueExpression(String valueExpression) { + this.valueExpression = valueExpression; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (key() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property key in model JWTAuthenticatorExtraClaimMappingExpression")); + } + if (valueExpression() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property valueExpression in model JWTAuthenticatorExtraClaimMappingExpression")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorExtraClaimMappingExpression.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("valueExpression", this.valueExpression); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorExtraClaimMappingExpression from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorExtraClaimMappingExpression if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorExtraClaimMappingExpression. + */ + public static JWTAuthenticatorExtraClaimMappingExpression fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorExtraClaimMappingExpression deserializedJWTAuthenticatorExtraClaimMappingExpression + = new JWTAuthenticatorExtraClaimMappingExpression(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedJWTAuthenticatorExtraClaimMappingExpression.key = reader.getString(); + } else if ("valueExpression".equals(fieldName)) { + deserializedJWTAuthenticatorExtraClaimMappingExpression.valueExpression = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorExtraClaimMappingExpression; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorIssuer.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorIssuer.java new file mode 100644 index 000000000000..1bbde0a29e9d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorIssuer.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The OIDC issuer details for JWTAuthenticator. + */ +@Fluent +public final class JWTAuthenticatorIssuer implements JsonSerializable { + /* + * The issuer URL. The URL must begin with the scheme https and cannot contain a query string or fragment. This must + * match the "iss" claim in the presented JWT, and the issuer returned from discovery. + */ + private String url; + + /* + * The set of acceptable audiences the JWT must be issued to. At least one is required. When multiple is set, + * AudienceMatchPolicy is used in API Server configuration. + */ + private List audiences; + + /** + * Creates an instance of JWTAuthenticatorIssuer class. + */ + public JWTAuthenticatorIssuer() { + } + + /** + * Get the url property: The issuer URL. The URL must begin with the scheme https and cannot contain a query string + * or fragment. This must match the "iss" claim in the presented JWT, and the issuer returned from discovery. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: The issuer URL. The URL must begin with the scheme https and cannot contain a query string + * or fragment. This must match the "iss" claim in the presented JWT, and the issuer returned from discovery. + * + * @param url the url value to set. + * @return the JWTAuthenticatorIssuer object itself. + */ + public JWTAuthenticatorIssuer withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the audiences property: The set of acceptable audiences the JWT must be issued to. At least one is required. + * When multiple is set, AudienceMatchPolicy is used in API Server configuration. + * + * @return the audiences value. + */ + public List audiences() { + return this.audiences; + } + + /** + * Set the audiences property: The set of acceptable audiences the JWT must be issued to. At least one is required. + * When multiple is set, AudienceMatchPolicy is used in API Server configuration. + * + * @param audiences the audiences value to set. + * @return the JWTAuthenticatorIssuer object itself. + */ + public JWTAuthenticatorIssuer withAudiences(List audiences) { + this.audiences = audiences; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (url() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property url in model JWTAuthenticatorIssuer")); + } + if (audiences() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property audiences in model JWTAuthenticatorIssuer")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorIssuer.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("url", this.url); + jsonWriter.writeArrayField("audiences", this.audiences, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorIssuer from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorIssuer if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorIssuer. + */ + public static JWTAuthenticatorIssuer fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorIssuer deserializedJWTAuthenticatorIssuer = new JWTAuthenticatorIssuer(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("url".equals(fieldName)) { + deserializedJWTAuthenticatorIssuer.url = reader.getString(); + } else if ("audiences".equals(fieldName)) { + List audiences = reader.readArray(reader1 -> reader1.getString()); + deserializedJWTAuthenticatorIssuer.audiences = audiences; + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorIssuer; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProperties.java new file mode 100644 index 000000000000..a07f74eada82 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProperties.java @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The properties of JWTAuthenticator. For details on how to configure the properties of a JWT authenticator, please + * refer to the Kubernetes documentation: + * https://kubernetes.io/docs/reference/access-authn-authz/authentication/#using-authentication-configuration. Please + * note that not all fields available in the Kubernetes documentation are supported by AKS. For troubleshooting, please + * see https://aka.ms/aks-external-issuers-docs. + */ +@Fluent +public final class JWTAuthenticatorProperties implements JsonSerializable { + /* + * The current provisioning state of the JWT authenticator. + */ + private JWTAuthenticatorProvisioningState provisioningState; + + /* + * The JWT OIDC issuer details. + */ + private JWTAuthenticatorIssuer issuer; + + /* + * The rules that are applied to validate token claims to authenticate users. All the expressions must evaluate to + * true for validation to succeed. + */ + private List claimValidationRules; + + /* + * The mappings that define how user attributes are extracted from the token claims. + */ + private JWTAuthenticatorClaimMappings claimMappings; + + /* + * The rules that are applied to the mapped user before completing authentication. All the expressions must evaluate + * to true for validation to succeed. + */ + private List userValidationRules; + + /** + * Creates an instance of JWTAuthenticatorProperties class. + */ + public JWTAuthenticatorProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state of the JWT authenticator. + * + * @return the provisioningState value. + */ + public JWTAuthenticatorProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the issuer property: The JWT OIDC issuer details. + * + * @return the issuer value. + */ + public JWTAuthenticatorIssuer issuer() { + return this.issuer; + } + + /** + * Set the issuer property: The JWT OIDC issuer details. + * + * @param issuer the issuer value to set. + * @return the JWTAuthenticatorProperties object itself. + */ + public JWTAuthenticatorProperties withIssuer(JWTAuthenticatorIssuer issuer) { + this.issuer = issuer; + return this; + } + + /** + * Get the claimValidationRules property: The rules that are applied to validate token claims to authenticate users. + * All the expressions must evaluate to true for validation to succeed. + * + * @return the claimValidationRules value. + */ + public List claimValidationRules() { + return this.claimValidationRules; + } + + /** + * Set the claimValidationRules property: The rules that are applied to validate token claims to authenticate users. + * All the expressions must evaluate to true for validation to succeed. + * + * @param claimValidationRules the claimValidationRules value to set. + * @return the JWTAuthenticatorProperties object itself. + */ + public JWTAuthenticatorProperties + withClaimValidationRules(List claimValidationRules) { + this.claimValidationRules = claimValidationRules; + return this; + } + + /** + * Get the claimMappings property: The mappings that define how user attributes are extracted from the token claims. + * + * @return the claimMappings value. + */ + public JWTAuthenticatorClaimMappings claimMappings() { + return this.claimMappings; + } + + /** + * Set the claimMappings property: The mappings that define how user attributes are extracted from the token claims. + * + * @param claimMappings the claimMappings value to set. + * @return the JWTAuthenticatorProperties object itself. + */ + public JWTAuthenticatorProperties withClaimMappings(JWTAuthenticatorClaimMappings claimMappings) { + this.claimMappings = claimMappings; + return this; + } + + /** + * Get the userValidationRules property: The rules that are applied to the mapped user before completing + * authentication. All the expressions must evaluate to true for validation to succeed. + * + * @return the userValidationRules value. + */ + public List userValidationRules() { + return this.userValidationRules; + } + + /** + * Set the userValidationRules property: The rules that are applied to the mapped user before completing + * authentication. All the expressions must evaluate to true for validation to succeed. + * + * @param userValidationRules the userValidationRules value to set. + * @return the JWTAuthenticatorProperties object itself. + */ + public JWTAuthenticatorProperties + withUserValidationRules(List userValidationRules) { + this.userValidationRules = userValidationRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (issuer() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property issuer in model JWTAuthenticatorProperties")); + } else { + issuer().validate(); + } + if (claimValidationRules() != null) { + claimValidationRules().forEach(e -> e.validate()); + } + if (claimMappings() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property claimMappings in model JWTAuthenticatorProperties")); + } else { + claimMappings().validate(); + } + if (userValidationRules() != null) { + userValidationRules().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("issuer", this.issuer); + jsonWriter.writeJsonField("claimMappings", this.claimMappings); + jsonWriter.writeArrayField("claimValidationRules", this.claimValidationRules, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("userValidationRules", this.userValidationRules, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorProperties. + */ + public static JWTAuthenticatorProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorProperties deserializedJWTAuthenticatorProperties = new JWTAuthenticatorProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("issuer".equals(fieldName)) { + deserializedJWTAuthenticatorProperties.issuer = JWTAuthenticatorIssuer.fromJson(reader); + } else if ("claimMappings".equals(fieldName)) { + deserializedJWTAuthenticatorProperties.claimMappings + = JWTAuthenticatorClaimMappings.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedJWTAuthenticatorProperties.provisioningState + = JWTAuthenticatorProvisioningState.fromString(reader.getString()); + } else if ("claimValidationRules".equals(fieldName)) { + List claimValidationRules + = reader.readArray(reader1 -> JWTAuthenticatorValidationRule.fromJson(reader1)); + deserializedJWTAuthenticatorProperties.claimValidationRules = claimValidationRules; + } else if ("userValidationRules".equals(fieldName)) { + List userValidationRules + = reader.readArray(reader1 -> JWTAuthenticatorValidationRule.fromJson(reader1)); + deserializedJWTAuthenticatorProperties.userValidationRules = userValidationRules; + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProvisioningState.java new file mode 100644 index 000000000000..3cb2ef6a9d1d --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the last accepted operation. + */ +public final class JWTAuthenticatorProvisioningState extends ExpandableStringEnum { + /** + * Resource has been created. + */ + public static final JWTAuthenticatorProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Resource creation failed. + */ + public static final JWTAuthenticatorProvisioningState FAILED = fromString("Failed"); + + /** + * Resource creation was canceled. + */ + public static final JWTAuthenticatorProvisioningState CANCELED = fromString("Canceled"); + + /** + * The JWT authenticator is being created. + */ + public static final JWTAuthenticatorProvisioningState CREATING = fromString("Creating"); + + /** + * The JWT authenticator is being updated. + */ + public static final JWTAuthenticatorProvisioningState UPDATING = fromString("Updating"); + + /** + * The JWT authenticator is being deleted. + */ + public static final JWTAuthenticatorProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of JWTAuthenticatorProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JWTAuthenticatorProvisioningState() { + } + + /** + * Creates or finds a JWTAuthenticatorProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding JWTAuthenticatorProvisioningState. + */ + public static JWTAuthenticatorProvisioningState fromString(String name) { + return fromString(name, JWTAuthenticatorProvisioningState.class); + } + + /** + * Gets known JWTAuthenticatorProvisioningState values. + * + * @return known JWTAuthenticatorProvisioningState values. + */ + public static Collection values() { + return values(JWTAuthenticatorProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorValidationRule.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorValidationRule.java new file mode 100644 index 000000000000..ba7efd902605 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorValidationRule.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The validation rule for JWTAuthenticator. + */ +@Fluent +public final class JWTAuthenticatorValidationRule implements JsonSerializable { + /* + * The CEL expression used to validate the claim or attribute. + */ + private String expression; + + /* + * The validation error message. + */ + private String message; + + /** + * Creates an instance of JWTAuthenticatorValidationRule class. + */ + public JWTAuthenticatorValidationRule() { + } + + /** + * Get the expression property: The CEL expression used to validate the claim or attribute. + * + * @return the expression value. + */ + public String expression() { + return this.expression; + } + + /** + * Set the expression property: The CEL expression used to validate the claim or attribute. + * + * @param expression the expression value to set. + * @return the JWTAuthenticatorValidationRule object itself. + */ + public JWTAuthenticatorValidationRule withExpression(String expression) { + this.expression = expression; + return this; + } + + /** + * Get the message property: The validation error message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: The validation error message. + * + * @param message the message value to set. + * @return the JWTAuthenticatorValidationRule object itself. + */ + public JWTAuthenticatorValidationRule withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (expression() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property expression in model JWTAuthenticatorValidationRule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JWTAuthenticatorValidationRule.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("expression", this.expression); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JWTAuthenticatorValidationRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JWTAuthenticatorValidationRule if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JWTAuthenticatorValidationRule. + */ + public static JWTAuthenticatorValidationRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JWTAuthenticatorValidationRule deserializedJWTAuthenticatorValidationRule + = new JWTAuthenticatorValidationRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expression".equals(fieldName)) { + deserializedJWTAuthenticatorValidationRule.expression = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedJWTAuthenticatorValidationRule.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJWTAuthenticatorValidationRule; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java index d07302d31b09..1745258607cc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java @@ -81,6 +81,12 @@ public final class KubeletConfig implements JsonSerializable { */ private Integer podMaxPids; + /* + * Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' will be used by + * default. + */ + private SeccompDefault seccompDefault; + /** * Creates an instance of KubeletConfig class. */ @@ -331,6 +337,28 @@ public KubeletConfig withPodMaxPids(Integer podMaxPids) { return this; } + /** + * Get the seccompDefault property: Specifies the default seccomp profile applied to all workloads. If not + * specified, 'Unconfined' will be used by default. + * + * @return the seccompDefault value. + */ + public SeccompDefault seccompDefault() { + return this.seccompDefault; + } + + /** + * Set the seccompDefault property: Specifies the default seccomp profile applied to all workloads. If not + * specified, 'Unconfined' will be used by default. + * + * @param seccompDefault the seccompDefault value to set. + * @return the KubeletConfig object itself. + */ + public KubeletConfig withSeccompDefault(SeccompDefault seccompDefault) { + this.seccompDefault = seccompDefault; + return this; + } + /** * Validates the instance. * @@ -357,6 +385,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeNumberField("containerLogMaxSizeMB", this.containerLogMaxSizeMB); jsonWriter.writeNumberField("containerLogMaxFiles", this.containerLogMaxFiles); jsonWriter.writeNumberField("podMaxPids", this.podMaxPids); + jsonWriter.writeStringField("seccompDefault", + this.seccompDefault == null ? null : this.seccompDefault.toString()); return jsonWriter.writeEndObject(); } @@ -398,6 +428,8 @@ public static KubeletConfig fromJson(JsonReader jsonReader) throws IOException { deserializedKubeletConfig.containerLogMaxFiles = reader.getNullable(JsonReader::getInt); } else if ("podMaxPids".equals(fieldName)) { deserializedKubeletConfig.podMaxPids = reader.getNullable(JsonReader::getInt); + } else if ("seccompDefault".equals(fieldName)) { + deserializedKubeletConfig.seccompDefault = SeccompDefault.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java new file mode 100644 index 000000000000..899150175859 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Encryption at rest of Kubernetes resource objects using service-managed keys. More information on this can be found + * under https://aka.ms/aks/kubernetesResourceObjectEncryption. + */ +@Fluent +public final class KubernetesResourceObjectEncryptionProfile + implements JsonSerializable { + /* + * Whether to enable encryption at rest of Kubernetes resource objects using service-managed keys. More information + * on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. + */ + private InfrastructureEncryption infrastructureEncryption; + + /** + * Creates an instance of KubernetesResourceObjectEncryptionProfile class. + */ + public KubernetesResourceObjectEncryptionProfile() { + } + + /** + * Get the infrastructureEncryption property: Whether to enable encryption at rest of Kubernetes resource objects + * using service-managed keys. More information on this can be found under + * https://aka.ms/aks/kubernetesResourceObjectEncryption. + * + * @return the infrastructureEncryption value. + */ + public InfrastructureEncryption infrastructureEncryption() { + return this.infrastructureEncryption; + } + + /** + * Set the infrastructureEncryption property: Whether to enable encryption at rest of Kubernetes resource objects + * using service-managed keys. More information on this can be found under + * https://aka.ms/aks/kubernetesResourceObjectEncryption. + * + * @param infrastructureEncryption the infrastructureEncryption value to set. + * @return the KubernetesResourceObjectEncryptionProfile object itself. + */ + public KubernetesResourceObjectEncryptionProfile + withInfrastructureEncryption(InfrastructureEncryption infrastructureEncryption) { + this.infrastructureEncryption = infrastructureEncryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("infrastructureEncryption", + this.infrastructureEncryption == null ? null : this.infrastructureEncryption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KubernetesResourceObjectEncryptionProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KubernetesResourceObjectEncryptionProfile if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the KubernetesResourceObjectEncryptionProfile. + */ + public static KubernetesResourceObjectEncryptionProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KubernetesResourceObjectEncryptionProfile deserializedKubernetesResourceObjectEncryptionProfile + = new KubernetesResourceObjectEncryptionProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("infrastructureEncryption".equals(fieldName)) { + deserializedKubernetesResourceObjectEncryptionProfile.infrastructureEncryption + = InfrastructureEncryption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedKubernetesResourceObjectEncryptionProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java new file mode 100644 index 000000000000..70e48728567f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. + * An empty label selector matches all objects. A null label selector matches no objects. + */ +@Fluent +public final class LabelSelector implements JsonSerializable { + /* + * matchLabels is an array of {key=value} pairs. A single {key=value} in the matchLabels map is equivalent to an + * element of matchExpressions, whose key field is `key`, the operator is `In`, and the values array contains only + * `value`. The requirements are ANDed. + */ + private List matchLabels; + + /* + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + private List matchExpressions; + + /** + * Creates an instance of LabelSelector class. + */ + public LabelSelector() { + } + + /** + * Get the matchLabels property: matchLabels is an array of {key=value} pairs. A single {key=value} in the + * matchLabels map is equivalent to an element of matchExpressions, whose key field is `key`, the operator is `In`, + * and the values array contains only `value`. The requirements are ANDed. + * + * @return the matchLabels value. + */ + public List matchLabels() { + return this.matchLabels; + } + + /** + * Set the matchLabels property: matchLabels is an array of {key=value} pairs. A single {key=value} in the + * matchLabels map is equivalent to an element of matchExpressions, whose key field is `key`, the operator is `In`, + * and the values array contains only `value`. The requirements are ANDed. + * + * @param matchLabels the matchLabels value to set. + * @return the LabelSelector object itself. + */ + public LabelSelector withMatchLabels(List matchLabels) { + this.matchLabels = matchLabels; + return this; + } + + /** + * Get the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements + * are ANDed. + * + * @return the matchExpressions value. + */ + public List matchExpressions() { + return this.matchExpressions; + } + + /** + * Set the matchExpressions property: matchExpressions is a list of label selector requirements. The requirements + * are ANDed. + * + * @param matchExpressions the matchExpressions value to set. + * @return the LabelSelector object itself. + */ + public LabelSelector withMatchExpressions(List matchExpressions) { + this.matchExpressions = matchExpressions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (matchExpressions() != null) { + matchExpressions().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("matchLabels", this.matchLabels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("matchExpressions", this.matchExpressions, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelSelector from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelSelector if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the LabelSelector. + */ + public static LabelSelector fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelSelector deserializedLabelSelector = new LabelSelector(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("matchLabels".equals(fieldName)) { + List matchLabels = reader.readArray(reader1 -> reader1.getString()); + deserializedLabelSelector.matchLabels = matchLabels; + } else if ("matchExpressions".equals(fieldName)) { + List matchExpressions + = reader.readArray(reader1 -> LabelSelectorRequirement.fromJson(reader1)); + deserializedLabelSelector.matchExpressions = matchExpressions; + } else { + reader.skipChildren(); + } + } + + return deserializedLabelSelector; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java new file mode 100644 index 000000000000..15d4188070c0 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A label selector requirement is a selector that contains values, a key, and an operator that relates the key and + * values. + */ +@Fluent +public final class LabelSelectorRequirement implements JsonSerializable { + /* + * key is the label key that the selector applies to. + */ + private String key; + + /* + * operator represents a key's relationship to a set of values. Valid operators are In and NotIn + */ + private Operator operator; + + /* + * values is an array of string values, the values array must be non-empty. + */ + private List values; + + /** + * Creates an instance of LabelSelectorRequirement class. + */ + public LabelSelectorRequirement() { + } + + /** + * Get the key property: key is the label key that the selector applies to. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: key is the label key that the selector applies to. + * + * @param key the key value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the operator property: operator represents a key's relationship to a set of values. Valid operators are In + * and NotIn. + * + * @return the operator value. + */ + public Operator operator() { + return this.operator; + } + + /** + * Set the operator property: operator represents a key's relationship to a set of values. Valid operators are In + * and NotIn. + * + * @param operator the operator value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withOperator(Operator operator) { + this.operator = operator; + return this; + } + + /** + * Get the values property: values is an array of string values, the values array must be non-empty. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: values is an array of string values, the values array must be non-empty. + * + * @param values the values value to set. + * @return the LabelSelectorRequirement object itself. + */ + public LabelSelectorRequirement withValues(List values) { + this.values = values; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("operator", this.operator == null ? null : this.operator.toString()); + jsonWriter.writeArrayField("values", this.values, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelSelectorRequirement from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelSelectorRequirement if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the LabelSelectorRequirement. + */ + public static LabelSelectorRequirement fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelSelectorRequirement deserializedLabelSelectorRequirement = new LabelSelectorRequirement(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedLabelSelectorRequirement.key = reader.getString(); + } else if ("operator".equals(fieldName)) { + deserializedLabelSelectorRequirement.operator = Operator.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedLabelSelectorRequirement.values = values; + } else { + reader.skipChildren(); + } + } + + return deserializedLabelSelectorRequirement; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineBillingProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineBillingProfile.java new file mode 100644 index 000000000000..8671f8fd079b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineBillingProfile.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties having to do with machine billing. + */ +@Fluent +public final class MachineBillingProfile implements JsonSerializable { + /* + * The max price (in US Dollars) you are willing to pay for spot instances. Possible values are any decimal value + * greater than zero or -1 which indicates default price to be up-to on-demand. For more details on spot pricing, + * see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing) + */ + private Float spotMaxPrice; + + /** + * Creates an instance of MachineBillingProfile class. + */ + public MachineBillingProfile() { + } + + /** + * Get the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. For + * more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @return the spotMaxPrice value. + */ + public Float spotMaxPrice() { + return this.spotMaxPrice; + } + + /** + * Set the spotMaxPrice property: The max price (in US Dollars) you are willing to pay for spot instances. Possible + * values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand. For + * more details on spot pricing, see [spot VMs + * pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). + * + * @param spotMaxPrice the spotMaxPrice value to set. + * @return the MachineBillingProfile object itself. + */ + public MachineBillingProfile withSpotMaxPrice(Float spotMaxPrice) { + this.spotMaxPrice = spotMaxPrice; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("spotMaxPrice", this.spotMaxPrice); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineBillingProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineBillingProfile if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineBillingProfile. + */ + public static MachineBillingProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineBillingProfile deserializedMachineBillingProfile = new MachineBillingProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("spotMaxPrice".equals(fieldName)) { + deserializedMachineBillingProfile.spotMaxPrice = reader.getNullable(JsonReader::getFloat); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineBillingProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java new file mode 100644 index 000000000000..fc95dab7515f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The hardware and GPU settings of the machine. + */ +@Fluent +public final class MachineHardwareProfile implements JsonSerializable { + /* + * The size of the VM. VM size availability varies by region. If a node contains insufficient compute resources + * (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: + * https://docs.microsoft.com/azure/aks/quotas-skus-regions + */ + private String vmSize; + + /* + * GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + */ + private GpuInstanceProfile gpuInstanceProfile; + + /* + * The GPU settings of the machine. + */ + private GpuProfile gpuProfile; + + /* + * Whether to enable UltraSSD + */ + private Boolean ultraSsdEnabled; + + /** + * Creates an instance of MachineHardwareProfile class. + */ + public MachineHardwareProfile() { + } + + /** + * Get the vmSize property: The size of the VM. VM size availability varies by region. If a node contains + * insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @return the vmSize value. + */ + public String vmSize() { + return this.vmSize; + } + + /** + * Set the vmSize property: The size of the VM. VM size availability varies by region. If a node contains + * insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on + * restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + * + * @param vmSize the vmSize value to set. + * @return the MachineHardwareProfile object itself. + */ + public MachineHardwareProfile withVmSize(String vmSize) { + this.vmSize = vmSize; + return this; + } + + /** + * Get the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @return the gpuInstanceProfile value. + */ + public GpuInstanceProfile gpuInstanceProfile() { + return this.gpuInstanceProfile; + } + + /** + * Set the gpuInstanceProfile property: GPUInstanceProfile to be used to specify GPU MIG instance profile for + * supported GPU VM SKU. + * + * @param gpuInstanceProfile the gpuInstanceProfile value to set. + * @return the MachineHardwareProfile object itself. + */ + public MachineHardwareProfile withGpuInstanceProfile(GpuInstanceProfile gpuInstanceProfile) { + this.gpuInstanceProfile = gpuInstanceProfile; + return this; + } + + /** + * Get the gpuProfile property: The GPU settings of the machine. + * + * @return the gpuProfile value. + */ + public GpuProfile gpuProfile() { + return this.gpuProfile; + } + + /** + * Set the gpuProfile property: The GPU settings of the machine. + * + * @param gpuProfile the gpuProfile value to set. + * @return the MachineHardwareProfile object itself. + */ + public MachineHardwareProfile withGpuProfile(GpuProfile gpuProfile) { + this.gpuProfile = gpuProfile; + return this; + } + + /** + * Get the ultraSsdEnabled property: Whether to enable UltraSSD. + * + * @return the ultraSsdEnabled value. + */ + public Boolean ultraSsdEnabled() { + return this.ultraSsdEnabled; + } + + /** + * Set the ultraSsdEnabled property: Whether to enable UltraSSD. + * + * @param ultraSsdEnabled the ultraSsdEnabled value to set. + * @return the MachineHardwareProfile object itself. + */ + public MachineHardwareProfile withUltraSsdEnabled(Boolean ultraSsdEnabled) { + this.ultraSsdEnabled = ultraSsdEnabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (gpuProfile() != null) { + gpuProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("vmSize", this.vmSize); + jsonWriter.writeStringField("gpuInstanceProfile", + this.gpuInstanceProfile == null ? null : this.gpuInstanceProfile.toString()); + jsonWriter.writeJsonField("gpuProfile", this.gpuProfile); + jsonWriter.writeBooleanField("ultraSsdEnabled", this.ultraSsdEnabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineHardwareProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineHardwareProfile if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineHardwareProfile. + */ + public static MachineHardwareProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineHardwareProfile deserializedMachineHardwareProfile = new MachineHardwareProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("vmSize".equals(fieldName)) { + deserializedMachineHardwareProfile.vmSize = reader.getString(); + } else if ("gpuInstanceProfile".equals(fieldName)) { + deserializedMachineHardwareProfile.gpuInstanceProfile + = GpuInstanceProfile.fromString(reader.getString()); + } else if ("gpuProfile".equals(fieldName)) { + deserializedMachineHardwareProfile.gpuProfile = GpuProfile.fromJson(reader); + } else if ("ultraSsdEnabled".equals(fieldName)) { + deserializedMachineHardwareProfile.ultraSsdEnabled = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineHardwareProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java new file mode 100644 index 000000000000..c846b9de23e4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java @@ -0,0 +1,390 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The Kubernetes configurations used by the machine. + */ +@Fluent +public final class MachineKubernetesProfile implements JsonSerializable { + /* + * The node labels on the machine. + */ + private Map nodeLabels; + + /* + * The version of Kubernetes specified by the user. Both patch version and are + * supported. When is specified, the latest supported patch version is chosen automatically. + */ + private String orchestratorVersion; + + /* + * The version of Kubernetes running on the machine. If orchestratorVersion was a fully specified version + * , this field will be exactly equal to it. If orchestratorVersion was , this field + * will contain the full version being used. + */ + private String currentOrchestratorVersion; + + /* + * Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + */ + private KubeletDiskType kubeletDiskType; + + /* + * The Kubelet configuration on the machine. + */ + private KubeletConfig kubeletConfig; + + /* + * Taints added on the node during creation that will not be reconciled by AKS. These taints will not be reconciled + * by AKS and can be removed with a kubectl call. These taints allow for required configuration to run before the + * node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl + * taint nodes node1 key1=value1:NoSchedule-` + */ + private List nodeInitializationTaints; + + /* + * The taints added to new node during machine create. For example, key=value:NoSchedule. + */ + private List nodeTaints; + + /* + * The maximum number of pods that can run on a node. + */ + private Integer maxPods; + + /* + * The node name in the Kubernetes cluster. + */ + private String nodeName; + + /* + * Determines the type of workload a node can run. + */ + private WorkloadRuntime workloadRuntime; + + /* + * Configuration for using artifact streaming on AKS. + */ + private AgentPoolArtifactStreamingProfile artifactStreamingProfile; + + /** + * Creates an instance of MachineKubernetesProfile class. + */ + public MachineKubernetesProfile() { + } + + /** + * Get the nodeLabels property: The node labels on the machine. + * + * @return the nodeLabels value. + */ + public Map nodeLabels() { + return this.nodeLabels; + } + + /** + * Set the nodeLabels property: The node labels on the machine. + * + * @param nodeLabels the nodeLabels value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withNodeLabels(Map nodeLabels) { + this.nodeLabels = nodeLabels; + return this; + } + + /** + * Get the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the + * latest supported patch version is chosen automatically. + * + * @return the orchestratorVersion value. + */ + public String orchestratorVersion() { + return this.orchestratorVersion; + } + + /** + * Set the orchestratorVersion property: The version of Kubernetes specified by the user. Both patch version + * <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the + * latest supported patch version is chosen automatically. + * + * @param orchestratorVersion the orchestratorVersion value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withOrchestratorVersion(String orchestratorVersion) { + this.orchestratorVersion = orchestratorVersion; + return this; + } + + /** + * Get the currentOrchestratorVersion property: The version of Kubernetes running on the machine. If + * orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to + * it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> + * version being used. + * + * @return the currentOrchestratorVersion value. + */ + public String currentOrchestratorVersion() { + return this.currentOrchestratorVersion; + } + + /** + * Get the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @return the kubeletDiskType value. + */ + public KubeletDiskType kubeletDiskType() { + return this.kubeletDiskType; + } + + /** + * Set the kubeletDiskType property: Determines the placement of emptyDir volumes, container runtime data root, and + * Kubelet ephemeral storage. + * + * @param kubeletDiskType the kubeletDiskType value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withKubeletDiskType(KubeletDiskType kubeletDiskType) { + this.kubeletDiskType = kubeletDiskType; + return this; + } + + /** + * Get the kubeletConfig property: The Kubelet configuration on the machine. + * + * @return the kubeletConfig value. + */ + public KubeletConfig kubeletConfig() { + return this.kubeletConfig; + } + + /** + * Set the kubeletConfig property: The Kubelet configuration on the machine. + * + * @param kubeletConfig the kubeletConfig value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withKubeletConfig(KubeletConfig kubeletConfig) { + this.kubeletConfig = kubeletConfig; + return this; + } + + /** + * Get the nodeInitializationTaints property: Taints added on the node during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. These taints allow for + * required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' + * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @return the nodeInitializationTaints value. + */ + public List nodeInitializationTaints() { + return this.nodeInitializationTaints; + } + + /** + * Set the nodeInitializationTaints property: Taints added on the node during creation that will not be reconciled + * by AKS. These taints will not be reconciled by AKS and can be removed with a kubectl call. These taints allow for + * required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' + * that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`. + * + * @param nodeInitializationTaints the nodeInitializationTaints value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withNodeInitializationTaints(List nodeInitializationTaints) { + this.nodeInitializationTaints = nodeInitializationTaints; + return this; + } + + /** + * Get the nodeTaints property: The taints added to new node during machine create. For example, + * key=value:NoSchedule. + * + * @return the nodeTaints value. + */ + public List nodeTaints() { + return this.nodeTaints; + } + + /** + * Set the nodeTaints property: The taints added to new node during machine create. For example, + * key=value:NoSchedule. + * + * @param nodeTaints the nodeTaints value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withNodeTaints(List nodeTaints) { + this.nodeTaints = nodeTaints; + return this; + } + + /** + * Get the maxPods property: The maximum number of pods that can run on a node. + * + * @return the maxPods value. + */ + public Integer maxPods() { + return this.maxPods; + } + + /** + * Set the maxPods property: The maximum number of pods that can run on a node. + * + * @param maxPods the maxPods value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withMaxPods(Integer maxPods) { + this.maxPods = maxPods; + return this; + } + + /** + * Get the nodeName property: The node name in the Kubernetes cluster. + * + * @return the nodeName value. + */ + public String nodeName() { + return this.nodeName; + } + + /** + * Get the workloadRuntime property: Determines the type of workload a node can run. + * + * @return the workloadRuntime value. + */ + public WorkloadRuntime workloadRuntime() { + return this.workloadRuntime; + } + + /** + * Set the workloadRuntime property: Determines the type of workload a node can run. + * + * @param workloadRuntime the workloadRuntime value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile withWorkloadRuntime(WorkloadRuntime workloadRuntime) { + this.workloadRuntime = workloadRuntime; + return this; + } + + /** + * Get the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @return the artifactStreamingProfile value. + */ + public AgentPoolArtifactStreamingProfile artifactStreamingProfile() { + return this.artifactStreamingProfile; + } + + /** + * Set the artifactStreamingProfile property: Configuration for using artifact streaming on AKS. + * + * @param artifactStreamingProfile the artifactStreamingProfile value to set. + * @return the MachineKubernetesProfile object itself. + */ + public MachineKubernetesProfile + withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + this.artifactStreamingProfile = artifactStreamingProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (kubeletConfig() != null) { + kubeletConfig().validate(); + } + if (artifactStreamingProfile() != null) { + artifactStreamingProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("nodeLabels", this.nodeLabels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("orchestratorVersion", this.orchestratorVersion); + jsonWriter.writeStringField("kubeletDiskType", + this.kubeletDiskType == null ? null : this.kubeletDiskType.toString()); + jsonWriter.writeJsonField("kubeletConfig", this.kubeletConfig); + jsonWriter.writeArrayField("nodeInitializationTaints", this.nodeInitializationTaints, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("nodeTaints", this.nodeTaints, (writer, element) -> writer.writeString(element)); + jsonWriter.writeNumberField("maxPods", this.maxPods); + jsonWriter.writeStringField("workloadRuntime", + this.workloadRuntime == null ? null : this.workloadRuntime.toString()); + jsonWriter.writeJsonField("artifactStreamingProfile", this.artifactStreamingProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineKubernetesProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineKubernetesProfile if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineKubernetesProfile. + */ + public static MachineKubernetesProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineKubernetesProfile deserializedMachineKubernetesProfile = new MachineKubernetesProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nodeLabels".equals(fieldName)) { + Map nodeLabels = reader.readMap(reader1 -> reader1.getString()); + deserializedMachineKubernetesProfile.nodeLabels = nodeLabels; + } else if ("orchestratorVersion".equals(fieldName)) { + deserializedMachineKubernetesProfile.orchestratorVersion = reader.getString(); + } else if ("currentOrchestratorVersion".equals(fieldName)) { + deserializedMachineKubernetesProfile.currentOrchestratorVersion = reader.getString(); + } else if ("kubeletDiskType".equals(fieldName)) { + deserializedMachineKubernetesProfile.kubeletDiskType + = KubeletDiskType.fromString(reader.getString()); + } else if ("kubeletConfig".equals(fieldName)) { + deserializedMachineKubernetesProfile.kubeletConfig = KubeletConfig.fromJson(reader); + } else if ("nodeInitializationTaints".equals(fieldName)) { + List nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedMachineKubernetesProfile.nodeInitializationTaints = nodeInitializationTaints; + } else if ("nodeTaints".equals(fieldName)) { + List nodeTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedMachineKubernetesProfile.nodeTaints = nodeTaints; + } else if ("maxPods".equals(fieldName)) { + deserializedMachineKubernetesProfile.maxPods = reader.getNullable(JsonReader::getInt); + } else if ("nodeName".equals(fieldName)) { + deserializedMachineKubernetesProfile.nodeName = reader.getString(); + } else if ("workloadRuntime".equals(fieldName)) { + deserializedMachineKubernetesProfile.workloadRuntime + = WorkloadRuntime.fromString(reader.getString()); + } else if ("artifactStreamingProfile".equals(fieldName)) { + deserializedMachineKubernetesProfile.artifactStreamingProfile + = AgentPoolArtifactStreamingProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineKubernetesProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java index a8ee1822c56d..a36eb9a2c6c5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,17 +15,53 @@ /** * network properties of the machine. */ -@Immutable +@Fluent public final class MachineNetworkProperties implements JsonSerializable { /* * IPv4, IPv6 addresses of the machine */ private List ipAddresses; + /* + * The ID of the subnet which node and optionally pods will join on startup. If this is not specified, a VNET and + * subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it + * applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ + * virtualNetworkName}/subnets/{subnetName} + */ + private String vnetSubnetId; + + /* + * The ID of the subnet which pods will join when launched. If omitted, pod IPs are statically assigned on the node + * subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{ + * virtualNetworkName}/subnets/{subnetName} + */ + private String podSubnetId; + + /* + * Whether the machine is allocated its own public IP. Some scenarios may require the machine to receive their own + * dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct + * connection to a cloud virtual machine to minimize hops. The default is false. + */ + private Boolean enableNodePublicIp; + + /* + * The public IP prefix ID which VM node should use IPs from. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{ + * publicIPPrefixName} + */ + private String nodePublicIpPrefixId; + + /* + * IPTags of instance-level public IPs. + */ + private List nodePublicIpTags; + /** * Creates an instance of MachineNetworkProperties class. */ - private MachineNetworkProperties() { + public MachineNetworkProperties() { } /** @@ -37,6 +73,126 @@ public List ipAddresses() { return this.ipAddresses; } + /** + * Get the vnetSubnetId property: The ID of the subnet which node and optionally pods will join on startup. If this + * is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to + * nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the vnetSubnetId value. + */ + public String vnetSubnetId() { + return this.vnetSubnetId; + } + + /** + * Set the vnetSubnetId property: The ID of the subnet which node and optionally pods will join on startup. If this + * is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to + * nodes and pods, otherwise it applies to just nodes. This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param vnetSubnetId the vnetSubnetId value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withVnetSubnetId(String vnetSubnetId) { + this.vnetSubnetId = vnetSubnetId; + return this; + } + + /** + * Get the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are + * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @return the podSubnetId value. + */ + public String podSubnetId() { + return this.podSubnetId; + } + + /** + * Set the podSubnetId property: The ID of the subnet which pods will join when launched. If omitted, pod IPs are + * statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + * + * @param podSubnetId the podSubnetId value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withPodSubnetId(String podSubnetId) { + this.podSubnetId = podSubnetId; + return this; + } + + /** + * Get the enableNodePublicIp property: Whether the machine is allocated its own public IP. Some scenarios may + * require the machine to receive their own dedicated public IP addresses. A common scenario is for gaming + * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. The + * default is false. + * + * @return the enableNodePublicIp value. + */ + public Boolean enableNodePublicIp() { + return this.enableNodePublicIp; + } + + /** + * Set the enableNodePublicIp property: Whether the machine is allocated its own public IP. Some scenarios may + * require the machine to receive their own dedicated public IP addresses. A common scenario is for gaming + * workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. The + * default is false. + * + * @param enableNodePublicIp the enableNodePublicIp value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withEnableNodePublicIp(Boolean enableNodePublicIp) { + this.enableNodePublicIp = enableNodePublicIp; + return this; + } + + /** + * Get the nodePublicIpPrefixId property: The public IP prefix ID which VM node should use IPs from. This is of the + * form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @return the nodePublicIpPrefixId value. + */ + public String nodePublicIpPrefixId() { + return this.nodePublicIpPrefixId; + } + + /** + * Set the nodePublicIpPrefixId property: The public IP prefix ID which VM node should use IPs from. This is of the + * form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + * + * @param nodePublicIpPrefixId the nodePublicIpPrefixId value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withNodePublicIpPrefixId(String nodePublicIpPrefixId) { + this.nodePublicIpPrefixId = nodePublicIpPrefixId; + return this; + } + + /** + * Get the nodePublicIpTags property: IPTags of instance-level public IPs. + * + * @return the nodePublicIpTags value. + */ + public List nodePublicIpTags() { + return this.nodePublicIpTags; + } + + /** + * Set the nodePublicIpTags property: IPTags of instance-level public IPs. + * + * @param nodePublicIpTags the nodePublicIpTags value to set. + * @return the MachineNetworkProperties object itself. + */ + public MachineNetworkProperties withNodePublicIpTags(List nodePublicIpTags) { + this.nodePublicIpTags = nodePublicIpTags; + return this; + } + /** * Validates the instance. * @@ -46,6 +202,9 @@ public void validate() { if (ipAddresses() != null) { ipAddresses().forEach(e -> e.validate()); } + if (nodePublicIpTags() != null) { + nodePublicIpTags().forEach(e -> e.validate()); + } } /** @@ -54,6 +213,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("vnetSubnetID", this.vnetSubnetId); + jsonWriter.writeStringField("podSubnetID", this.podSubnetId); + jsonWriter.writeBooleanField("enableNodePublicIP", this.enableNodePublicIp); + jsonWriter.writeStringField("nodePublicIPPrefixID", this.nodePublicIpPrefixId); + jsonWriter.writeArrayField("nodePublicIPTags", this.nodePublicIpTags, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -76,6 +241,18 @@ public static MachineNetworkProperties fromJson(JsonReader jsonReader) throws IO List ipAddresses = reader.readArray(reader1 -> MachineIpAddress.fromJson(reader1)); deserializedMachineNetworkProperties.ipAddresses = ipAddresses; + } else if ("vnetSubnetID".equals(fieldName)) { + deserializedMachineNetworkProperties.vnetSubnetId = reader.getString(); + } else if ("podSubnetID".equals(fieldName)) { + deserializedMachineNetworkProperties.podSubnetId = reader.getString(); + } else if ("enableNodePublicIP".equals(fieldName)) { + deserializedMachineNetworkProperties.enableNodePublicIp + = reader.getNullable(JsonReader::getBoolean); + } else if ("nodePublicIPPrefixID".equals(fieldName)) { + deserializedMachineNetworkProperties.nodePublicIpPrefixId = reader.getString(); + } else if ("nodePublicIPTags".equals(fieldName)) { + List nodePublicIpTags = reader.readArray(reader1 -> IpTag.fromJson(reader1)); + deserializedMachineNetworkProperties.nodePublicIpTags = nodePublicIpTags; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java new file mode 100644 index 000000000000..083bb49aeb2c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The operating system and disk used by the machine. + */ +@Fluent +public final class MachineOSProfile implements JsonSerializable { + /* + * The operating system type. The default is Linux. + */ + private OSType osType; + + /* + * 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. + */ + private OSSku osSku; + + /* + * OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify + * 0, it will apply the default osDisk size according to the vmSize specified. + */ + private Integer osDiskSizeGB; + + /* + * The OS disk type to be used for machines in the agent pool. The default is 'Ephemeral' if the VM supports it and + * has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + * after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + */ + private OSDiskType osDiskType; + + /* + * Whether to use a FIPS-enabled OS. + */ + private Boolean enableFips; + + /* + * The Linux machine's specific profile. + */ + private MachineOSProfileLinuxProfile linuxProfile; + + /* + * The Windows machine's specific profile. + */ + private AgentPoolWindowsProfile windowsProfile; + + /** + * Creates an instance of MachineOSProfile class. + */ + public MachineOSProfile() { + } + + /** + * Get the osType property: The operating system type. The default is Linux. + * + * @return the osType value. + */ + public OSType osType() { + return this.osType; + } + + /** + * Set the osType property: The operating system type. The default is Linux. + * + * @param osType the osType value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsType(OSType osType) { + this.osType = osType; + return this; + } + + /** + * Get the osSku property: 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. + * + * @return the osSku value. + */ + public OSSku osSku() { + return this.osSku; + } + + /** + * Set the osSku property: 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. + * + * @param osSku the osSku value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsSku(OSSku osSku) { + this.osSku = osSku; + return this; + } + + /** + * Get the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @return the osDiskSizeGB value. + */ + public Integer osDiskSizeGB() { + return this.osDiskSizeGB; + } + + /** + * Set the osDiskSizeGB property: OS Disk Size in GB to be used to specify the disk size for every machine in the + * master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. + * + * @param osDiskSizeGB the osDiskSizeGB value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsDiskSizeGB(Integer osDiskSizeGB) { + this.osDiskSizeGB = osDiskSizeGB; + return this; + } + + /** + * Get the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is + * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, + * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @return the osDiskType value. + */ + public OSDiskType osDiskType() { + return this.osDiskType; + } + + /** + * Set the osDiskType property: The OS disk type to be used for machines in the agent pool. The default is + * 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, + * defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral + * OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). + * + * @param osDiskType the osDiskType value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withOsDiskType(OSDiskType osDiskType) { + this.osDiskType = osDiskType; + return this; + } + + /** + * Get the enableFips property: Whether to use a FIPS-enabled OS. + * + * @return the enableFips value. + */ + public Boolean enableFips() { + return this.enableFips; + } + + /** + * Set the enableFips property: Whether to use a FIPS-enabled OS. + * + * @param enableFips the enableFips value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withEnableFips(Boolean enableFips) { + this.enableFips = enableFips; + return this; + } + + /** + * Get the linuxProfile property: The Linux machine's specific profile. + * + * @return the linuxProfile value. + */ + public MachineOSProfileLinuxProfile linuxProfile() { + return this.linuxProfile; + } + + /** + * Set the linuxProfile property: The Linux machine's specific profile. + * + * @param linuxProfile the linuxProfile value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withLinuxProfile(MachineOSProfileLinuxProfile linuxProfile) { + this.linuxProfile = linuxProfile; + return this; + } + + /** + * Get the windowsProfile property: The Windows machine's specific profile. + * + * @return the windowsProfile value. + */ + public AgentPoolWindowsProfile windowsProfile() { + return this.windowsProfile; + } + + /** + * Set the windowsProfile property: The Windows machine's specific profile. + * + * @param windowsProfile the windowsProfile value to set. + * @return the MachineOSProfile object itself. + */ + public MachineOSProfile withWindowsProfile(AgentPoolWindowsProfile windowsProfile) { + this.windowsProfile = windowsProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (linuxProfile() != null) { + linuxProfile().validate(); + } + if (windowsProfile() != null) { + windowsProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); + jsonWriter.writeStringField("osSKU", this.osSku == null ? null : this.osSku.toString()); + jsonWriter.writeNumberField("osDiskSizeGB", this.osDiskSizeGB); + jsonWriter.writeStringField("osDiskType", this.osDiskType == null ? null : this.osDiskType.toString()); + jsonWriter.writeBooleanField("enableFIPS", this.enableFips); + jsonWriter.writeJsonField("linuxProfile", this.linuxProfile); + jsonWriter.writeJsonField("windowsProfile", this.windowsProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineOSProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineOSProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineOSProfile. + */ + public static MachineOSProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineOSProfile deserializedMachineOSProfile = new MachineOSProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("osType".equals(fieldName)) { + deserializedMachineOSProfile.osType = OSType.fromString(reader.getString()); + } else if ("osSKU".equals(fieldName)) { + deserializedMachineOSProfile.osSku = OSSku.fromString(reader.getString()); + } else if ("osDiskSizeGB".equals(fieldName)) { + deserializedMachineOSProfile.osDiskSizeGB = reader.getNullable(JsonReader::getInt); + } else if ("osDiskType".equals(fieldName)) { + deserializedMachineOSProfile.osDiskType = OSDiskType.fromString(reader.getString()); + } else if ("enableFIPS".equals(fieldName)) { + deserializedMachineOSProfile.enableFips = reader.getNullable(JsonReader::getBoolean); + } else if ("linuxProfile".equals(fieldName)) { + deserializedMachineOSProfile.linuxProfile = MachineOSProfileLinuxProfile.fromJson(reader); + } else if ("windowsProfile".equals(fieldName)) { + deserializedMachineOSProfile.windowsProfile = AgentPoolWindowsProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineOSProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java new file mode 100644 index 000000000000..b80b1495a708 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Linux machine's specific profile. + */ +@Fluent +public final class MachineOSProfileLinuxProfile implements JsonSerializable { + /* + * The OS configuration of Linux machine. + */ + private LinuxOSConfig linuxOSConfig; + + /* + * Message of the day for Linux nodes, base64-encoded. A base64-encoded string which will be written to /etc/motd + * after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for + * Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). + */ + private String messageOfTheDay; + + /** + * Creates an instance of MachineOSProfileLinuxProfile class. + */ + public MachineOSProfileLinuxProfile() { + } + + /** + * Get the linuxOSConfig property: The OS configuration of Linux machine. + * + * @return the linuxOSConfig value. + */ + public LinuxOSConfig linuxOSConfig() { + return this.linuxOSConfig; + } + + /** + * Set the linuxOSConfig property: The OS configuration of Linux machine. + * + * @param linuxOSConfig the linuxOSConfig value to set. + * @return the MachineOSProfileLinuxProfile object itself. + */ + public MachineOSProfileLinuxProfile withLinuxOSConfig(LinuxOSConfig linuxOSConfig) { + this.linuxOSConfig = linuxOSConfig; + return this; + } + + /** + * Get the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string + * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux + * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not + * be executed as a script). + * + * @return the messageOfTheDay value. + */ + public String messageOfTheDay() { + return this.messageOfTheDay; + } + + /** + * Set the messageOfTheDay property: Message of the day for Linux nodes, base64-encoded. A base64-encoded string + * which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux + * nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not + * be executed as a script). + * + * @param messageOfTheDay the messageOfTheDay value to set. + * @return the MachineOSProfileLinuxProfile object itself. + */ + public MachineOSProfileLinuxProfile withMessageOfTheDay(String messageOfTheDay) { + this.messageOfTheDay = messageOfTheDay; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (linuxOSConfig() != null) { + linuxOSConfig().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("linuxOSConfig", this.linuxOSConfig); + jsonWriter.writeStringField("messageOfTheDay", this.messageOfTheDay); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineOSProfileLinuxProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineOSProfileLinuxProfile if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineOSProfileLinuxProfile. + */ + public static MachineOSProfileLinuxProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineOSProfileLinuxProfile deserializedMachineOSProfileLinuxProfile = new MachineOSProfileLinuxProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("linuxOSConfig".equals(fieldName)) { + deserializedMachineOSProfileLinuxProfile.linuxOSConfig = LinuxOSConfig.fromJson(reader); + } else if ("messageOfTheDay".equals(fieldName)) { + deserializedMachineOSProfileLinuxProfile.messageOfTheDay = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineOSProfileLinuxProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java index ab6e144bfc2e..b26d3a2cb611 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java @@ -4,17 +4,18 @@ package com.azure.resourcemanager.containerservice.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.Map; /** * The properties of the machine. */ -@Immutable +@Fluent public final class MachineProperties implements JsonSerializable { /* * network properties of the machine @@ -26,10 +27,84 @@ public final class MachineProperties implements JsonSerializable tags; + + /* + * Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is + * updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable + * optimistic concurrency per the normal eTag convention. + */ + private String eTag; + + /* + * Contains read-only information about the machine. + */ + private MachineStatus status; + + /* + * Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS helps improve performance and + * reliability of DNS resolution in an AKS cluster. For more details see aka.ms/aks/localdns. + */ + private LocalDnsProfile localDNSProfile; + /** * Creates an instance of MachineProperties class. */ - private MachineProperties() { + public MachineProperties() { } /** @@ -41,6 +116,17 @@ public MachineNetworkProperties network() { return this.network; } + /** + * Set the network property: network properties of the machine. + * + * @param network the network value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withNetwork(MachineNetworkProperties network) { + this.network = network; + return this; + } + /** * Get the resourceId property: Azure resource id of the machine. It can be used to GET underlying VM Instance. * @@ -50,6 +136,250 @@ public String resourceId() { return this.resourceId; } + /** + * Get the hardware property: The hardware and GPU settings of the machine. + * + * @return the hardware value. + */ + public MachineHardwareProfile hardware() { + return this.hardware; + } + + /** + * Set the hardware property: The hardware and GPU settings of the machine. + * + * @param hardware the hardware value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withHardware(MachineHardwareProfile hardware) { + this.hardware = hardware; + return this; + } + + /** + * Get the operatingSystem property: The operating system and disk used by the machine. + * + * @return the operatingSystem value. + */ + public MachineOSProfile operatingSystem() { + return this.operatingSystem; + } + + /** + * Set the operatingSystem property: The operating system and disk used by the machine. + * + * @param operatingSystem the operatingSystem value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withOperatingSystem(MachineOSProfile operatingSystem) { + this.operatingSystem = operatingSystem; + return this; + } + + /** + * Get the kubernetes property: The Kubernetes configurations used by the machine. + * + * @return the kubernetes value. + */ + public MachineKubernetesProfile kubernetes() { + return this.kubernetes; + } + + /** + * Set the kubernetes property: The Kubernetes configurations used by the machine. + * + * @param kubernetes the kubernetes value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withKubernetes(MachineKubernetesProfile kubernetes) { + this.kubernetes = kubernetes; + return this; + } + + /** + * Get the mode property: Machine only allows 'System' and 'User' mode. + * + * @return the mode value. + */ + public AgentPoolMode mode() { + return this.mode; + } + + /** + * Set the mode property: Machine only allows 'System' and 'User' mode. + * + * @param mode the mode value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withMode(AgentPoolMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the security property: The security settings of the machine. + * + * @return the security value. + */ + public MachineSecurityProfile security() { + return this.security; + } + + /** + * Set the security property: The security settings of the machine. + * + * @param security the security value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withSecurity(MachineSecurityProfile security) { + this.security = security; + return this; + } + + /** + * Get the priority property: The priority for the machine. If not specified, the default is 'Regular'. + * + * @return the priority value. + */ + public ScaleSetPriority priority() { + return this.priority; + } + + /** + * Set the priority property: The priority for the machine. If not specified, the default is 'Regular'. + * + * @param priority the priority value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withPriority(ScaleSetPriority priority) { + this.priority = priority; + return this; + } + + /** + * Get the evictionPolicy property: The eviction policy for machine. This cannot be specified unless the priority is + * 'Spot'. If not specified, the default is 'Delete'. + * + * @return the evictionPolicy value. + */ + public ScaleSetEvictionPolicy evictionPolicy() { + return this.evictionPolicy; + } + + /** + * Set the evictionPolicy property: The eviction policy for machine. This cannot be specified unless the priority is + * 'Spot'. If not specified, the default is 'Delete'. + * + * @param evictionPolicy the evictionPolicy value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withEvictionPolicy(ScaleSetEvictionPolicy evictionPolicy) { + this.evictionPolicy = evictionPolicy; + return this; + } + + /** + * Get the billing property: The properties having to do with machine billing. + * + * @return the billing value. + */ + public MachineBillingProfile billing() { + return this.billing; + } + + /** + * Set the billing property: The properties having to do with machine billing. + * + * @param billing the billing value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withBilling(MachineBillingProfile billing) { + this.billing = billing; + return this; + } + + /** + * Get the nodeImageVersion property: The version of node image. + * + * @return the nodeImageVersion value. + */ + public String nodeImageVersion() { + return this.nodeImageVersion; + } + + /** + * Get the provisioningState property: The current deployment or provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the tags property: The tags to be persisted on the machine. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags to be persisted on the machine. + * + * @param tags the tags value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the eTag property: Unique read-only string used to implement optimistic concurrency. The eTag value will + * change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a + * subsequent request to enable optimistic concurrency per the normal eTag convention. + * + * @return the eTag value. + */ + public String eTag() { + return this.eTag; + } + + /** + * Get the status property: Contains read-only information about the machine. + * + * @return the status value. + */ + public MachineStatus status() { + return this.status; + } + + /** + * Get the localDNSProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see + * aka.ms/aks/localdns. + * + * @return the localDNSProfile value. + */ + public LocalDnsProfile localDNSProfile() { + return this.localDNSProfile; + } + + /** + * Set the localDNSProfile property: Configures the per-node local DNS, with VnetDNS and KubeDNS overrides. LocalDNS + * helps improve performance and reliability of DNS resolution in an AKS cluster. For more details see + * aka.ms/aks/localdns. + * + * @param localDNSProfile the localDNSProfile value to set. + * @return the MachineProperties object itself. + */ + public MachineProperties withLocalDNSProfile(LocalDnsProfile localDNSProfile) { + this.localDNSProfile = localDNSProfile; + return this; + } + /** * Validates the instance. * @@ -59,6 +389,27 @@ public void validate() { if (network() != null) { network().validate(); } + if (hardware() != null) { + hardware().validate(); + } + if (operatingSystem() != null) { + operatingSystem().validate(); + } + if (kubernetes() != null) { + kubernetes().validate(); + } + if (security() != null) { + security().validate(); + } + if (billing() != null) { + billing().validate(); + } + if (status() != null) { + status().validate(); + } + if (localDNSProfile() != null) { + localDNSProfile().validate(); + } } /** @@ -67,6 +418,18 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("network", this.network); + jsonWriter.writeJsonField("hardware", this.hardware); + jsonWriter.writeJsonField("operatingSystem", this.operatingSystem); + jsonWriter.writeJsonField("kubernetes", this.kubernetes); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeJsonField("security", this.security); + jsonWriter.writeStringField("priority", this.priority == null ? null : this.priority.toString()); + jsonWriter.writeStringField("evictionPolicy", + this.evictionPolicy == null ? null : this.evictionPolicy.toString()); + jsonWriter.writeJsonField("billing", this.billing); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("localDNSProfile", this.localDNSProfile); return jsonWriter.writeEndObject(); } @@ -89,6 +452,36 @@ public static MachineProperties fromJson(JsonReader jsonReader) throws IOExcepti deserializedMachineProperties.network = MachineNetworkProperties.fromJson(reader); } else if ("resourceId".equals(fieldName)) { deserializedMachineProperties.resourceId = reader.getString(); + } else if ("hardware".equals(fieldName)) { + deserializedMachineProperties.hardware = MachineHardwareProfile.fromJson(reader); + } else if ("operatingSystem".equals(fieldName)) { + deserializedMachineProperties.operatingSystem = MachineOSProfile.fromJson(reader); + } else if ("kubernetes".equals(fieldName)) { + deserializedMachineProperties.kubernetes = MachineKubernetesProfile.fromJson(reader); + } else if ("mode".equals(fieldName)) { + deserializedMachineProperties.mode = AgentPoolMode.fromString(reader.getString()); + } else if ("security".equals(fieldName)) { + deserializedMachineProperties.security = MachineSecurityProfile.fromJson(reader); + } else if ("priority".equals(fieldName)) { + deserializedMachineProperties.priority = ScaleSetPriority.fromString(reader.getString()); + } else if ("evictionPolicy".equals(fieldName)) { + deserializedMachineProperties.evictionPolicy + = ScaleSetEvictionPolicy.fromString(reader.getString()); + } else if ("billing".equals(fieldName)) { + deserializedMachineProperties.billing = MachineBillingProfile.fromJson(reader); + } else if ("nodeImageVersion".equals(fieldName)) { + deserializedMachineProperties.nodeImageVersion = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedMachineProperties.provisioningState = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedMachineProperties.tags = tags; + } else if ("eTag".equals(fieldName)) { + deserializedMachineProperties.eTag = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedMachineProperties.status = MachineStatus.fromJson(reader); + } else if ("localDNSProfile".equals(fieldName)) { + deserializedMachineProperties.localDNSProfile = LocalDnsProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineSecurityProfile.java new file mode 100644 index 000000000000..21b7ccecb338 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineSecurityProfile.java @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The security settings of the machine. + */ +@Fluent +public final class MachineSecurityProfile implements JsonSerializable { + /* + * vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys and measurements held locally + * on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + */ + private Boolean enableVTPM; + + /* + * Secure Boot is a feature of Trusted Launch which ensures that only signed operating systems and drivers can boot. + * For more details, see aka.ms/aks/trustedlaunch. If not specified, the default is false. + */ + private Boolean enableSecureBoot; + + /* + * SSH access method of an agent pool. + */ + private AgentPoolSshAccess sshAccess; + + /* + * Whether to enable host based OS and data drive encryption. 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 + */ + private Boolean enableEncryptionAtHost; + + /** + * Creates an instance of MachineSecurityProfile class. + */ + public MachineSecurityProfile() { + } + + /** + * Get the enableVTPM property: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys + * and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @return the enableVTPM value. + */ + public Boolean enableVTPM() { + return this.enableVTPM; + } + + /** + * Set the enableVTPM property: vTPM is a Trusted Launch feature for configuring a dedicated secure vault for keys + * and measurements held locally on the node. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @param enableVTPM the enableVTPM value to set. + * @return the MachineSecurityProfile object itself. + */ + public MachineSecurityProfile withEnableVTPM(Boolean enableVTPM) { + this.enableVTPM = enableVTPM; + return this; + } + + /** + * Get the enableSecureBoot property: Secure Boot is a feature of Trusted Launch which ensures that only signed + * operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @return the enableSecureBoot value. + */ + public Boolean enableSecureBoot() { + return this.enableSecureBoot; + } + + /** + * Set the enableSecureBoot property: Secure Boot is a feature of Trusted Launch which ensures that only signed + * operating systems and drivers can boot. For more details, see aka.ms/aks/trustedlaunch. If not specified, the + * default is false. + * + * @param enableSecureBoot the enableSecureBoot value to set. + * @return the MachineSecurityProfile object itself. + */ + public MachineSecurityProfile withEnableSecureBoot(Boolean enableSecureBoot) { + this.enableSecureBoot = enableSecureBoot; + return this; + } + + /** + * Get the sshAccess property: SSH access method of an agent pool. + * + * @return the sshAccess value. + */ + public AgentPoolSshAccess sshAccess() { + return this.sshAccess; + } + + /** + * Set the sshAccess property: SSH access method of an agent pool. + * + * @param sshAccess the sshAccess value to set. + * @return the MachineSecurityProfile object itself. + */ + public MachineSecurityProfile withSshAccess(AgentPoolSshAccess sshAccess) { + this.sshAccess = sshAccess; + return this; + } + + /** + * Get the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. 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. + * + * @return the enableEncryptionAtHost value. + */ + public Boolean enableEncryptionAtHost() { + return this.enableEncryptionAtHost; + } + + /** + * Set the enableEncryptionAtHost property: Whether to enable host based OS and data drive encryption. 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. + * + * @param enableEncryptionAtHost the enableEncryptionAtHost value to set. + * @return the MachineSecurityProfile object itself. + */ + public MachineSecurityProfile withEnableEncryptionAtHost(Boolean enableEncryptionAtHost) { + this.enableEncryptionAtHost = enableEncryptionAtHost; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableVTPM", this.enableVTPM); + jsonWriter.writeBooleanField("enableSecureBoot", this.enableSecureBoot); + jsonWriter.writeStringField("sshAccess", this.sshAccess == null ? null : this.sshAccess.toString()); + jsonWriter.writeBooleanField("enableEncryptionAtHost", this.enableEncryptionAtHost); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineSecurityProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineSecurityProfile if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineSecurityProfile. + */ + public static MachineSecurityProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineSecurityProfile deserializedMachineSecurityProfile = new MachineSecurityProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableVTPM".equals(fieldName)) { + deserializedMachineSecurityProfile.enableVTPM = reader.getNullable(JsonReader::getBoolean); + } else if ("enableSecureBoot".equals(fieldName)) { + deserializedMachineSecurityProfile.enableSecureBoot = reader.getNullable(JsonReader::getBoolean); + } else if ("sshAccess".equals(fieldName)) { + deserializedMachineSecurityProfile.sshAccess = AgentPoolSshAccess.fromString(reader.getString()); + } else if ("enableEncryptionAtHost".equals(fieldName)) { + deserializedMachineSecurityProfile.enableEncryptionAtHost + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineSecurityProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java new file mode 100644 index 000000000000..46eba39440c5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * Contains read-only information about the machine. + */ +@Immutable +public final class MachineStatus implements JsonSerializable { + /* + * The error details information of the machine. Preserves the detailed info of failure. If there was no error, this + * field is omitted. + */ + private ManagementError provisioningError; + + /* + * Specifies the time at which the machine was created. + */ + private OffsetDateTime creationTimestamp; + + /* + * The drift action of the machine. Indicates whether a machine has deviated from its expected state due to changes + * in managed cluster properties, requiring corrective action. + */ + private DriftAction driftAction; + + /* + * Reason for machine drift. Provides detailed information on why the machine has drifted. This field is omitted if + * the machine is up to date. + */ + private String driftReason; + + /* + * Virtual machine state. Indicates the current state of the underlying virtual machine. + */ + private VmState vmState; + + /** + * Creates an instance of MachineStatus class. + */ + private MachineStatus() { + } + + /** + * Get the provisioningError property: The error details information of the machine. Preserves the detailed info of + * failure. If there was no error, this field is omitted. + * + * @return the provisioningError value. + */ + public ManagementError provisioningError() { + return this.provisioningError; + } + + /** + * Get the creationTimestamp property: Specifies the time at which the machine was created. + * + * @return the creationTimestamp value. + */ + public OffsetDateTime creationTimestamp() { + return this.creationTimestamp; + } + + /** + * Get the driftAction property: The drift action of the machine. Indicates whether a machine has deviated from its + * expected state due to changes in managed cluster properties, requiring corrective action. + * + * @return the driftAction value. + */ + public DriftAction driftAction() { + return this.driftAction; + } + + /** + * Get the driftReason property: Reason for machine drift. Provides detailed information on why the machine has + * drifted. This field is omitted if the machine is up to date. + * + * @return the driftReason value. + */ + public String driftReason() { + return this.driftReason; + } + + /** + * Get the vmState property: Virtual machine state. Indicates the current state of the underlying virtual machine. + * + * @return the vmState value. + */ + public VmState vmState() { + return this.vmState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the MachineStatus. + */ + public static MachineStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineStatus deserializedMachineStatus = new MachineStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningError".equals(fieldName)) { + deserializedMachineStatus.provisioningError = ManagementError.fromJson(reader); + } else if ("creationTimestamp".equals(fieldName)) { + deserializedMachineStatus.creationTimestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("driftAction".equals(fieldName)) { + deserializedMachineStatus.driftAction = DriftAction.fromString(reader.getString()); + } else if ("driftReason".equals(fieldName)) { + deserializedMachineStatus.driftReason = reader.getString(); + } else if ("vmState".equals(fieldName)) { + deserializedMachineStatus.vmState = VmState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineStatus; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java index 2d7ee44a90ba..8ea9453e682a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java @@ -30,11 +30,6 @@ public final class ManagedClusterAgentPoolProfile extends ManagedClusterAgentPoo */ private String provisioningState; - /* - * The version of node image - */ - private String nodeImageVersion; - /* * The version of Kubernetes the Agent Pool is running. If orchestratorVersion is a fully specified version * , this field will be exactly equal to it. If orchestratorVersion is , this field @@ -87,16 +82,6 @@ public String provisioningState() { return this.provisioningState; } - /** - * Get the nodeImageVersion property: The version of node image. - * - * @return the nodeImageVersion value. - */ - @Override - public String nodeImageVersion() { - return this.nodeImageVersion; - } - /** * Get the currentOrchestratorVersion property: The version of Kubernetes the Agent Pool is running. If * orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to @@ -302,6 +287,33 @@ public ManagedClusterAgentPoolProfile withOrchestratorVersion(String orchestrato return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withNodeImageVersion(String nodeImageVersion) { + super.withNodeImageVersion(nodeImageVersion); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withUpgradeStrategy(UpgradeStrategy upgradeStrategy) { + super.withUpgradeStrategy(upgradeStrategy); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withEnableOSDiskFullCaching(Boolean enableOSDiskFullCaching) { + super.withEnableOSDiskFullCaching(enableOSDiskFullCaching); + return this; + } + /** * {@inheritDoc} */ @@ -311,6 +323,16 @@ public ManagedClusterAgentPoolProfile withUpgradeSettings(AgentPoolUpgradeSettin return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile + withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings upgradeSettingsBlueGreen) { + super.withUpgradeSettingsBlueGreen(upgradeSettingsBlueGreen); + return this; + } + /** * {@inheritDoc} */ @@ -401,6 +423,15 @@ public ManagedClusterAgentPoolProfile withNodeTaints(List nodeTaints) { return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile withNodeInitializationTaints(List nodeInitializationTaints) { + super.withNodeInitializationTaints(nodeInitializationTaints); + return this; + } + /** * {@inheritDoc} */ @@ -536,6 +567,16 @@ public ManagedClusterAgentPoolProfile withGatewayProfile(AgentPoolGatewayProfile return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile + withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile artifactStreamingProfile) { + super.withArtifactStreamingProfile(artifactStreamingProfile); + return this; + } + /** * {@inheritDoc} */ @@ -573,6 +614,16 @@ public ManagedClusterAgentPoolProfile withLocalDnsProfile(LocalDnsProfile localD return this; } + /** + * {@inheritDoc} + */ + @Override + public ManagedClusterAgentPoolProfile + withPreparedImageSpecificationProfile(PreparedImageSpecificationProfile preparedImageSpecificationProfile) { + super.withPreparedImageSpecificationProfile(preparedImageSpecificationProfile); + return this; + } + /** * Validates the instance. * @@ -588,6 +639,9 @@ public void validate() { if (upgradeSettings() != null) { upgradeSettings().validate(); } + if (upgradeSettingsBlueGreen() != null) { + upgradeSettingsBlueGreen().validate(); + } if (powerState() != null) { powerState().validate(); } @@ -615,6 +669,9 @@ public void validate() { if (gatewayProfile() != null) { gatewayProfile().validate(); } + if (artifactStreamingProfile() != null) { + artifactStreamingProfile().validate(); + } if (virtualMachinesProfile() != null) { virtualMachinesProfile().validate(); } @@ -627,6 +684,9 @@ public void validate() { if (localDnsProfile() != null) { localDnsProfile().validate(); } + if (preparedImageSpecificationProfile() != null) { + preparedImageSpecificationProfile().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterAgentPoolProfile.class); @@ -658,7 +718,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("type", type() == null ? null : type().toString()); jsonWriter.writeStringField("mode", mode() == null ? null : mode().toString()); jsonWriter.writeStringField("orchestratorVersion", orchestratorVersion()); + jsonWriter.writeStringField("nodeImageVersion", nodeImageVersion()); + jsonWriter.writeStringField("upgradeStrategy", upgradeStrategy() == null ? null : upgradeStrategy().toString()); + jsonWriter.writeBooleanField("enableOSDiskFullCaching", enableOSDiskFullCaching()); jsonWriter.writeJsonField("upgradeSettings", upgradeSettings()); + jsonWriter.writeJsonField("upgradeSettingsBlueGreen", upgradeSettingsBlueGreen()); jsonWriter.writeJsonField("powerState", powerState()); jsonWriter.writeArrayField("availabilityZones", availabilityZones(), (writer, element) -> writer.writeString(element)); @@ -672,6 +736,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("nodeLabels", nodeLabels(), (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("nodeTaints", nodeTaints(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("nodeInitializationTaints", nodeInitializationTaints(), + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("proximityPlacementGroupID", proximityPlacementGroupId()); jsonWriter.writeJsonField("kubeletConfig", kubeletConfig()); jsonWriter.writeJsonField("linuxOSConfig", linuxOSConfig()); @@ -688,11 +754,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("securityProfile", securityProfile()); jsonWriter.writeJsonField("gpuProfile", gpuProfile()); jsonWriter.writeJsonField("gatewayProfile", gatewayProfile()); + jsonWriter.writeJsonField("artifactStreamingProfile", artifactStreamingProfile()); jsonWriter.writeJsonField("virtualMachinesProfile", virtualMachinesProfile()); jsonWriter.writeArrayField("virtualMachineNodesStatus", virtualMachineNodesStatus(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("status", status()); jsonWriter.writeJsonField("localDNSProfile", localDnsProfile()); + jsonWriter.writeJsonField("preparedImageSpecificationProfile", preparedImageSpecificationProfile()); jsonWriter.writeStringField("name", this.name); return jsonWriter.writeEndObject(); } @@ -765,10 +833,19 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr } else if ("currentOrchestratorVersion".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.currentOrchestratorVersion = reader.getString(); } else if ("nodeImageVersion".equals(fieldName)) { - deserializedManagedClusterAgentPoolProfile.nodeImageVersion = reader.getString(); + deserializedManagedClusterAgentPoolProfile.withNodeImageVersion(reader.getString()); + } else if ("upgradeStrategy".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withUpgradeStrategy(UpgradeStrategy.fromString(reader.getString())); + } else if ("enableOSDiskFullCaching".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withEnableOSDiskFullCaching(reader.getNullable(JsonReader::getBoolean)); } else if ("upgradeSettings".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withUpgradeSettings(AgentPoolUpgradeSettings.fromJson(reader)); + } else if ("upgradeSettingsBlueGreen".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withUpgradeSettingsBlueGreen(AgentPoolBlueGreenUpgradeSettings.fromJson(reader)); } else if ("provisioningState".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.provisioningState = reader.getString(); } else if ("powerState".equals(fieldName)) { @@ -799,6 +876,9 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr } else if ("nodeTaints".equals(fieldName)) { List nodeTaints = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterAgentPoolProfile.withNodeTaints(nodeTaints); + } else if ("nodeInitializationTaints".equals(fieldName)) { + List nodeInitializationTaints = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterAgentPoolProfile.withNodeInitializationTaints(nodeInitializationTaints); } else if ("proximityPlacementGroupID".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withProximityPlacementGroupId(reader.getString()); } else if ("kubeletConfig".equals(fieldName)) { @@ -837,6 +917,9 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr } else if ("gatewayProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withGatewayProfile(AgentPoolGatewayProfile.fromJson(reader)); + } else if ("artifactStreamingProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withArtifactStreamingProfile(AgentPoolArtifactStreamingProfile.fromJson(reader)); } else if ("virtualMachinesProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile .withVirtualMachinesProfile(VirtualMachinesProfile.fromJson(reader)); @@ -848,6 +931,9 @@ public static ManagedClusterAgentPoolProfile fromJson(JsonReader jsonReader) thr deserializedManagedClusterAgentPoolProfile.withStatus(AgentPoolStatus.fromJson(reader)); } else if ("localDNSProfile".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.withLocalDnsProfile(LocalDnsProfile.fromJson(reader)); + } else if ("preparedImageSpecificationProfile".equals(fieldName)) { + deserializedManagedClusterAgentPoolProfile + .withPreparedImageSpecificationProfile(PreparedImageSpecificationProfile.fromJson(reader)); } else if ("name".equals(fieldName)) { deserializedManagedClusterAgentPoolProfile.name = reader.getString(); } else { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java index c0539ac92c30..8c7e89ac20c7 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java @@ -23,6 +23,12 @@ public final class ManagedClusterAzureMonitorProfile implements JsonSerializable */ private ManagedClusterAzureMonitorProfileMetrics metrics; + /* + * Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. + * See aka.ms/AzureMonitorContainerInsights for an overview. + */ + private ManagedClusterAzureMonitorProfileContainerInsights containerInsights; + /* * 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 @@ -60,6 +66,29 @@ public ManagedClusterAzureMonitorProfile withMetrics(ManagedClusterAzureMonitorP return this; } + /** + * Get the containerInsights property: Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and + * Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. + * + * @return the containerInsights value. + */ + public ManagedClusterAzureMonitorProfileContainerInsights containerInsights() { + return this.containerInsights; + } + + /** + * Set the containerInsights property: Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and + * Container stdout & stderr logs etc. See aka.ms/AzureMonitorContainerInsights for an overview. + * + * @param containerInsights the containerInsights value to set. + * @return the ManagedClusterAzureMonitorProfile object itself. + */ + public ManagedClusterAzureMonitorProfile + withContainerInsights(ManagedClusterAzureMonitorProfileContainerInsights containerInsights) { + this.containerInsights = containerInsights; + return this; + } + /** * Get the appMonitoring property: Application Monitoring Profile for Kubernetes Application Container. Collects * application logs, metrics and traces through auto-instrumentation of the application using Azure Monitor @@ -94,6 +123,9 @@ public void validate() { if (metrics() != null) { metrics().validate(); } + if (containerInsights() != null) { + containerInsights().validate(); + } if (appMonitoring() != null) { appMonitoring().validate(); } @@ -106,6 +138,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("metrics", this.metrics); + jsonWriter.writeJsonField("containerInsights", this.containerInsights); jsonWriter.writeJsonField("appMonitoring", this.appMonitoring); return jsonWriter.writeEndObject(); } @@ -129,6 +162,9 @@ public static ManagedClusterAzureMonitorProfile fromJson(JsonReader jsonReader) if ("metrics".equals(fieldName)) { deserializedManagedClusterAzureMonitorProfile.metrics = ManagedClusterAzureMonitorProfileMetrics.fromJson(reader); + } else if ("containerInsights".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfile.containerInsights + = ManagedClusterAzureMonitorProfileContainerInsights.fromJson(reader); } else if ("appMonitoring".equals(fieldName)) { deserializedManagedClusterAzureMonitorProfile.appMonitoring = ManagedClusterAzureMonitorProfileAppMonitoring.fromJson(reader); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java index e51667993ee5..adcdf7a11bba 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java @@ -24,6 +24,20 @@ public final class ManagedClusterAzureMonitorProfileAppMonitoring */ private ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation autoInstrumentation; + /* + * Application Monitoring Open Telemetry Metrics Profile for AKS. Collects OpenTelemetry metrics of the application + * using Azure Monitor OpenTelemetry based SDKs. See https://aka.ms/AKSAppMonitoringDocs and + * https://aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ + private ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics openTelemetryMetrics; + + /* + * Application Monitoring Open Telemetry Logs and Traces Profile for AKS. Collects OpenTelemetry logs and traces of + * the application using Azure Monitor OpenTelemetry based SDKs. See https://aka.ms/AKSAppMonitoringDocs and + * https://aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ + private ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces openTelemetryLogsAndTraces; + /** * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoring class. */ @@ -57,6 +71,56 @@ public ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation autoIns return this; } + /** + * Get the openTelemetryMetrics property: Application Monitoring Open Telemetry Metrics Profile for AKS. Collects + * OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry based SDKs. See + * https://aka.ms/AKSAppMonitoringDocs and https://aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @return the openTelemetryMetrics value. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics openTelemetryMetrics() { + return this.openTelemetryMetrics; + } + + /** + * Set the openTelemetryMetrics property: Application Monitoring Open Telemetry Metrics Profile for AKS. Collects + * OpenTelemetry metrics of the application using Azure Monitor OpenTelemetry based SDKs. See + * https://aka.ms/AKSAppMonitoringDocs and https://aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @param openTelemetryMetrics the openTelemetryMetrics value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoring object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoring withOpenTelemetryMetrics( + ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics openTelemetryMetrics) { + this.openTelemetryMetrics = openTelemetryMetrics; + return this; + } + + /** + * Get the openTelemetryLogsAndTraces property: Application Monitoring Open Telemetry Logs and Traces Profile for + * AKS. Collects OpenTelemetry logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See + * https://aka.ms/AKSAppMonitoringDocs and https://aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @return the openTelemetryLogsAndTraces value. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces openTelemetryLogsAndTraces() { + return this.openTelemetryLogsAndTraces; + } + + /** + * Set the openTelemetryLogsAndTraces property: Application Monitoring Open Telemetry Logs and Traces Profile for + * AKS. Collects OpenTelemetry logs and traces of the application using Azure Monitor OpenTelemetry based SDKs. See + * https://aka.ms/AKSAppMonitoringDocs and https://aka.ms/AzureMonitorApplicationMonitoring for an overview. + * + * @param openTelemetryLogsAndTraces the openTelemetryLogsAndTraces value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoring object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoring withOpenTelemetryLogsAndTraces( + ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces openTelemetryLogsAndTraces) { + this.openTelemetryLogsAndTraces = openTelemetryLogsAndTraces; + return this; + } + /** * Validates the instance. * @@ -66,6 +130,12 @@ public void validate() { if (autoInstrumentation() != null) { autoInstrumentation().validate(); } + if (openTelemetryMetrics() != null) { + openTelemetryMetrics().validate(); + } + if (openTelemetryLogsAndTraces() != null) { + openTelemetryLogsAndTraces().validate(); + } } /** @@ -75,6 +145,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("autoInstrumentation", this.autoInstrumentation); + jsonWriter.writeJsonField("openTelemetryMetrics", this.openTelemetryMetrics); + jsonWriter.writeJsonField("openTelemetryLogsAndTraces", this.openTelemetryLogsAndTraces); return jsonWriter.writeEndObject(); } @@ -97,6 +169,12 @@ public static ManagedClusterAzureMonitorProfileAppMonitoring fromJson(JsonReader if ("autoInstrumentation".equals(fieldName)) { deserializedManagedClusterAzureMonitorProfileAppMonitoring.autoInstrumentation = ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.fromJson(reader); + } else if ("openTelemetryMetrics".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoring.openTelemetryMetrics + = ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.fromJson(reader); + } else if ("openTelemetryLogsAndTraces".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoring.openTelemetryLogsAndTraces + = ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces.java new file mode 100644 index 000000000000..726b13e922cf --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Application Monitoring Open Telemetry Logs and Traces Profile for AKS. Collects OpenTelemetry logs and traces of the + * application using Azure Monitor OpenTelemetry based SDKs. See https://aka.ms/AKSAppMonitoringDocs and + * https://aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces + implements JsonSerializable { + /* + * Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. + */ + private Boolean enabled; + + /* + * The host port for Open Telemetry HTTP/PROTOBUF logs and traces. If not specified, the default port is 28331. + */ + private Long httpPort; + + /* + * The host port for Open Telemetry GRPC logs and traces. If not specified, the default port is 28332. + */ + private Long grpcPort; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces class. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces() { + } + + /** + * Get the enabled property: Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates if Application Monitoring Open Telemetry Logs and traces is enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the httpPort property: The host port for Open Telemetry HTTP/PROTOBUF logs and traces. If not specified, the + * default port is 28331. + * + * @return the httpPort value. + */ + public Long httpPort() { + return this.httpPort; + } + + /** + * Set the httpPort property: The host port for Open Telemetry HTTP/PROTOBUF logs and traces. If not specified, the + * default port is 28331. + * + * @param httpPort the httpPort value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces withHttpPort(Long httpPort) { + this.httpPort = httpPort; + return this; + } + + /** + * Get the grpcPort property: The host port for Open Telemetry GRPC logs and traces. If not specified, the default + * port is 28332. + * + * @return the grpcPort value. + */ + public Long grpcPort() { + return this.grpcPort; + } + + /** + * Set the grpcPort property: The host port for Open Telemetry GRPC logs and traces. If not specified, the default + * port is 28332. + * + * @param grpcPort the grpcPort value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces withGrpcPort(Long grpcPort) { + this.grpcPort = grpcPort; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeNumberField("httpPort", this.httpPort); + jsonWriter.writeNumberField("grpcPort", this.grpcPort); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces from the + * JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces if the JsonReader + * was pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces. + */ + public static ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces + fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces + = new ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("httpPort".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces.httpPort + = reader.getNullable(JsonReader::getLong); + } else if ("grpcPort".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces.grpcPort + = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java new file mode 100644 index 000000000000..a633d63331c8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Application Monitoring Open Telemetry Metrics Profile for AKS. Collects OpenTelemetry metrics of the application + * using Azure Monitor OpenTelemetry based SDKs. See https://aka.ms/AKSAppMonitoringDocs and + * https://aka.ms/AzureMonitorApplicationMonitoring for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics + implements JsonSerializable { + /* + * Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. + */ + private Boolean enabled; + + /* + * The host port for Open Telemetry HTTP/PROTOBUF metrics. If not specified, the default port is 28333. + */ + private Long httpPort; + + /* + * The host port for Open Telemetry GRPC metrics. If not specified, the default port is 28334. + */ + private Long grpcPort; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics class. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics() { + } + + /** + * Get the enabled property: Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates if Application Monitoring Open Telemetry Metrics is enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the httpPort property: The host port for Open Telemetry HTTP/PROTOBUF metrics. If not specified, the default + * port is 28333. + * + * @return the httpPort value. + */ + public Long httpPort() { + return this.httpPort; + } + + /** + * Set the httpPort property: The host port for Open Telemetry HTTP/PROTOBUF metrics. If not specified, the default + * port is 28333. + * + * @param httpPort the httpPort value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics withHttpPort(Long httpPort) { + this.httpPort = httpPort; + return this; + } + + /** + * Get the grpcPort property: The host port for Open Telemetry GRPC metrics. If not specified, the default port is + * 28334. + * + * @return the grpcPort value. + */ + public Long grpcPort() { + return this.grpcPort; + } + + /** + * Set the grpcPort property: The host port for Open Telemetry GRPC metrics. If not specified, the default port is + * 28334. + * + * @param grpcPort the grpcPort value to set. + * @return the ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics withGrpcPort(Long grpcPort) { + this.grpcPort = grpcPort; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeNumberField("httpPort", this.httpPort); + jsonWriter.writeNumberField("grpcPort", this.grpcPort); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics if the JsonReader was + * pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics. + */ + public static ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics + = new ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("httpPort".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.httpPort + = reader.getNullable(JsonReader::getLong); + } else if ("grpcPort".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.grpcPort + = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java new file mode 100644 index 000000000000..ee5766506939 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Azure Monitor Container Insights Profile for Kubernetes Events, Inventory and Container stdout & stderr logs etc. + * See aka.ms/AzureMonitorContainerInsights for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileContainerInsights + implements JsonSerializable { + /* + * Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. + */ + private Boolean enabled; + + /* + * Fully Qualified ARM Resource Id of Azure Log Analytics Workspace for storing Azure Monitor Container Insights + * Logs. + */ + private String logAnalyticsWorkspaceResourceId; + + /* + * The syslog host port. If not specified, the default port is 28330. + */ + private Long syslogPort; + + /* + * Indicates whether custom metrics collection has to be disabled or not. If not specified the default is false. No + * custom metrics will be emitted if this field is false but the container insights enabled field is false + */ + private Boolean disableCustomMetrics; + + /* + * Indicates whether prometheus metrics scraping is disabled or not. If not specified the default is false. No + * prometheus metrics will be emitted if this field is false but the container insights enabled field is false + */ + private Boolean disablePrometheusMetricsScraping; + + /* + * Configures container network logs ingestion with Azure Monitor. Which network logs to ingest is controlled by the + * CRD found in the following links. No network logs are ingested by default. More information on container network + * logs can be found at https://aka.ms/ContainerNetworkLogsDoc. More information on configuring container network + * log can be found at https://aka.ms/acns/howtoenablecnl. If not specified, the default is Disabled. + */ + private ContainerNetworkLogs containerNetworkLogs; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileContainerInsights class. + */ + public ManagedClusterAzureMonitorProfileContainerInsights() { + } + + /** + * Get the enabled property: Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates if Azure Monitor Container Insights Logs Addon is enabled or not. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the logAnalyticsWorkspaceResourceId property: Fully Qualified ARM Resource Id of Azure Log Analytics + * Workspace for storing Azure Monitor Container Insights Logs. + * + * @return the logAnalyticsWorkspaceResourceId value. + */ + public String logAnalyticsWorkspaceResourceId() { + return this.logAnalyticsWorkspaceResourceId; + } + + /** + * Set the logAnalyticsWorkspaceResourceId property: Fully Qualified ARM Resource Id of Azure Log Analytics + * Workspace for storing Azure Monitor Container Insights Logs. + * + * @param logAnalyticsWorkspaceResourceId the logAnalyticsWorkspaceResourceId value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights + withLogAnalyticsWorkspaceResourceId(String logAnalyticsWorkspaceResourceId) { + this.logAnalyticsWorkspaceResourceId = logAnalyticsWorkspaceResourceId; + return this; + } + + /** + * Get the syslogPort property: The syslog host port. If not specified, the default port is 28330. + * + * @return the syslogPort value. + */ + public Long syslogPort() { + return this.syslogPort; + } + + /** + * Set the syslogPort property: The syslog host port. If not specified, the default port is 28330. + * + * @param syslogPort the syslogPort value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights withSyslogPort(Long syslogPort) { + this.syslogPort = syslogPort; + return this; + } + + /** + * Get the disableCustomMetrics property: Indicates whether custom metrics collection has to be disabled or not. If + * not specified the default is false. No custom metrics will be emitted if this field is false but the container + * insights enabled field is false. + * + * @return the disableCustomMetrics value. + */ + public Boolean disableCustomMetrics() { + return this.disableCustomMetrics; + } + + /** + * Set the disableCustomMetrics property: Indicates whether custom metrics collection has to be disabled or not. If + * not specified the default is false. No custom metrics will be emitted if this field is false but the container + * insights enabled field is false. + * + * @param disableCustomMetrics the disableCustomMetrics value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights withDisableCustomMetrics(Boolean disableCustomMetrics) { + this.disableCustomMetrics = disableCustomMetrics; + return this; + } + + /** + * Get the disablePrometheusMetricsScraping property: Indicates whether prometheus metrics scraping is disabled or + * not. If not specified the default is false. No prometheus metrics will be emitted if this field is false but the + * container insights enabled field is false. + * + * @return the disablePrometheusMetricsScraping value. + */ + public Boolean disablePrometheusMetricsScraping() { + return this.disablePrometheusMetricsScraping; + } + + /** + * Set the disablePrometheusMetricsScraping property: Indicates whether prometheus metrics scraping is disabled or + * not. If not specified the default is false. No prometheus metrics will be emitted if this field is false but the + * container insights enabled field is false. + * + * @param disablePrometheusMetricsScraping the disablePrometheusMetricsScraping value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights + withDisablePrometheusMetricsScraping(Boolean disablePrometheusMetricsScraping) { + this.disablePrometheusMetricsScraping = disablePrometheusMetricsScraping; + return this; + } + + /** + * Get the containerNetworkLogs property: Configures container network logs ingestion with Azure Monitor. Which + * network logs to ingest is controlled by the CRD found in the following links. No network logs are ingested by + * default. More information on container network logs can be found at https://aka.ms/ContainerNetworkLogsDoc. More + * information on configuring container network log can be found at https://aka.ms/acns/howtoenablecnl. If not + * specified, the default is Disabled. + * + * @return the containerNetworkLogs value. + */ + public ContainerNetworkLogs containerNetworkLogs() { + return this.containerNetworkLogs; + } + + /** + * Set the containerNetworkLogs property: Configures container network logs ingestion with Azure Monitor. Which + * network logs to ingest is controlled by the CRD found in the following links. No network logs are ingested by + * default. More information on container network logs can be found at https://aka.ms/ContainerNetworkLogsDoc. More + * information on configuring container network log can be found at https://aka.ms/acns/howtoenablecnl. If not + * specified, the default is Disabled. + * + * @param containerNetworkLogs the containerNetworkLogs value to set. + * @return the ManagedClusterAzureMonitorProfileContainerInsights object itself. + */ + public ManagedClusterAzureMonitorProfileContainerInsights + withContainerNetworkLogs(ContainerNetworkLogs containerNetworkLogs) { + this.containerNetworkLogs = containerNetworkLogs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("logAnalyticsWorkspaceResourceId", this.logAnalyticsWorkspaceResourceId); + jsonWriter.writeNumberField("syslogPort", this.syslogPort); + jsonWriter.writeBooleanField("disableCustomMetrics", this.disableCustomMetrics); + jsonWriter.writeBooleanField("disablePrometheusMetricsScraping", this.disablePrometheusMetricsScraping); + jsonWriter.writeStringField("containerNetworkLogs", + this.containerNetworkLogs == null ? null : this.containerNetworkLogs.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfileContainerInsights from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfileContainerInsights if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterAzureMonitorProfileContainerInsights. + */ + public static ManagedClusterAzureMonitorProfileContainerInsights fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfileContainerInsights deserializedManagedClusterAzureMonitorProfileContainerInsights + = new ManagedClusterAzureMonitorProfileContainerInsights(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileContainerInsights.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("logAnalyticsWorkspaceResourceId".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileContainerInsights.logAnalyticsWorkspaceResourceId + = reader.getString(); + } else if ("syslogPort".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileContainerInsights.syslogPort + = reader.getNullable(JsonReader::getLong); + } else if ("disableCustomMetrics".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileContainerInsights.disableCustomMetrics + = reader.getNullable(JsonReader::getBoolean); + } else if ("disablePrometheusMetricsScraping".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileContainerInsights.disablePrometheusMetricsScraping + = reader.getNullable(JsonReader::getBoolean); + } else if ("containerNetworkLogs".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileContainerInsights.containerNetworkLogs + = ContainerNetworkLogs.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfileContainerInsights; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java index fa17000e3cae..18e3242ae4c8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java @@ -32,6 +32,13 @@ public final class ManagedClusterAzureMonitorProfileMetrics */ private ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics; + /* + * Control plane metrics collection profile for the Azure Managed Prometheus addon. Configures collection of + * operational runtime metrics from managed control plane components (kube-apiserver, etcd, etc). See + * aka.ms/aks/controlplane-metrics for an overview. + */ + private ManagedClusterAzureMonitorProfileMetricsControlPlane controlPlane; + /** * Creates an instance of ManagedClusterAzureMonitorProfileMetrics class. */ @@ -85,6 +92,31 @@ public ManagedClusterAzureMonitorProfileKubeStateMetrics kubeStateMetrics() { return this; } + /** + * Get the controlPlane property: Control plane metrics collection profile for the Azure Managed Prometheus addon. + * Configures collection of operational runtime metrics from managed control plane components (kube-apiserver, etcd, + * etc). See aka.ms/aks/controlplane-metrics for an overview. + * + * @return the controlPlane value. + */ + public ManagedClusterAzureMonitorProfileMetricsControlPlane controlPlane() { + return this.controlPlane; + } + + /** + * Set the controlPlane property: Control plane metrics collection profile for the Azure Managed Prometheus addon. + * Configures collection of operational runtime metrics from managed control plane components (kube-apiserver, etcd, + * etc). See aka.ms/aks/controlplane-metrics for an overview. + * + * @param controlPlane the controlPlane value to set. + * @return the ManagedClusterAzureMonitorProfileMetrics object itself. + */ + public ManagedClusterAzureMonitorProfileMetrics + withControlPlane(ManagedClusterAzureMonitorProfileMetricsControlPlane controlPlane) { + this.controlPlane = controlPlane; + return this; + } + /** * Validates the instance. * @@ -94,6 +126,9 @@ public void validate() { if (kubeStateMetrics() != null) { kubeStateMetrics().validate(); } + if (controlPlane() != null) { + controlPlane().validate(); + } } /** @@ -104,6 +139,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("enabled", this.enabled); jsonWriter.writeJsonField("kubeStateMetrics", this.kubeStateMetrics); + jsonWriter.writeJsonField("controlPlane", this.controlPlane); return jsonWriter.writeEndObject(); } @@ -129,6 +165,9 @@ public static ManagedClusterAzureMonitorProfileMetrics fromJson(JsonReader jsonR } else if ("kubeStateMetrics".equals(fieldName)) { deserializedManagedClusterAzureMonitorProfileMetrics.kubeStateMetrics = ManagedClusterAzureMonitorProfileKubeStateMetrics.fromJson(reader); + } else if ("controlPlane".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileMetrics.controlPlane + = ManagedClusterAzureMonitorProfileMetricsControlPlane.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetricsControlPlane.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetricsControlPlane.java new file mode 100644 index 000000000000..abe77e0195f6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetricsControlPlane.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Control plane metrics collection profile for the Azure Managed Prometheus addon. Configures collection of operational + * runtime metrics from managed control plane components (kube-apiserver, etcd, etc). See + * aka.ms/aks/controlplane-metrics for an overview. + */ +@Fluent +public final class ManagedClusterAzureMonitorProfileMetricsControlPlane + implements JsonSerializable { + /* + * Whether to enable or disable collection of control plane metrics by the Azure Managed Prometheus addon. Defaults + * to disabled. See aka.ms/aks/controlplane-metrics for details. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterAzureMonitorProfileMetricsControlPlane class. + */ + public ManagedClusterAzureMonitorProfileMetricsControlPlane() { + } + + /** + * Get the enabled property: Whether to enable or disable collection of control plane metrics by the Azure Managed + * Prometheus addon. Defaults to disabled. See aka.ms/aks/controlplane-metrics for details. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable or disable collection of control plane metrics by the Azure Managed + * Prometheus addon. Defaults to disabled. See aka.ms/aks/controlplane-metrics for details. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterAzureMonitorProfileMetricsControlPlane object itself. + */ + public ManagedClusterAzureMonitorProfileMetricsControlPlane withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterAzureMonitorProfileMetricsControlPlane from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterAzureMonitorProfileMetricsControlPlane if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterAzureMonitorProfileMetricsControlPlane. + */ + public static ManagedClusterAzureMonitorProfileMetricsControlPlane fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterAzureMonitorProfileMetricsControlPlane deserializedManagedClusterAzureMonitorProfileMetricsControlPlane + = new ManagedClusterAzureMonitorProfileMetricsControlPlane(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterAzureMonitorProfileMetricsControlPlane.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterAzureMonitorProfileMetricsControlPlane; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterControlPlaneScalingProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterControlPlaneScalingProfile.java new file mode 100644 index 000000000000..e4840f8e70a8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterControlPlaneScalingProfile.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Profile for providing scaled and performance guaranteed control plane capacity to deliver consistent performance + * under high workload. Requires Kubernetes version 1.33.0 or later. + */ +@Fluent +public final class ManagedClusterControlPlaneScalingProfile + implements JsonSerializable { + /* + * The scaling size of the control plane. Scaling sizes offer guaranteed capacity and predictable Kubernetes + * performance beyond standard tier defaults. Higher H sizes provide increased performance guarantees. See + * https://aka.ms/aks/hyperscale for performance metrics details for each size. + */ + private ControlPlaneScalingSize scalingSize; + + /** + * Creates an instance of ManagedClusterControlPlaneScalingProfile class. + */ + public ManagedClusterControlPlaneScalingProfile() { + } + + /** + * Get the scalingSize property: The scaling size of the control plane. Scaling sizes offer guaranteed capacity and + * predictable Kubernetes performance beyond standard tier defaults. Higher H sizes provide increased performance + * guarantees. See https://aka.ms/aks/hyperscale for performance metrics details for each size. + * + * @return the scalingSize value. + */ + public ControlPlaneScalingSize scalingSize() { + return this.scalingSize; + } + + /** + * Set the scalingSize property: The scaling size of the control plane. Scaling sizes offer guaranteed capacity and + * predictable Kubernetes performance beyond standard tier defaults. Higher H sizes provide increased performance + * guarantees. See https://aka.ms/aks/hyperscale for performance metrics details for each size. + * + * @param scalingSize the scalingSize value to set. + * @return the ManagedClusterControlPlaneScalingProfile object itself. + */ + public ManagedClusterControlPlaneScalingProfile withScalingSize(ControlPlaneScalingSize scalingSize) { + this.scalingSize = scalingSize; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scalingSize() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property scalingSize in model ManagedClusterControlPlaneScalingProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterControlPlaneScalingProfile.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scalingSize", this.scalingSize == null ? null : this.scalingSize.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterControlPlaneScalingProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterControlPlaneScalingProfile if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ManagedClusterControlPlaneScalingProfile. + */ + public static ManagedClusterControlPlaneScalingProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterControlPlaneScalingProfile deserializedManagedClusterControlPlaneScalingProfile + = new ManagedClusterControlPlaneScalingProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("scalingSize".equals(fieldName)) { + deserializedManagedClusterControlPlaneScalingProfile.scalingSize + = ControlPlaneScalingSize.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterControlPlaneScalingProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHealthMonitorProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHealthMonitorProfile.java new file mode 100644 index 000000000000..a4981a55eba5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHealthMonitorProfile.java @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Health monitor profile for the managed cluster. + */ +@Fluent +public final class ManagedClusterHealthMonitorProfile implements JsonSerializable { + /* + * Whether to enable continuous control plane and addon monitor. + */ + private Boolean enableContinuousControlPlaneAndAddonMonitor; + + /* + * Whether to enable on-demand monitor. + */ + private Boolean enableOnDemandMonitor; + + /** + * Creates an instance of ManagedClusterHealthMonitorProfile class. + */ + public ManagedClusterHealthMonitorProfile() { + } + + /** + * Get the enableContinuousControlPlaneAndAddonMonitor property: Whether to enable continuous control plane and + * addon monitor. + * + * @return the enableContinuousControlPlaneAndAddonMonitor value. + */ + public Boolean enableContinuousControlPlaneAndAddonMonitor() { + return this.enableContinuousControlPlaneAndAddonMonitor; + } + + /** + * Set the enableContinuousControlPlaneAndAddonMonitor property: Whether to enable continuous control plane and + * addon monitor. + * + * @param enableContinuousControlPlaneAndAddonMonitor the enableContinuousControlPlaneAndAddonMonitor value to set. + * @return the ManagedClusterHealthMonitorProfile object itself. + */ + public ManagedClusterHealthMonitorProfile + withEnableContinuousControlPlaneAndAddonMonitor(Boolean enableContinuousControlPlaneAndAddonMonitor) { + this.enableContinuousControlPlaneAndAddonMonitor = enableContinuousControlPlaneAndAddonMonitor; + return this; + } + + /** + * Get the enableOnDemandMonitor property: Whether to enable on-demand monitor. + * + * @return the enableOnDemandMonitor value. + */ + public Boolean enableOnDemandMonitor() { + return this.enableOnDemandMonitor; + } + + /** + * Set the enableOnDemandMonitor property: Whether to enable on-demand monitor. + * + * @param enableOnDemandMonitor the enableOnDemandMonitor value to set. + * @return the ManagedClusterHealthMonitorProfile object itself. + */ + public ManagedClusterHealthMonitorProfile withEnableOnDemandMonitor(Boolean enableOnDemandMonitor) { + this.enableOnDemandMonitor = enableOnDemandMonitor; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableContinuousControlPlaneAndAddonMonitor", + this.enableContinuousControlPlaneAndAddonMonitor); + jsonWriter.writeBooleanField("enableOnDemandMonitor", this.enableOnDemandMonitor); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterHealthMonitorProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterHealthMonitorProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterHealthMonitorProfile. + */ + public static ManagedClusterHealthMonitorProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterHealthMonitorProfile deserializedManagedClusterHealthMonitorProfile + = new ManagedClusterHealthMonitorProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableContinuousControlPlaneAndAddonMonitor".equals(fieldName)) { + deserializedManagedClusterHealthMonitorProfile.enableContinuousControlPlaneAndAddonMonitor + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableOnDemandMonitor".equals(fieldName)) { + deserializedManagedClusterHealthMonitorProfile.enableOnDemandMonitor + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterHealthMonitorProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java index aca96ac49794..796ed2329e1e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java @@ -32,6 +32,12 @@ public final class ManagedClusterHttpProxyConfig implements JsonSerializable noProxy; + /* + * 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. + */ + private List effectiveNoProxy; + /* * Alternative CA cert to use for connecting to proxy servers. */ @@ -109,6 +115,16 @@ public ManagedClusterHttpProxyConfig withNoProxy(List noProxy) { return this; } + /** + * Get the effectiveNoProxy property: 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. + * + * @return the effectiveNoProxy value. + */ + public List effectiveNoProxy() { + return this.effectiveNoProxy; + } + /** * Get the trustedCa property: Alternative CA cert to use for connecting to proxy servers. * @@ -196,6 +212,9 @@ public static ManagedClusterHttpProxyConfig fromJson(JsonReader jsonReader) thro } else if ("noProxy".equals(fieldName)) { List noProxy = reader.readArray(reader1 -> reader1.getString()); deserializedManagedClusterHttpProxyConfig.noProxy = noProxy; + } else if ("effectiveNoProxy".equals(fieldName)) { + List effectiveNoProxy = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterHttpProxyConfig.effectiveNoProxy = effectiveNoProxy; } else if ("trustedCa".equals(fieldName)) { deserializedManagedClusterHttpProxyConfig.trustedCa = reader.getString(); } else if ("enabled".equals(fieldName)) { diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java new file mode 100644 index 000000000000..02ee4a68be4f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Default domain profile for the managed cluster ingress profile. + */ +@Fluent +public final class ManagedClusterIngressDefaultDomainProfile + implements JsonSerializable { + /* + * Whether to enable Default Domain. + */ + private Boolean enabled; + + /* + * The unique fully qualified domain name assigned to the cluster. This will not change even if disabled then + * reenabled. + */ + private String domainName; + + /** + * Creates an instance of ManagedClusterIngressDefaultDomainProfile class. + */ + public ManagedClusterIngressDefaultDomainProfile() { + } + + /** + * Get the enabled property: Whether to enable Default Domain. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Default Domain. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterIngressDefaultDomainProfile object itself. + */ + public ManagedClusterIngressDefaultDomainProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the domainName property: The unique fully qualified domain name assigned to the cluster. This will not change + * even if disabled then reenabled. + * + * @return the domainName value. + */ + public String domainName() { + return this.domainName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterIngressDefaultDomainProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterIngressDefaultDomainProfile if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterIngressDefaultDomainProfile. + */ + public static ManagedClusterIngressDefaultDomainProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterIngressDefaultDomainProfile deserializedManagedClusterIngressDefaultDomainProfile + = new ManagedClusterIngressDefaultDomainProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterIngressDefaultDomainProfile.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("domainName".equals(fieldName)) { + deserializedManagedClusterIngressDefaultDomainProfile.domainName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterIngressDefaultDomainProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java index 63edb179b945..383fdcb55412 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java @@ -27,6 +27,11 @@ public final class ManagedClusterIngressProfile implements JsonSerializable { + /* + * Whether to enable Application Load Balancer. + */ + private Boolean enabled; + + /* + * Managed identity of the Application Load Balancer add-on. This is the identity that should be granted permissions + * to manage the associated Application Gateway for Containers resource. + */ + private UserAssignedIdentity identity; + + /** + * Creates an instance of ManagedClusterIngressProfileApplicationLoadBalancer class. + */ + public ManagedClusterIngressProfileApplicationLoadBalancer() { + } + + /** + * Get the enabled property: Whether to enable Application Load Balancer. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Application Load Balancer. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterIngressProfileApplicationLoadBalancer object itself. + */ + public ManagedClusterIngressProfileApplicationLoadBalancer withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the identity property: Managed identity of the Application Load Balancer add-on. This is the identity that + * should be granted permissions to manage the associated Application Gateway for Containers resource. + * + * @return the identity value. + */ + public UserAssignedIdentity identity() { + return this.identity; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterIngressProfileApplicationLoadBalancer from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterIngressProfileApplicationLoadBalancer if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterIngressProfileApplicationLoadBalancer. + */ + public static ManagedClusterIngressProfileApplicationLoadBalancer fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterIngressProfileApplicationLoadBalancer deserializedManagedClusterIngressProfileApplicationLoadBalancer + = new ManagedClusterIngressProfileApplicationLoadBalancer(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterIngressProfileApplicationLoadBalancer.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("identity".equals(fieldName)) { + deserializedManagedClusterIngressProfileApplicationLoadBalancer.identity + = UserAssignedIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterIngressProfileApplicationLoadBalancer; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java index 5be044dc901a..1d85a2dfe24b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java @@ -50,6 +50,13 @@ public final class ManagedClusterIngressProfileWebAppRouting */ private UserAssignedIdentity identity; + /* + * Configuration for the Default Domain. This is a unique, autogenerated domain that comes with a signed TLS + * Certificate allowing for secure HTTPS. See [the Default Domain documentation](https://aka.ms/aks/defaultdomain) + * for more instructions. + */ + private ManagedClusterIngressDefaultDomainProfile defaultDomain; + /** * Creates an instance of ManagedClusterIngressProfileWebAppRouting class. */ @@ -159,6 +166,31 @@ public UserAssignedIdentity identity() { return this.identity; } + /** + * Get the defaultDomain property: Configuration for the Default Domain. This is a unique, autogenerated domain that + * comes with a signed TLS Certificate allowing for secure HTTPS. See [the Default Domain + * documentation](https://aka.ms/aks/defaultdomain) for more instructions. + * + * @return the defaultDomain value. + */ + public ManagedClusterIngressDefaultDomainProfile defaultDomain() { + return this.defaultDomain; + } + + /** + * Set the defaultDomain property: Configuration for the Default Domain. This is a unique, autogenerated domain that + * comes with a signed TLS Certificate allowing for secure HTTPS. See [the Default Domain + * documentation](https://aka.ms/aks/defaultdomain) for more instructions. + * + * @param defaultDomain the defaultDomain value to set. + * @return the ManagedClusterIngressProfileWebAppRouting object itself. + */ + public ManagedClusterIngressProfileWebAppRouting + withDefaultDomain(ManagedClusterIngressDefaultDomainProfile defaultDomain) { + this.defaultDomain = defaultDomain; + return this; + } + /** * Validates the instance. * @@ -174,6 +206,9 @@ public void validate() { if (identity() != null) { identity().validate(); } + if (defaultDomain() != null) { + defaultDomain().validate(); + } } /** @@ -187,6 +222,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("dnsZoneResourceIds", this.dnsZoneResourceIds, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("nginx", this.nginx); + jsonWriter.writeJsonField("defaultDomain", this.defaultDomain); return jsonWriter.writeEndObject(); } @@ -221,6 +257,9 @@ public static ManagedClusterIngressProfileWebAppRouting fromJson(JsonReader json } else if ("identity".equals(fieldName)) { deserializedManagedClusterIngressProfileWebAppRouting.identity = UserAssignedIdentity.fromJson(reader); + } else if ("defaultDomain".equals(fieldName)) { + deserializedManagedClusterIngressProfileWebAppRouting.defaultDomain + = ManagedClusterIngressDefaultDomainProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java index 917a6232954e..744e402a98dc 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java @@ -59,6 +59,11 @@ public final class ManagedClusterLoadBalancerProfile implements JsonSerializable */ private BackendPoolType backendPoolType; + /* + * The health probing behavior for External Traffic Policy Cluster services. + */ + private ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode; + /** * Creates an instance of ManagedClusterLoadBalancerProfile class. */ @@ -223,6 +228,29 @@ public ManagedClusterLoadBalancerProfile withBackendPoolType(BackendPoolType bac return this; } + /** + * Get the clusterServiceLoadBalancerHealthProbeMode property: The health probing behavior for External Traffic + * Policy Cluster services. + * + * @return the clusterServiceLoadBalancerHealthProbeMode value. + */ + public ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode() { + return this.clusterServiceLoadBalancerHealthProbeMode; + } + + /** + * Set the clusterServiceLoadBalancerHealthProbeMode property: The health probing behavior for External Traffic + * Policy Cluster services. + * + * @param clusterServiceLoadBalancerHealthProbeMode the clusterServiceLoadBalancerHealthProbeMode value to set. + * @return the ManagedClusterLoadBalancerProfile object itself. + */ + public ManagedClusterLoadBalancerProfile withClusterServiceLoadBalancerHealthProbeMode( + ClusterServiceLoadBalancerHealthProbeMode clusterServiceLoadBalancerHealthProbeMode) { + this.clusterServiceLoadBalancerHealthProbeMode = clusterServiceLoadBalancerHealthProbeMode; + return this; + } + /** * Validates the instance. * @@ -257,6 +285,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("enableMultipleStandardLoadBalancers", this.enableMultipleStandardLoadBalancers); jsonWriter.writeStringField("backendPoolType", this.backendPoolType == null ? null : this.backendPoolType.toString()); + jsonWriter.writeStringField("clusterServiceLoadBalancerHealthProbeMode", + this.clusterServiceLoadBalancerHealthProbeMode == null + ? null + : this.clusterServiceLoadBalancerHealthProbeMode.toString()); return jsonWriter.writeEndObject(); } @@ -301,6 +333,9 @@ public static ManagedClusterLoadBalancerProfile fromJson(JsonReader jsonReader) } else if ("backendPoolType".equals(fieldName)) { deserializedManagedClusterLoadBalancerProfile.backendPoolType = BackendPoolType.fromString(reader.getString()); + } else if ("clusterServiceLoadBalancerHealthProbeMode".equals(fieldName)) { + deserializedManagedClusterLoadBalancerProfile.clusterServiceLoadBalancerHealthProbeMode + = ClusterServiceLoadBalancerHealthProbeMode.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java index ba2e7787bac1..36668b2d3f85 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java @@ -23,6 +23,12 @@ public final class ManagedClusterManagedOutboundIpProfile */ private Integer count; + /* + * The desired number of IPv6 outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 + * (inclusive). + */ + private Integer countIPv6; + /** * Creates an instance of ManagedClusterManagedOutboundIpProfile class. */ @@ -51,6 +57,28 @@ public ManagedClusterManagedOutboundIpProfile withCount(Integer count) { return this; } + /** + * Get the countIPv6 property: The desired number of IPv6 outbound IPs created/managed by Azure. Allowed values must + * be in the range of 1 to 16 (inclusive). + * + * @return the countIPv6 value. + */ + public Integer countIPv6() { + return this.countIPv6; + } + + /** + * Set the countIPv6 property: The desired number of IPv6 outbound IPs created/managed by Azure. Allowed values must + * be in the range of 1 to 16 (inclusive). + * + * @param countIPv6 the countIPv6 value to set. + * @return the ManagedClusterManagedOutboundIpProfile object itself. + */ + public ManagedClusterManagedOutboundIpProfile withCountIPv6(Integer countIPv6) { + this.countIPv6 = countIPv6; + return this; + } + /** * Validates the instance. * @@ -66,6 +94,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeNumberField("countIPv6", this.countIPv6); return jsonWriter.writeEndObject(); } @@ -87,6 +116,9 @@ public static ManagedClusterManagedOutboundIpProfile fromJson(JsonReader jsonRea if ("count".equals(fieldName)) { deserializedManagedClusterManagedOutboundIpProfile.count = reader.getNullable(JsonReader::getInt); + } else if ("countIPv6".equals(fieldName)) { + deserializedManagedClusterManagedOutboundIpProfile.countIPv6 + = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIPs.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIPs.java new file mode 100644 index 000000000000..389a6e206aeb --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIPs.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The ManagedClusterNATGatewayProfileOutboundIPs model. + */ +@Fluent +public final class ManagedClusterNATGatewayProfileOutboundIPs + implements JsonSerializable { + /* + * A list of public IP resources. + */ + private List publicIPs; + + /** + * Creates an instance of ManagedClusterNATGatewayProfileOutboundIPs class. + */ + public ManagedClusterNATGatewayProfileOutboundIPs() { + } + + /** + * Get the publicIPs property: A list of public IP resources. + * + * @return the publicIPs value. + */ + public List publicIPs() { + return this.publicIPs; + } + + /** + * Set the publicIPs property: A list of public IP resources. + * + * @param publicIPs the publicIPs value to set. + * @return the ManagedClusterNATGatewayProfileOutboundIPs object itself. + */ + public ManagedClusterNATGatewayProfileOutboundIPs withPublicIPs(List publicIPs) { + this.publicIPs = publicIPs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("publicIPs", this.publicIPs, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterNATGatewayProfileOutboundIPs from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterNATGatewayProfileOutboundIPs if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterNATGatewayProfileOutboundIPs. + */ + public static ManagedClusterNATGatewayProfileOutboundIPs fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterNATGatewayProfileOutboundIPs deserializedManagedClusterNATGatewayProfileOutboundIPs + = new ManagedClusterNATGatewayProfileOutboundIPs(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicIPs".equals(fieldName)) { + List publicIPs = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterNATGatewayProfileOutboundIPs.publicIPs = publicIPs; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterNATGatewayProfileOutboundIPs; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIpPrefixes.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIpPrefixes.java new file mode 100644 index 000000000000..81a83754b929 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIpPrefixes.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The ManagedClusterNATGatewayProfileOutboundIpPrefixes model. + */ +@Fluent +public final class ManagedClusterNATGatewayProfileOutboundIpPrefixes + implements JsonSerializable { + /* + * A list of public IP prefix resources. + */ + private List publicIPPrefixes; + + /** + * Creates an instance of ManagedClusterNATGatewayProfileOutboundIpPrefixes class. + */ + public ManagedClusterNATGatewayProfileOutboundIpPrefixes() { + } + + /** + * Get the publicIPPrefixes property: A list of public IP prefix resources. + * + * @return the publicIPPrefixes value. + */ + public List publicIPPrefixes() { + return this.publicIPPrefixes; + } + + /** + * Set the publicIPPrefixes property: A list of public IP prefix resources. + * + * @param publicIPPrefixes the publicIPPrefixes value to set. + * @return the ManagedClusterNATGatewayProfileOutboundIpPrefixes object itself. + */ + public ManagedClusterNATGatewayProfileOutboundIpPrefixes withPublicIPPrefixes(List publicIPPrefixes) { + this.publicIPPrefixes = publicIPPrefixes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("publicIPPrefixes", this.publicIPPrefixes, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterNATGatewayProfileOutboundIpPrefixes from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterNATGatewayProfileOutboundIpPrefixes if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterNATGatewayProfileOutboundIpPrefixes. + */ + public static ManagedClusterNATGatewayProfileOutboundIpPrefixes fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterNATGatewayProfileOutboundIpPrefixes deserializedManagedClusterNATGatewayProfileOutboundIpPrefixes + = new ManagedClusterNATGatewayProfileOutboundIpPrefixes(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("publicIPPrefixes".equals(fieldName)) { + List publicIPPrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedManagedClusterNATGatewayProfileOutboundIpPrefixes.publicIPPrefixes = publicIPPrefixes; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterNATGatewayProfileOutboundIpPrefixes; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java index 1ce385103742..f8ff0a7cb2ea 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java @@ -27,6 +27,16 @@ public final class ManagedClusterNatGatewayProfile implements JsonSerializable effectiveOutboundIPs; + /* + * Desired outbound IP Prefix resources for the managed NAT Gateway. Only compatible with NAT Gateway V2. + */ + private ManagedClusterNATGatewayProfileOutboundIpPrefixes outboundIpPrefixes; + + /* + * Desired outbound IP resources for the managed NAT Gateway. + */ + private ManagedClusterNATGatewayProfileOutboundIPs outboundIps; + /* * Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The * default value is 4 minutes. @@ -71,6 +81,49 @@ public List effectiveOutboundIPs() { return this.effectiveOutboundIPs; } + /** + * Get the outboundIpPrefixes property: Desired outbound IP Prefix resources for the managed NAT Gateway. Only + * compatible with NAT Gateway V2. + * + * @return the outboundIpPrefixes value. + */ + public ManagedClusterNATGatewayProfileOutboundIpPrefixes outboundIpPrefixes() { + return this.outboundIpPrefixes; + } + + /** + * Set the outboundIpPrefixes property: Desired outbound IP Prefix resources for the managed NAT Gateway. Only + * compatible with NAT Gateway V2. + * + * @param outboundIpPrefixes the outboundIpPrefixes value to set. + * @return the ManagedClusterNatGatewayProfile object itself. + */ + public ManagedClusterNatGatewayProfile + withOutboundIpPrefixes(ManagedClusterNATGatewayProfileOutboundIpPrefixes outboundIpPrefixes) { + this.outboundIpPrefixes = outboundIpPrefixes; + return this; + } + + /** + * Get the outboundIps property: Desired outbound IP resources for the managed NAT Gateway. + * + * @return the outboundIps value. + */ + public ManagedClusterNATGatewayProfileOutboundIPs outboundIps() { + return this.outboundIps; + } + + /** + * Set the outboundIps property: Desired outbound IP resources for the managed NAT Gateway. + * + * @param outboundIps the outboundIps value to set. + * @return the ManagedClusterNatGatewayProfile object itself. + */ + public ManagedClusterNatGatewayProfile withOutboundIps(ManagedClusterNATGatewayProfileOutboundIPs outboundIps) { + this.outboundIps = outboundIps; + return this; + } + /** * Get the idleTimeoutInMinutes property: Desired outbound flow idle timeout in minutes. Allowed values are in the * range of 4 to 120 (inclusive). The default value is 4 minutes. @@ -105,6 +158,12 @@ public void validate() { if (effectiveOutboundIPs() != null) { effectiveOutboundIPs().forEach(e -> e.validate()); } + if (outboundIpPrefixes() != null) { + outboundIpPrefixes().validate(); + } + if (outboundIps() != null) { + outboundIps().validate(); + } } /** @@ -114,6 +173,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("managedOutboundIPProfile", this.managedOutboundIpProfile); + jsonWriter.writeJsonField("outboundIPPrefixes", this.outboundIpPrefixes); + jsonWriter.writeJsonField("outboundIPs", this.outboundIps); jsonWriter.writeNumberField("idleTimeoutInMinutes", this.idleTimeoutInMinutes); return jsonWriter.writeEndObject(); } @@ -141,6 +202,12 @@ public static ManagedClusterNatGatewayProfile fromJson(JsonReader jsonReader) th List effectiveOutboundIPs = reader.readArray(reader1 -> ResourceReference.fromJson(reader1)); deserializedManagedClusterNatGatewayProfile.effectiveOutboundIPs = effectiveOutboundIPs; + } else if ("outboundIPPrefixes".equals(fieldName)) { + deserializedManagedClusterNatGatewayProfile.outboundIpPrefixes + = ManagedClusterNATGatewayProfileOutboundIpPrefixes.fromJson(reader); + } else if ("outboundIPs".equals(fieldName)) { + deserializedManagedClusterNatGatewayProfile.outboundIps + = ManagedClusterNATGatewayProfileOutboundIPs.fromJson(reader); } else if ("idleTimeoutInMinutes".equals(fieldName)) { deserializedManagedClusterNatGatewayProfile.idleTimeoutInMinutes = reader.getNullable(JsonReader::getInt); diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java index 2fe55571ce53..1032f8cea239 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java @@ -38,6 +38,11 @@ public final class ManagedClusterPoolUpgradeProfile implements JsonSerializable< */ private List upgrades; + /* + * List of components grouped by kubernetes major.minor version. + */ + private List componentsByReleases; + /** * Creates an instance of ManagedClusterPoolUpgradeProfile class. */ @@ -80,6 +85,15 @@ public List upgrades() { return this.upgrades; } + /** + * Get the componentsByReleases property: List of components grouped by kubernetes major.minor version. + * + * @return the componentsByReleases value. + */ + public List componentsByReleases() { + return this.componentsByReleases; + } + /** * Validates the instance. * @@ -99,6 +113,9 @@ public void validate() { if (upgrades() != null) { upgrades().forEach(e -> e.validate()); } + if (componentsByReleases() != null) { + componentsByReleases().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(ManagedClusterPoolUpgradeProfile.class); @@ -113,6 +130,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeStringField("name", this.name); jsonWriter.writeArrayField("upgrades", this.upgrades, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("componentsByReleases", this.componentsByReleases, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -143,6 +162,10 @@ public static ManagedClusterPoolUpgradeProfile fromJson(JsonReader jsonReader) t List upgrades = reader.readArray(reader1 -> ManagedClusterPoolUpgradeProfileUpgradesItem.fromJson(reader1)); deserializedManagedClusterPoolUpgradeProfile.upgrades = upgrades; + } else if ("componentsByReleases".equals(fieldName)) { + List componentsByReleases + = reader.readArray(reader1 -> ComponentsByRelease.fromJson(reader1)); + deserializedManagedClusterPoolUpgradeProfile.componentsByReleases = componentsByReleases; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java index 8717467dc2aa..07ce6b21b26c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java @@ -27,6 +27,11 @@ public final class ManagedClusterPoolUpgradeProfileUpgradesItem */ private Boolean isPreview; + /* + * Whether the Kubernetes version is out of support. + */ + private Boolean isOutOfSupport; + /** * Creates an instance of ManagedClusterPoolUpgradeProfileUpgradesItem class. */ @@ -51,6 +56,15 @@ public Boolean isPreview() { return this.isPreview; } + /** + * Get the isOutOfSupport property: Whether the Kubernetes version is out of support. + * + * @return the isOutOfSupport value. + */ + public Boolean isOutOfSupport() { + return this.isOutOfSupport; + } + /** * Validates the instance. * @@ -67,6 +81,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("kubernetesVersion", this.kubernetesVersion); jsonWriter.writeBooleanField("isPreview", this.isPreview); + jsonWriter.writeBooleanField("isOutOfSupport", this.isOutOfSupport); return jsonWriter.writeEndObject(); } @@ -91,6 +106,9 @@ public static ManagedClusterPoolUpgradeProfileUpgradesItem fromJson(JsonReader j } else if ("isPreview".equals(fieldName)) { deserializedManagedClusterPoolUpgradeProfileUpgradesItem.isPreview = reader.getNullable(JsonReader::getBoolean); + } else if ("isOutOfSupport".equals(fieldName)) { + deserializedManagedClusterPoolUpgradeProfileUpgradesItem.isOutOfSupport + = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java new file mode 100644 index 000000000000..8bb2f269c587 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * managed cluster properties for snapshot, these properties are read only. + */ +@Immutable +public final class ManagedClusterPropertiesForSnapshot + implements JsonSerializable { + /* + * The current kubernetes version. + */ + private String kubernetesVersion; + + /* + * The current managed cluster sku. + */ + private ManagedClusterSku sku; + + /* + * Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + */ + private Boolean enableRbac; + + /* + * The current network profile. + */ + private NetworkProfileForSnapshot networkProfile; + + /** + * Creates an instance of ManagedClusterPropertiesForSnapshot class. + */ + private ManagedClusterPropertiesForSnapshot() { + } + + /** + * Get the kubernetesVersion property: The current kubernetes version. + * + * @return the kubernetesVersion value. + */ + public String kubernetesVersion() { + return this.kubernetesVersion; + } + + /** + * Get the sku property: The current managed cluster sku. + * + * @return the sku value. + */ + public ManagedClusterSku sku() { + return this.sku; + } + + /** + * Get the enableRbac property: Whether the cluster has enabled Kubernetes Role-Based Access Control or not. + * + * @return the enableRbac value. + */ + public Boolean enableRbac() { + return this.enableRbac; + } + + /** + * Get the networkProfile property: The current network profile. + * + * @return the networkProfile value. + */ + public NetworkProfileForSnapshot networkProfile() { + return this.networkProfile; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterPropertiesForSnapshot from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterPropertiesForSnapshot if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterPropertiesForSnapshot. + */ + public static ManagedClusterPropertiesForSnapshot fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterPropertiesForSnapshot deserializedManagedClusterPropertiesForSnapshot + = new ManagedClusterPropertiesForSnapshot(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kubernetesVersion".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.kubernetesVersion = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.sku = ManagedClusterSku.fromJson(reader); + } else if ("enableRbac".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.enableRbac + = reader.getNullable(JsonReader::getBoolean); + } else if ("networkProfile".equals(fieldName)) { + deserializedManagedClusterPropertiesForSnapshot.networkProfile + = NetworkProfileForSnapshot.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterPropertiesForSnapshot; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java index 87f640c2a584..3be600dea027 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java @@ -28,6 +28,12 @@ public final class ManagedClusterSecurityProfile implements JsonSerializable customCATrustCertificates; + /* + * Defines service account based image pull settings. + */ + private ServiceAccountImagePullProfile serviceAccountImagePullProfile; + /** * Creates an instance of ManagedClusterSecurityProfile class. */ @@ -94,6 +119,29 @@ public ManagedClusterSecurityProfile withAzureKeyVaultKms(AzureKeyVaultKms azure return this; } + /** + * Get the kubernetesResourceObjectEncryptionProfile property: Encryption at rest of Kubernetes resource objects. + * More information on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. + * + * @return the kubernetesResourceObjectEncryptionProfile value. + */ + public KubernetesResourceObjectEncryptionProfile kubernetesResourceObjectEncryptionProfile() { + return this.kubernetesResourceObjectEncryptionProfile; + } + + /** + * Set the kubernetesResourceObjectEncryptionProfile property: Encryption at rest of Kubernetes resource objects. + * More information on this can be found under https://aka.ms/aks/kubernetesResourceObjectEncryption. + * + * @param kubernetesResourceObjectEncryptionProfile the kubernetesResourceObjectEncryptionProfile value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile withKubernetesResourceObjectEncryptionProfile( + KubernetesResourceObjectEncryptionProfile kubernetesResourceObjectEncryptionProfile) { + this.kubernetesResourceObjectEncryptionProfile = kubernetesResourceObjectEncryptionProfile; + return this; + } + /** * Get the workloadIdentity property: 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 @@ -139,6 +187,56 @@ public ManagedClusterSecurityProfile withImageCleaner(ManagedClusterSecurityProf return this; } + /** + * Get the imageIntegrity property: 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. + * + * @return the imageIntegrity value. + */ + public ManagedClusterSecurityProfileImageIntegrity imageIntegrity() { + return this.imageIntegrity; + } + + /** + * Set the imageIntegrity property: 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. + * + * @param imageIntegrity the imageIntegrity value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile + withImageIntegrity(ManagedClusterSecurityProfileImageIntegrity imageIntegrity) { + this.imageIntegrity = imageIntegrity; + return this; + } + + /** + * Get the nodeRestriction property: [Node + * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) + * settings for the security profile. + * + * @return the nodeRestriction value. + */ + public ManagedClusterSecurityProfileNodeRestriction nodeRestriction() { + return this.nodeRestriction; + } + + /** + * Set the nodeRestriction property: [Node + * Restriction](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#noderestriction) + * settings for the security profile. + * + * @param nodeRestriction the nodeRestriction value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile + withNodeRestriction(ManagedClusterSecurityProfileNodeRestriction nodeRestriction) { + this.nodeRestriction = nodeRestriction; + return this; + } + /** * Get the customCATrustCertificates property: A list of up to 10 base64 encoded CAs that will be added to the trust * store on all nodes in the cluster. For more information see [Custom CA Trust @@ -163,6 +261,27 @@ public ManagedClusterSecurityProfile withCustomCATrustCertificates(List return this; } + /** + * Get the serviceAccountImagePullProfile property: Defines service account based image pull settings. + * + * @return the serviceAccountImagePullProfile value. + */ + public ServiceAccountImagePullProfile serviceAccountImagePullProfile() { + return this.serviceAccountImagePullProfile; + } + + /** + * Set the serviceAccountImagePullProfile property: Defines service account based image pull settings. + * + * @param serviceAccountImagePullProfile the serviceAccountImagePullProfile value to set. + * @return the ManagedClusterSecurityProfile object itself. + */ + public ManagedClusterSecurityProfile + withServiceAccountImagePullProfile(ServiceAccountImagePullProfile serviceAccountImagePullProfile) { + this.serviceAccountImagePullProfile = serviceAccountImagePullProfile; + return this; + } + /** * Validates the instance. * @@ -175,12 +294,24 @@ public void validate() { if (azureKeyVaultKms() != null) { azureKeyVaultKms().validate(); } + if (kubernetesResourceObjectEncryptionProfile() != null) { + kubernetesResourceObjectEncryptionProfile().validate(); + } if (workloadIdentity() != null) { workloadIdentity().validate(); } if (imageCleaner() != null) { imageCleaner().validate(); } + if (imageIntegrity() != null) { + imageIntegrity().validate(); + } + if (nodeRestriction() != null) { + nodeRestriction().validate(); + } + if (serviceAccountImagePullProfile() != null) { + serviceAccountImagePullProfile().validate(); + } } /** @@ -191,10 +322,15 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("defender", this.defender); jsonWriter.writeJsonField("azureKeyVaultKms", this.azureKeyVaultKms); + jsonWriter.writeJsonField("kubernetesResourceObjectEncryptionProfile", + this.kubernetesResourceObjectEncryptionProfile); jsonWriter.writeJsonField("workloadIdentity", this.workloadIdentity); jsonWriter.writeJsonField("imageCleaner", this.imageCleaner); + jsonWriter.writeJsonField("imageIntegrity", this.imageIntegrity); + jsonWriter.writeJsonField("nodeRestriction", this.nodeRestriction); jsonWriter.writeArrayField("customCATrustCertificates", this.customCATrustCertificates, (writer, element) -> writer.writeBinary(element)); + jsonWriter.writeJsonField("serviceAccountImagePullProfile", this.serviceAccountImagePullProfile); return jsonWriter.writeEndObject(); } @@ -219,15 +355,27 @@ public static ManagedClusterSecurityProfile fromJson(JsonReader jsonReader) thro = ManagedClusterSecurityProfileDefender.fromJson(reader); } else if ("azureKeyVaultKms".equals(fieldName)) { deserializedManagedClusterSecurityProfile.azureKeyVaultKms = AzureKeyVaultKms.fromJson(reader); + } else if ("kubernetesResourceObjectEncryptionProfile".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.kubernetesResourceObjectEncryptionProfile + = KubernetesResourceObjectEncryptionProfile.fromJson(reader); } else if ("workloadIdentity".equals(fieldName)) { deserializedManagedClusterSecurityProfile.workloadIdentity = ManagedClusterSecurityProfileWorkloadIdentity.fromJson(reader); } else if ("imageCleaner".equals(fieldName)) { deserializedManagedClusterSecurityProfile.imageCleaner = ManagedClusterSecurityProfileImageCleaner.fromJson(reader); + } else if ("imageIntegrity".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.imageIntegrity + = ManagedClusterSecurityProfileImageIntegrity.fromJson(reader); + } else if ("nodeRestriction".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.nodeRestriction + = ManagedClusterSecurityProfileNodeRestriction.fromJson(reader); } else if ("customCATrustCertificates".equals(fieldName)) { List customCATrustCertificates = reader.readArray(reader1 -> reader1.getBinary()); deserializedManagedClusterSecurityProfile.customCATrustCertificates = customCATrustCertificates; + } else if ("serviceAccountImagePullProfile".equals(fieldName)) { + deserializedManagedClusterSecurityProfile.serviceAccountImagePullProfile + = ServiceAccountImagePullProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java index 3f831383f5de..9966d9dfbccf 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java @@ -29,6 +29,13 @@ public final class ManagedClusterSecurityProfileDefender */ private ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitoring; + /* + * Microsoft Defender settings for security gating, validates container images eligibility for deployment based on + * Defender for Containers security findings. Using Admission Controller, it either audits or prevents the + * deployment of images that do not meet security standards. + */ + private ManagedClusterSecurityProfileDefenderSecurityGating securityGating; + /** * Creates an instance of ManagedClusterSecurityProfileDefender class. */ @@ -83,6 +90,31 @@ public ManagedClusterSecurityProfileDefenderSecurityMonitoring securityMonitorin return this; } + /** + * Get the securityGating property: Microsoft Defender settings for security gating, validates container images + * eligibility for deployment based on Defender for Containers security findings. Using Admission Controller, it + * either audits or prevents the deployment of images that do not meet security standards. + * + * @return the securityGating value. + */ + public ManagedClusterSecurityProfileDefenderSecurityGating securityGating() { + return this.securityGating; + } + + /** + * Set the securityGating property: Microsoft Defender settings for security gating, validates container images + * eligibility for deployment based on Defender for Containers security findings. Using Admission Controller, it + * either audits or prevents the deployment of images that do not meet security standards. + * + * @param securityGating the securityGating value to set. + * @return the ManagedClusterSecurityProfileDefender object itself. + */ + public ManagedClusterSecurityProfileDefender + withSecurityGating(ManagedClusterSecurityProfileDefenderSecurityGating securityGating) { + this.securityGating = securityGating; + return this; + } + /** * Validates the instance. * @@ -92,6 +124,9 @@ public void validate() { if (securityMonitoring() != null) { securityMonitoring().validate(); } + if (securityGating() != null) { + securityGating().validate(); + } } /** @@ -102,6 +137,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("logAnalyticsWorkspaceResourceId", this.logAnalyticsWorkspaceResourceId); jsonWriter.writeJsonField("securityMonitoring", this.securityMonitoring); + jsonWriter.writeJsonField("securityGating", this.securityGating); return jsonWriter.writeEndObject(); } @@ -127,6 +163,9 @@ public static ManagedClusterSecurityProfileDefender fromJson(JsonReader jsonRead } else if ("securityMonitoring".equals(fieldName)) { deserializedManagedClusterSecurityProfileDefender.securityMonitoring = ManagedClusterSecurityProfileDefenderSecurityMonitoring.fromJson(reader); + } else if ("securityGating".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefender.securityGating + = ManagedClusterSecurityProfileDefenderSecurityGating.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java new file mode 100644 index 000000000000..7322fc13f682 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Microsoft Defender settings for security gating, validates container images eligibility for deployment based on + * Defender for Containers security findings. Using Admission Controller, it either audits or prevents the deployment of + * images that do not meet security standards. + */ +@Fluent +public final class ManagedClusterSecurityProfileDefenderSecurityGating + implements JsonSerializable { + /* + * Whether to enable Defender security gating. When enabled, the gating feature will scan container images and audit + * or block the deployment of images that do not meet security standards according to the configured security rules. + */ + private Boolean enabled; + + /* + * List of identities that the admission controller will make use of in order to pull security artifacts from the + * registry. These are the same identities used by the cluster to pull container images. Each identity provided + * should have federated identity credential attached to it. + */ + private List identities; + + /* + * In use only while registry access granted by secret rather than managed identity. Set whether to grant the + * Defender gating agent access to the cluster's secrets for pulling images from registries. If secret access is + * denied and the registry requires pull secrets, the add-on will not perform any image validation. Default value is + * false. + */ + private Boolean allowSecretAccess; + + /** + * Creates an instance of ManagedClusterSecurityProfileDefenderSecurityGating class. + */ + public ManagedClusterSecurityProfileDefenderSecurityGating() { + } + + /** + * Get the enabled property: Whether to enable Defender security gating. When enabled, the gating feature will scan + * container images and audit or block the deployment of images that do not meet security standards according to the + * configured security rules. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Defender security gating. When enabled, the gating feature will scan + * container images and audit or block the deployment of images that do not meet security standards according to the + * configured security rules. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityGating object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityGating withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the identities property: List of identities that the admission controller will make use of in order to pull + * security artifacts from the registry. These are the same identities used by the cluster to pull container images. + * Each identity provided should have federated identity credential attached to it. + * + * @return the identities value. + */ + public List identities() { + return this.identities; + } + + /** + * Set the identities property: List of identities that the admission controller will make use of in order to pull + * security artifacts from the registry. These are the same identities used by the cluster to pull container images. + * Each identity provided should have federated identity credential attached to it. + * + * @param identities the identities value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityGating object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityGating + withIdentities(List identities) { + this.identities = identities; + return this; + } + + /** + * Get the allowSecretAccess property: In use only while registry access granted by secret rather than managed + * identity. Set whether to grant the Defender gating agent access to the cluster's secrets for pulling images from + * registries. If secret access is denied and the registry requires pull secrets, the add-on will not perform any + * image validation. Default value is false. + * + * @return the allowSecretAccess value. + */ + public Boolean allowSecretAccess() { + return this.allowSecretAccess; + } + + /** + * Set the allowSecretAccess property: In use only while registry access granted by secret rather than managed + * identity. Set whether to grant the Defender gating agent access to the cluster's secrets for pulling images from + * registries. If secret access is denied and the registry requires pull secrets, the add-on will not perform any + * image validation. Default value is false. + * + * @param allowSecretAccess the allowSecretAccess value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityGating object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityGating withAllowSecretAccess(Boolean allowSecretAccess) { + this.allowSecretAccess = allowSecretAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identities() != null) { + identities().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeArrayField("identities", this.identities, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("allowSecretAccess", this.allowSecretAccess); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileDefenderSecurityGating from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileDefenderSecurityGating if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSecurityProfileDefenderSecurityGating. + */ + public static ManagedClusterSecurityProfileDefenderSecurityGating fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileDefenderSecurityGating deserializedManagedClusterSecurityProfileDefenderSecurityGating + = new ManagedClusterSecurityProfileDefenderSecurityGating(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefenderSecurityGating.enabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("identities".equals(fieldName)) { + List identities + = reader.readArray(reader1 -> ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem + .fromJson(reader1)); + deserializedManagedClusterSecurityProfileDefenderSecurityGating.identities = identities; + } else if ("allowSecretAccess".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefenderSecurityGating.allowSecretAccess + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileDefenderSecurityGating; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java new file mode 100644 index 000000000000..40c05e197ee8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Identity information used by Defender security gating to access container registries. + */ +@Fluent +public final class ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem + implements JsonSerializable { + /* + * The container registry for which the identity will be used; the identity specified here should have a federated + * identity credential attached to it. + */ + private String azureContainerRegistry; + + /* + * The identity object used to access the registry + */ + private UserAssignedIdentity identity; + + /** + * Creates an instance of ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem class. + */ + public ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem() { + } + + /** + * Get the azureContainerRegistry property: The container registry for which the identity will be used; the identity + * specified here should have a federated identity credential attached to it. + * + * @return the azureContainerRegistry value. + */ + public String azureContainerRegistry() { + return this.azureContainerRegistry; + } + + /** + * Set the azureContainerRegistry property: The container registry for which the identity will be used; the identity + * specified here should have a federated identity credential attached to it. + * + * @param azureContainerRegistry the azureContainerRegistry value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem + withAzureContainerRegistry(String azureContainerRegistry) { + this.azureContainerRegistry = azureContainerRegistry; + return this; + } + + /** + * Get the identity property: The identity object used to access the registry. + * + * @return the identity value. + */ + public UserAssignedIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity object used to access the registry. + * + * @param identity the identity value to set. + * @return the ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem object itself. + */ + public ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem + withIdentity(UserAssignedIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("azureContainerRegistry", this.azureContainerRegistry); + jsonWriter.writeJsonField("identity", this.identity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem if the JsonReader was + * pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem. + */ + public static ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem + = new ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("azureContainerRegistry".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.azureContainerRegistry + = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.identity + = UserAssignedIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java new file mode 100644 index 000000000000..a8564658218f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Image integrity related settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileImageIntegrity + implements JsonSerializable { + /* + * Whether to enable image integrity. The default value is false. + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterSecurityProfileImageIntegrity class. + */ + public ManagedClusterSecurityProfileImageIntegrity() { + } + + /** + * Get the enabled property: Whether to enable image integrity. The default value is false. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable image integrity. The default value is false. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileImageIntegrity object itself. + */ + public ManagedClusterSecurityProfileImageIntegrity withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileImageIntegrity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileImageIntegrity if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSecurityProfileImageIntegrity. + */ + public static ManagedClusterSecurityProfileImageIntegrity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileImageIntegrity deserializedManagedClusterSecurityProfileImageIntegrity + = new ManagedClusterSecurityProfileImageIntegrity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterSecurityProfileImageIntegrity.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileImageIntegrity; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java new file mode 100644 index 000000000000..760149a2ed83 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Node Restriction settings for the security profile. + */ +@Fluent +public final class ManagedClusterSecurityProfileNodeRestriction + implements JsonSerializable { + /* + * Whether to enable Node Restriction + */ + private Boolean enabled; + + /** + * Creates an instance of ManagedClusterSecurityProfileNodeRestriction class. + */ + public ManagedClusterSecurityProfileNodeRestriction() { + } + + /** + * Get the enabled property: Whether to enable Node Restriction. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether to enable Node Restriction. + * + * @param enabled the enabled value to set. + * @return the ManagedClusterSecurityProfileNodeRestriction object itself. + */ + public ManagedClusterSecurityProfileNodeRestriction withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedClusterSecurityProfileNodeRestriction from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedClusterSecurityProfileNodeRestriction if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedClusterSecurityProfileNodeRestriction. + */ + public static ManagedClusterSecurityProfileNodeRestriction fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedClusterSecurityProfileNodeRestriction deserializedManagedClusterSecurityProfileNodeRestriction + = new ManagedClusterSecurityProfileNodeRestriction(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedManagedClusterSecurityProfileNodeRestriction.enabled + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedClusterSecurityProfileNodeRestriction; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java index ac0063cf88ed..d60b78f3b8de 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java @@ -22,6 +22,11 @@ public final class ManagedClusterStorageProfileDiskCsiDriver */ private Boolean enabled; + /* + * The version of AzureDisk CSI Driver. The default value is v1. + */ + private String version; + /** * Creates an instance of ManagedClusterStorageProfileDiskCsiDriver class. */ @@ -48,6 +53,26 @@ public ManagedClusterStorageProfileDiskCsiDriver withEnabled(Boolean enabled) { return this; } + /** + * Get the version property: The version of AzureDisk CSI Driver. The default value is v1. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The version of AzureDisk CSI Driver. The default value is v1. + * + * @param version the version value to set. + * @return the ManagedClusterStorageProfileDiskCsiDriver object itself. + */ + public ManagedClusterStorageProfileDiskCsiDriver withVersion(String version) { + this.version = version; + return this; + } + /** * Validates the instance. * @@ -63,6 +88,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("version", this.version); return jsonWriter.writeEndObject(); } @@ -85,6 +111,8 @@ public static ManagedClusterStorageProfileDiskCsiDriver fromJson(JsonReader json if ("enabled".equals(fieldName)) { deserializedManagedClusterStorageProfileDiskCsiDriver.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("version".equals(fieldName)) { + deserializedManagedClusterStorageProfileDiskCsiDriver.version = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java index 437787a18357..0598abfa790f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java @@ -22,6 +22,11 @@ public final class ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler */ private boolean enabled; + /* + * Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + */ + private AddonAutoscaling addonAutoscaling; + /** * Creates an instance of ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler class. */ @@ -48,6 +53,27 @@ public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler withEnabled( return this; } + /** + * Get the addonAutoscaling property: Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + * + * @return the addonAutoscaling value. + */ + public AddonAutoscaling addonAutoscaling() { + return this.addonAutoscaling; + } + + /** + * Set the addonAutoscaling property: Whether VPA add-on is enabled and configured to scale AKS-managed add-ons. + * + * @param addonAutoscaling the addonAutoscaling value to set. + * @return the ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler object itself. + */ + public ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler + withAddonAutoscaling(AddonAutoscaling addonAutoscaling) { + this.addonAutoscaling = addonAutoscaling; + return this; + } + /** * Validates the instance. * @@ -63,6 +89,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("addonAutoscaling", + this.addonAutoscaling == null ? null : this.addonAutoscaling.toString()); return jsonWriter.writeEndObject(); } @@ -88,6 +116,9 @@ public static ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler fromJ if ("enabled".equals(fieldName)) { deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.enabled = reader.getBoolean(); + } else if ("addonAutoscaling".equals(fieldName)) { + deserializedManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.addonAutoscaling + = AddonAutoscaling.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagementMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagementMode.java new file mode 100644 index 000000000000..f09d7f9a4ec9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ManagementMode.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The Managed GPU experience installs additional components, such as the Data Center GPU Manager (DCGM) metrics for + * monitoring, on top of the GPU driver for you. For more details of what is installed, check out + * aka.ms/aks/managed-gpu. + */ +public final class ManagementMode extends ExpandableStringEnum { + /** + * Managed GPU experience is disabled for NVIDIA GPUs. + */ + public static final ManagementMode UNMANAGED = fromString("Unmanaged"); + + /** + * Managed GPU experience is enabled for NVIDIA GPUs. + */ + public static final ManagementMode MANAGED = fromString("Managed"); + + /** + * Creates a new instance of ManagementMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagementMode() { + } + + /** + * Creates or finds a ManagementMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagementMode. + */ + public static ManagementMode fromString(String name) { + return fromString(name, ManagementMode.class); + } + + /** + * Gets known ManagementMode values. + * + * @return known ManagementMode values. + */ + public static Collection values() { + return values(ManagementMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipPrivateConnectProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipPrivateConnectProfile.java new file mode 100644 index 000000000000..3d3b502f541f --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipPrivateConnectProfile.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Private connect profile for mesh membership. + */ +@Fluent +public final class MeshMembershipPrivateConnectProfile + implements JsonSerializable { + /* + * The private IP address of the member cluster private FQDN. This is a read-only property populated by the service. + */ + private String privateIpAddress; + + /* + * The delegated subnet resource ID. Customer can provide their own subnet, or AKS will allocate one if not + * specified. When providing your own subnet, the minimum required size is /28 + */ + private String subnetResourceId; + + /** + * Creates an instance of MeshMembershipPrivateConnectProfile class. + */ + public MeshMembershipPrivateConnectProfile() { + } + + /** + * Get the privateIpAddress property: The private IP address of the member cluster private FQDN. This is a read-only + * property populated by the service. + * + * @return the privateIpAddress value. + */ + public String privateIpAddress() { + return this.privateIpAddress; + } + + /** + * Get the subnetResourceId property: The delegated subnet resource ID. Customer can provide their own subnet, or + * AKS will allocate one if not specified. When providing your own subnet, the minimum required size is /28. + * + * @return the subnetResourceId value. + */ + public String subnetResourceId() { + return this.subnetResourceId; + } + + /** + * Set the subnetResourceId property: The delegated subnet resource ID. Customer can provide their own subnet, or + * AKS will allocate one if not specified. When providing your own subnet, the minimum required size is /28. + * + * @param subnetResourceId the subnetResourceId value to set. + * @return the MeshMembershipPrivateConnectProfile object itself. + */ + public MeshMembershipPrivateConnectProfile withSubnetResourceId(String subnetResourceId) { + this.subnetResourceId = subnetResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("subnetResourceId", this.subnetResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshMembershipPrivateConnectProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshMembershipPrivateConnectProfile if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MeshMembershipPrivateConnectProfile. + */ + public static MeshMembershipPrivateConnectProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshMembershipPrivateConnectProfile deserializedMeshMembershipPrivateConnectProfile + = new MeshMembershipPrivateConnectProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateIpAddress".equals(fieldName)) { + deserializedMeshMembershipPrivateConnectProfile.privateIpAddress = reader.getString(); + } else if ("subnetResourceId".equals(fieldName)) { + deserializedMeshMembershipPrivateConnectProfile.subnetResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshMembershipPrivateConnectProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java new file mode 100644 index 000000000000..462dd0a25f37 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Mesh membership properties of a managed cluster. + */ +@Fluent +public final class MeshMembershipProperties implements JsonSerializable { + /* + * The current provisioning state of the Mesh Membership. + */ + private MeshMembershipProvisioningState provisioningState; + + /* + * Profile for configuring private connectivity between the mesh control plane and member clusters. When configured, + * communication between the mesh control plane and this member cluster occurs over private network instead of + * public networks. Visit https://aka.ms/applink for more information. + */ + private MeshMembershipPrivateConnectProfile privateConnectProfile; + + /* + * The ARM resource id for the managed mesh member. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{ + * appLinkName}/appLinkMembers/{appLinkMemberName}'. Visit https://aka.ms/applink for more information. + */ + private String managedMeshId; + + /** + * Creates an instance of MeshMembershipProperties class. + */ + public MeshMembershipProperties() { + } + + /** + * Get the provisioningState property: The current provisioning state of the Mesh Membership. + * + * @return the provisioningState value. + */ + public MeshMembershipProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateConnectProfile property: Profile for configuring private connectivity between the mesh control + * plane and member clusters. When configured, communication between the mesh control plane and this member cluster + * occurs over private network instead of public networks. Visit https://aka.ms/applink for more information. + * + * @return the privateConnectProfile value. + */ + public MeshMembershipPrivateConnectProfile privateConnectProfile() { + return this.privateConnectProfile; + } + + /** + * Set the privateConnectProfile property: Profile for configuring private connectivity between the mesh control + * plane and member clusters. When configured, communication between the mesh control plane and this member cluster + * occurs over private network instead of public networks. Visit https://aka.ms/applink for more information. + * + * @param privateConnectProfile the privateConnectProfile value to set. + * @return the MeshMembershipProperties object itself. + */ + public MeshMembershipProperties + withPrivateConnectProfile(MeshMembershipPrivateConnectProfile privateConnectProfile) { + this.privateConnectProfile = privateConnectProfile; + return this; + } + + /** + * Get the managedMeshId property: The ARM resource id for the managed mesh member. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. + * Visit https://aka.ms/applink for more information. + * + * @return the managedMeshId value. + */ + public String managedMeshId() { + return this.managedMeshId; + } + + /** + * Set the managedMeshId property: The ARM resource id for the managed mesh member. This is of the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppLink/applinks/{appLinkName}/appLinkMembers/{appLinkMemberName}'. + * Visit https://aka.ms/applink for more information. + * + * @param managedMeshId the managedMeshId value to set. + * @return the MeshMembershipProperties object itself. + */ + public MeshMembershipProperties withManagedMeshId(String managedMeshId) { + this.managedMeshId = managedMeshId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateConnectProfile() != null) { + privateConnectProfile().validate(); + } + if (managedMeshId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property managedMeshId in model MeshMembershipProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MeshMembershipProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("managedMeshID", this.managedMeshId); + jsonWriter.writeJsonField("privateConnectProfile", this.privateConnectProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MeshMembershipProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MeshMembershipProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the MeshMembershipProperties. + */ + public static MeshMembershipProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MeshMembershipProperties deserializedMeshMembershipProperties = new MeshMembershipProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managedMeshID".equals(fieldName)) { + deserializedMeshMembershipProperties.managedMeshId = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedMeshMembershipProperties.provisioningState + = MeshMembershipProvisioningState.fromString(reader.getString()); + } else if ("privateConnectProfile".equals(fieldName)) { + deserializedMeshMembershipProperties.privateConnectProfile + = MeshMembershipPrivateConnectProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMeshMembershipProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java new file mode 100644 index 000000000000..9f3800fba4da --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The provisioning state of the last accepted operation. + */ +public final class MeshMembershipProvisioningState extends ExpandableStringEnum { + /** + * Resource creation was canceled. + */ + public static final MeshMembershipProvisioningState CANCELED = fromString("Canceled"); + + /** + * The Mesh Membership is being created. + */ + public static final MeshMembershipProvisioningState CREATING = fromString("Creating"); + + /** + * The Mesh Membership is being deleted. + */ + public static final MeshMembershipProvisioningState DELETING = fromString("Deleting"); + + /** + * Resource creation failed. + */ + public static final MeshMembershipProvisioningState FAILED = fromString("Failed"); + + /** + * Resource has been created. + */ + public static final MeshMembershipProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * The Mesh Membership is being updated. + */ + public static final MeshMembershipProvisioningState UPDATING = fromString("Updating"); + + /** + * Creates a new instance of MeshMembershipProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MeshMembershipProvisioningState() { + } + + /** + * Creates or finds a MeshMembershipProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding MeshMembershipProvisioningState. + */ + public static MeshMembershipProvisioningState fromString(String name) { + return fromString(name, MeshMembershipProvisioningState.class); + } + + /** + * Gets known MeshMembershipProvisioningState values. + * + * @return known MeshMembershipProvisioningState values. + */ + public static Collection values() { + return values(MeshMembershipProvisioningState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MigStrategy.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MigStrategy.java new file mode 100644 index 000000000000..a9d1a0590832 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/MigStrategy.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG support. For more information about the + * different strategies, visit aka.ms/aks/managed-gpu. When not specified, the default is None. + */ +public final class MigStrategy extends ExpandableStringEnum { + /** + * Don't set a MIG strategy. If you previously had one set, this will override it and set remove the set MIG + * strategy. + */ + public static final MigStrategy NONE = fromString("None"); + + /** + * Set the MIG strategy for managed MIG as single. + */ + public static final MigStrategy SINGLE = fromString("Single"); + + /** + * Set the MIG strategy for managed MIG as mixed. + */ + public static final MigStrategy MIXED = fromString("Mixed"); + + /** + * Creates a new instance of MigStrategy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MigStrategy() { + } + + /** + * Creates or finds a MigStrategy from its string representation. + * + * @param name a name to look for. + * @return the corresponding MigStrategy. + */ + public static MigStrategy fromString(String name) { + return fromString(name, MigStrategy.class); + } + + /** + * Gets known MigStrategy values. + * + * @return known MigStrategy values. + */ + public static Collection values() { + return values(MigStrategy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java new file mode 100644 index 000000000000..43ad5b9807f5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specify which proxy mode to use ('IPTABLES', 'IPVS' or 'NFTABLES'). + */ +public final class Mode extends ExpandableStringEnum { + /** + * IPTables proxy mode. + */ + public static final Mode IPTABLES = fromString("IPTABLES"); + + /** + * IPVS proxy mode. Must be using Kubernetes version >= 1.22. + */ + public static final Mode IPVS = fromString("IPVS"); + + /** + * NFTables proxy mode. Must be using Kubernetes version >= 1.33. + */ + public static final Mode NFTABLES = fromString("NFTABLES"); + + /** + * Creates a new instance of Mode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Mode() { + } + + /** + * Creates or finds a Mode from its string representation. + * + * @param name a name to look for. + * @return the corresponding Mode. + */ + public static Mode fromString(String name) { + return fromString(name, Mode.class); + } + + /** + * Gets known Mode values. + * + * @return known Mode values. + */ + public static Collection values() { + return values(Mode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java new file mode 100644 index 000000000000..30c82df6eaf3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * network profile for managed cluster snapshot, these properties are read only. + */ +@Immutable +public final class NetworkProfileForSnapshot implements JsonSerializable { + /* + * networkPlugin for managed cluster snapshot. + */ + private NetworkPlugin networkPlugin; + + /* + * NetworkPluginMode for managed cluster snapshot. + */ + private NetworkPluginMode networkPluginMode; + + /* + * networkPolicy for managed cluster snapshot. + */ + private NetworkPolicy networkPolicy; + + /* + * networkMode for managed cluster snapshot. + */ + private NetworkMode networkMode; + + /* + * loadBalancerSku for managed cluster snapshot. + */ + private LoadBalancerSku loadBalancerSku; + + /** + * Creates an instance of NetworkProfileForSnapshot class. + */ + private NetworkProfileForSnapshot() { + } + + /** + * Get the networkPlugin property: networkPlugin for managed cluster snapshot. + * + * @return the networkPlugin value. + */ + public NetworkPlugin networkPlugin() { + return this.networkPlugin; + } + + /** + * Get the networkPluginMode property: NetworkPluginMode for managed cluster snapshot. + * + * @return the networkPluginMode value. + */ + public NetworkPluginMode networkPluginMode() { + return this.networkPluginMode; + } + + /** + * Get the networkPolicy property: networkPolicy for managed cluster snapshot. + * + * @return the networkPolicy value. + */ + public NetworkPolicy networkPolicy() { + return this.networkPolicy; + } + + /** + * Get the networkMode property: networkMode for managed cluster snapshot. + * + * @return the networkMode value. + */ + public NetworkMode networkMode() { + return this.networkMode; + } + + /** + * Get the loadBalancerSku property: loadBalancerSku for managed cluster snapshot. + * + * @return the loadBalancerSku value. + */ + public LoadBalancerSku loadBalancerSku() { + return this.loadBalancerSku; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("networkPlugin", this.networkPlugin == null ? null : this.networkPlugin.toString()); + jsonWriter.writeStringField("networkPluginMode", + this.networkPluginMode == null ? null : this.networkPluginMode.toString()); + jsonWriter.writeStringField("networkPolicy", this.networkPolicy == null ? null : this.networkPolicy.toString()); + jsonWriter.writeStringField("networkMode", this.networkMode == null ? null : this.networkMode.toString()); + jsonWriter.writeStringField("loadBalancerSku", + this.loadBalancerSku == null ? null : this.loadBalancerSku.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkProfileForSnapshot from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkProfileForSnapshot if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkProfileForSnapshot. + */ + public static NetworkProfileForSnapshot fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkProfileForSnapshot deserializedNetworkProfileForSnapshot = new NetworkProfileForSnapshot(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkPlugin".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkPlugin = NetworkPlugin.fromString(reader.getString()); + } else if ("networkPluginMode".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkPluginMode + = NetworkPluginMode.fromString(reader.getString()); + } else if ("networkPolicy".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkPolicy = NetworkPolicy.fromString(reader.getString()); + } else if ("networkMode".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.networkMode = NetworkMode.fromString(reader.getString()); + } else if ("loadBalancerSku".equals(fieldName)) { + deserializedNetworkProfileForSnapshot.loadBalancerSku + = LoadBalancerSku.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkProfileForSnapshot; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaGPUProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaGPUProfile.java new file mode 100644 index 000000000000..9eacdc66a1ca --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaGPUProfile.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * NVIDIA-specific GPU settings. + */ +@Fluent +public final class NvidiaGPUProfile implements JsonSerializable { + /* + * The Managed GPU experience installs additional components, such as the Data Center GPU Manager (DCGM) metrics for + * monitoring, on top of the GPU driver for you. For more details of what is installed, check out + * aka.ms/aks/managed-gpu. + */ + private ManagementMode managementMode; + + /* + * Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG support. For more information about + * the different strategies, visit aka.ms/aks/managed-gpu. When not specified, the default is None. + */ + private MigStrategy migStrategy; + + /** + * Creates an instance of NvidiaGPUProfile class. + */ + public NvidiaGPUProfile() { + } + + /** + * Get the managementMode property: The Managed GPU experience installs additional components, such as the Data + * Center GPU Manager (DCGM) metrics for monitoring, on top of the GPU driver for you. For more details of what is + * installed, check out aka.ms/aks/managed-gpu. + * + * @return the managementMode value. + */ + public ManagementMode managementMode() { + return this.managementMode; + } + + /** + * Set the managementMode property: The Managed GPU experience installs additional components, such as the Data + * Center GPU Manager (DCGM) metrics for monitoring, on top of the GPU driver for you. For more details of what is + * installed, check out aka.ms/aks/managed-gpu. + * + * @param managementMode the managementMode value to set. + * @return the NvidiaGPUProfile object itself. + */ + public NvidiaGPUProfile withManagementMode(ManagementMode managementMode) { + this.managementMode = managementMode; + return this; + } + + /** + * Get the migStrategy property: Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG + * support. For more information about the different strategies, visit aka.ms/aks/managed-gpu. When not specified, + * the default is None. + * + * @return the migStrategy value. + */ + public MigStrategy migStrategy() { + return this.migStrategy; + } + + /** + * Set the migStrategy property: Sets the MIG (Multi-Instance GPU) strategy that will be used for managed MIG + * support. For more information about the different strategies, visit aka.ms/aks/managed-gpu. When not specified, + * the default is None. + * + * @param migStrategy the migStrategy value to set. + * @return the NvidiaGPUProfile object itself. + */ + public NvidiaGPUProfile withMigStrategy(MigStrategy migStrategy) { + this.migStrategy = migStrategy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("managementMode", + this.managementMode == null ? null : this.managementMode.toString()); + jsonWriter.writeStringField("migStrategy", this.migStrategy == null ? null : this.migStrategy.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NvidiaGPUProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NvidiaGPUProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NvidiaGPUProfile. + */ + public static NvidiaGPUProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NvidiaGPUProfile deserializedNvidiaGPUProfile = new NvidiaGPUProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managementMode".equals(fieldName)) { + deserializedNvidiaGPUProfile.managementMode = ManagementMode.fromString(reader.getString()); + } else if ("migStrategy".equals(fieldName)) { + deserializedNvidiaGPUProfile.migStrategy = MigStrategy.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedNvidiaGPUProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java index 45275642db14..33175c01b8a8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java @@ -30,6 +30,18 @@ public final class OSSku extends ExpandableStringEnum { */ public static final OSSku AZURE_LINUX3 = fromString("AzureLinux3"); + /** + * Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. + */ + public static final OSSku MARINER = fromString("Mariner"); + + /** + * Use Flatcar Container Linux as the OS for node images. Flatcar is a container-optimized, security-focused Linux + * OS, with an immutable filesystem and part of the Cloud Native Computing Foundation (CNCF). For more information + * about Flatcar Container Linux for AKS, see aka.ms/aks/flatcar-container-linux-for-aks. + */ + public static final OSSku FLATCAR = fromString("Flatcar"); + /** * Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. */ @@ -59,6 +71,13 @@ public final class OSSku extends ExpandableStringEnum { */ public static final OSSku WINDOWS2025 = fromString("Windows2025"); + /** + * Use Windows Annual Channel version as the OS for node images. Unsupported for system node pools. Details about + * supported container images and kubernetes versions under different AKS Annual Channel versions could be seen in + * https://aka.ms/aks/windows-annual-channel-details. + */ + public static final OSSku WINDOWS_ANNUAL = fromString("WindowsAnnual"); + /** * Use Ubuntu2404 as the OS for node images, however, Ubuntu 24.04 may not be supported for all nodepools. For * limitations and supported kubernetes versions, see see https://aka.ms/aks/supported-ubuntu-versions. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java new file mode 100644 index 000000000000..3047f879b8a9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * operator represents a key's relationship to a set of values. Valid operators are In and NotIn. + */ +public final class Operator extends ExpandableStringEnum { + /** + * The value of the key should be in the given list. + */ + public static final Operator IN = fromString("In"); + + /** + * The value of the key should not be in the given list. + */ + public static final Operator NOT_IN = fromString("NotIn"); + + /** + * The value of the key should exist. + */ + public static final Operator EXISTS = fromString("Exists"); + + /** + * The value of the key should not exist. + */ + public static final Operator DOES_NOT_EXIST = fromString("DoesNotExist"); + + /** + * Creates a new instance of Operator value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Operator() { + } + + /** + * Creates or finds a Operator from its string representation. + * + * @param name a name to look for. + * @return the corresponding Operator. + */ + public static Operator fromString(String name) { + return fromString(name, Operator.class); + } + + /** + * Gets known Operator values. + * + * @return known Operator values. + */ + public static Collection values() { + return values(Operator.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java index 54c470f6aa95..6a796abc06ae 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java @@ -31,6 +31,11 @@ public final class OutboundType extends ExpandableStringEnum { */ public static final OutboundType MANAGED_NATGATEWAY = fromString("managedNATGateway"); + /** + * The AKS-managed NAT gateway V2 is used for egress. + */ + public static final OutboundType MANAGED_NATGATEWAY_V2 = fromString("managedNATGatewayV2"); + /** * The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an advanced scenario * and requires proper network configuration. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java new file mode 100644 index 000000000000..967e4f295d88 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines access to special link local addresses (Azure Instance Metadata Service, aka IMDS) for pods with + * hostNetwork=false. If not specified, the default is 'IMDS'. + */ +public final class PodLinkLocalAccess extends ExpandableStringEnum { + /** + * Pods with hostNetwork=false can access Azure Instance Metadata Service (IMDS) without restriction. + */ + public static final PodLinkLocalAccess IMDS = fromString("IMDS"); + + /** + * Pods with hostNetwork=false cannot access Azure Instance Metadata Service (IMDS). + */ + public static final PodLinkLocalAccess NONE = fromString("None"); + + /** + * Creates a new instance of PodLinkLocalAccess value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PodLinkLocalAccess() { + } + + /** + * Creates or finds a PodLinkLocalAccess from its string representation. + * + * @param name a name to look for. + * @return the corresponding PodLinkLocalAccess. + */ + public static PodLinkLocalAccess fromString(String name) { + return fromString(name, PodLinkLocalAccess.class); + } + + /** + * Gets known PodLinkLocalAccess values. + * + * @return known PodLinkLocalAccess values. + */ + public static Collection values() { + return values(PodLinkLocalAccess.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PreparedImageSpecificationProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PreparedImageSpecificationProfile.java new file mode 100644 index 000000000000..eb767c7fb0d2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PreparedImageSpecificationProfile.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Settings to determine the prepared image specification used to provision nodes in a pool. + */ +@Fluent +public final class PreparedImageSpecificationProfile implements JsonSerializable { + /* + * The resource ID of the prepared image specification resource to use. This can include a version. Omitting the + * version will use the latest version of the prepared image specification. + */ + private String preparedImageSpecificationId; + + /** + * Creates an instance of PreparedImageSpecificationProfile class. + */ + public PreparedImageSpecificationProfile() { + } + + /** + * Get the preparedImageSpecificationId property: The resource ID of the prepared image specification resource to + * use. This can include a version. Omitting the version will use the latest version of the prepared image + * specification. + * + * @return the preparedImageSpecificationId value. + */ + public String preparedImageSpecificationId() { + return this.preparedImageSpecificationId; + } + + /** + * Set the preparedImageSpecificationId property: The resource ID of the prepared image specification resource to + * use. This can include a version. Omitting the version will use the latest version of the prepared image + * specification. + * + * @param preparedImageSpecificationId the preparedImageSpecificationId value to set. + * @return the PreparedImageSpecificationProfile object itself. + */ + public PreparedImageSpecificationProfile withPreparedImageSpecificationId(String preparedImageSpecificationId) { + this.preparedImageSpecificationId = preparedImageSpecificationId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("preparedImageSpecificationId", this.preparedImageSpecificationId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PreparedImageSpecificationProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PreparedImageSpecificationProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PreparedImageSpecificationProfile. + */ + public static PreparedImageSpecificationProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PreparedImageSpecificationProfile deserializedPreparedImageSpecificationProfile + = new PreparedImageSpecificationProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("preparedImageSpecificationId".equals(fieldName)) { + deserializedPreparedImageSpecificationProfile.preparedImageSpecificationId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPreparedImageSpecificationProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java index d0f973ce2392..66424d6a749e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java @@ -21,6 +21,11 @@ public final class PublicNetworkAccess extends ExpandableStringEnum { + /* + * The load balancer names list. + */ + private List loadBalancerNames; + + /** + * Creates an instance of RebalanceLoadBalancersRequestBody class. + */ + public RebalanceLoadBalancersRequestBody() { + } + + /** + * Get the loadBalancerNames property: The load balancer names list. + * + * @return the loadBalancerNames value. + */ + public List loadBalancerNames() { + return this.loadBalancerNames; + } + + /** + * Set the loadBalancerNames property: The load balancer names list. + * + * @param loadBalancerNames the loadBalancerNames value to set. + * @return the RebalanceLoadBalancersRequestBody object itself. + */ + public RebalanceLoadBalancersRequestBody withLoadBalancerNames(List loadBalancerNames) { + this.loadBalancerNames = loadBalancerNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("loadBalancerNames", this.loadBalancerNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RebalanceLoadBalancersRequestBody from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RebalanceLoadBalancersRequestBody if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RebalanceLoadBalancersRequestBody. + */ + public static RebalanceLoadBalancersRequestBody fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RebalanceLoadBalancersRequestBody deserializedRebalanceLoadBalancersRequestBody + = new RebalanceLoadBalancersRequestBody(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("loadBalancerNames".equals(fieldName)) { + List loadBalancerNames = reader.readArray(reader1 -> reader1.getString()); + deserializedRebalanceLoadBalancersRequestBody.loadBalancerNames = loadBalancerNames; + } else { + reader.skipChildren(); + } + } + + return deserializedRebalanceLoadBalancersRequestBody; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapabilities.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapabilities.java new file mode 100644 index 000000000000..9aed2b186f7b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapabilities.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes The SKU capabilities object. + */ +@Immutable +public final class ResourceSkuCapabilities implements JsonSerializable { + /* + * An invariant to describe the feature. + */ + private String name; + + /* + * An invariant if the feature is measured by quantity. + */ + private String value; + + /** + * Creates an instance of ResourceSkuCapabilities class. + */ + private ResourceSkuCapabilities() { + } + + /** + * Get the name property: An invariant to describe the feature. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the value property: An invariant if the feature is measured by quantity. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuCapabilities from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuCapabilities if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuCapabilities. + */ + public static ResourceSkuCapabilities fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuCapabilities deserializedResourceSkuCapabilities = new ResourceSkuCapabilities(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedResourceSkuCapabilities.name = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedResourceSkuCapabilities.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuCapabilities; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacity.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacity.java new file mode 100644 index 000000000000..d59f328fc912 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacity.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes scaling information of a SKU. + */ +@Immutable +public final class ResourceSkuCapacity implements JsonSerializable { + /* + * The minimum capacity. + */ + private Long minimum; + + /* + * The maximum capacity that can be set. + */ + private Long maximum; + + /* + * The default capacity. + */ + private Long defaultProperty; + + /* + * The scale type applicable to the sku. + */ + private ResourceSkuCapacityScaleType scaleType; + + /** + * Creates an instance of ResourceSkuCapacity class. + */ + private ResourceSkuCapacity() { + } + + /** + * Get the minimum property: The minimum capacity. + * + * @return the minimum value. + */ + public Long minimum() { + return this.minimum; + } + + /** + * Get the maximum property: The maximum capacity that can be set. + * + * @return the maximum value. + */ + public Long maximum() { + return this.maximum; + } + + /** + * Get the defaultProperty property: The default capacity. + * + * @return the defaultProperty value. + */ + public Long defaultProperty() { + return this.defaultProperty; + } + + /** + * Get the scaleType property: The scale type applicable to the sku. + * + * @return the scaleType value. + */ + public ResourceSkuCapacityScaleType scaleType() { + return this.scaleType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuCapacity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuCapacity if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuCapacity. + */ + public static ResourceSkuCapacity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuCapacity deserializedResourceSkuCapacity = new ResourceSkuCapacity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("minimum".equals(fieldName)) { + deserializedResourceSkuCapacity.minimum = reader.getNullable(JsonReader::getLong); + } else if ("maximum".equals(fieldName)) { + deserializedResourceSkuCapacity.maximum = reader.getNullable(JsonReader::getLong); + } else if ("default".equals(fieldName)) { + deserializedResourceSkuCapacity.defaultProperty = reader.getNullable(JsonReader::getLong); + } else if ("scaleType".equals(fieldName)) { + deserializedResourceSkuCapacity.scaleType + = ResourceSkuCapacityScaleType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuCapacity; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacityScaleType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacityScaleType.java new file mode 100644 index 000000000000..1c7aea85d928 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacityScaleType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The scale type applicable to the sku. + */ +public final class ResourceSkuCapacityScaleType extends ExpandableStringEnum { + /** + * Automatic scaling. + */ + public static final ResourceSkuCapacityScaleType AUTOMATIC = fromString("Automatic"); + + /** + * Manual scaling. + */ + public static final ResourceSkuCapacityScaleType MANUAL = fromString("Manual"); + + /** + * No scaling. + */ + public static final ResourceSkuCapacityScaleType NONE = fromString("None"); + + /** + * Creates a new instance of ResourceSkuCapacityScaleType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceSkuCapacityScaleType() { + } + + /** + * Creates or finds a ResourceSkuCapacityScaleType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceSkuCapacityScaleType. + */ + public static ResourceSkuCapacityScaleType fromString(String name) { + return fromString(name, ResourceSkuCapacityScaleType.class); + } + + /** + * Gets known ResourceSkuCapacityScaleType values. + * + * @return known ResourceSkuCapacityScaleType values. + */ + public static Collection values() { + return values(ResourceSkuCapacityScaleType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCosts.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCosts.java new file mode 100644 index 000000000000..069e612cbbaf --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCosts.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes metadata for retrieving price info. + */ +@Immutable +public final class ResourceSkuCosts implements JsonSerializable { + /* + * Used for querying price from commerce. + */ + private String meterId; + + /* + * The multiplier is needed to extend the base metered cost. + */ + private Long quantity; + + /* + * An invariant to show the extended unit. + */ + private String extendedUnit; + + /** + * Creates an instance of ResourceSkuCosts class. + */ + private ResourceSkuCosts() { + } + + /** + * Get the meterId property: Used for querying price from commerce. + * + * @return the meterId value. + */ + public String meterId() { + return this.meterId; + } + + /** + * Get the quantity property: The multiplier is needed to extend the base metered cost. + * + * @return the quantity value. + */ + public Long quantity() { + return this.quantity; + } + + /** + * Get the extendedUnit property: An invariant to show the extended unit. + * + * @return the extendedUnit value. + */ + public String extendedUnit() { + return this.extendedUnit; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuCosts from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuCosts if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuCosts. + */ + public static ResourceSkuCosts fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuCosts deserializedResourceSkuCosts = new ResourceSkuCosts(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("meterID".equals(fieldName)) { + deserializedResourceSkuCosts.meterId = reader.getString(); + } else if ("quantity".equals(fieldName)) { + deserializedResourceSkuCosts.quantity = reader.getNullable(JsonReader::getLong); + } else if ("extendedUnit".equals(fieldName)) { + deserializedResourceSkuCosts.extendedUnit = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuCosts; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuLocationInfo.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuLocationInfo.java new file mode 100644 index 000000000000..e69981ec167b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuLocationInfo.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes an available Compute SKU Location Information. + */ +@Immutable +public final class ResourceSkuLocationInfo implements JsonSerializable { + /* + * Location of the SKU + */ + private String location; + + /* + * List of availability zones where the SKU is supported. + */ + private List zones; + + /* + * Details of capabilities available to a SKU in specific zones. + */ + private List zoneDetails; + + /* + * The names of extended locations. + */ + private List extendedLocations; + + /* + * The type of the extended location. + */ + private ExtendedLocationTypes type; + + /** + * Creates an instance of ResourceSkuLocationInfo class. + */ + private ResourceSkuLocationInfo() { + } + + /** + * Get the location property: Location of the SKU. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the zones property: List of availability zones where the SKU is supported. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Get the zoneDetails property: Details of capabilities available to a SKU in specific zones. + * + * @return the zoneDetails value. + */ + public List zoneDetails() { + return this.zoneDetails; + } + + /** + * Get the extendedLocations property: The names of extended locations. + * + * @return the extendedLocations value. + */ + public List extendedLocations() { + return this.extendedLocations; + } + + /** + * Get the type property: The type of the extended location. + * + * @return the type value. + */ + public ExtendedLocationTypes type() { + return this.type; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (zoneDetails() != null) { + zoneDetails().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuLocationInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuLocationInfo if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuLocationInfo. + */ + public static ResourceSkuLocationInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuLocationInfo deserializedResourceSkuLocationInfo = new ResourceSkuLocationInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("location".equals(fieldName)) { + deserializedResourceSkuLocationInfo.location = reader.getString(); + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuLocationInfo.zones = zones; + } else if ("zoneDetails".equals(fieldName)) { + List zoneDetails + = reader.readArray(reader1 -> ResourceSkuZoneDetails.fromJson(reader1)); + deserializedResourceSkuLocationInfo.zoneDetails = zoneDetails; + } else if ("extendedLocations".equals(fieldName)) { + List extendedLocations = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuLocationInfo.extendedLocations = extendedLocations; + } else if ("type".equals(fieldName)) { + deserializedResourceSkuLocationInfo.type = ExtendedLocationTypes.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuLocationInfo; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionInfo.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionInfo.java new file mode 100644 index 000000000000..601f679be3d7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionInfo.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes an available Compute SKU Restriction Information. + */ +@Immutable +public final class ResourceSkuRestrictionInfo implements JsonSerializable { + /* + * Locations where the SKU is restricted + */ + private List locations; + + /* + * List of availability zones where the SKU is restricted. + */ + private List zones; + + /** + * Creates an instance of ResourceSkuRestrictionInfo class. + */ + private ResourceSkuRestrictionInfo() { + } + + /** + * Get the locations property: Locations where the SKU is restricted. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Get the zones property: List of availability zones where the SKU is restricted. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuRestrictionInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuRestrictionInfo if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuRestrictionInfo. + */ + public static ResourceSkuRestrictionInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuRestrictionInfo deserializedResourceSkuRestrictionInfo = new ResourceSkuRestrictionInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("locations".equals(fieldName)) { + List locations = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuRestrictionInfo.locations = locations; + } else if ("zones".equals(fieldName)) { + List zones = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuRestrictionInfo.zones = zones; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuRestrictionInfo; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictions.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictions.java new file mode 100644 index 000000000000..8ca66c39db66 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictions.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes scaling information of a SKU. + */ +@Immutable +public final class ResourceSkuRestrictions implements JsonSerializable { + /* + * The type of restrictions. + */ + private ResourceSkuRestrictionsType type; + + /* + * The value of restrictions. If the restriction type is set to location. This would be different locations where + * the SKU is restricted. + */ + private List values; + + /* + * The information about the restriction where the SKU cannot be used. + */ + private ResourceSkuRestrictionInfo restrictionInfo; + + /* + * The reason for restriction. + */ + private ResourceSkuRestrictionsReasonCode reasonCode; + + /** + * Creates an instance of ResourceSkuRestrictions class. + */ + private ResourceSkuRestrictions() { + } + + /** + * Get the type property: The type of restrictions. + * + * @return the type value. + */ + public ResourceSkuRestrictionsType type() { + return this.type; + } + + /** + * Get the values property: The value of restrictions. If the restriction type is set to location. This would be + * different locations where the SKU is restricted. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Get the restrictionInfo property: The information about the restriction where the SKU cannot be used. + * + * @return the restrictionInfo value. + */ + public ResourceSkuRestrictionInfo restrictionInfo() { + return this.restrictionInfo; + } + + /** + * Get the reasonCode property: The reason for restriction. + * + * @return the reasonCode value. + */ + public ResourceSkuRestrictionsReasonCode reasonCode() { + return this.reasonCode; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (restrictionInfo() != null) { + restrictionInfo().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuRestrictions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuRestrictions if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuRestrictions. + */ + public static ResourceSkuRestrictions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuRestrictions deserializedResourceSkuRestrictions = new ResourceSkuRestrictions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedResourceSkuRestrictions.type + = ResourceSkuRestrictionsType.fromString(reader.getString()); + } else if ("values".equals(fieldName)) { + List values = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuRestrictions.values = values; + } else if ("restrictionInfo".equals(fieldName)) { + deserializedResourceSkuRestrictions.restrictionInfo = ResourceSkuRestrictionInfo.fromJson(reader); + } else if ("reasonCode".equals(fieldName)) { + deserializedResourceSkuRestrictions.reasonCode + = ResourceSkuRestrictionsReasonCode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuRestrictions; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsReasonCode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsReasonCode.java new file mode 100644 index 000000000000..182192219cf6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsReasonCode.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The reason for restriction. + */ +public final class ResourceSkuRestrictionsReasonCode extends ExpandableStringEnum { + /** + * Quota ID restriction. + */ + public static final ResourceSkuRestrictionsReasonCode QUOTA_ID = fromString("QuotaId"); + + /** + * Not available for subscription. + */ + public static final ResourceSkuRestrictionsReasonCode NOT_AVAILABLE_FOR_SUBSCRIPTION + = fromString("NotAvailableForSubscription"); + + /** + * Creates a new instance of ResourceSkuRestrictionsReasonCode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceSkuRestrictionsReasonCode() { + } + + /** + * Creates or finds a ResourceSkuRestrictionsReasonCode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceSkuRestrictionsReasonCode. + */ + public static ResourceSkuRestrictionsReasonCode fromString(String name) { + return fromString(name, ResourceSkuRestrictionsReasonCode.class); + } + + /** + * Gets known ResourceSkuRestrictionsReasonCode values. + * + * @return known ResourceSkuRestrictionsReasonCode values. + */ + public static Collection values() { + return values(ResourceSkuRestrictionsReasonCode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsType.java new file mode 100644 index 000000000000..52b3611920cc --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of restrictions. + */ +public final class ResourceSkuRestrictionsType extends ExpandableStringEnum { + /** + * Location restriction. + */ + public static final ResourceSkuRestrictionsType LOCATION = fromString("Location"); + + /** + * Zone restriction. + */ + public static final ResourceSkuRestrictionsType ZONE = fromString("Zone"); + + /** + * Creates a new instance of ResourceSkuRestrictionsType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ResourceSkuRestrictionsType() { + } + + /** + * Creates or finds a ResourceSkuRestrictionsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceSkuRestrictionsType. + */ + public static ResourceSkuRestrictionsType fromString(String name) { + return fromString(name, ResourceSkuRestrictionsType.class); + } + + /** + * Gets known ResourceSkuRestrictionsType values. + * + * @return known ResourceSkuRestrictionsType values. + */ + public static Collection values() { + return values(ResourceSkuRestrictionsType.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuZoneDetails.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuZoneDetails.java new file mode 100644 index 000000000000..dda9f3498322 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuZoneDetails.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes The zonal capabilities of a SKU. + */ +@Immutable +public final class ResourceSkuZoneDetails implements JsonSerializable { + /* + * The set of zones that the SKU is available in with the specified capabilities. + */ + private List name; + + /* + * A list of capabilities that are available for the SKU in the specified list of zones. + */ + private List capabilities; + + /** + * Creates an instance of ResourceSkuZoneDetails class. + */ + private ResourceSkuZoneDetails() { + } + + /** + * Get the name property: The set of zones that the SKU is available in with the specified capabilities. + * + * @return the name value. + */ + public List name() { + return this.name; + } + + /** + * Get the capabilities property: A list of capabilities that are available for the SKU in the specified list of + * zones. + * + * @return the capabilities value. + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capabilities() != null) { + capabilities().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceSkuZoneDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceSkuZoneDetails if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceSkuZoneDetails. + */ + public static ResourceSkuZoneDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceSkuZoneDetails deserializedResourceSkuZoneDetails = new ResourceSkuZoneDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + List name = reader.readArray(reader1 -> reader1.getString()); + deserializedResourceSkuZoneDetails.name = name; + } else if ("capabilities".equals(fieldName)) { + List capabilities + = reader.readArray(reader1 -> ResourceSkuCapabilities.fromJson(reader1)); + deserializedResourceSkuZoneDetails.capabilities = capabilities; + } else { + reader.skipChildren(); + } + } + + return deserializedResourceSkuZoneDetails; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java new file mode 100644 index 000000000000..be616c4f7d06 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Whether the version is default or not and support info. + */ +@Immutable +public final class SafeguardsAvailableVersionsProperties + implements JsonSerializable { + /* + * Whether this is the default version. + */ + private Boolean isDefaultVersion; + + /* + * Whether the version is preview or stable. + */ + private SafeguardsSupport support; + + /** + * Creates an instance of SafeguardsAvailableVersionsProperties class. + */ + private SafeguardsAvailableVersionsProperties() { + } + + /** + * Get the isDefaultVersion property: Whether this is the default version. + * + * @return the isDefaultVersion value. + */ + public Boolean isDefaultVersion() { + return this.isDefaultVersion; + } + + /** + * Get the support property: Whether the version is preview or stable. + * + * @return the support value. + */ + public SafeguardsSupport support() { + return this.support; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SafeguardsAvailableVersionsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SafeguardsAvailableVersionsProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SafeguardsAvailableVersionsProperties. + */ + public static SafeguardsAvailableVersionsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SafeguardsAvailableVersionsProperties deserializedSafeguardsAvailableVersionsProperties + = new SafeguardsAvailableVersionsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isDefaultVersion".equals(fieldName)) { + deserializedSafeguardsAvailableVersionsProperties.isDefaultVersion + = reader.getNullable(JsonReader::getBoolean); + } else if ("support".equals(fieldName)) { + deserializedSafeguardsAvailableVersionsProperties.support + = SafeguardsSupport.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSafeguardsAvailableVersionsProperties; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java new file mode 100644 index 000000000000..0631186b5be5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Whether the version is preview or stable. + */ +public final class SafeguardsSupport extends ExpandableStringEnum { + /** + * 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. + */ + public static final SafeguardsSupport PREVIEW = fromString("Preview"); + + /** + * The version is stable and can be used on critical production clusters. + */ + public static final SafeguardsSupport STABLE = fromString("Stable"); + + /** + * Creates a new instance of SafeguardsSupport value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SafeguardsSupport() { + } + + /** + * Creates or finds a SafeguardsSupport from its string representation. + * + * @param name a name to look for. + * @return the corresponding SafeguardsSupport. + */ + public static SafeguardsSupport fromString(String name) { + return fromString(name, SafeguardsSupport.class); + } + + /** + * Gets known SafeguardsSupport values. + * + * @return known SafeguardsSupport values. + */ + public static Collection values() { + return values(SafeguardsSupport.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java index b0dba05240f5..a8a3674489b6 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java @@ -22,6 +22,14 @@ public final class ScaleProfile implements JsonSerializable { */ private List manual; + /* + * Specifications on how to auto-scale the VirtualMachines agent pool within a predefined size range. + * Each profile targets a specific VM SKU and is evaluated independently. + * Scaling decisions across profiles are governed by the cluster autoscaler expander, + * configurable via `ManagedCluster.properties.autoScalerProfile.expander`. + */ + private List autoscale; + /** * Creates an instance of ScaleProfile class. */ @@ -48,6 +56,34 @@ public ScaleProfile withManual(List manual) { return this; } + /** + * Get the autoscale property: Specifications on how to auto-scale the VirtualMachines agent pool within a + * predefined size range. + * Each profile targets a specific VM SKU and is evaluated independently. + * Scaling decisions across profiles are governed by the cluster autoscaler expander, + * configurable via `ManagedCluster.properties.autoScalerProfile.expander`. + * + * @return the autoscale value. + */ + public List autoscale() { + return this.autoscale; + } + + /** + * Set the autoscale property: Specifications on how to auto-scale the VirtualMachines agent pool within a + * predefined size range. + * Each profile targets a specific VM SKU and is evaluated independently. + * Scaling decisions across profiles are governed by the cluster autoscaler expander, + * configurable via `ManagedCluster.properties.autoScalerProfile.expander`. + * + * @param autoscale the autoscale value to set. + * @return the ScaleProfile object itself. + */ + public ScaleProfile withAutoscale(List autoscale) { + this.autoscale = autoscale; + return this; + } + /** * Validates the instance. * @@ -57,6 +93,9 @@ public void validate() { if (manual() != null) { manual().forEach(e -> e.validate()); } + if (autoscale() != null) { + autoscale().forEach(e -> e.validate()); + } } /** @@ -66,6 +105,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("manual", this.manual, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("autoscale", this.autoscale, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -87,6 +127,9 @@ public static ScaleProfile fromJson(JsonReader jsonReader) throws IOException { if ("manual".equals(fieldName)) { List manual = reader.readArray(reader1 -> ManualScaleProfile.fromJson(reader1)); deserializedScaleProfile.manual = manual; + } else if ("autoscale".equals(fieldName)) { + List autoscale = reader.readArray(reader1 -> AutoScaleProfile.fromJson(reader1)); + deserializedScaleProfile.autoscale = autoscale; } else { reader.skipChildren(); } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java new file mode 100644 index 000000000000..c2813b1f49e4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The config customization mode for this scheduler instance. + */ +public final class SchedulerConfigMode extends ExpandableStringEnum { + /** + * No config customization. Use default configuration. + */ + public static final SchedulerConfigMode DEFAULT = fromString("Default"); + + /** + * Enable config customization. Customer can specify scheduler configuration via a CRD. See aka.ms/aks/scheduler-crd + * for details. + */ + public static final SchedulerConfigMode MANAGED_BY_CRD = fromString("ManagedByCRD"); + + /** + * Creates a new instance of SchedulerConfigMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SchedulerConfigMode() { + } + + /** + * Creates or finds a SchedulerConfigMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding SchedulerConfigMode. + */ + public static SchedulerConfigMode fromString(String name) { + return fromString(name, SchedulerConfigMode.class); + } + + /** + * Gets known SchedulerConfigMode values. + * + * @return known SchedulerConfigMode values. + */ + public static Collection values() { + return values(SchedulerConfigMode.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java new file mode 100644 index 000000000000..f6ddb83005b9 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The scheduler profile for a single scheduler instance. + */ +@Fluent +public final class SchedulerInstanceProfile implements JsonSerializable { + /* + * The config customization mode for this scheduler instance. + */ + private SchedulerConfigMode schedulerConfigMode; + + /** + * Creates an instance of SchedulerInstanceProfile class. + */ + public SchedulerInstanceProfile() { + } + + /** + * Get the schedulerConfigMode property: The config customization mode for this scheduler instance. + * + * @return the schedulerConfigMode value. + */ + public SchedulerConfigMode schedulerConfigMode() { + return this.schedulerConfigMode; + } + + /** + * Set the schedulerConfigMode property: The config customization mode for this scheduler instance. + * + * @param schedulerConfigMode the schedulerConfigMode value to set. + * @return the SchedulerInstanceProfile object itself. + */ + public SchedulerInstanceProfile withSchedulerConfigMode(SchedulerConfigMode schedulerConfigMode) { + this.schedulerConfigMode = schedulerConfigMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("schedulerConfigMode", + this.schedulerConfigMode == null ? null : this.schedulerConfigMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SchedulerInstanceProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SchedulerInstanceProfile if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SchedulerInstanceProfile. + */ + public static SchedulerInstanceProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SchedulerInstanceProfile deserializedSchedulerInstanceProfile = new SchedulerInstanceProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("schedulerConfigMode".equals(fieldName)) { + deserializedSchedulerInstanceProfile.schedulerConfigMode + = SchedulerConfigMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSchedulerInstanceProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java new file mode 100644 index 000000000000..a88623f565df --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The pod scheduler profile for the cluster. + */ +@Fluent +public final class SchedulerProfile implements JsonSerializable { + /* + * Mapping of each scheduler instance to its profile. + */ + private SchedulerProfileSchedulerInstanceProfiles schedulerInstanceProfiles; + + /** + * Creates an instance of SchedulerProfile class. + */ + public SchedulerProfile() { + } + + /** + * Get the schedulerInstanceProfiles property: Mapping of each scheduler instance to its profile. + * + * @return the schedulerInstanceProfiles value. + */ + public SchedulerProfileSchedulerInstanceProfiles schedulerInstanceProfiles() { + return this.schedulerInstanceProfiles; + } + + /** + * Set the schedulerInstanceProfiles property: Mapping of each scheduler instance to its profile. + * + * @param schedulerInstanceProfiles the schedulerInstanceProfiles value to set. + * @return the SchedulerProfile object itself. + */ + public SchedulerProfile + withSchedulerInstanceProfiles(SchedulerProfileSchedulerInstanceProfiles schedulerInstanceProfiles) { + this.schedulerInstanceProfiles = schedulerInstanceProfiles; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (schedulerInstanceProfiles() != null) { + schedulerInstanceProfiles().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("schedulerInstanceProfiles", this.schedulerInstanceProfiles); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SchedulerProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SchedulerProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SchedulerProfile. + */ + public static SchedulerProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SchedulerProfile deserializedSchedulerProfile = new SchedulerProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("schedulerInstanceProfiles".equals(fieldName)) { + deserializedSchedulerProfile.schedulerInstanceProfiles + = SchedulerProfileSchedulerInstanceProfiles.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSchedulerProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.java new file mode 100644 index 000000000000..74c6cb9a2d6e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Mapping of each scheduler instance to its profile. + */ +@Fluent +public final class SchedulerProfileSchedulerInstanceProfiles + implements JsonSerializable { + /* + * The scheduler profile for the upstream scheduler instance. + */ + private SchedulerInstanceProfile upstream; + + /** + * Creates an instance of SchedulerProfileSchedulerInstanceProfiles class. + */ + public SchedulerProfileSchedulerInstanceProfiles() { + } + + /** + * Get the upstream property: The scheduler profile for the upstream scheduler instance. + * + * @return the upstream value. + */ + public SchedulerInstanceProfile upstream() { + return this.upstream; + } + + /** + * Set the upstream property: The scheduler profile for the upstream scheduler instance. + * + * @param upstream the upstream value to set. + * @return the SchedulerProfileSchedulerInstanceProfiles object itself. + */ + public SchedulerProfileSchedulerInstanceProfiles withUpstream(SchedulerInstanceProfile upstream) { + this.upstream = upstream; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (upstream() != null) { + upstream().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("upstream", this.upstream); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SchedulerProfileSchedulerInstanceProfiles from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SchedulerProfileSchedulerInstanceProfiles if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SchedulerProfileSchedulerInstanceProfiles. + */ + public static SchedulerProfileSchedulerInstanceProfiles fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SchedulerProfileSchedulerInstanceProfiles deserializedSchedulerProfileSchedulerInstanceProfiles + = new SchedulerProfileSchedulerInstanceProfiles(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("upstream".equals(fieldName)) { + deserializedSchedulerProfileSchedulerInstanceProfiles.upstream + = SchedulerInstanceProfile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSchedulerProfileSchedulerInstanceProfiles; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java new file mode 100644 index 000000000000..5847b1bcc721 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the default seccomp profile applied to all workloads. If not specified, 'Unconfined' will be used by + * default. + */ +public final class SeccompDefault extends ExpandableStringEnum { + /** + * No seccomp profile is applied, allowing all system calls. + */ + public static final SeccompDefault UNCONFINED = fromString("Unconfined"); + + /** + * The default seccomp profile for container runtime is applied, which restricts certain system calls for enhanced + * security. + */ + public static final SeccompDefault RUNTIME_DEFAULT = fromString("RuntimeDefault"); + + /** + * Creates a new instance of SeccompDefault value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SeccompDefault() { + } + + /** + * Creates or finds a SeccompDefault from its string representation. + * + * @param name a name to look for. + * @return the corresponding SeccompDefault. + */ + public static SeccompDefault fromString(String name) { + return fromString(name, SeccompDefault.class); + } + + /** + * Gets known SeccompDefault values. + * + * @return known SeccompDefault values. + */ + public static Collection values() { + return values(SeccompDefault.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceAccountImagePullProfile.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceAccountImagePullProfile.java new file mode 100644 index 000000000000..0c5c59a37cf7 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/ServiceAccountImagePullProfile.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Profile for configuring image pull authentication to use service account scoped managed identities for authentication + * instead of node scoped managed identity (kubelet identity) for authentication to Azure Container Registry. For more + * information, refer to https://aka.ms/aks/identity-binding/acr-image-pull/docs. + */ +@Fluent +public final class ServiceAccountImagePullProfile implements JsonSerializable { + /* + * Indicates whether service account based image pull is enabled, for which identity bindings are required for the + * managed identity to be used for authentication. For more information, refer to + * https://aka.ms/aks/identity-binding-docs. + */ + private Boolean enabled; + + /* + * Optional. The default managed identity resource ID used for image pulls at the cluster level. When configured, + * this identity is used if a Pod’s service account does not explicitly specify an identity for pulling images. If + * not configured and no identity is specified at service account level, image will be pulled via anonymous + * authentication. + */ + private String defaultManagedIdentityId; + + /** + * Creates an instance of ServiceAccountImagePullProfile class. + */ + public ServiceAccountImagePullProfile() { + } + + /** + * Get the enabled property: Indicates whether service account based image pull is enabled, for which identity + * bindings are required for the managed identity to be used for authentication. For more information, refer to + * https://aka.ms/aks/identity-binding-docs. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether service account based image pull is enabled, for which identity + * bindings are required for the managed identity to be used for authentication. For more information, refer to + * https://aka.ms/aks/identity-binding-docs. + * + * @param enabled the enabled value to set. + * @return the ServiceAccountImagePullProfile object itself. + */ + public ServiceAccountImagePullProfile withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the defaultManagedIdentityId property: Optional. The default managed identity resource ID used for image + * pulls at the cluster level. When configured, this identity is used if a Pod’s service account does not explicitly + * specify an identity for pulling images. If not configured and no identity is specified at service account level, + * image will be pulled via anonymous authentication. + * + * @return the defaultManagedIdentityId value. + */ + public String defaultManagedIdentityId() { + return this.defaultManagedIdentityId; + } + + /** + * Set the defaultManagedIdentityId property: Optional. The default managed identity resource ID used for image + * pulls at the cluster level. When configured, this identity is used if a Pod’s service account does not explicitly + * specify an identity for pulling images. If not configured and no identity is specified at service account level, + * image will be pulled via anonymous authentication. + * + * @param defaultManagedIdentityId the defaultManagedIdentityId value to set. + * @return the ServiceAccountImagePullProfile object itself. + */ + public ServiceAccountImagePullProfile withDefaultManagedIdentityId(String defaultManagedIdentityId) { + this.defaultManagedIdentityId = defaultManagedIdentityId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("defaultManagedIdentityId", this.defaultManagedIdentityId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServiceAccountImagePullProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServiceAccountImagePullProfile if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServiceAccountImagePullProfile. + */ + public static ServiceAccountImagePullProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServiceAccountImagePullProfile deserializedServiceAccountImagePullProfile + = new ServiceAccountImagePullProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedServiceAccountImagePullProfile.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("defaultManagedIdentityId".equals(fieldName)) { + deserializedServiceAccountImagePullProfile.defaultManagedIdentityId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServiceAccountImagePullProfile; + }); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java index 6539cbbd4092..f94850c9924e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java @@ -16,6 +16,11 @@ public final class SnapshotType extends ExpandableStringEnum { */ public static final SnapshotType NODE_POOL = fromString("NodePool"); + /** + * The snapshot is a snapshot of a managed cluster. + */ + public static final SnapshotType MANAGED_CLUSTER = fromString("ManagedCluster"); + /** * Creates a new instance of SnapshotType value. * diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java index 588980d9452c..6a14e41784c6 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java @@ -18,6 +18,12 @@ public final class TransitEncryptionType extends ExpandableStringEnum { + /** + * Specifies that the agent pool will conduct rolling upgrade. This is the default upgrade strategy. + */ + public static final UpgradeStrategy ROLLING = fromString("Rolling"); + + /** + * Specifies that the agent pool will conduct blue-green upgrade. + */ + public static final UpgradeStrategy BLUE_GREEN = fromString("BlueGreen"); + + /** + * Creates a new instance of UpgradeStrategy value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpgradeStrategy() { + } + + /** + * Creates or finds a UpgradeStrategy from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpgradeStrategy. + */ + public static UpgradeStrategy fromString(String name) { + return fromString(name, UpgradeStrategy.class); + } + + /** + * Gets known UpgradeStrategy values. + * + * @return known UpgradeStrategy values. + */ + public static Collection values() { + return values(UpgradeStrategy.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java new file mode 100644 index 000000000000..77ae5a314d12 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Virtual machine state. Indicates the current state of the underlying virtual machine. + */ +public final class VmState extends ExpandableStringEnum { + /** + * The virtual machine is currently running. + */ + public static final VmState RUNNING = fromString("Running"); + + /** + * The virtual machine has been deleted by the user or due to spot eviction. + */ + public static final VmState DELETED = fromString("Deleted"); + + /** + * Creates a new instance of VmState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VmState() { + } + + /** + * Creates or finds a VmState from its string representation. + * + * @param name a name to look for. + * @return the corresponding VmState. + */ + public static VmState fromString(String name) { + return fromString(name, VmState.class); + } + + /** + * Gets known VmState values. + * + * @return known VmState values. + */ + public static Collection values() { + return values(VmState.class); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java index 2a39c6c56762..5410b0b3bce8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java @@ -21,6 +21,14 @@ public final class WorkloadRuntime extends ExpandableStringEnum */ public static final WorkloadRuntime WASM_WASI = fromString("WasmWasi"); + /** + * Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods (Preview). Due to the use + * Hyper-V, AKS node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series that + * support Nested Virtualization such as Dv3 series. This naming convention will be deprecated in future releases in + * favor of KataVmIsolation. + */ + public static final WorkloadRuntime KATA_MSHV_VM_ISOLATION = fromString("KataMshvVmIsolation"); + /** * Nodes can use (Kata + Cloud Hypervisor + Hyper-V) to enable Nested VM-based pods. Due to the use Hyper-V, AKS * node OS itself is a nested VM (the root OS) of Hyper-V. Thus it can only be used with VM series that support diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json index 5d70d95b2865..abeb8ca00df4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/azure-resourcemanager-containerservice_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.ContainerService":"2026-02-01"},"generatedFiles":["src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AgentPoolListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MachineListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceConfigurationListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedNamespaceListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshRevisionProfileList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshUpgradeProfileList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OutboundEnvironmentEndpointCollection.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SnapshotListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleBindingListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleListResult.java","src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java","src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java","src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/Code.java","src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java","src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java","src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java","src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java","src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java","src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java","src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java","src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java","src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java","src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java","src/main/java/com/azure/resourcemanager/containerservice/models/Format.java","src/main/java/com/azure/resourcemanager/containerservice/models/GatewayApiIstioEnabled.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java","src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java","src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java","src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAppRoutingIstio.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWebAppRoutingGatewayApiImplementations.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java","src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java","src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java","src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java","src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java","src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java","src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java","src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java","src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java","src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java","src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java","src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java","src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java","src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/Type.java","src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java","src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java","src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java","src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/package-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.ContainerService":"2026-02-02-preview"},"generatedFiles":["src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ContainerServiceManagementClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/IdentityBindingsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/JWTAuthenticatorsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/LoadBalancersClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MachinesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MaintenanceConfigurationsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClusterSnapshotsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedNamespacesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/MeshMembershipsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationStatusResultsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/ResolvePrivateLinkServiceIdsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/SnapshotsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRoleBindingsClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/TrustedAccessRolesClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/VmSkusClient.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AccessProfile.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolAvailableVersionsProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/AgentPoolUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CommandResultProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/CredentialResultsInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/GuardrailsAvailableVersionInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/IdentityBindingInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/JWTAuthenticatorInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/KubernetesVersionListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/LoadBalancerProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MachineInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MaintenanceConfigurationProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAccessProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterAgentPoolProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterSnapshotProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedClusterUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ManagedNamespaceInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshMembershipInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshRevisionProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/MeshUpgradeProfileInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/NodeImageVersionInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationStatusResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueDisplay.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OperationValueInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/OutboundEnvironmentEndpointInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/PrivateLinkResourcesListResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/ResourceSkuInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/RunCommandResultInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SafeguardsAvailableVersionInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/SnapshotProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleBindingProperties.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/TrustedAccessRoleInner.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/fluent/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ContainerServiceManagementClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/IdentityBindingsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/JWTAuthenticatorsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/LoadBalancersClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MachinesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MaintenanceConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClusterSnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedClustersClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ManagedNamespacesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/MeshMembershipsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationStatusResultsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/ResolvePrivateLinkServiceIdsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/SnapshotsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRoleBindingsClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/TrustedAccessRolesClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/VmSkusClientImpl.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/AgentPoolListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/GuardrailsAvailableVersionsList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/IdentityBindingListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/JWTAuthenticatorListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/LoadBalancerListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MachineListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MaintenanceConfigurationListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedClusterSnapshotListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/ManagedNamespaceListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshMembershipsListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshRevisionProfileList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/MeshUpgradeProfileList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/NodeImageVersionsListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OperationStatusResultList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/OutboundEnvironmentEndpointCollection.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SafeguardsAvailableVersionsList.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/SnapshotListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleBindingListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/TrustedAccessRoleListResult.java","src/main/java/com/azure/resourcemanager/containerservice/implementation/models/VmSkusListResult.java","src/main/java/com/azure/resourcemanager/containerservice/models/AbsoluteMonthlySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/AccelerationMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/AddonAutoscaling.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdoptionPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkPolicies.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworking.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingObservability.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingPerformance.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurity.java","src/main/java/com/azure/resourcemanager/containerservice/models/AdvancedNetworkingSecurityTransitEncryption.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolArtifactStreamingProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolBlueGreenUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolDeleteMachinesParameter.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolNetworkProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolRecentlyUsedVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolSshAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolType.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeProfilePropertiesUpgradesItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/AgentPoolWindowsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ArtifactSource.java","src/main/java/com/azure/resourcemanager/containerservice/models/AutoScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/AzureKeyVaultKms.java","src/main/java/com/azure/resourcemanager/containerservice/models/BackendPoolType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ClusterServiceLoadBalancerHealthProbeMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ClusterUpgradeSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/Code.java","src/main/java/com/azure/resourcemanager/containerservice/models/CompatibleVersions.java","src/main/java/com/azure/resourcemanager/containerservice/models/Component.java","src/main/java/com/azure/resourcemanager/containerservice/models/ComponentsByRelease.java","src/main/java/com/azure/resourcemanager/containerservice/models/ConnectionStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerNetworkLogs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceLinuxProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceNetworkProfileKubeProxyConfigIpvsConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshConfiguration.java","src/main/java/com/azure/resourcemanager/containerservice/models/ContainerServiceSshPublicKey.java","src/main/java/com/azure/resourcemanager/containerservice/models/ControlPlaneScalingSize.java","src/main/java/com/azure/resourcemanager/containerservice/models/CreationData.java","src/main/java/com/azure/resourcemanager/containerservice/models/CredentialResult.java","src/main/java/com/azure/resourcemanager/containerservice/models/DailySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/DateSpan.java","src/main/java/com/azure/resourcemanager/containerservice/models/DelegatedResource.java","src/main/java/com/azure/resourcemanager/containerservice/models/DeletePolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/DriftAction.java","src/main/java/com/azure/resourcemanager/containerservice/models/DriverType.java","src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDependency.java","src/main/java/com/azure/resourcemanager/containerservice/models/EndpointDetail.java","src/main/java/com/azure/resourcemanager/containerservice/models/Expander.java","src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocation.java","src/main/java/com/azure/resourcemanager/containerservice/models/ExtendedLocationTypes.java","src/main/java/com/azure/resourcemanager/containerservice/models/Format.java","src/main/java/com/azure/resourcemanager/containerservice/models/GatewayApiIstioEnabled.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuInstanceProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/GpuProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsAvailableVersionsProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/GuardrailsSupport.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingManagedIdentityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingOidcIssuerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/IdentityBindingProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/InfrastructureEncryption.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpFamily.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpTag.java","src/main/java/com/azure/resourcemanager/containerservice/models/IpvsScheduler.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioCertificateAuthority.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioComponents.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioEgressGateway.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGateway.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioIngressGatewayMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioPluginCertificateAuthority.java","src/main/java/com/azure/resourcemanager/containerservice/models/IstioServiceMesh.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappingExpression.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorClaimMappings.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorExtraClaimMappingExpression.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorIssuer.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/JWTAuthenticatorValidationRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/KeyVaultNetworkAccessTypes.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubeletConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubeletDiskType.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesPatchVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesResourceObjectEncryptionProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesSupportPlan.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersion.java","src/main/java/com/azure/resourcemanager/containerservice/models/KubernetesVersionCapabilities.java","src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelector.java","src/main/java/com/azure/resourcemanager/containerservice/models/LabelSelectorRequirement.java","src/main/java/com/azure/resourcemanager/containerservice/models/LicenseType.java","src/main/java/com/azure/resourcemanager/containerservice/models/LinuxOSConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/LoadBalancerSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardDestination.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsForwardPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsOverride.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsProtocol.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsQueryLogging.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsServeStale.java","src/main/java/com/azure/resourcemanager/containerservice/models/LocalDnsState.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineBillingProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineHardwareProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineIpAddress.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineKubernetesProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineNetworkProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineOSProfileLinuxProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MachineStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/MaintenanceWindow.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAIToolchainOperatorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAadProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAddonProfileIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAgentPoolProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterApiServerAccessProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAppRoutingIstio.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAutoUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoring.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringAutoInstrumentation.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryLogsAndTraces.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileAppMonitoringOpenTelemetryMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileContainerInsights.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileKubeStateMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetrics.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterAzureMonitorProfileMetricsControlPlane.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterBootstrapProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterControlPlaneScalingProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterCostAnalysis.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHealthMonitorProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHostedSystemProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterHttpProxyConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressDefaultDomainProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileApplicationLoadBalancer.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileGatewayConfiguration.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileNginx.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterIngressProfileWebAppRouting.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterLoadBalancerProfileOutboundIpPrefixes.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterManagedOutboundIpProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterMetricsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIPs.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNATGatewayProfileOutboundIpPrefixes.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNatGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeProvisioningProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterNodeResourceGroupProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterOidcIssuerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityException.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningError.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningErrorBody.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningInfo.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPodIdentityProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPoolUpgradeProfileUpgradesItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesAutoScalerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterPropertiesForSnapshot.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefender.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGating.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileDefenderSecurityMonitoring.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageCleaner.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileImageIntegrity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileNodeRestriction.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSecurityProfileWorkloadIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterServicePrincipalProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuName.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterSkuTier.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStaticEgressGatewayProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStatus.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileBlobCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileDiskCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileFileCsiDriver.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterStorageProfileSnapshotController.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWebAppRoutingGatewayApiImplementations.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWindowsProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileKeda.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClusterWorkloadAutoScalerProfileVerticalPodAutoscaler.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultHeaders.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedClustersGetCommandResultResponse.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedGatewayType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagedServiceIdentityUserAssignedIdentitiesValue.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManagementMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ManualScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipPrivateConnectProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshMembershipProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevision.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshRevisionProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MeshUpgradeProfileProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/MigStrategy.java","src/main/java/com/azure/resourcemanager/containerservice/models/Mode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/NamespaceProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkDataplane.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPlugin.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPluginMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicies.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/NetworkProfileForSnapshot.java","src/main/java/com/azure/resourcemanager/containerservice/models/NginxIngressControllerType.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeOSUpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningDefaultNodePools.java","src/main/java/com/azure/resourcemanager/containerservice/models/NodeProvisioningMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/NvidiaGPUProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSDiskType.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSSku.java","src/main/java/com/azure/resourcemanager/containerservice/models/OSType.java","src/main/java/com/azure/resourcemanager/containerservice/models/Operator.java","src/main/java/com/azure/resourcemanager/containerservice/models/OutboundType.java","src/main/java/com/azure/resourcemanager/containerservice/models/PodIpAllocationMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/PodLinkLocalAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/PolicyRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/PortRange.java","src/main/java/com/azure/resourcemanager/containerservice/models/PowerState.java","src/main/java/com/azure/resourcemanager/containerservice/models/PreparedImageSpecificationProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/containerservice/models/Protocol.java","src/main/java/com/azure/resourcemanager/containerservice/models/ProxyRedirectionMechanism.java","src/main/java/com/azure/resourcemanager/containerservice/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/containerservice/models/RebalanceLoadBalancersRequestBody.java","src/main/java/com/azure/resourcemanager/containerservice/models/RelativeMonthlySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceQuota.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceReference.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapabilities.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacity.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCapacityScaleType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuCosts.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuLocationInfo.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionInfo.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictions.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsReasonCode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuRestrictionsType.java","src/main/java/com/azure/resourcemanager/containerservice/models/ResourceSkuZoneDetails.java","src/main/java/com/azure/resourcemanager/containerservice/models/RestrictionLevel.java","src/main/java/com/azure/resourcemanager/containerservice/models/RunCommandRequest.java","src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsAvailableVersionsProperties.java","src/main/java/com/azure/resourcemanager/containerservice/models/SafeguardsSupport.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleDownMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetEvictionPolicy.java","src/main/java/com/azure/resourcemanager/containerservice/models/ScaleSetPriority.java","src/main/java/com/azure/resourcemanager/containerservice/models/Schedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerConfigMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerInstanceProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/SchedulerProfileSchedulerInstanceProfiles.java","src/main/java/com/azure/resourcemanager/containerservice/models/SeccompDefault.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceAccountImagePullProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshMode.java","src/main/java/com/azure/resourcemanager/containerservice/models/ServiceMeshProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/SnapshotType.java","src/main/java/com/azure/resourcemanager/containerservice/models/SysctlConfig.java","src/main/java/com/azure/resourcemanager/containerservice/models/TagsObject.java","src/main/java/com/azure/resourcemanager/containerservice/models/TimeInWeek.java","src/main/java/com/azure/resourcemanager/containerservice/models/TimeSpan.java","src/main/java/com/azure/resourcemanager/containerservice/models/TransitEncryptionType.java","src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleBindingProvisioningState.java","src/main/java/com/azure/resourcemanager/containerservice/models/TrustedAccessRoleRule.java","src/main/java/com/azure/resourcemanager/containerservice/models/Type.java","src/main/java/com/azure/resourcemanager/containerservice/models/UndrainableNodeBehavior.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeChannel.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeOverrideSettings.java","src/main/java/com/azure/resourcemanager/containerservice/models/UpgradeStrategy.java","src/main/java/com/azure/resourcemanager/containerservice/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachineNodes.java","src/main/java/com/azure/resourcemanager/containerservice/models/VirtualMachinesProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/VmState.java","src/main/java/com/azure/resourcemanager/containerservice/models/WeekDay.java","src/main/java/com/azure/resourcemanager/containerservice/models/WeeklySchedule.java","src/main/java/com/azure/resourcemanager/containerservice/models/WindowsGmsaProfile.java","src/main/java/com/azure/resourcemanager/containerservice/models/WorkloadRuntime.java","src/main/java/com/azure/resourcemanager/containerservice/models/package-info.java","src/main/java/com/azure/resourcemanager/containerservice/package-info.java"]} \ No newline at end of file diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json index cf725a0f4c44..67532f1a8c80 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-containerservice/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.containerservice.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerservice.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.containerservice.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClustersClientImpl$ManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.ManagedNamespacesClientImpl$ManagedNamespacesService"],["com.azure.resourcemanager.containerservice.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.containerservice.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService"],["com.azure.resourcemanager.containerservice.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService"]] \ No newline at end of file +[["com.azure.resourcemanager.containerservice.implementation.AgentPoolsClientImpl$AgentPoolsService"],["com.azure.resourcemanager.containerservice.implementation.IdentityBindingsClientImpl$IdentityBindingsService"],["com.azure.resourcemanager.containerservice.implementation.JWTAuthenticatorsClientImpl$JWTAuthenticatorsService"],["com.azure.resourcemanager.containerservice.implementation.LoadBalancersClientImpl$LoadBalancersService"],["com.azure.resourcemanager.containerservice.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.containerservice.implementation.MaintenanceConfigurationsClientImpl$MaintenanceConfigurationsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClusterSnapshotsClientImpl$ManagedClusterSnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.ManagedClustersClientImpl$ManagedClustersService"],["com.azure.resourcemanager.containerservice.implementation.ManagedNamespacesClientImpl$ManagedNamespacesService"],["com.azure.resourcemanager.containerservice.implementation.MeshMembershipsClientImpl$MeshMembershipsService"],["com.azure.resourcemanager.containerservice.implementation.OperationStatusResultsClientImpl$OperationStatusResultsService"],["com.azure.resourcemanager.containerservice.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.containerservice.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.containerservice.implementation.ResolvePrivateLinkServiceIdsClientImpl$ResolvePrivateLinkServiceIdsService"],["com.azure.resourcemanager.containerservice.implementation.SnapshotsClientImpl$SnapshotsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRoleBindingsClientImpl$TrustedAccessRoleBindingsService"],["com.azure.resourcemanager.containerservice.implementation.TrustedAccessRolesClientImpl$TrustedAccessRolesService"],["com.azure.resourcemanager.containerservice.implementation.VmSkusClientImpl$VmSkusService"]] \ No newline at end of file diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java index 2739a690f9b8..1999f79a3a30 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsAbortLatestOperationSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsAbortLatestOperationSamples { /* - * x-ms-original-file: 2026-02-01/AgentPoolsAbortOperation.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsAbortOperation.json */ /** * Sample code: Abort operation on agent pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCompleteUpgradeSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCompleteUpgradeSamples.java new file mode 100644 index 000000000000..1dcb28e4e884 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCompleteUpgradeSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for AgentPools CompleteUpgrade. + */ +public final class AgentPoolsCompleteUpgradeSamples { + /* + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCompleteUpgrade.json + */ + /** + * Sample code: Complete agent pool upgrade. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + completeAgentPoolUpgrade(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .completeUpgrade("rg1", "clustername1", "agentpool1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java index 797b3ec665c3..10762b085d50 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsCreateOrUpdateSamples.java @@ -8,6 +8,7 @@ import com.azure.resourcemanager.containerservice.models.AgentPoolMode; import com.azure.resourcemanager.containerservice.models.AgentPoolType; import com.azure.resourcemanager.containerservice.models.AgentPoolWindowsProfile; +import com.azure.resourcemanager.containerservice.models.AutoScaleProfile; import com.azure.resourcemanager.containerservice.models.Code; import com.azure.resourcemanager.containerservice.models.CreationData; import com.azure.resourcemanager.containerservice.models.GpuInstanceProfile; @@ -33,7 +34,7 @@ */ public final class AgentPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_EnableFIPS.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_EnableFIPS.json */ /** * Sample code: Create Agent Pool with FIPS enabled OS. @@ -54,7 +55,7 @@ public final class AgentPoolsCreateOrUpdateSamples { } /* - * x-ms-original-file: 2026-02-01/AgentPools_Update.json + * x-ms-original-file: 2026-02-02-preview/AgentPools_Update.json */ /** * Sample code: Update Agent Pool. @@ -79,7 +80,7 @@ public static void updateAgentPool(com.azure.resourcemanager.containerservice.Co } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_GPUMIG.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_GPUMIG.json */ /** * Sample code: Create Agent Pool with GPUMIG. @@ -116,7 +117,7 @@ public static void updateAgentPool(com.azure.resourcemanager.containerservice.Co } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_WindowsOSSKU.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_WindowsOSSKU.json */ /** * Sample code: Create Agent Pool with Windows OSSKU. @@ -137,7 +138,7 @@ public static void updateAgentPool(com.azure.resourcemanager.containerservice.Co } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_DedicatedHostGroup.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_DedicatedHostGroup.json */ /** * Sample code: Create Agent Pool with Dedicated Host Group. @@ -158,7 +159,7 @@ public static void createAgentPoolWithDedicatedHostGroup( } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_Update.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_Update.json */ /** * Sample code: Create/Update Agent Pool. @@ -184,7 +185,7 @@ public static void createAgentPoolWithDedicatedHostGroup( } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_WindowsDisableOutboundNAT.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_WindowsDisableOutboundNAT.json */ /** * Sample code: Create Windows Agent Pool with disabling OutboundNAT. @@ -206,7 +207,7 @@ public static void createWindowsAgentPoolWithDisablingOutboundNAT( } /* - * x-ms-original-file: 2026-02-01/AgentPools_Start.json + * x-ms-original-file: 2026-02-02-preview/AgentPools_Start.json */ /** * Sample code: Start Agent Pool. @@ -222,7 +223,7 @@ public static void startAgentPool(com.azure.resourcemanager.containerservice.Con } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_Spot.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_Spot.json */ /** * Sample code: Create Spot Agent Pool. @@ -246,7 +247,7 @@ public static void createSpotAgentPool(com.azure.resourcemanager.containerservic } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_Ephemeral.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_Ephemeral.json */ /** * Sample code: Create Agent Pool with Ephemeral OS Disk. @@ -268,7 +269,28 @@ public static void createSpotAgentPool(com.azure.resourcemanager.containerservic } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_EnableEncryptionAtHost.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsAssociate_CRG.json + */ + /** + * Sample code: Associate Agent Pool with Capacity Reservation Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void associateAgentPoolWithCapacityReservationGroup( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withOrchestratorVersion("") + .withCapacityReservationGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_EnableEncryptionAtHost.json */ /** * Sample code: Create Agent Pool with EncryptionAtHost enabled. @@ -289,7 +311,7 @@ public static void createAgentPoolWithEncryptionAtHostEnabled( } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_EnableUltraSSD.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_EnableUltraSSD.json */ /** * Sample code: Create Agent Pool with UltraSSD enabled. @@ -310,7 +332,30 @@ public static void createAgentPoolWithEncryptionAtHostEnabled( } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_WasmWasi.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json + */ + /** + * Sample code: Create Agent Pool with VirtualMachines pool type with autoscaling enabled. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withOsType(OSType.LINUX) + .withTypePropertiesType(AgentPoolType.VIRTUAL_MACHINES) + .withOrchestratorVersion("1.29.0") + .withTags(mapOf("name1", "val1")) + .withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .withVirtualMachinesProfile(new VirtualMachinesProfile().withScale(new ScaleProfile().withAutoscale( + Arrays.asList(new AutoScaleProfile().withSize("Standard_D2_v2").withMinCount(1).withMaxCount(5))))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_WasmWasi.json */ /** * Sample code: Create Agent Pool with Krustlet and the WASI runtime. @@ -333,7 +378,7 @@ public static void createAgentPoolWithKrustletAndTheWASIRuntime( } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_PPG.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_PPG.json */ /** * Sample code: Create Agent Pool with PPG. @@ -354,7 +399,7 @@ public static void createAgentPoolWithKrustletAndTheWASIRuntime( } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_Snapshot.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_Snapshot.json */ /** * Sample code: Create Agent Pool using an agent pool snapshot. @@ -376,7 +421,7 @@ public static void createAgentPoolUsingAnAgentPoolSnapshot( } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_CustomNodeConfig.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_CustomNodeConfig.json */ /** * Sample code: Create Agent Pool with KubeletConfig and LinuxOSConfig. @@ -412,7 +457,7 @@ public static void createAgentPoolWithKubeletConfigAndLinuxOSConfig( } /* - * x-ms-original-file: 2026-02-01/AgentPools_Stop.json + * x-ms-original-file: 2026-02-02-preview/AgentPools_Stop.json */ /** * Sample code: Stop Agent Pool. @@ -428,7 +473,7 @@ public static void stopAgentPool(com.azure.resourcemanager.containerservice.Cont } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_MessageOfTheDay.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_MessageOfTheDay.json */ /** * Sample code: Create Agent Pool with Message of the Day. @@ -451,28 +496,7 @@ public static void stopAgentPool(com.azure.resourcemanager.containerservice.Cont } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_CRG.json - */ - /** - * Sample code: Create Agent Pool with Capacity Reservation Group. - * - * @param manager Entry point to ContainerServiceManager. - */ - public static void createAgentPoolWithCapacityReservationGroup( - com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { - manager.serviceClient() - .getAgentPools() - .createOrUpdate("rg1", "clustername1", "agentpool1", new AgentPoolInner().withCount(3) - .withVmSize("Standard_DS2_v2") - .withOsType(OSType.LINUX) - .withOrchestratorVersion("") - .withCapacityReservationGroupId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/CapacityReservationGroups/crg1"), - null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_OSSKU.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_OSSKU.json */ /** * Sample code: Create Agent Pool with OSSKU. @@ -509,7 +533,7 @@ public static void createAgentPoolWithCapacityReservationGroup( } /* - * x-ms-original-file: 2026-02-01/AgentPoolsCreate_TypeVirtualMachines.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsCreate_TypeVirtualMachines.json */ /** * Sample code: Create Agent Pool with VirtualMachines pool type. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java index 0aec808477a6..a15d7de61609 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteMachinesSamples.java @@ -12,7 +12,7 @@ */ public final class AgentPoolsDeleteMachinesSamples { /* - * x-ms-original-file: 2026-02-01/AgentPoolsDeleteMachines.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsDeleteMachines.json */ /** * Sample code: Delete Specific Machines in an Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java index e68dd005fe19..21585ea4e54f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsDeleteSamples.java @@ -9,7 +9,22 @@ */ public final class AgentPoolsDeleteSamples { /* - * x-ms-original-file: 2026-02-01/AgentPoolsDelete.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsDelete_IgnorePodDisruptionBudget.json + */ + /** + * Sample code: Delete Agent Pool by ignoring PodDisruptionBudget. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteAgentPoolByIgnoringPodDisruptionBudget( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getAgentPools() + .delete("rg1", "clustername1", "agentpool1", true, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/AgentPoolsDelete.json */ /** * Sample code: Delete Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java index b3b491d48c2d..617d595aa93e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetAvailableAgentPoolVersionsSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsGetAvailableAgentPoolVersionsSamples { /* - * x-ms-original-file: 2026-02-01/AgentPoolsGetAgentPoolAvailableVersions.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsGetAgentPoolAvailableVersions.json */ /** * Sample code: Get available versions for agent pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java index 4b4e7c45d452..c0b0c5356c31 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsGetSamples { /* - * x-ms-original-file: 2026-02-01/AgentPoolsGet.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsGet.json */ /** * Sample code: Get Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java index 1faeb0f9c8cd..a8bed51634dd 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsGetUpgradeProfileSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsGetUpgradeProfileSamples { /* - * x-ms-original-file: 2026-02-01/AgentPoolsGetUpgradeProfile.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsGetUpgradeProfile.json */ /** * Sample code: Get Upgrade Profile for Agent Pool. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java index dccfd3fa54b8..a1f165508a44 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsListSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsListSamples { /* - * x-ms-original-file: 2026-02-01/AgentPoolsList.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsList.json */ /** * Sample code: List Agent Pools by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java index 998fd898af08..df2a877e8c30 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/AgentPoolsUpgradeNodeImageVersionSamples.java @@ -9,7 +9,7 @@ */ public final class AgentPoolsUpgradeNodeImageVersionSamples { /* - * x-ms-original-file: 2026-02-01/AgentPoolsUpgradeNodeImageVersion.json + * x-ms-original-file: 2026-02-02-preview/AgentPoolsUpgradeNodeImageVersion.json */ /** * Sample code: Upgrade Agent Pool Node Image Version. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..77980d778c5e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsCreateOrUpdateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.IdentityBindingInner; +import com.azure.resourcemanager.containerservice.models.IdentityBindingManagedIdentityProfile; +import com.azure.resourcemanager.containerservice.models.IdentityBindingProperties; + +/** + * Samples for IdentityBindings CreateOrUpdate. + */ +public final class IdentityBindingsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-02-02-preview/IdentityBindings_Create_Or_Update.json + */ + /** + * Sample code: Create or update Identity Binding. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createOrUpdateIdentityBinding(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getIdentityBindings() + .createOrUpdate("rg1", "clustername1", "identitybinding1", + new IdentityBindingInner().withProperties(new IdentityBindingProperties() + .withManagedIdentity(new IdentityBindingManagedIdentityProfile().withResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsDeleteSamples.java new file mode 100644 index 000000000000..3214e117fd03 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for IdentityBindings Delete. + */ +public final class IdentityBindingsDeleteSamples { + /* + * x-ms-original-file: 2026-02-02-preview/IdentityBindings_Delete.json + */ + /** + * Sample code: Delete Identity Binding. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteIdentityBinding(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getIdentityBindings() + .delete("rg1", "clustername1", "identitybinding1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsGetSamples.java new file mode 100644 index 000000000000..d0a5cd57c2b3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for IdentityBindings Get. + */ +public final class IdentityBindingsGetSamples { + /* + * x-ms-original-file: 2026-02-02-preview/IdentityBindings_Get.json + */ + /** + * Sample code: Get Identity Binding. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getIdentityBinding(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getIdentityBindings() + .getWithResponse("rg1", "clustername1", "identitybinding1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsListByManagedClusterSamples.java new file mode 100644 index 000000000000..5040780e5d31 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/IdentityBindingsListByManagedClusterSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for IdentityBindings ListByManagedCluster. + */ +public final class IdentityBindingsListByManagedClusterSamples { + /* + * x-ms-original-file: 2026-02-02-preview/IdentityBindings_List.json + */ + /** + * Sample code: List Identity Bindings by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listIdentityBindingsByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getIdentityBindings() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..4c4f4022fc1b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsCreateOrUpdateSamples.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.JWTAuthenticatorInner; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorClaimMappingExpression; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorClaimMappings; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorExtraClaimMappingExpression; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorIssuer; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorProperties; +import com.azure.resourcemanager.containerservice.models.JWTAuthenticatorValidationRule; +import java.util.Arrays; + +/** + * Samples for JWTAuthenticators CreateOrUpdate. + */ +public final class JWTAuthenticatorsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-02-02-preview/JWTAuthenticators_Create_Or_Update.json + */ + /** + * Sample code: Create or update JWT Authenticator. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createOrUpdateJWTAuthenticator(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getJWTAuthenticators() + .createOrUpdate("rg1", "clustername1", "jwt1", + new JWTAuthenticatorInner() + .withProperties( + new JWTAuthenticatorProperties() + .withIssuer( + new JWTAuthenticatorIssuer().withUrl("https://example.com") + .withAudiences(Arrays.asList("https://example.com/audience1", + "https://example.com/audience2"))) + .withClaimValidationRules(Arrays.asList( + new JWTAuthenticatorValidationRule().withExpression("has(claims.sub)") + .withMessage("Sub is required"), + new JWTAuthenticatorValidationRule().withExpression("claims.sub != ''") + .withMessage("Sub cannot be empty"))) + .withClaimMappings(new JWTAuthenticatorClaimMappings() + .withUsername(new JWTAuthenticatorClaimMappingExpression() + .withExpression("'aks:jwt:' + claims.sub")) + .withGroups(new JWTAuthenticatorClaimMappingExpression() + .withExpression("claims.groups.split(',').map(group, 'aks:jwt:' + group)")) + .withExtra(Arrays.asList( + new JWTAuthenticatorExtraClaimMappingExpression().withKey("fakeTokenPlaceholder") + .withValueExpression("claims.customfield")))) + .withUserValidationRules(Arrays.asList(new JWTAuthenticatorValidationRule() + .withExpression("user.groups.all(group, group.startsWith('aks:jwt:admin:'))") + .withMessage("Must be in admin user group")))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsDeleteSamples.java new file mode 100644 index 000000000000..85acf39e55a8 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for JWTAuthenticators Delete. + */ +public final class JWTAuthenticatorsDeleteSamples { + /* + * x-ms-original-file: 2026-02-02-preview/JWTAuthenticators_Delete.json + */ + /** + * Sample code: Delete JWT Authenticator. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteJWTAuthenticator(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getJWTAuthenticators() + .delete("rg1", "clustername1", "jwt1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsGetSamples.java new file mode 100644 index 000000000000..5ca9a116ee3c --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for JWTAuthenticators Get. + */ +public final class JWTAuthenticatorsGetSamples { + /* + * x-ms-original-file: 2026-02-02-preview/JWTAuthenticators_Get.json + */ + /** + * Sample code: Get JWT Authenticator. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getJWTAuthenticator(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getJWTAuthenticators() + .getWithResponse("rg1", "clustername1", "jwt1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsListByManagedClusterSamples.java new file mode 100644 index 000000000000..c32f9dfd02f5 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/JWTAuthenticatorsListByManagedClusterSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for JWTAuthenticators ListByManagedCluster. + */ +public final class JWTAuthenticatorsListByManagedClusterSamples { + /* + * x-ms-original-file: 2026-02-02-preview/JWTAuthenticators_List.json + */ + /** + * Sample code: List JWT authenticators by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listJWTAuthenticatorsByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getJWTAuthenticators() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..3e007cb22200 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersCreateOrUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.LoadBalancerInner; + +/** + * Samples for LoadBalancers CreateOrUpdate. + */ +public final class LoadBalancersCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-02-02-preview/LoadBalancers_Create_Or_Update.json + */ + /** + * Sample code: Create or update a Load Balancer. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createOrUpdateALoadBalancer(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getLoadBalancers() + .createOrUpdateWithResponse("rg1", "clustername1", "kubernetes", + new LoadBalancerInner().withPrimaryAgentPoolName("agentpool1").withAllowServicePlacement(true), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersDeleteSamples.java new file mode 100644 index 000000000000..3e93979bcce3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for LoadBalancers Delete. + */ +public final class LoadBalancersDeleteSamples { + /* + * x-ms-original-file: 2026-02-02-preview/LoadBalancers_Delete.json + */ + /** + * Sample code: Delete a Load Balancer. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void deleteALoadBalancer(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getLoadBalancers() + .delete("rg1", "clustername1", "kubernetes", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersGetSamples.java new file mode 100644 index 000000000000..f2f8ea83b076 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for LoadBalancers Get. + */ +public final class LoadBalancersGetSamples { + /* + * x-ms-original-file: 2026-02-02-preview/LoadBalancers_Get.json + */ + /** + * Sample code: Get Load Balancer. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getLoadBalancer(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getLoadBalancers() + .getWithResponse("rg1", "clustername1", "kubernetes", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersListByManagedClusterSamples.java new file mode 100644 index 000000000000..d922b0212929 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/LoadBalancersListByManagedClusterSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for LoadBalancers ListByManagedCluster. + */ +public final class LoadBalancersListByManagedClusterSamples { + /* + * x-ms-original-file: 2026-02-02-preview/LoadBalancers_List.json + */ + /** + * Sample code: List Load Balancers by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listLoadBalancersByManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getLoadBalancers() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..b1486eb7e053 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesCreateOrUpdateSamples.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.MachineInner; +import com.azure.resourcemanager.containerservice.models.AgentPoolMode; +import com.azure.resourcemanager.containerservice.models.KubeletDiskType; +import com.azure.resourcemanager.containerservice.models.MachineHardwareProfile; +import com.azure.resourcemanager.containerservice.models.MachineKubernetesProfile; +import com.azure.resourcemanager.containerservice.models.MachineOSProfile; +import com.azure.resourcemanager.containerservice.models.MachineProperties; +import com.azure.resourcemanager.containerservice.models.OSSku; +import com.azure.resourcemanager.containerservice.models.OSType; +import com.azure.resourcemanager.containerservice.models.ScaleSetPriority; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Machines CreateOrUpdate. + */ +public final class MachinesCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-02-02-preview/MachineCreate_Update.json + */ + /** + * Sample code: Create/Update Machine. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createUpdateMachine(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMachines() + .createOrUpdate("rg1", "clustername1", "agentpool1", "machine1", + new MachineInner().withProperties(new MachineProperties() + .withHardware(new MachineHardwareProfile().withVmSize("Standard_DS1_v2")) + .withOperatingSystem( + new MachineOSProfile().withOsType(OSType.LINUX).withOsSku(OSSku.UBUNTU).withEnableFips(false)) + .withKubernetes(new MachineKubernetesProfile().withNodeLabels(mapOf("key1", "fakeTokenPlaceholder")) + .withOrchestratorVersion("1.30") + .withKubeletDiskType(KubeletDiskType.OS) + .withNodeTaints(Arrays.asList("Key1=Value1:NoSchedule")) + .withMaxPods(110)) + .withMode(AgentPoolMode.USER) + .withPriority(ScaleSetPriority.SPOT) + .withTags(mapOf("name1", "val1"))), + null, null, com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java index 21a80881905b..92b321d9f097 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesGetSamples.java @@ -9,7 +9,7 @@ */ public final class MachinesGetSamples { /* - * x-ms-original-file: 2026-02-01/MachineGet.json + * x-ms-original-file: 2026-02-02-preview/MachineGet.json */ /** * Sample code: Get a Machine in an Agent Pools by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java index 2a0f12f2e0f7..9019f3abedd5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MachinesListSamples.java @@ -9,7 +9,7 @@ */ public final class MachinesListSamples { /* - * x-ms-original-file: 2026-02-01/MachineList.json + * x-ms-original-file: 2026-02-02-preview/MachineList.json */ /** * Sample code: List Machines in an Agentpool by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java index 3eaf5ae19b96..e7442775fa0e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ */ public final class MaintenanceConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-02-01/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json + * x-ms-original-file: 2026-02-02-preview/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json */ /** * Sample code: Create/Update Maintenance Configuration with Maintenance Window. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java index 2c8a48a41719..da18a56a4705 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class MaintenanceConfigurationsDeleteSamples { /* - * x-ms-original-file: 2026-02-01/MaintenanceConfigurationsDelete_MaintenanceWindow.json + * x-ms-original-file: 2026-02-02-preview/MaintenanceConfigurationsDelete_MaintenanceWindow.json */ /** * Sample code: Delete Maintenance Configuration For Node OS Upgrade. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java index 0b8fb24c0ce7..8e2556bd88c1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsGetSamples.java @@ -9,7 +9,7 @@ */ public final class MaintenanceConfigurationsGetSamples { /* - * x-ms-original-file: 2026-02-01/MaintenanceConfigurationsGet_MaintenanceWindow.json + * x-ms-original-file: 2026-02-02-preview/MaintenanceConfigurationsGet_MaintenanceWindow.json */ /** * Sample code: Get Maintenance Configuration Configured With Maintenance Window. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java index 35085b4f609f..f0760d4ed882 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MaintenanceConfigurationsListByManagedClusterSamples.java @@ -9,7 +9,7 @@ */ public final class MaintenanceConfigurationsListByManagedClusterSamples { /* - * x-ms-original-file: 2026-02-01/MaintenanceConfigurationsList_MaintenanceWindow.json + * x-ms-original-file: 2026-02-02-preview/MaintenanceConfigurationsList_MaintenanceWindow.json */ /** * Sample code: List maintenance configurations configured with maintenance window by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..428d2ea88061 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsCreateOrUpdateSamples.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.ManagedClusterSnapshotInner; +import com.azure.resourcemanager.containerservice.models.CreationData; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedClusterSnapshots CreateOrUpdate. + */ +public final class ManagedClusterSnapshotsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsCreate.json + */ + /** + * Sample code: Create/Update Managed Cluster Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createUpdateManagedClusterSnapshot(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusterSnapshots() + .createOrUpdateWithResponse("rg1", "snapshot1", new ManagedClusterSnapshotInner().withLocation("westus") + .withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")) + .withCreationData(new CreationData().withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsDeleteSamples.java new file mode 100644 index 000000000000..074caa93dd3a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusterSnapshots Delete. + */ +public final class ManagedClusterSnapshotsDeleteSamples { + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsDelete.json + */ + /** + * Sample code: Delete Managed Cluster Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteManagedClusterSnapshot(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusterSnapshots() + .deleteWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..dd1ddf961cc6 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusterSnapshots GetByResourceGroup. + */ +public final class ManagedClusterSnapshotsGetByResourceGroupSamples { + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsGet.json + */ + /** + * Sample code: Get Managed Cluster Snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getManagedClusterSnapshot(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusterSnapshots() + .getByResourceGroupWithResponse("rg1", "snapshot1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListByResourceGroupSamples.java new file mode 100644 index 000000000000..003dcd42f89e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusterSnapshots ListByResourceGroup. + */ +public final class ManagedClusterSnapshotsListByResourceGroupSamples { + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsListByResourceGroup.json + */ + /** + * Sample code: List Managed Cluster Snapshots by Resource Group. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listManagedClusterSnapshotsByResourceGroup( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusterSnapshots() + .listByResourceGroup("rg1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListSamples.java new file mode 100644 index 000000000000..caba6455b916 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusterSnapshots List. + */ +public final class ManagedClusterSnapshotsListSamples { + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsList.json + */ + /** + * Sample code: List Managed Cluster Snapshots. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listManagedClusterSnapshots(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getManagedClusterSnapshots().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsUpdateTagsSamples.java new file mode 100644 index 000000000000..f83ea17235a4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClusterSnapshotsUpdateTagsSamples.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.TagsObject; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedClusterSnapshots UpdateTags. + */ +public final class ManagedClusterSnapshotsUpdateTagsSamples { + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClusterSnapshotsUpdateTags.json + */ + /** + * Sample code: Update Managed Cluster Snapshot Tags. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + updateManagedClusterSnapshotTags(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusterSnapshots() + .updateTagsWithResponse("rg1", "snapshot1", + new TagsObject().withTags(mapOf("key2", "fakeTokenPlaceholder", "key3", "fakeTokenPlaceholder")), + com.azure.core.util.Context.NONE); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java index 6294133c04e5..11af8641570a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersAbortLatestOperationSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersAbortLatestOperationSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersAbortOperation.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersAbortOperation.json */ /** * Sample code: Abort operation on managed cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java index 6d51045c57fe..f4e44ad74968 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersCreateOrUpdateSamples.java @@ -17,6 +17,7 @@ import com.azure.resourcemanager.containerservice.models.ContainerServiceNetworkProfile; import com.azure.resourcemanager.containerservice.models.ContainerServiceSshConfiguration; import com.azure.resourcemanager.containerservice.models.ContainerServiceSshPublicKey; +import com.azure.resourcemanager.containerservice.models.ControlPlaneScalingSize; import com.azure.resourcemanager.containerservice.models.CreationData; import com.azure.resourcemanager.containerservice.models.Expander; import com.azure.resourcemanager.containerservice.models.GpuInstanceProfile; @@ -31,13 +32,16 @@ import com.azure.resourcemanager.containerservice.models.KubernetesSupportPlan; import com.azure.resourcemanager.containerservice.models.LicenseType; import com.azure.resourcemanager.containerservice.models.LoadBalancerSku; +import com.azure.resourcemanager.containerservice.models.ManagedClusterAIToolchainOperatorProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAadProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAddonProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterAgentPoolProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterApiServerAccessProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterControlPlaneScalingProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterHttpProxyConfig; import com.azure.resourcemanager.containerservice.models.ManagedClusterIdentity; import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfile; +import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfileApplicationLoadBalancer; import com.azure.resourcemanager.containerservice.models.ManagedClusterIngressProfileWebAppRouting; import com.azure.resourcemanager.containerservice.models.ManagedClusterLoadBalancerProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs; @@ -47,8 +51,9 @@ import com.azure.resourcemanager.containerservice.models.ManagedClusterPropertiesAutoScalerProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileDefender; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGating; +import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem; import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileDefenderSecurityMonitoring; -import com.azure.resourcemanager.containerservice.models.ManagedClusterSecurityProfileWorkloadIdentity; import com.azure.resourcemanager.containerservice.models.ManagedClusterServicePrincipalProfile; import com.azure.resourcemanager.containerservice.models.ManagedClusterSku; import com.azure.resourcemanager.containerservice.models.ManagedClusterSkuName; @@ -67,6 +72,7 @@ import com.azure.resourcemanager.containerservice.models.ServiceMeshProfile; import com.azure.resourcemanager.containerservice.models.TransitEncryptionType; import com.azure.resourcemanager.containerservice.models.UpgradeOverrideSettings; +import com.azure.resourcemanager.containerservice.models.UserAssignedIdentity; import com.azure.resourcemanager.containerservice.models.WindowsGmsaProfile; import java.time.OffsetDateTime; import java.util.Arrays; @@ -78,14 +84,14 @@ */ public final class ManagedClustersCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_CRG.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_DualStackNetworking.json */ /** - * Sample code: Create Managed Cluster with Capacity Reservation Group. + * Sample code: Create/Update Managed Cluster with dual-stack networking. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithCapacityReservationGroup( + public static void createUpdateManagedClusterWithDualStackNetworking( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -93,16 +99,20 @@ public static void createManagedClusterWithCapacityReservationGroup( .withTags(mapOf("archv2", "", "tier", "production")) .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) .withTier(ManagedClusterSkuTier.FREE)) + .withIdentity(new ManagedClusterIdentity().withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new ManagedServiceIdentityUserAssignedIdentitiesValue()))) .withKubernetesVersion("") .withDnsPrefix("dnsprefix1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) - .withVmSize("Standard_DS2_v2") + .withVmSize("Standard_DS1_v2") .withOsType(OSType.LINUX) + .withScaleDownMode(ScaleDownMode.DEALLOCATE) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) .withEnableNodePublicIp(true) - .withCapacityReservationGroupId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1") .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -115,24 +125,31 @@ public static void createManagedClusterWithCapacityReservationGroup( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( - new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) - .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") - .withScaleDownDelayAfterAdd("15m")) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile() + .withManagedOutboundIPs(new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2))) + .withIpFamilies(Arrays.asList(IpFamily.IPV4, IpFamily.IPV6))) + .withAutoScalerProfile( + new ManagedClusterPropertiesAutoScalerProfile().withBalanceSimilarNodeGroups("true") + .withExpander(Expander.PRIORITY) + .withMaxNodeProvisionTime("15m") + .withNewPodScaleUpDelay("1m") + .withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m") + .withSkipNodesWithSystemPods("false")) .withDiskEncryptionSetId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_CustomCATrustCertificates.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_PodIdentity.json */ /** - * Sample code: Create Managed Cluster with Custom CA Trust Certificates. + * Sample code: Create Managed Cluster with PodIdentity enabled. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithCustomCATrustCertificates( + public static void createManagedClusterWithPodIdentityEnabled( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -157,6 +174,8 @@ public static void createManagedClusterWithCustomCATrustCertificates( .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) + .withPodIdentityProfile( + new ManagedClusterPodIdentityProfile().withEnabled(true).withAllowNetworkPluginKubenet(true)) .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) @@ -165,22 +184,100 @@ public static void createManagedClusterWithCustomCATrustCertificates( .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") - .withSecurityProfile(new ManagedClusterSecurityProfile().withCustomCATrustCertificates( - Arrays.asList("ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=".getBytes()))), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_DualStackNetworking.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_UserAssignedNATGateway.json */ /** - * Sample code: Create/Update Managed Cluster with dual-stack networking. + * Sample code: Create Managed Cluster with user-assigned NAT gateway as outbound type. * * @param manager Entry point to ContainerServiceManager. */ - public static void createUpdateManagedClusterWithDualStackNetworking( + public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(false) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile().withOutboundType(OutboundType.USER_ASSIGNED_NATGATEWAY) + .withLoadBalancerSku(LoadBalancerSku.STANDARD)) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_MCSnapshot.json + */ + /** + * Sample code: Create Managed Cluster using a managed cluster snapshot. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterUsingAManagedClusterSnapshot( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withCreationData(new CreationData().withSourceResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/managedclustersnapshots/snapshot1")) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withEnableFips(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_Update.json + */ + /** + * Sample code: Create/Update Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createUpdateManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") @@ -213,9 +310,11 @@ public static void createUpdateManagedClusterWithDualStackNetworking( .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile() - .withManagedOutboundIPs(new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2))) - .withIpFamilies(Arrays.asList(IpFamily.IPV4, IpFamily.IPV6))) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withUpgradeSettings(new ClusterUpgradeSettings() + .withOverrideSettings(new UpgradeOverrideSettings().withForceUpgrade(true) + .withUntil(OffsetDateTime.parse("2022-11-01T13:00:00Z")))) .withAutoScalerProfile( new ManagedClusterPropertiesAutoScalerProfile().withBalanceSimilarNodeGroups("true") .withExpander(Expander.PRIORITY) @@ -230,14 +329,54 @@ public static void createUpdateManagedClusterWithDualStackNetworking( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_PodIdentity.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_ControlPlaneScalingProfile.json */ /** - * Sample code: Create Managed Cluster with PodIdentity enabled. + * Sample code: Create Managed Cluster with ControlPlaneScalingProfile. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithPodIdentityEnabled( + public static void createManagedClusterWithControlPlaneScalingProfile( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", + new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.BASE) + .withTier(ManagedClusterSkuTier.STANDARD)) + .withKubernetesVersion("1.33.0") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withNetworkProfile(new ContainerServiceNetworkProfile().withNetworkPlugin(NetworkPlugin.AZURE) + .withNetworkPluginMode(NetworkPluginMode.OVERLAY) + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withControlPlaneScalingProfile( + new ManagedClusterControlPlaneScalingProfile().withScalingSize(ControlPlaneScalingSize.H4)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + */ + /** + * Sample code: Create Managed Private Cluster with fqdn subdomain specified. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -246,13 +385,14 @@ public static void createManagedClusterWithPodIdentityEnabled( .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) .withTier(ManagedClusterSkuTier.FREE)) .withKubernetesVersion("") - .withDnsPrefix("dnsprefix1") + .withFqdnSubdomain("domain1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -262,8 +402,6 @@ public static void createManagedClusterWithPodIdentityEnabled( .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) - .withPodIdentityProfile( - new ManagedClusterPodIdentityProfile().withEnabled(true).withAllowNetworkPluginKubenet(true)) .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) @@ -271,20 +409,21 @@ public static void createManagedClusterWithPodIdentityEnabled( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) - .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true) + .withPrivateDnsZone( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io")), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_UserAssignedNATGateway.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_ManagedNATGateway.json */ /** - * Sample code: Create Managed Cluster with user-assigned NAT gateway as outbound type. + * Sample code: Create Managed Cluster with AKS-managed NAT gateway as outbound type. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( + public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -311,8 +450,10 @@ public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( .withAddonProfiles(mapOf()) .withEnableRbac(true) .withNetworkProfile( - new ContainerServiceNetworkProfile().withOutboundType(OutboundType.USER_ASSIGNED_NATGATEWAY) - .withLoadBalancerSku(LoadBalancerSku.STANDARD)) + new ContainerServiceNetworkProfile().withOutboundType(OutboundType.MANAGED_NATGATEWAY) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withNatGatewayProfile(new ManagedClusterNatGatewayProfile() + .withManagedOutboundIpProfile(new ManagedClusterManagedOutboundIpProfile().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) .withDiskEncryptionSetId( @@ -321,35 +462,30 @@ public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_Update.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_Premium.json */ /** - * Sample code: Create/Update Managed Cluster. + * Sample code: Create Managed Cluster with LongTermSupport. * * @param manager Entry point to ContainerServiceManager. */ - public static void - createUpdateManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + public static void createManagedClusterWithLongTermSupport( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") .withTags(mapOf("archv2", "", "tier", "production")) - .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) - .withTier(ManagedClusterSkuTier.FREE)) - .withIdentity(new ManagedClusterIdentity().withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", - new ManagedServiceIdentityUserAssignedIdentitiesValue()))) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.BASE) + .withTier(ManagedClusterSkuTier.PREMIUM)) .withKubernetesVersion("") .withDnsPrefix("dnsprefix1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) - .withVmSize("Standard_DS1_v2") + .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) - .withScaleDownMode(ScaleDownMode.DEALLOCATE) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) - .withAvailabilityZones(Arrays.asList("1", "2", "3")) .withEnableNodePublicIp(true) + .withEnableEncryptionAtHost(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -360,35 +496,78 @@ public static void createManagedClusterWithUserAssignedNATGatewayAsOutboundType( .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) .withEnableRbac(true) + .withSupportPlan(KubernetesSupportPlan.AKSLONG_TERM_SUPPORT) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) - .withUpgradeSettings(new ClusterUpgradeSettings() - .withOverrideSettings(new UpgradeOverrideSettings().withForceUpgrade(false) - .withUntil(OffsetDateTime.parse("2022-11-01T13:00:00Z")))) - .withAutoScalerProfile( - new ManagedClusterPropertiesAutoScalerProfile().withBalanceSimilarNodeGroups("true") - .withExpander(Expander.PRIORITY) - .withMaxNodeProvisionTime("15m") - .withNewPodScaleUpDelay("1m") + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withDisableRunCommand(true)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json + */ + /** + * Sample code: Create Managed Cluster with Azure Key Vault Secrets Provider Addon. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", + new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles( + mapOf("azureKeyvaultSecretsProvider", + new ManagedClusterAddonProfile().withEnabled(true) + .withConfig(mapOf("enableSecretRotation", "fakeTokenPlaceholder", + "rotationPollInterval", "2m")))) + .withEnableRbac(true) + .withNetworkProfile( + new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile() .withScanInterval("20s") - .withScaleDownDelayAfterAdd("15m") - .withSkipNodesWithSystemPods("false")) - .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersAssociate_CRG.json */ /** - * Sample code: Create Managed Private Cluster with fqdn subdomain specified. + * Sample code: Associate Managed Cluster with Capacity Reservation Group. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( + public static void associateManagedClusterWithCapacityReservationGroup( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -397,14 +576,15 @@ public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) .withTier(ManagedClusterSkuTier.FREE)) .withKubernetesVersion("") - .withFqdnSubdomain("domain1") + .withDnsPrefix("dnsprefix1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) - .withEnableEncryptionAtHost(true) + .withCapacityReservationGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/capacityReservationGroups/crg1") .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -421,21 +601,63 @@ public static void createManagedPrivateClusterWithFqdnSubdomainSpecified( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) - .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true) - .withPrivateDnsZone( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io")), + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_ManagedNATGateway.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_NodeAutoProvisioning.json */ /** - * Sample code: Create Managed Cluster with AKS-managed NAT gateway as outbound type. + * Sample code: Create Managed Cluster with Node Auto Provisioning. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( + public static void createManagedClusterWithNodeAutoProvisioning( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", + new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withNetworkPlugin(NetworkPlugin.AZURE) + .withNetworkPluginMode(NetworkPluginMode.OVERLAY) + .withNetworkDataplane(NetworkDataplane.CILIUM) + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_NodePublicIPPrefix.json + */ + /** + * Sample code: Create Managed Cluster with Node Public IP Prefix. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithNodePublicIPPrefix( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -450,7 +672,9 @@ public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) - .withEnableNodePublicIp(false) + .withEnableNodePublicIp(true) + .withNodePublicIpPrefixId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix") .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -461,11 +685,10 @@ public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) .withEnableRbac(true) - .withNetworkProfile( - new ContainerServiceNetworkProfile().withOutboundType(OutboundType.MANAGED_NATGATEWAY) - .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withNatGatewayProfile(new ManagedClusterNatGatewayProfile() - .withManagedOutboundIpProfile(new ManagedClusterManagedOutboundIpProfile().withCount(2)))) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) .withDiskEncryptionSetId( @@ -474,21 +697,21 @@ public static void createManagedClusterWithAKSManagedNATGatewayAsOutboundType( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_Premium.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_EnableEncryptionAtHost.json */ /** - * Sample code: Create Managed Cluster with LongTermSupport. + * Sample code: Create Managed Cluster with EncryptionAtHost enabled. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithLongTermSupport( + public static void createManagedClusterWithEncryptionAtHostEnabled( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") .withTags(mapOf("archv2", "", "tier", "production")) - .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.BASE) - .withTier(ManagedClusterSkuTier.PREMIUM)) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) .withKubernetesVersion("") .withDnsPrefix("dnsprefix1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) @@ -508,26 +731,26 @@ public static void createManagedClusterWithLongTermSupport( .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) .withEnableRbac(true) - .withSupportPlan(KubernetesSupportPlan.AKSLONG_TERM_SUPPORT) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) - .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withDisableRunCommand(true)), + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_NodePublicIPPrefix.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_PrivateClusterPublicFQDN.json */ /** - * Sample code: Create Managed Cluster with Node Public IP Prefix. + * Sample code: Create Managed Private Cluster with Public FQDN specified. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithNodePublicIPPrefix( + public static void createManagedPrivateClusterWithPublicFQDNSpecified( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -543,8 +766,7 @@ public static void createManagedClusterWithNodePublicIPPrefix( .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) - .withNodePublicIpPrefixId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix") + .withEnableEncryptionAtHost(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -561,20 +783,20 @@ public static void createManagedClusterWithNodePublicIPPrefix( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) - .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true) + .withEnablePrivateClusterPublicFqdn(true)), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_EnableEncryptionAtHost.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_HTTPProxy.json */ /** - * Sample code: Create Managed Cluster with EncryptionAtHost enabled. + * Sample code: Create Managed Cluster with HTTP proxy configured. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithEncryptionAtHostEnabled( + public static void createManagedClusterWithHTTPProxyConfigured( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -590,7 +812,6 @@ public static void createManagedClusterWithEncryptionAtHostEnabled( .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) - .withEnableEncryptionAtHost(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -608,19 +829,23 @@ public static void createManagedClusterWithEncryptionAtHostEnabled( .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withHttpProxyConfig(new ManagedClusterHttpProxyConfig().withHttpProxy("http://myproxy.server.com:8080") + .withHttpsProxy("https://myproxy.server.com:8080") + .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) + .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_PrivateClusterPublicFQDN.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_UpdateWithEnableNamespaceResources.json */ /** - * Sample code: Create Managed Private Cluster with Public FQDN specified. + * Sample code: Create/Update Managed Cluster with EnableNamespaceResources. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedPrivateClusterWithPublicFQDNSpecified( + public static void createUpdateManagedClusterWithEnableNamespaceResources( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -631,12 +856,12 @@ public static void createManagedPrivateClusterWithPublicFQDNSpecified( .withKubernetesVersion("") .withDnsPrefix("dnsprefix1") .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) - .withVmSize("Standard_DS2_v2") + .withVmSize("Standard_DS1_v2") .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) .withMode(AgentPoolMode.SYSTEM) + .withAvailabilityZones(Arrays.asList("1", "2", "3")) .withEnableNodePublicIp(true) - .withEnableEncryptionAtHost(true) .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -647,26 +872,27 @@ public static void createManagedPrivateClusterWithPublicFQDNSpecified( .withSecret("fakeTokenPlaceholder")) .withAddonProfiles(mapOf()) .withEnableRbac(true) + .withEnableNamespaceResources(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) - .withApiServerAccessProfile(new ManagedClusterApiServerAccessProfile().withEnablePrivateCluster(true) - .withEnablePrivateClusterPublicFqdn(true)), + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_HTTPProxy.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_DedicatedHostGroup.json */ /** - * Sample code: Create Managed Cluster with HTTP proxy configured. + * Sample code: Create Managed Cluster with Dedicated Host Group. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithHTTPProxyConfigured( + public static void createManagedClusterWithDedicatedHostGroup( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -680,8 +906,9 @@ public static void createManagedClusterWithHTTPProxyConfigured( .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) - .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) + .withHostGroupId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1") .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( @@ -699,23 +926,63 @@ public static void createManagedClusterWithHTTPProxyConfigured( .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") .withScaleDownDelayAfterAdd("15m")) .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") - .withHttpProxyConfig(new ManagedClusterHttpProxyConfig().withHttpProxy("http://myproxy.server.com:8080") - .withHttpsProxy("https://myproxy.server.com:8080") - .withNoProxy(Arrays.asList("localhost", "127.0.0.1")) - .withTrustedCa("Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=")), + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_DedicatedHostGroup.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_EnableAIToolchainOperator.json */ /** - * Sample code: Create Managed Cluster with Dedicated Host Group. + * Sample code: Create Managed Cluster with AI Toolchain Operator enabled. * * @param manager Entry point to ContainerServiceManager. */ - public static void createManagedClusterWithDedicatedHostGroup( + public static void createManagedClusterWithAIToolchainOperatorEnabled( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", + new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withNetworkPlugin(NetworkPlugin.AZURE) + .withNetworkPluginMode(NetworkPluginMode.OVERLAY) + .withNetworkDataplane(NetworkDataplane.CILIUM) + .withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAiToolchainOperatorProfile(new ManagedClusterAIToolchainOperatorProfile().withEnabled(true)), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_IngressProfile_ApplicationLoadBalancer.json + */ + /** + * Sample code: Create Managed Cluster with Application Load Balancer Profile configured. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithApplicationLoadBalancerProfileConfigured( com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() @@ -729,32 +996,23 @@ public static void createManagedClusterWithDedicatedHostGroup( .withVmSize("Standard_DS2_v2") .withOsType(OSType.LINUX) .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) .withEnableNodePublicIp(true) - .withHostGroupId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1") .withName("nodepool1"))) .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) - .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") - .withAdminPassword("fakeTokenPlaceholder")) - .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") - .withSecret("fakeTokenPlaceholder")) - .withAddonProfiles(mapOf()) - .withEnableRbac(true) .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) .withLoadBalancerSku(LoadBalancerSku.STANDARD) .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) - .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") - .withScaleDownDelayAfterAdd("15m")) - .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + .withIngressProfile(new ManagedClusterIngressProfile().withApplicationLoadBalancer( + new ManagedClusterIngressProfileApplicationLoadBalancer().withEnabled(true))), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_EnabledFIPS.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_EnabledFIPS.json */ /** * Sample code: Create Managed Cluster with FIPS enabled OS. @@ -800,7 +1058,7 @@ public static void createManagedClusterWithFIPSEnabledOS( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_SecurityProfile.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_SecurityProfile.json */ /** * Sample code: Create Managed Cluster with Security Profile configured. @@ -835,13 +1093,20 @@ public static void createManagedClusterWithSecurityProfileConfigured( .withDefender(new ManagedClusterSecurityProfileDefender().withLogAnalyticsWorkspaceResourceId( "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME") .withSecurityMonitoring( - new ManagedClusterSecurityProfileDefenderSecurityMonitoring().withEnabled(true))) - .withWorkloadIdentity(new ManagedClusterSecurityProfileWorkloadIdentity().withEnabled(true))), + new ManagedClusterSecurityProfileDefenderSecurityMonitoring().withEnabled(true)) + .withSecurityGating(new ManagedClusterSecurityProfileDefenderSecurityGating().withEnabled(true) + .withIdentities( + Arrays.asList(new ManagedClusterSecurityProfileDefenderSecurityGatingIdentitiesItem() + .withAzureContainerRegistry("registry1") + .withIdentity(new UserAssignedIdentity().withResourceId( + "/subscriptions/SUB_ID/resourceGroups/RG_NAME/providers/Microsoft.ManagedIdentity/userAssignedIdentities/IDENTITY_NAME") + .withClientId("client1")))) + .withAllowSecretAccess(true)))), null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_PPG.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_PPG.json */ /** * Sample code: Create Managed Cluster with PPG. @@ -888,7 +1153,7 @@ public static void createManagedClusterWithSecurityProfileConfigured( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_IngressProfile_WebAppRouting.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_IngressProfile_WebAppRouting.json */ /** * Sample code: Create Managed Cluster with Web App Routing Ingress Profile configured. @@ -927,7 +1192,7 @@ public static void createManagedClusterWithWebAppRoutingIngressProfileConfigured } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_UpdateWithAHUB.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_UpdateWithAHUB.json */ /** * Sample code: Create/Update Managed Cluster with EnableAHUB. @@ -978,7 +1243,7 @@ public static void createUpdateManagedClusterWithEnableAHUB( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_DisableRunCommand.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_DisableRunCommand.json */ /** * Sample code: Create Managed Cluster with RunCommand disabled. @@ -1023,7 +1288,7 @@ public static void createManagedClusterWithRunCommandDisabled( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_AzureServiceMesh.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_AzureServiceMesh.json */ /** * Sample code: Create/Update Managed Cluster with Azure Service Mesh. @@ -1077,9 +1342,8 @@ public static void createUpdateManagedClusterWithAzureServiceMesh( .withIngressGateways( Arrays.asList(new IstioIngressGateway().withMode(IstioIngressGatewayMode.INTERNAL) .withEnabled(true))) - .withEgressGateways(Arrays.asList(new IstioEgressGateway().withEnabled(true) - .withName("test-istio-egress") - .withGatewayConfigurationName("test-gateway-configuration")))) + .withEgressGateways( + Arrays.asList(new IstioEgressGateway().withEnabled(true).withName("istioegress1")))) .withCertificateAuthority(new IstioCertificateAuthority() .withPlugin(new IstioPluginCertificateAuthority().withKeyVaultId("fakeTokenPlaceholder") .withCertObjectName("ca-cert") @@ -1090,7 +1354,7 @@ public static void createUpdateManagedClusterWithAzureServiceMesh( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_Snapshot.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_Snapshot.json */ /** * Sample code: Create Managed Cluster using an agent pool snapshot. @@ -1138,59 +1402,7 @@ public static void createManagedClusterUsingAnAgentPoolSnapshot( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json - */ - /** - * Sample code: Create Managed Cluster with Azure KeyVault Secrets Provider Addon. - * - * @param manager Entry point to ContainerServiceManager. - */ - public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( - com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { - manager.serviceClient() - .getManagedClusters() - .createOrUpdate("rg1", "clustername1", - new ManagedClusterInner().withLocation("location1") - .withTags(mapOf("archv2", "", "tier", "production")) - .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) - .withTier(ManagedClusterSkuTier.FREE)) - .withKubernetesVersion("") - .withDnsPrefix("dnsprefix1") - .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) - .withVmSize("Standard_DS2_v2") - .withOsType(OSType.LINUX) - .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) - .withMode(AgentPoolMode.SYSTEM) - .withEnableNodePublicIp(true) - .withName("nodepool1"))) - .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") - .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( - Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) - .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") - .withAdminPassword("fakeTokenPlaceholder")) - .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") - .withSecret("fakeTokenPlaceholder")) - .withAddonProfiles( - mapOf("azureKeyvaultSecretsProvider", - new ManagedClusterAddonProfile().withEnabled(true) - .withConfig(mapOf("enableSecretRotation", "fakeTokenPlaceholder", - "rotationPollInterval", "2m")))) - .withEnableRbac(true) - .withNetworkProfile( - new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) - .withLoadBalancerSku(LoadBalancerSku.STANDARD) - .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( - new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) - .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile() - .withScanInterval("20s") - .withScaleDownDelayAfterAdd("15m")) - .withDiskEncryptionSetId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), - null, null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_OSSKU.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_OSSKU.json */ /** * Sample code: Create Managed Cluster with OSSKU. @@ -1240,7 +1452,48 @@ public static void createManagedClusterWithAzureKeyVaultSecretsProviderAddon( } /* - * x-ms-original-file: 2026-02-01/AdvancedNetworkingTransitEncryption.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_VirtualMachines.json + */ + /** + * Sample code: Create Managed Cluster with VirtualMachines pool type. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithVirtualMachinesPoolType( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINES) + .withMode(AgentPoolMode.SYSTEM) + .withEnableFips(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/AdvancedNetworkingTransitEncryption.json */ /** * Sample code: Create Managed Cluster with Advanced Networking Transit Encryption. @@ -1289,7 +1542,7 @@ public static void createManagedClusterWithAdvancedNetworkingTransitEncryption( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json */ /** * Sample code: Create/Update AAD Managed Cluster with EnableAzureRBAC. @@ -1336,7 +1589,7 @@ public static void createUpdateAADManagedClusterWithEnableAzureRBAC( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_EnableUltraSSD.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_EnableUltraSSD.json */ /** * Sample code: Create Managed Cluster with UltraSSD enabled. @@ -1382,7 +1635,54 @@ public static void createManagedClusterWithUltraSSDEnabled( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_UpdateWindowsGmsa.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_CustomCATrustCertificates.json + */ + /** + * Sample code: Create Managed Cluster with CustomCATrustCertificates populated. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void createManagedClusterWithCustomCATrustCertificatesPopulated( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .createOrUpdate("rg1", "clustername1", new ManagedClusterInner().withLocation("location1") + .withTags(mapOf("archv2", "", "tier", "production")) + .withSku(new ManagedClusterSku().withName(ManagedClusterSkuName.fromString("Basic")) + .withTier(ManagedClusterSkuTier.FREE)) + .withKubernetesVersion("") + .withDnsPrefix("dnsprefix1") + .withAgentPoolProfiles(Arrays.asList(new ManagedClusterAgentPoolProfile().withCount(3) + .withVmSize("Standard_DS2_v2") + .withOsType(OSType.LINUX) + .withType(AgentPoolType.VIRTUAL_MACHINE_SCALE_SETS) + .withMode(AgentPoolMode.SYSTEM) + .withEnableNodePublicIp(true) + .withName("nodepool1"))) + .withLinuxProfile(new ContainerServiceLinuxProfile().withAdminUsername("azureuser") + .withSsh(new ContainerServiceSshConfiguration().withPublicKeys( + Arrays.asList(new ContainerServiceSshPublicKey().withKeyData("fakeTokenPlaceholder"))))) + .withWindowsProfile(new ManagedClusterWindowsProfile().withAdminUsername("azureuser") + .withAdminPassword("fakeTokenPlaceholder")) + .withServicePrincipalProfile(new ManagedClusterServicePrincipalProfile().withClientId("clientid") + .withSecret("fakeTokenPlaceholder")) + .withAddonProfiles(mapOf()) + .withEnableRbac(true) + .withNetworkProfile(new ContainerServiceNetworkProfile().withOutboundType(OutboundType.LOAD_BALANCER) + .withLoadBalancerSku(LoadBalancerSku.STANDARD) + .withLoadBalancerProfile(new ManagedClusterLoadBalancerProfile().withManagedOutboundIPs( + new ManagedClusterLoadBalancerProfileManagedOutboundIPs().withCount(2)))) + .withAutoScalerProfile(new ManagedClusterPropertiesAutoScalerProfile().withScanInterval("20s") + .withScaleDownDelayAfterAdd("15m")) + .withDiskEncryptionSetId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des") + .withSecurityProfile(new ManagedClusterSecurityProfile().withCustomCATrustCertificates( + Arrays.asList("ZHVtbXlFeGFtcGxlVGVzdFZhbHVlRm9yQ2VydGlmaWNhdGVUb0JlQWRkZWQ=".getBytes()))), + null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_UpdateWindowsGmsa.json */ /** * Sample code: Create/Update Managed Cluster with Windows gMSA enabled. @@ -1433,7 +1733,7 @@ public static void createUpdateManagedClusterWithWindowsGMSAEnabled( } /* - * x-ms-original-file: 2026-02-01/ManagedClustersCreate_GPUMIG.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersCreate_GPUMIG.json */ /** * Sample code: Create Managed Cluster with GPUMIG. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java index 6917fb5a90a2..d0ab1fc52459 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersDeleteSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersDelete.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersDelete.json */ /** * Sample code: Delete Managed Cluster. @@ -20,6 +20,6 @@ public final class ManagedClustersDeleteSamples { deleteManagedCluster(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { manager.serviceClient() .getManagedClusters() - .delete("rg1", "clustername1", null, com.azure.core.util.Context.NONE); + .delete("rg1", "clustername1", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java index 1f7ce48919bd..262ddb138df8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetAccessProfileSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetAccessProfileSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersGetAccessProfile.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersGetAccessProfile.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java index 08d6e9b19676..b3c84544da0f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersGet.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersGet.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java index 332c8e2b0486..925bd6d9de2a 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetCommandResultSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetCommandResultSamples { /* - * x-ms-original-file: 2026-02-01/RunCommandResultFailed.json + * x-ms-original-file: 2026-02-02-preview/RunCommandResultFailed.json */ /** * Sample code: commandFailedResult. @@ -24,7 +24,7 @@ public static void commandFailedResult(com.azure.resourcemanager.containerservic } /* - * x-ms-original-file: 2026-02-01/RunCommandResultSucceed.json + * x-ms-original-file: 2026-02-02-preview/RunCommandResultSucceed.json */ /** * Sample code: commandSucceedResult. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetGuardrailsVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetGuardrailsVersionsSamples.java new file mode 100644 index 000000000000..2625dd6f081b --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetGuardrailsVersionsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters GetGuardrailsVersions. + */ +public final class ManagedClustersGetGuardrailsVersionsSamples { + /* + * x-ms-original-file: 2026-02-02-preview/GetGuardrailsVersions.json + */ + /** + * Sample code: Get guardrails available versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getGuardrailsAvailableVersions(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .getGuardrailsVersionsWithResponse("location1", "v1.0.0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java index ba52aa681084..63e7a9270ca5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshRevisionProfileSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetMeshRevisionProfileSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersGet_MeshRevisionProfile.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersGet_MeshRevisionProfile.json */ /** * Sample code: Get a mesh revision profile for a mesh mode. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java index d937c07dfdac..14a140301099 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetMeshUpgradeProfileSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetMeshUpgradeProfileSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersGet_MeshUpgradeProfile.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersGet_MeshUpgradeProfile.json */ /** * Sample code: Gets version compatibility and upgrade profile for a service mesh in a cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetSafeguardsVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetSafeguardsVersionsSamples.java new file mode 100644 index 000000000000..acf6eff5cb46 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetSafeguardsVersionsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters GetSafeguardsVersions. + */ +public final class ManagedClustersGetSafeguardsVersionsSamples { + /* + * x-ms-original-file: 2026-02-02-preview/GetSafeguardsVersions.json + */ + /** + * Sample code: Get Safeguards available versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getSafeguardsAvailableVersions(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .getSafeguardsVersionsWithResponse("location1", "v1.0.0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java index 64705cf7d79c..d8893e0f628f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersGetUpgradeProfileSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersGetUpgradeProfileSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersGetUpgradeProfile.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersGetUpgradeProfile.json */ /** * Sample code: Get Upgrade Profile for Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java index d9cdfa8659f9..e3118dce0c8f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListByResourceGroupSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersListByResourceGroup.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersListByResourceGroup.json */ /** * Sample code: Get Managed Clusters by Resource Group. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java index 7ddbed1c0269..f85b27a6cb4c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterAdminCredentialsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListClusterAdminCredentialsSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersListClusterAdminCredentials.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersListClusterAdminCredentials.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java index 4e84436b6c10..1d0d0c63bce8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterMonitoringUserCredentialsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListClusterMonitoringUserCredentialsSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersListClusterMonitoringUserCredentials.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersListClusterCredentialResult.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java index dae37905e1d9..7ca90aba57d0 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListClusterUserCredentialsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListClusterUserCredentialsSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersListClusterUserCredentials.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersListClusterUserCredentials.json */ /** * Sample code: Get Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListGuardrailsVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListGuardrailsVersionsSamples.java new file mode 100644 index 000000000000..5416be8cda2a --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListGuardrailsVersionsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListGuardrailsVersions. + */ +public final class ManagedClustersListGuardrailsVersionsSamples { + /* + * x-ms-original-file: 2026-02-02-preview/ListGuardrailsVersions.json + */ + /** + * Sample code: List Guardrails Versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listGuardrailsVersions(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listGuardrailsVersions("location1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java index fd909bac3ec3..662ec0738bb8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListKubernetesVersionsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListKubernetesVersionsSamples { /* - * x-ms-original-file: 2026-02-01/KubernetesVersions_List.json + * x-ms-original-file: 2026-02-02-preview/KubernetesVersions_List.json */ /** * Sample code: List Kubernetes Versions. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java index 348074f3d55d..424690edf68f 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshRevisionProfilesSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListMeshRevisionProfilesSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersList_MeshRevisionProfiles.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersList_MeshRevisionProfiles.json */ /** * Sample code: List mesh revision profiles in a location. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java index f6d4b4313625..24b49ebb914b 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListMeshUpgradeProfilesSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListMeshUpgradeProfilesSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersList_MeshUpgradeProfiles.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersList_MeshUpgradeProfiles.json */ /** * Sample code: Lists version compatibility and upgrade profile for all service meshes in a cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java index bbc48c3ad6dd..e78f289b7698 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: 2026-02-01/OutboundNetworkDependenciesEndpointsList.json + * x-ms-original-file: 2026-02-02-preview/OutboundNetworkDependenciesEndpointsList.json */ /** * Sample code: List OutboundNetworkDependenciesEndpoints by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSafeguardsVersionsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSafeguardsVersionsSamples.java new file mode 100644 index 000000000000..68826b236055 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSafeguardsVersionsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for ManagedClusters ListSafeguardsVersions. + */ +public final class ManagedClustersListSafeguardsVersionsSamples { + /* + * x-ms-original-file: 2026-02-02-preview/ListSafeguardsVersions.json + */ + /** + * Sample code: List Safeguards Versions. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listSafeguardsVersions(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .listSafeguardsVersions("location1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java index 5771e450c9af..af318df025f5 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersListSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersList.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersList.json */ /** * Sample code: List Managed Clusters. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRebalanceLoadBalancersSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRebalanceLoadBalancersSamples.java new file mode 100644 index 000000000000..8f72bdea7bf3 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRebalanceLoadBalancersSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.models.RebalanceLoadBalancersRequestBody; +import java.util.Arrays; + +/** + * Samples for ManagedClusters RebalanceLoadBalancers. + */ +public final class ManagedClustersRebalanceLoadBalancersSamples { + /* + * x-ms-original-file: 2026-02-02-preview/LoadBalancers_Rebalance.json + */ + /** + * Sample code: Rebalance Load Balancers of a Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void rebalanceLoadBalancersOfAManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getManagedClusters() + .rebalanceLoadBalancers("rg1", "clustername1", + new RebalanceLoadBalancersRequestBody().withLoadBalancerNames(Arrays.asList("kubernetes")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAADProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAADProfileSamples.java index 471a83664cfb..8ef31b30d97d 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAADProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetAADProfileSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClustersResetAADProfileSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersResetAADProfile.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersResetAADProfile.json */ /** * Sample code: Reset AAD Profile. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java index bc38b4e216c6..e4523d5d700c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersResetServicePrincipalProfileSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClustersResetServicePrincipalProfileSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersResetServicePrincipalProfile.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersResetServicePrincipalProfile.json */ /** * Sample code: Reset Service Principal Profile. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java index 691928a0ce27..7698da56d9e2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateClusterCertificatesSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersRotateClusterCertificatesSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersRotateClusterCertificates.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersRotateClusterCertificates.json */ /** * Sample code: Rotate Cluster Certificates. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java index fc7405ccd5ce..74ecac501187 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRotateServiceAccountSigningKeysSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersRotateServiceAccountSigningKeysSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersRotateServiceAccountSigningKeys.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersRotateServiceAccountSigningKeys.json */ /** * Sample code: Rotate Cluster Service Account Signing Keys. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java index cffe265a6d62..739edcfe0827 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersRunCommandSamples.java @@ -11,7 +11,7 @@ */ public final class ManagedClustersRunCommandSamples { /* - * x-ms-original-file: 2026-02-01/RunCommandRequest.json + * x-ms-original-file: 2026-02-02-preview/RunCommandRequest.json */ /** * Sample code: submitNewCommand. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java index 9930b0edc5a0..bf0a0eb393a8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStartSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersStartSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersStart.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersStart.json */ /** * Sample code: Start Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java index efd4332b25d9..b3228a2745a4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersStopSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedClustersStopSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersStop.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersStop.json */ /** * Sample code: Stop Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java index e86f6c91746a..46847350fd3e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class ManagedClustersUpdateTagsSamples { /* - * x-ms-original-file: 2026-02-01/ManagedClustersUpdateTags.json + * x-ms-original-file: 2026-02-02-preview/ManagedClustersUpdateTags.json */ /** * Sample code: Update Managed Cluster Tags. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java index 4b5e249fb996..d26f3f086630 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ */ public final class ManagedNamespacesCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-02-01/ManagedNamespacesCreate_Update.json + * x-ms-original-file: 2026-02-02-preview/ManagedNamespacesCreate_Update.json */ /** * Sample code: Create/Update Managed Namespace. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java index e606148fbe82..885f9ad97a61 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedNamespacesDeleteSamples { /* - * x-ms-original-file: 2026-02-01/ManagedNamespacesDelete.json + * x-ms-original-file: 2026-02-02-preview/ManagedNamespacesDelete.json */ /** * Sample code: Delete Managed Namespace. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java index afc573acc451..7f148e5c0889 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedNamespacesGetSamples { /* - * x-ms-original-file: 2026-02-01/ManagedNamespacesGet.json + * x-ms-original-file: 2026-02-02-preview/ManagedNamespacesGet.json */ /** * Sample code: Get Managed Namespace. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java index dc2027949c66..6e638041ec9c 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListByManagedClusterSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedNamespacesListByManagedClusterSamples { /* - * x-ms-original-file: 2026-02-01/ManagedNamespacesList.json + * x-ms-original-file: 2026-02-02-preview/ManagedNamespacesList.json */ /** * Sample code: List namespaces by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java index 83ccc18baffe..9c1a79500def 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesListCredentialSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedNamespacesListCredentialSamples { /* - * x-ms-original-file: 2026-02-01/ManagedNamespacesListCredentialResult.json + * x-ms-original-file: 2026-02-02-preview/ManagedNamespacesListCredentialResult.json */ /** * Sample code: List managed namespace credentials. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java index a874fb3494f3..78eb9c60c2ff 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedNamespacesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ManagedNamespacesUpdateSamples { /* - * x-ms-original-file: 2026-02-01/ManagedNamespacesUpdateTags.json + * x-ms-original-file: 2026-02-02-preview/ManagedNamespacesUpdateTags.json */ /** * Sample code: Update Managed Namespace Tags. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..75e38c6ab219 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsCreateOrUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +import com.azure.resourcemanager.containerservice.fluent.models.MeshMembershipInner; +import com.azure.resourcemanager.containerservice.models.MeshMembershipProperties; + +/** + * Samples for MeshMemberships CreateOrUpdate. + */ +public final class MeshMembershipsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-02-02-preview/MeshMemberships_CreateOrUpdate.json + */ + /** + * Sample code: Create or update Mesh Membership. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + createOrUpdateMeshMembership(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMeshMemberships() + .createOrUpdate("rg1", "clustername1", "meshmembership1", + new MeshMembershipInner().withProperties(new MeshMembershipProperties().withManagedMeshId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.AppLink/applinks/applink1/appLinkMembers/member1")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsDeleteSamples.java new file mode 100644 index 000000000000..c6a64a538ff4 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MeshMemberships Delete. + */ +public final class MeshMembershipsDeleteSamples { + /* + * x-ms-original-file: 2026-02-02-preview/MeshMemberships_Delete.json + */ + /** + * Sample code: Delete Mesh Membership. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + deleteMeshMembership(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMeshMemberships() + .delete("rg1", "clustername1", "meshmembership1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsGetSamples.java new file mode 100644 index 000000000000..6b25a19936f2 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MeshMemberships Get. + */ +public final class MeshMembershipsGetSamples { + /* + * x-ms-original-file: 2026-02-02-preview/MeshMemberships_Get.json + */ + /** + * Sample code: Get Mesh Membership. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void getMeshMembership(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMeshMemberships() + .getWithResponse("rg1", "clustername1", "meshmembership1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsListByManagedClusterSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsListByManagedClusterSamples.java new file mode 100644 index 000000000000..381dc5e2cc69 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/MeshMembershipsListByManagedClusterSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for MeshMemberships ListByManagedCluster. + */ +public final class MeshMembershipsListByManagedClusterSamples { + /* + * x-ms-original-file: 2026-02-02-preview/MeshMemberships_ListByManagedCluster.json + */ + /** + * Sample code: List Mesh Memberships by Managed Cluster. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listMeshMembershipsByManagedCluster( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getMeshMemberships() + .listByManagedCluster("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetByAgentPoolSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetByAgentPoolSamples.java new file mode 100644 index 000000000000..1f9c5553d94e --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetByAgentPoolSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for OperationStatusResult GetByAgentPool. + */ +public final class OperationStatusResultGetByAgentPoolSamples { + /* + * x-ms-original-file: 2026-02-02-preview/OperationStatusResultGetByAgentPool.json + */ + /** + * Sample code: Get OperationStatusResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getOperationStatusResult(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOperationStatusResults() + .getByAgentPoolWithResponse("rg1", "clustername1", "agentpool1", "00000000-0000-0000-0000-000000000001", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetSamples.java new file mode 100644 index 000000000000..6ad54a808a32 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultGetSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for OperationStatusResult Get. + */ +public final class OperationStatusResultGetSamples { + /* + * x-ms-original-file: 2026-02-02-preview/OperationStatusResultGet.json + */ + /** + * Sample code: Get OperationStatusResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + getOperationStatusResult(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOperationStatusResults() + .getWithResponse("rg1", "clustername1", "00000000-0000-0000-0000-000000000001", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultListSamples.java new file mode 100644 index 000000000000..6b8ff430f353 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationStatusResultListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for OperationStatusResult List. + */ +public final class OperationStatusResultListSamples { + /* + * x-ms-original-file: 2026-02-02-preview/OperationStatusResultList.json + */ + /** + * Sample code: List of OperationStatusResult. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void + listOfOperationStatusResult(com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient() + .getOperationStatusResults() + .list("rg1", "clustername1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java index e17d3ffa01d7..bf5e2aab541e 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2026-02-01/Operation_List.json + * x-ms-original-file: 2026-02-02-preview/Operation_List.json */ /** * Sample code: List available operations for the container service resource provider. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java index e41a8cdb0425..d6bb4e50caa4 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: 2026-02-01/PrivateEndpointConnectionsDelete.json + * x-ms-original-file: 2026-02-02-preview/PrivateEndpointConnectionsDelete.json */ /** * Sample code: Delete Private Endpoint Connection. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java index 27845ef3a69a..969e1760b5d9 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: 2026-02-01/PrivateEndpointConnectionsGet.json + * x-ms-original-file: 2026-02-02-preview/PrivateEndpointConnectionsGet.json */ /** * Sample code: Get Private Endpoint Connection. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java index 99b9006b10f3..e467cd174f98 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsListSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: 2026-02-01/PrivateEndpointConnectionsList.json + * x-ms-original-file: 2026-02-02-preview/PrivateEndpointConnectionsList.json */ /** * Sample code: List Private Endpoint Connections by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java index 3934dc7a1d61..db4032d162c2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateEndpointConnectionsUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class PrivateEndpointConnectionsUpdateSamples { /* - * x-ms-original-file: 2026-02-01/PrivateEndpointConnectionsUpdate.json + * x-ms-original-file: 2026-02-02-preview/PrivateEndpointConnectionsUpdate.json */ /** * Sample code: Update Private Endpoint Connection. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java index 3119f5f89c90..a777b11e9bbb 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/PrivateLinkResourcesListSamples.java @@ -9,7 +9,7 @@ */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: 2026-02-01/PrivateLinkResourcesList.json + * x-ms-original-file: 2026-02-02-preview/PrivateLinkResourcesList.json */ /** * Sample code: List Private Link Resources by Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPOSTSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPOSTSamples.java index e1cffae07145..a9a9ccba1362 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPOSTSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/ResolvePrivateLinkServiceIdPOSTSamples.java @@ -11,7 +11,7 @@ */ public final class ResolvePrivateLinkServiceIdPOSTSamples { /* - * x-ms-original-file: 2026-02-01/ResolvePrivateLinkServiceId.json + * x-ms-original-file: 2026-02-02-preview/ResolvePrivateLinkServiceId.json */ /** * Sample code: Resolve the Private Link Service ID for Managed Cluster. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java index ba0bf3136f0f..b72b8645a133 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class SnapshotsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-02-01/SnapshotsCreate.json + * x-ms-original-file: 2026-02-02-preview/SnapshotsCreate.json */ /** * Sample code: Create/Update Snapshot. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java index f316ea4e90b3..1be35c932124 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsDeleteSamples { /* - * x-ms-original-file: 2026-02-01/SnapshotsDelete.json + * x-ms-original-file: 2026-02-02-preview/SnapshotsDelete.json */ /** * Sample code: Delete Snapshot. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java index 640c37c8bac1..055afb8b9d31 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsGetByResourceGroupSamples { /* - * x-ms-original-file: 2026-02-01/SnapshotsGet.json + * x-ms-original-file: 2026-02-02-preview/SnapshotsGet.json */ /** * Sample code: Get Snapshot. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java index 4e6c524252d6..e76e6195d0e2 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsListByResourceGroupSamples { /* - * x-ms-original-file: 2026-02-01/SnapshotsListByResourceGroup.json + * x-ms-original-file: 2026-02-02-preview/SnapshotsListByResourceGroup.json */ /** * Sample code: List Snapshots by Resource Group. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java index cfcf1cdd670c..8152feccd5be 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsListSamples.java @@ -9,7 +9,7 @@ */ public final class SnapshotsListSamples { /* - * x-ms-original-file: 2026-02-01/SnapshotsList.json + * x-ms-original-file: 2026-02-02-preview/SnapshotsList.json */ /** * Sample code: List Snapshots. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java index 717448c9b4ff..595d228f6c39 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/SnapshotsUpdateTagsSamples.java @@ -13,7 +13,7 @@ */ public final class SnapshotsUpdateTagsSamples { /* - * x-ms-original-file: 2026-02-01/SnapshotsUpdateTags.json + * x-ms-original-file: 2026-02-02-preview/SnapshotsUpdateTags.json */ /** * Sample code: Update Snapshot Tags. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java index 7dbe86fcb1a5..6eae21682bb8 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class TrustedAccessRoleBindingsCreateOrUpdateSamples { /* - * x-ms-original-file: 2026-02-01/TrustedAccessRoleBindings_CreateOrUpdate.json + * x-ms-original-file: 2026-02-02-preview/TrustedAccessRoleBindings_CreateOrUpdate.json */ /** * Sample code: Create or update a trusted access role binding. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java index 34ded6543f6a..e370e3cc0032 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class TrustedAccessRoleBindingsDeleteSamples { /* - * x-ms-original-file: 2026-02-01/TrustedAccessRoleBindings_Delete.json + * x-ms-original-file: 2026-02-02-preview/TrustedAccessRoleBindings_Delete.json */ /** * Sample code: Delete a trusted access role binding. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java index f4c80b035d0b..bdbcfcd9e637 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsGetSamples.java @@ -9,7 +9,7 @@ */ public final class TrustedAccessRoleBindingsGetSamples { /* - * x-ms-original-file: 2026-02-01/TrustedAccessRoleBindings_Get.json + * x-ms-original-file: 2026-02-02-preview/TrustedAccessRoleBindings_Get.json */ /** * Sample code: Get a trusted access role binding. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java index 9be46a668d95..1aa93d7b2a32 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRoleBindingsListSamples.java @@ -9,7 +9,7 @@ */ public final class TrustedAccessRoleBindingsListSamples { /* - * x-ms-original-file: 2026-02-01/TrustedAccessRoleBindings_List.json + * x-ms-original-file: 2026-02-02-preview/TrustedAccessRoleBindings_List.json */ /** * Sample code: List trusted access role bindings. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java index ff6cb4bfdfb4..6ea4303fcb48 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/TrustedAccessRolesListSamples.java @@ -9,7 +9,7 @@ */ public final class TrustedAccessRolesListSamples { /* - * x-ms-original-file: 2026-02-01/TrustedAccessRoles_List.json + * x-ms-original-file: 2026-02-02-preview/TrustedAccessRoles_List.json */ /** * Sample code: List trusted access roles. diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/VmSkusListSamples.java b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/VmSkusListSamples.java new file mode 100644 index 000000000000..73e0ddd5ebd1 --- /dev/null +++ b/sdk/containerservice/azure-resourcemanager-containerservice/src/samples/java/com/azure/resourcemanager/containerservice/generated/VmSkusListSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.containerservice.generated; + +/** + * Samples for VmSkus List. + */ +public final class VmSkusListSamples { + /* + * x-ms-original-file: 2026-02-02-preview/ListAvailableContainerServiceVmSkusWithExtendedLocations.json + */ + /** + * Sample code: Lists all available Container Service VM SKUs with Extended Location information. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listsAllAvailableContainerServiceVMSKUsWithExtendedLocationInformation( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getVmSkus().list("westus", true, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-02-02-preview/ListAvailableContainerServiceVmSkus.json + */ + /** + * Sample code: Lists all available Container Service VM SKUs for a location. + * + * @param manager Entry point to ContainerServiceManager. + */ + public static void listsAllAvailableContainerServiceVMSKUsForALocation( + com.azure.resourcemanager.containerservice.ContainerServiceManager manager) { + manager.serviceClient().getVmSkus().list("westus", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml b/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml index 71726f66474e..e3fa89986eb1 100644 --- a/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml +++ b/sdk/containerservice/azure-resourcemanager-containerservice/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/containerservice/resource-manager/Microsoft.ContainerService/aks -commit: 8b2ae2cd4aaa5292b115bb38663f722b8a694235 +commit: 84d3ee44165575ed56740413fa1346ed0a65e4e1 repo: Azure/azure-rest-api-specs additionalDirectories: