From fbcf851152e825f2ab4b3631dbb3b9e12d4708b3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 21 Mar 2022 05:29:11 +0000 Subject: [PATCH] CodeGen from PR 18324 in Azure/azure-rest-api-specs Merge 5beeec96aa762217130a876905029df99ca6c8d6 into e94b0da0c7f80e2986af90c1dd7e9c8f4c336c61 --- .../src/Generated/AgentPoolsOperations.cs | 167 +- .../AgentPoolsOperationsExtensions.cs | 40 +- .../src/Generated/ContainerServiceClient.cs | 14 +- .../src/Generated/IAgentPoolsOperations.cs | 24 +- .../src/Generated/IContainerServiceClient.cs | 11 +- .../IMaintenanceConfigurationsOperations.cs | 8 +- .../Generated/IManagedClustersOperations.cs | 65 +- .../IPrivateEndpointConnectionsOperations.cs | 10 +- .../IPrivateLinkResourcesOperations.cs | 2 +- .../IResolvePrivateLinkServiceIdOperations.cs | 2 +- .../src/Generated/ISnapshotsOperations.cs | 215 ++ .../MaintenanceConfigurationsOperations.cs | 80 +- ...nanceConfigurationsOperationsExtensions.cs | 16 +- .../Generated/ManagedClustersOperations.cs | 428 +++- .../ManagedClustersOperationsExtensions.cs | 132 +- .../src/Generated/Models/AgentPool.cs | 37 +- ...gentPoolsUpgradeNodeImageVersionHeaders.cs | 54 + .../Models/ContainerServiceNetworkProfile.cs | 49 +- .../src/Generated/Models/CreationData.cs | 53 + .../src/Generated/Models/Format.cs | 30 + .../src/Generated/Models/IpFamily.cs | 22 + .../src/Generated/Models/ManagedCluster.cs | 28 +- .../ManagedClusterAPIServerAccessProfile.cs | 11 +- .../Models/ManagedClusterAccessProfile.cs | 15 +- .../Models/ManagedClusterAgentPoolProfile.cs | 13 +- ...anagedClusterAgentPoolProfileProperties.cs | 37 +- .../ManagedClusterLoadBalancerProfile.cs | 12 +- ...erLoadBalancerProfileManagedOutboundIPs.cs | 33 +- .../Models/ManagedClusterWindowsProfile.cs | 11 +- .../Generated/Models/PublicNetworkAccess.cs | 22 + .../src/Generated/Models/Resource.cs | 36 +- .../src/Generated/Models/Snapshot.cs | 138 ++ .../src/Generated/Models/SnapshotType.cs | 24 + .../src/Generated/Models/SystemData.cs | 12 +- .../Generated/Models/WindowsGmsaProfile.cs | 82 + .../src/Generated/Models/WorkloadRuntime.cs | 29 + .../src/Generated/Operations.cs | 7 + .../PrivateEndpointConnectionsOperations.cs | 82 +- ...EndpointConnectionsOperationsExtensions.cs | 20 +- .../PrivateLinkResourcesOperations.cs | 20 +- ...rivateLinkResourcesOperationsExtensions.cs | 4 +- .../ResolvePrivateLinkServiceIdOperations.cs | 20 +- ...rivateLinkServiceIdOperationsExtensions.cs | 4 +- .../SdkInfo_ContainerServiceClient.cs | 26 +- .../src/Generated/SnapshotsOperations.cs | 1778 +++++++++++++++++ .../SnapshotsOperationsExtensions.cs | 326 +++ 46 files changed, 3967 insertions(+), 282 deletions(-) create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ISnapshotsOperations.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolsUpgradeNodeImageVersionHeaders.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CreationData.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Format.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/IpFamily.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PublicNetworkAccess.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Snapshot.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SnapshotType.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/WindowsGmsaProfile.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/WorkloadRuntime.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SnapshotsOperations.cs create mode 100644 sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SnapshotsOperationsExtensions.cs diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs index 57e020a86678..d114b6deb110 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs @@ -54,7 +54,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// Gets a list of agent pools in the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -86,16 +86,34 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -272,7 +290,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// Gets the specified managed cluster agent pool. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -307,16 +325,34 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -499,7 +535,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// Creates or updates an agent pool in the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -527,7 +563,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// Deletes an agent pool in the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -552,7 +588,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// Gets the upgrade profile for an agent pool. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -587,16 +623,34 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -784,7 +838,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// for more details about the version lifecycle. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -816,16 +870,34 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -1008,7 +1080,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1022,10 +1094,10 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// The cancellation token. /// - public async Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginUpgradeNodeImageVersionWithHttpMessagesAsync(resourceGroupName, resourceName, agentPoolName, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -1033,7 +1105,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// Creates or updates an agent pool in the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1071,16 +1143,34 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -1296,7 +1386,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// Deletes an agent pool in the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1328,16 +1418,34 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -1508,7 +1616,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1537,22 +1645,40 @@ internal AgentPoolsOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -1699,7 +1825,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -1724,6 +1850,19 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); } } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } if (_shouldTrace) { ServiceClientTracing.Exit(_invocationId, _result); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs index e0c7263272e9..346cd6ebe5cf 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperationsExtensions.cs @@ -28,7 +28,7 @@ public static partial class AgentPoolsOperationsExtensions /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -45,7 +45,7 @@ public static IPage List(this IAgentPoolsOperations operations, strin /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -68,7 +68,7 @@ public static IPage List(this IAgentPoolsOperations operations, strin /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -88,7 +88,7 @@ public static AgentPool Get(this IAgentPoolsOperations operations, string resour /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -114,7 +114,7 @@ public static AgentPool Get(this IAgentPoolsOperations operations, string resour /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -137,7 +137,7 @@ public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, st /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -166,7 +166,7 @@ public static AgentPool CreateOrUpdate(this IAgentPoolsOperations operations, st /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -186,7 +186,7 @@ public static void Delete(this IAgentPoolsOperations operations, string resource /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -209,7 +209,7 @@ public static void Delete(this IAgentPoolsOperations operations, string resource /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -229,7 +229,7 @@ public static AgentPoolUpgradeProfile GetUpgradeProfile(this IAgentPoolsOperatio /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -260,7 +260,7 @@ public static AgentPoolUpgradeProfile GetUpgradeProfile(this IAgentPoolsOperatio /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -282,7 +282,7 @@ public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAge /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -311,7 +311,7 @@ public static AgentPoolAvailableVersions GetAvailableAgentPoolVersions(this IAge /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -337,7 +337,7 @@ public static AgentPool UpgradeNodeImageVersion(this IAgentPoolsOperations opera /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -363,7 +363,7 @@ public static AgentPool UpgradeNodeImageVersion(this IAgentPoolsOperations opera /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -386,7 +386,7 @@ public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operation /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -415,7 +415,7 @@ public static AgentPool BeginCreateOrUpdate(this IAgentPoolsOperations operation /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -435,7 +435,7 @@ public static void BeginDelete(this IAgentPoolsOperations operations, string res /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -464,7 +464,7 @@ public static void BeginDelete(this IAgentPoolsOperations operations, string res /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -490,7 +490,7 @@ public static AgentPool BeginUpgradeNodeImageVersion(this IAgentPoolsOperations /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs index 79b8567011fc..311b557a03b2 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs @@ -47,14 +47,12 @@ public partial class ContainerServiceClient : ServiceClient - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. The subscription ID forms part of the URI for every service - /// call. + /// The ID of the target subscription. /// public string SubscriptionId { get; set; } /// - /// Client Api Version. + /// The API version to use for this operation. /// public string ApiVersion { get; private set; } @@ -111,6 +109,11 @@ public partial class ContainerServiceClient : ServiceClient public virtual IResolvePrivateLinkServiceIdOperations ResolvePrivateLinkServiceId { get; private set; } + /// + /// Gets the ISnapshotsOperations. + /// + public virtual ISnapshotsOperations Snapshots { get; private set; } + /// /// Initializes a new instance of the ContainerServiceClient class. /// @@ -359,8 +362,9 @@ private void Initialize() PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); PrivateLinkResources = new PrivateLinkResourcesOperations(this); ResolvePrivateLinkServiceId = new ResolvePrivateLinkServiceIdOperations(this); + Snapshots = new SnapshotsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-07-01"; + ApiVersion = "2022-02-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs index 7bf6c2693960..038a90e66966 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IAgentPoolsOperations.cs @@ -27,7 +27,7 @@ public partial interface IAgentPoolsOperations /// Gets a list of agent pools in the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -52,7 +52,7 @@ public partial interface IAgentPoolsOperations /// Gets the specified managed cluster agent pool. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -80,7 +80,7 @@ public partial interface IAgentPoolsOperations /// Creates or updates an agent pool in the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -111,7 +111,7 @@ public partial interface IAgentPoolsOperations /// Deletes an agent pool in the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -136,7 +136,7 @@ public partial interface IAgentPoolsOperations /// Gets the upgrade profile for an agent pool. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -170,7 +170,7 @@ public partial interface IAgentPoolsOperations /// for more details about the version lifecycle. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -202,7 +202,7 @@ public partial interface IAgentPoolsOperations /// https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -225,12 +225,12 @@ public partial interface IAgentPoolsOperations /// /// Thrown when a required parameter is null /// - Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> UpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Creates or updates an agent pool in the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -261,7 +261,7 @@ public partial interface IAgentPoolsOperations /// Deletes an agent pool in the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -293,7 +293,7 @@ public partial interface IAgentPoolsOperations /// https://docs.microsoft.com/azure/aks/node-image-upgrade /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -316,7 +316,7 @@ public partial interface IAgentPoolsOperations /// /// Thrown when a required parameter is null /// - Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> BeginUpgradeNodeImageVersionWithHttpMessagesAsync(string resourceGroupName, string resourceName, string agentPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a list of agent pools in the specified managed cluster. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs index 2b88f1d25012..7e7f2c5a91e2 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs @@ -41,14 +41,12 @@ public partial interface IContainerServiceClient : System.IDisposable ServiceClientCredentials Credentials { get; } /// - /// Subscription credentials which uniquely identify Microsoft Azure - /// subscription. The subscription ID forms part of the URI for every - /// service call. + /// The ID of the target subscription. /// string SubscriptionId { get; set; } /// - /// Client Api Version. + /// The API version to use for this operation. /// string ApiVersion { get; } @@ -106,5 +104,10 @@ public partial interface IContainerServiceClient : System.IDisposable /// IResolvePrivateLinkServiceIdOperations ResolvePrivateLinkServiceId { get; } + /// + /// Gets the ISnapshotsOperations. + /// + ISnapshotsOperations Snapshots { get; } + } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs index 8b6ea84dee6d..aec8c81a7d30 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IMaintenanceConfigurationsOperations.cs @@ -28,7 +28,7 @@ public partial interface IMaintenanceConfigurationsOperations /// cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -53,7 +53,7 @@ public partial interface IMaintenanceConfigurationsOperations /// Gets the specified maintenance configuration of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -82,7 +82,7 @@ public partial interface IMaintenanceConfigurationsOperations /// managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -113,7 +113,7 @@ public partial interface IMaintenanceConfigurationsOperations /// Deletes a maintenance configuration. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs index 23d59d0baea0..f7054fa9ee52 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs @@ -27,7 +27,7 @@ public partial interface IManagedClustersOperations /// Gets supported OS options in the specified subscription. /// /// - /// The name of a supported Azure region. + /// The name of Azure region. /// /// /// The resource type for which the OS options needs to be returned @@ -72,7 +72,7 @@ public partial interface IManagedClustersOperations /// group. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The headers that will be added to request. @@ -94,7 +94,7 @@ public partial interface IManagedClustersOperations /// Gets the upgrade profile of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -126,7 +126,7 @@ public partial interface IManagedClustersOperations /// . /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -155,7 +155,7 @@ public partial interface IManagedClustersOperations /// Lists the admin credentials of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -183,7 +183,7 @@ public partial interface IManagedClustersOperations /// Lists the user credentials of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -191,6 +191,13 @@ public partial interface IManagedClustersOperations /// /// server fqdn type for credentials to be returned /// + /// + /// Only apply to AAD clusters, specifies the format of returned + /// kubeconfig. Format 'azure' will return azure auth-provider + /// kubeconfig; format 'exec' will return exec format kubeconfig, which + /// requires kubelogin binary in the path. Possible values include: + /// 'azure', 'exec' + /// /// /// The headers that will be added to request. /// @@ -206,12 +213,12 @@ public partial interface IManagedClustersOperations /// /// Thrown when a required parameter is null /// - Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Lists the cluster monitoring user credentials of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -239,7 +246,7 @@ public partial interface IManagedClustersOperations /// Gets a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -264,7 +271,7 @@ public partial interface IManagedClustersOperations /// Creates or updates a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -292,7 +299,7 @@ public partial interface IManagedClustersOperations /// Updates tags on a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -320,7 +327,7 @@ public partial interface IManagedClustersOperations /// Deletes a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -346,7 +353,7 @@ public partial interface IManagedClustersOperations /// service principal /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -371,7 +378,7 @@ public partial interface IManagedClustersOperations /// Reset the AAD Profile of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -401,7 +408,7 @@ public partial interface IManagedClustersOperations /// for more details about rotating managed cluster certificates. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -432,7 +439,7 @@ public partial interface IManagedClustersOperations /// for more details about stopping a cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -459,7 +466,7 @@ public partial interface IManagedClustersOperations /// for more details about starting a cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -486,7 +493,7 @@ public partial interface IManagedClustersOperations /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -515,7 +522,7 @@ public partial interface IManagedClustersOperations /// Cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -549,7 +556,7 @@ public partial interface IManagedClustersOperations /// returns properties of each egress endpoint. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -574,7 +581,7 @@ public partial interface IManagedClustersOperations /// Creates or updates a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -602,7 +609,7 @@ public partial interface IManagedClustersOperations /// Updates tags on a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -630,7 +637,7 @@ public partial interface IManagedClustersOperations /// Deletes a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -656,7 +663,7 @@ public partial interface IManagedClustersOperations /// service principal /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -681,7 +688,7 @@ public partial interface IManagedClustersOperations /// Reset the AAD Profile of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -711,7 +718,7 @@ public partial interface IManagedClustersOperations /// for more details about rotating managed cluster certificates. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -742,7 +749,7 @@ public partial interface IManagedClustersOperations /// for more details about stopping a cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -769,7 +776,7 @@ public partial interface IManagedClustersOperations /// for more details about starting a cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -796,7 +803,7 @@ public partial interface IManagedClustersOperations /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs index 65c6818cb075..c7215b26ffaf 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs @@ -32,7 +32,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -61,7 +61,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -89,7 +89,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// Updates a private endpoint connection. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -120,7 +120,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// Deletes a private endpoint connection. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -145,7 +145,7 @@ public partial interface IPrivateEndpointConnectionsOperations /// Deletes a private endpoint connection. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs index cd758eb5d374..3a8134d0ca55 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateLinkResourcesOperations.cs @@ -32,7 +32,7 @@ public partial interface IPrivateLinkResourcesOperations /// https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs index a8d2d4863090..743ac50836f1 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IResolvePrivateLinkServiceIdOperations.cs @@ -27,7 +27,7 @@ public partial interface IResolvePrivateLinkServiceIdOperations /// Gets the private link service ID for the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ISnapshotsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ISnapshotsOperations.cs new file mode 100644 index 000000000000..604e546f73f3 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ISnapshotsOperations.cs @@ -0,0 +1,215 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SnapshotsOperations operations. + /// + public partial interface ISnapshotsOperations + { + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a snapshot. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Creates or updates a snapshot. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The snapshot to create or update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, Snapshot parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates tags on a snapshot. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Resource tags. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a snapshot. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperations.cs index 07ee742f075d..7c28a1eeae51 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperations.cs @@ -54,7 +54,7 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// Gets a list of maintenance configurations in the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -86,16 +86,34 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -272,7 +290,7 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// Gets the specified maintenance configuration of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -307,16 +325,34 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -500,7 +536,7 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -538,16 +574,34 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -741,7 +795,7 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) /// Deletes a maintenance configuration. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -773,16 +827,34 @@ internal MaintenanceConfigurationsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperationsExtensions.cs index 638889d85358..b50c1e74eaa7 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/MaintenanceConfigurationsOperationsExtensions.cs @@ -28,7 +28,7 @@ public static partial class MaintenanceConfigurationsOperationsExtensions /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -45,7 +45,7 @@ public static IPage ListByManagedCluster(this IMainten /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -68,7 +68,7 @@ public static IPage ListByManagedCluster(this IMainten /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -88,7 +88,7 @@ public static MaintenanceConfiguration Get(this IMaintenanceConfigurationsOperat /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -115,7 +115,7 @@ public static MaintenanceConfiguration Get(this IMaintenanceConfigurationsOperat /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -139,7 +139,7 @@ public static MaintenanceConfiguration CreateOrUpdate(this IMaintenanceConfigura /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -168,7 +168,7 @@ public static MaintenanceConfiguration CreateOrUpdate(this IMaintenanceConfigura /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -188,7 +188,7 @@ public static void Delete(this IMaintenanceConfigurationsOperations operations, /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs index 1d51d037c289..f089fbe8abc2 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs @@ -54,7 +54,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Gets supported OS options in the specified subscription. /// /// - /// The name of a supported Azure region. + /// The name of Azure region. /// /// /// The resource type for which the OS options needs to be returned @@ -86,14 +86,35 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (location == null) { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } + if (location != null) + { + if (location.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "location", 1); + } + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -275,10 +296,24 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -427,7 +462,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Lists managed clusters in the specified subscription and resource group. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// Headers that will be added to request. @@ -456,16 +491,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -621,7 +674,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Gets the upgrade profile of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -653,16 +706,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -846,7 +917,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// . /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -882,16 +953,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -1074,7 +1163,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Lists the admin credentials of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1109,16 +1198,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -1300,7 +1407,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Lists the user credentials of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1308,6 +1415,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// server fqdn type for credentials to be returned /// + /// + /// Only apply to AAD clusters, specifies the format of returned kubeconfig. + /// Format 'azure' will return azure auth-provider kubeconfig; format 'exec' + /// will return exec format kubeconfig, which requires kubelogin binary in the + /// path. Possible values include: 'azure', 'exec' + /// /// /// Headers that will be added to request. /// @@ -1329,22 +1442,40 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// - public async Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> ListClusterUserCredentialsWithHttpMessagesAsync(string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -1379,6 +1510,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("resourceName", resourceName); tracingParameters.Add("serverFqdn", serverFqdn); + tracingParameters.Add("format", format); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListClusterUserCredentials", tracingParameters); } @@ -1397,6 +1529,10 @@ internal ManagedClustersOperations(ContainerServiceClient client) { _queryParameters.Add(string.Format("server-fqdn={0}", System.Uri.EscapeDataString(serverFqdn))); } + if (format != null) + { + _queryParameters.Add(string.Format("format={0}", System.Uri.EscapeDataString(format))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -1526,7 +1662,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Lists the cluster monitoring user credentials of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1561,16 +1697,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -1752,7 +1906,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Gets a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1784,16 +1938,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -1970,7 +2142,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Creates or updates a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1995,7 +2167,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Updates tags on a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2020,7 +2192,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Deletes a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2046,7 +2218,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// principal /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2071,7 +2243,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Reset the AAD Profile of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2101,7 +2273,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// more details about rotating managed cluster certificates. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2131,7 +2303,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// details about stopping a cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2158,7 +2330,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// details about starting a cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2185,7 +2357,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2210,7 +2382,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Gets the results of a command which has been run on the Managed Cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2245,16 +2417,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -2443,7 +2633,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// properties of each egress endpoint. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2475,16 +2665,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -2661,7 +2869,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Creates or updates a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2696,16 +2904,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -2915,7 +3141,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Updates tags on a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -2950,16 +3176,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -3148,7 +3392,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Deletes a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -3177,16 +3421,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -3349,7 +3611,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// principal /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -3381,16 +3643,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -3564,7 +3844,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Reset the AAD Profile of a managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -3596,16 +3876,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -3780,7 +4078,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// more details about rotating managed cluster certificates. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -3809,16 +4107,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -3985,7 +4301,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// details about stopping a cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -4014,16 +4330,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -4187,7 +4521,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// details about starting a cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -4216,16 +4550,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -4389,7 +4741,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -4424,16 +4776,34 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs index 5a64e1e4c822..e42cf4e39929 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs @@ -30,7 +30,7 @@ public static partial class ManagedClustersOperationsExtensions /// The operations group for this extension method. /// /// - /// The name of a supported Azure region. + /// The name of Azure region. /// /// /// The resource type for which the OS options needs to be returned @@ -47,7 +47,7 @@ public static partial class ManagedClustersOperationsExtensions /// The operations group for this extension method. /// /// - /// The name of a supported Azure region. + /// The name of Azure region. /// /// /// The resource type for which the OS options needs to be returned @@ -98,7 +98,7 @@ public static IPage List(this IManagedClustersOperations operati /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// public static IPage ListByResourceGroup(this IManagedClustersOperations operations, string resourceGroupName) { @@ -112,7 +112,7 @@ public static IPage ListByResourceGroup(this IManagedClustersOpe /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The cancellation token. @@ -132,7 +132,7 @@ public static IPage ListByResourceGroup(this IManagedClustersOpe /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -149,7 +149,7 @@ public static ManagedClusterUpgradeProfile GetUpgradeProfile(this IManagedCluste /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -179,7 +179,7 @@ public static ManagedClusterUpgradeProfile GetUpgradeProfile(this IManagedCluste /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -207,7 +207,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -234,7 +234,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -254,7 +254,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -280,7 +280,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -288,9 +288,15 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// /// server fqdn type for credentials to be returned /// - public static CredentialResults ListClusterUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string)) + /// + /// Only apply to AAD clusters, specifies the format of returned kubeconfig. + /// Format 'azure' will return azure auth-provider kubeconfig; format 'exec' + /// will return exec format kubeconfig, which requires kubelogin binary in the + /// path. Possible values include: 'azure', 'exec' + /// + public static CredentialResults ListClusterUserCredentials(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string)) { - return operations.ListClusterUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn).GetAwaiter().GetResult(); + return operations.ListClusterUserCredentialsAsync(resourceGroupName, resourceName, serverFqdn, format).GetAwaiter().GetResult(); } /// @@ -300,7 +306,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -308,12 +314,18 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// /// server fqdn type for credentials to be returned /// + /// + /// Only apply to AAD clusters, specifies the format of returned kubeconfig. + /// Format 'azure' will return azure auth-provider kubeconfig; format 'exec' + /// will return exec format kubeconfig, which requires kubelogin binary in the + /// path. Possible values include: 'azure', 'exec' + /// /// /// The cancellation token. /// - public static async Task ListClusterUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task ListClusterUserCredentialsAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string serverFqdn = default(string), string format = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.ListClusterUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListClusterUserCredentialsWithHttpMessagesAsync(resourceGroupName, resourceName, serverFqdn, format, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -326,7 +338,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -346,7 +358,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -372,7 +384,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -389,7 +401,7 @@ public static ManagedCluster Get(this IManagedClustersOperations operations, str /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -412,7 +424,7 @@ public static ManagedCluster Get(this IManagedClustersOperations operations, str /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -432,7 +444,7 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -458,7 +470,7 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -478,7 +490,7 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -504,7 +516,7 @@ public static ManagedCluster CreateOrUpdate(this IManagedClustersOperations oper /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -521,7 +533,7 @@ public static void Delete(this IManagedClustersOperations operations, string res /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -545,7 +557,7 @@ public static void Delete(this IManagedClustersOperations operations, string res /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -569,7 +581,7 @@ public static void ResetServicePrincipalProfile(this IManagedClustersOperations /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -592,7 +604,7 @@ public static void ResetServicePrincipalProfile(this IManagedClustersOperations /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -612,7 +624,7 @@ public static void ResetAADProfile(this IManagedClustersOperations operations, s /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -640,7 +652,7 @@ public static void ResetAADProfile(this IManagedClustersOperations operations, s /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -662,7 +674,7 @@ public static void RotateClusterCertificates(this IManagedClustersOperations ope /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -690,7 +702,7 @@ public static void RotateClusterCertificates(this IManagedClustersOperations ope /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -715,7 +727,7 @@ public static void Stop(this IManagedClustersOperations operations, string resou /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -740,7 +752,7 @@ public static void Stop(this IManagedClustersOperations operations, string resou /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -762,7 +774,7 @@ public static void Start(this IManagedClustersOperations operations, string reso /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -787,7 +799,7 @@ public static void Start(this IManagedClustersOperations operations, string reso /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -812,7 +824,7 @@ public static RunCommandResult RunCommand(this IManagedClustersOperations operat /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -838,7 +850,7 @@ public static RunCommandResult RunCommand(this IManagedClustersOperations operat /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -858,7 +870,7 @@ public static RunCommandResult GetCommandResult(this IManagedClustersOperations /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -890,7 +902,7 @@ public static RunCommandResult GetCommandResult(this IManagedClustersOperations /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -913,7 +925,7 @@ public static IPage ListOutboundNetworkDependencies /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -936,7 +948,7 @@ public static IPage ListOutboundNetworkDependencies /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -956,7 +968,7 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -982,7 +994,7 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1002,7 +1014,7 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1028,7 +1040,7 @@ public static ManagedCluster BeginCreateOrUpdate(this IManagedClustersOperations /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1045,7 +1057,7 @@ public static void BeginDelete(this IManagedClustersOperations operations, strin /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1069,7 +1081,7 @@ public static void BeginDelete(this IManagedClustersOperations operations, strin /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1093,7 +1105,7 @@ public static void BeginResetServicePrincipalProfile(this IManagedClustersOperat /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1116,7 +1128,7 @@ public static void BeginResetServicePrincipalProfile(this IManagedClustersOperat /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1136,7 +1148,7 @@ public static void BeginResetAADProfile(this IManagedClustersOperations operatio /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1164,7 +1176,7 @@ public static void BeginResetAADProfile(this IManagedClustersOperations operatio /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1186,7 +1198,7 @@ public static void BeginRotateClusterCertificates(this IManagedClustersOperation /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1214,7 +1226,7 @@ public static void BeginRotateClusterCertificates(this IManagedClustersOperation /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1239,7 +1251,7 @@ public static void BeginStop(this IManagedClustersOperations operations, string /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1264,7 +1276,7 @@ public static void BeginStop(this IManagedClustersOperations operations, string /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1286,7 +1298,7 @@ public static void BeginStart(this IManagedClustersOperations operations, string /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1311,7 +1323,7 @@ public static void BeginStart(this IManagedClustersOperations operations, string /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -1336,7 +1348,7 @@ public static RunCommandResult BeginRunCommand(this IManagedClustersOperations o /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs index 490bb7791c19..36512cba6d2a 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPool.cs @@ -48,6 +48,8 @@ public AgentPool() /// 'Ephemeral' /// Possible values include: 'OS', /// 'Temporary' + /// Possible values include: + /// 'OCIContainer', 'WasmWasi' /// The ID of the subnet which agent pool /// nodes and optionally pods will join on startup. /// The ID of the subnet which pods will join @@ -77,8 +79,8 @@ public AgentPool() /// agentpool /// The current deployment or /// provisioning state. - /// Describes whether the Agent Pool is - /// Running or Stopped + /// Whether the Agent Pool is running or + /// stopped. /// The list of Availability zones to /// use for nodes. This can only be specified if the AgentPoolType /// property is 'VirtualMachineScaleSets'. @@ -114,7 +116,10 @@ public AgentPool() /// GPUInstanceProfile to be used to /// specify GPU MIG instance profile for supported GPU VM SKU. Possible /// values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' - public AgentPool(string id = default(string), string name = default(string), string type = default(string), int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string vnetSubnetID = default(string), string podSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), string osSKU = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string agentPoolType = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixID = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSSD = default(bool?), bool? enableFIPS = default(bool?), string gpuInstanceProfile = default(string)) + /// CreationData to be used to specify the + /// source Snapshot ID if the node pool will be created/upgraded using + /// a snapshot. + public AgentPool(string id = default(string), string name = default(string), string type = default(string), int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string workloadRuntime = default(string), string vnetSubnetID = default(string), string podSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), string osSKU = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string agentPoolType = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixID = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSSD = default(bool?), bool? enableFIPS = default(bool?), string gpuInstanceProfile = default(string), CreationData creationData = default(CreationData)) : base(id, name, type) { Count = count; @@ -122,6 +127,7 @@ public AgentPool() OsDiskSizeGB = osDiskSizeGB; OsDiskType = osDiskType; KubeletDiskType = kubeletDiskType; + WorkloadRuntime = workloadRuntime; VnetSubnetID = vnetSubnetID; PodSubnetID = podSubnetID; MaxPods = maxPods; @@ -154,6 +160,7 @@ public AgentPool() EnableUltraSSD = enableUltraSSD; EnableFIPS = enableFIPS; GpuInstanceProfile = gpuInstanceProfile; + CreationData = creationData; CustomInit(); } @@ -200,6 +207,12 @@ public AgentPool() [JsonProperty(PropertyName = "properties.kubeletDiskType")] public string KubeletDiskType { get; set; } + /// + /// Gets or sets possible values include: 'OCIContainer', 'WasmWasi' + /// + [JsonProperty(PropertyName = "properties.workloadRuntime")] + public string WorkloadRuntime { get; set; } + /// /// Gets or sets the ID of the subnet which agent pool nodes and /// optionally pods will join on startup. @@ -320,10 +333,17 @@ public AgentPool() public string ProvisioningState { get; private set; } /// - /// Gets describes whether the Agent Pool is Running or Stopped + /// Gets or sets whether the Agent Pool is running or stopped. /// + /// + /// When an Agent Pool is first created it is initially Running. The + /// Agent Pool can be stopped by setting this field to Stopped. A + /// stopped Agent Pool stops all of its VMs and does not accrue billing + /// charges. An Agent Pool can only be stopped if it is Running and + /// provisioning state is Succeeded + /// [JsonProperty(PropertyName = "properties.powerState")] - public PowerState PowerState { get; private set; } + public PowerState PowerState { get; set; } /// /// Gets or sets the list of Availability zones to use for nodes. This @@ -469,6 +489,13 @@ public AgentPool() [JsonProperty(PropertyName = "properties.gpuInstanceProfile")] public string GpuInstanceProfile { get; set; } + /// + /// Gets or sets creationData to be used to specify the source Snapshot + /// ID if the node pool will be created/upgraded using a snapshot. + /// + [JsonProperty(PropertyName = "properties.creationData")] + public CreationData CreationData { get; set; } + /// /// Validate the object. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolsUpgradeNodeImageVersionHeaders.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolsUpgradeNodeImageVersionHeaders.cs new file mode 100644 index 000000000000..6b8f401fe88f --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolsUpgradeNodeImageVersionHeaders.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for UpgradeNodeImageVersion operation. + /// + public partial class AgentPoolsUpgradeNodeImageVersionHeaders + { + /// + /// Initializes a new instance of the + /// AgentPoolsUpgradeNodeImageVersionHeaders class. + /// + public AgentPoolsUpgradeNodeImageVersionHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// AgentPoolsUpgradeNodeImageVersionHeaders class. + /// + /// URL to query for status of the + /// operation. + public AgentPoolsUpgradeNodeImageVersionHeaders(string azureAsyncOperation = default(string)) + { + AzureAsyncOperation = azureAsyncOperation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets URL to query for status of the operation. + /// + [JsonProperty(PropertyName = "Azure-AsyncOperation")] + public string AzureAsyncOperation { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs index 74371e2d92dd..9eaa9c2e2104 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs @@ -12,6 +12,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models { using Microsoft.Rest; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -59,7 +61,13 @@ public ContainerServiceNetworkProfile() /// balancer. /// Profile of the cluster NAT /// gateway. - public ContainerServiceNetworkProfile(string networkPlugin = default(string), string networkPolicy = default(string), string networkMode = default(string), string podCidr = default(string), string serviceCidr = default(string), string dnsServiceIP = default(string), string dockerBridgeCidr = default(string), string outboundType = default(string), string loadBalancerSku = default(string), ManagedClusterLoadBalancerProfile loadBalancerProfile = default(ManagedClusterLoadBalancerProfile), ManagedClusterNATGatewayProfile natGatewayProfile = default(ManagedClusterNATGatewayProfile)) + /// The CIDR notation IP ranges from which to + /// assign pod IPs. + /// The CIDR notation IP ranges from which + /// to assign service cluster IPs. + /// The IP families used to specify IP + /// versions available to the cluster. + public ContainerServiceNetworkProfile(string networkPlugin = default(string), string networkPolicy = default(string), string networkMode = default(string), string podCidr = default(string), string serviceCidr = default(string), string dnsServiceIP = default(string), string dockerBridgeCidr = default(string), string outboundType = default(string), string loadBalancerSku = default(string), ManagedClusterLoadBalancerProfile loadBalancerProfile = default(ManagedClusterLoadBalancerProfile), ManagedClusterNATGatewayProfile natGatewayProfile = default(ManagedClusterNATGatewayProfile), IList podCidrs = default(IList), IList serviceCidrs = default(IList), IList ipFamilies = default(IList)) { NetworkPlugin = networkPlugin; NetworkPolicy = networkPolicy; @@ -72,6 +80,9 @@ public ContainerServiceNetworkProfile() LoadBalancerSku = loadBalancerSku; LoadBalancerProfile = loadBalancerProfile; NatGatewayProfile = natGatewayProfile; + PodCidrs = podCidrs; + ServiceCidrs = serviceCidrs; + IpFamilies = ipFamilies; CustomInit(); } @@ -171,6 +182,42 @@ public ContainerServiceNetworkProfile() [JsonProperty(PropertyName = "natGatewayProfile")] public ManagedClusterNATGatewayProfile NatGatewayProfile { get; set; } + /// + /// Gets or sets the CIDR notation IP ranges from which to assign pod + /// IPs. + /// + /// + /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, + /// one for each IP family (IPv4/IPv6), is expected for dual-stack + /// networking. + /// + [JsonProperty(PropertyName = "podCidrs")] + public IList PodCidrs { get; set; } + + /// + /// Gets or sets the CIDR notation IP ranges from which to assign + /// service cluster IPs. + /// + /// + /// One IPv4 CIDR is expected for single-stack networking. Two CIDRs, + /// one for each IP family (IPv4/IPv6), is expected for dual-stack + /// networking. They must not overlap with any Subnet IP ranges. + /// + [JsonProperty(PropertyName = "serviceCidrs")] + public IList ServiceCidrs { get; set; } + + /// + /// Gets or sets the IP families used to specify IP versions available + /// to the cluster. + /// + /// + /// IP families are used to determine single-stack or dual-stack + /// clusters. For single-stack, the expected value is IPv4. For + /// dual-stack, the expected values are IPv4 and IPv6. + /// + [JsonProperty(PropertyName = "ipFamilies")] + public IList IpFamilies { get; set; } + /// /// Validate the object. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CreationData.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CreationData.cs new file mode 100644 index 000000000000..64cdf5b5fc75 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/CreationData.cs @@ -0,0 +1,53 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Data used when creating a target resource from a source resource. + /// + public partial class CreationData + { + /// + /// Initializes a new instance of the CreationData class. + /// + public CreationData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CreationData class. + /// + /// This is the ARM ID of the source + /// object to be used to create the target object. + public CreationData(string sourceResourceId = default(string)) + { + SourceResourceId = sourceResourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this is the ARM ID of the source object to be used to + /// create the target object. + /// + [JsonProperty(PropertyName = "sourceResourceId")] + public string SourceResourceId { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Format.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Format.cs new file mode 100644 index 000000000000..d2550ac1df32 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Format.cs @@ -0,0 +1,30 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + + /// + /// Defines values for Format. + /// + public static class Format + { + /// + /// Return azure auth-provider kubeconfig. This format is deprecated in + /// 1.22 and will be fully removed in 1.25. + /// + public const string Azure = "azure"; + /// + /// Return exec format kubeconfig. This format requires kubelogin + /// binary in the path. + /// + public const string Exec = "exec"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/IpFamily.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/IpFamily.cs new file mode 100644 index 000000000000..965f8846c9c8 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/IpFamily.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + + /// + /// Defines values for IpFamily. + /// + public static class IpFamily + { + public const string IPv4 = "IPv4"; + public const string IPv6 = "IPv6"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs index 459e63efc010..e23630eeec5d 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedCluster.cs @@ -35,9 +35,14 @@ public ManagedCluster() /// Initializes a new instance of the ManagedCluster class. /// /// Resource location - /// Resource Id - /// Resource name - /// Resource type + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Azure Resource Manager metadata containing + /// createdBy and modifiedBy information. /// Resource tags /// The managed cluster SKU. /// The extended location of the Virtual @@ -102,8 +107,10 @@ public ManagedCluster() /// cluster with HTTP proxy servers. /// Security profile for the managed /// cluster. - public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), ManagedClusterSKU sku = default(ManagedClusterSKU), ExtendedLocation extendedLocation = default(ExtendedLocation), ManagedClusterIdentity identity = default(ManagedClusterIdentity), string provisioningState = default(string), PowerState powerState = default(PowerState), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string dnsPrefix = default(string), string fqdnSubdomain = default(string), string fqdn = default(string), string privateFQDN = default(string), string azurePortalFQDN = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary), ManagedClusterPodIdentityProfile podIdentityProfile = default(ManagedClusterPodIdentityProfile), string nodeResourceGroup = default(string), bool? enableRBAC = default(bool?), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterAutoUpgradeProfile autoUpgradeProfile = default(ManagedClusterAutoUpgradeProfile), ManagedClusterPropertiesAutoScalerProfile autoScalerProfile = default(ManagedClusterPropertiesAutoScalerProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), string diskEncryptionSetID = default(string), IDictionary identityProfile = default(IDictionary), IList privateLinkResources = default(IList), bool? disableLocalAccounts = default(bool?), ManagedClusterHTTPProxyConfig httpProxyConfig = default(ManagedClusterHTTPProxyConfig), ManagedClusterSecurityProfile securityProfile = default(ManagedClusterSecurityProfile)) - : base(location, id, name, type, tags) + /// PublicNetworkAccess of the + /// managedCluster + public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary), ManagedClusterSKU sku = default(ManagedClusterSKU), ExtendedLocation extendedLocation = default(ExtendedLocation), ManagedClusterIdentity identity = default(ManagedClusterIdentity), string provisioningState = default(string), PowerState powerState = default(PowerState), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string dnsPrefix = default(string), string fqdnSubdomain = default(string), string fqdn = default(string), string privateFQDN = default(string), string azurePortalFQDN = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary), ManagedClusterPodIdentityProfile podIdentityProfile = default(ManagedClusterPodIdentityProfile), string nodeResourceGroup = default(string), bool? enableRBAC = default(bool?), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterAutoUpgradeProfile autoUpgradeProfile = default(ManagedClusterAutoUpgradeProfile), ManagedClusterPropertiesAutoScalerProfile autoScalerProfile = default(ManagedClusterPropertiesAutoScalerProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), string diskEncryptionSetID = default(string), IDictionary identityProfile = default(IDictionary), IList privateLinkResources = default(IList), bool? disableLocalAccounts = default(bool?), ManagedClusterHTTPProxyConfig httpProxyConfig = default(ManagedClusterHTTPProxyConfig), ManagedClusterSecurityProfile securityProfile = default(ManagedClusterSecurityProfile), string publicNetworkAccess = default(string)) + : base(location, id, name, type, systemData, tags) { Sku = sku; ExtendedLocation = extendedLocation; @@ -137,6 +144,7 @@ public ManagedCluster() DisableLocalAccounts = disableLocalAccounts; HttpProxyConfig = httpProxyConfig; SecurityProfile = securityProfile; + PublicNetworkAccess = publicNetworkAccess; CustomInit(); } @@ -386,6 +394,16 @@ public ManagedCluster() [JsonProperty(PropertyName = "properties.securityProfile")] public ManagedClusterSecurityProfile SecurityProfile { get; set; } + /// + /// Gets or sets publicNetworkAccess of the managedCluster + /// + /// + /// Allow or deny public network access for AKS. Possible values + /// include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "properties.publicNetworkAccess")] + public string PublicNetworkAccess { get; set; } + /// /// Validate the object. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs index 25d25ef2cdfe..3051fdc5656a 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAPIServerAccessProfile.cs @@ -41,12 +41,15 @@ public ManagedClusterAPIServerAccessProfile() /// cluster. /// Whether to create /// additional public FQDN for private cluster or not. - public ManagedClusterAPIServerAccessProfile(IList authorizedIPRanges = default(IList), bool? enablePrivateCluster = default(bool?), string privateDNSZone = default(string), bool? enablePrivateClusterPublicFQDN = default(bool?)) + /// Whether to disable run command for + /// the cluster or not. + public ManagedClusterAPIServerAccessProfile(IList authorizedIPRanges = default(IList), bool? enablePrivateCluster = default(bool?), string privateDNSZone = default(string), bool? enablePrivateClusterPublicFQDN = default(bool?), bool? disableRunCommand = default(bool?)) { AuthorizedIPRanges = authorizedIPRanges; EnablePrivateCluster = enablePrivateCluster; PrivateDNSZone = privateDNSZone; EnablePrivateClusterPublicFQDN = enablePrivateClusterPublicFQDN; + DisableRunCommand = disableRunCommand; CustomInit(); } @@ -98,5 +101,11 @@ public ManagedClusterAPIServerAccessProfile() [JsonProperty(PropertyName = "enablePrivateClusterPublicFQDN")] public bool? EnablePrivateClusterPublicFQDN { get; set; } + /// + /// Gets or sets whether to disable run command for the cluster or not. + /// + [JsonProperty(PropertyName = "disableRunCommand")] + public bool? DisableRunCommand { get; set; } + } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAccessProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAccessProfile.cs index 637cec2e1169..498c575049e2 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAccessProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAccessProfile.cs @@ -37,14 +37,19 @@ public ManagedClusterAccessProfile() /// class. /// /// Resource location - /// Resource Id - /// Resource name - /// Resource type + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Azure Resource Manager metadata containing + /// createdBy and modifiedBy information. /// Resource tags /// Base64-encoded Kubernetes configuration /// file. - public ManagedClusterAccessProfile(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), byte[] kubeConfig = default(byte[])) - : base(location, id, name, type, tags) + public ManagedClusterAccessProfile(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary), byte[] kubeConfig = default(byte[])) + : base(location, id, name, type, systemData, tags) { KubeConfig = kubeConfig; CustomInit(); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs index 70c5b5386759..4479924318e2 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs @@ -45,6 +45,8 @@ public ManagedClusterAgentPoolProfile() /// 'Ephemeral' /// Possible values include: 'OS', /// 'Temporary' + /// Possible values include: + /// 'OCIContainer', 'WasmWasi' /// The ID of the subnet which agent pool /// nodes and optionally pods will join on startup. /// The ID of the subnet which pods will join @@ -74,8 +76,8 @@ public ManagedClusterAgentPoolProfile() /// agentpool /// The current deployment or /// provisioning state. - /// Describes whether the Agent Pool is - /// Running or Stopped + /// Whether the Agent Pool is running or + /// stopped. /// The list of Availability zones to /// use for nodes. This can only be specified if the AgentPoolType /// property is 'VirtualMachineScaleSets'. @@ -111,8 +113,11 @@ public ManagedClusterAgentPoolProfile() /// GPUInstanceProfile to be used to /// specify GPU MIG instance profile for supported GPU VM SKU. Possible /// values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' - public ManagedClusterAgentPoolProfile(string name, int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string vnetSubnetID = default(string), string podSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), string osSKU = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixID = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSSD = default(bool?), bool? enableFIPS = default(bool?), string gpuInstanceProfile = default(string)) - : base(count, vmSize, osDiskSizeGB, osDiskType, kubeletDiskType, vnetSubnetID, podSubnetID, maxPods, osType, osSKU, maxCount, minCount, enableAutoScaling, scaleDownMode, type, mode, orchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, powerState, availabilityZones, enableNodePublicIP, nodePublicIPPrefixID, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupID, kubeletConfig, linuxOSConfig, enableEncryptionAtHost, enableUltraSSD, enableFIPS, gpuInstanceProfile) + /// CreationData to be used to specify the + /// source Snapshot ID if the node pool will be created/upgraded using + /// a snapshot. + public ManagedClusterAgentPoolProfile(string name, int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string workloadRuntime = default(string), string vnetSubnetID = default(string), string podSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), string osSKU = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixID = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSSD = default(bool?), bool? enableFIPS = default(bool?), string gpuInstanceProfile = default(string), CreationData creationData = default(CreationData)) + : base(count, vmSize, osDiskSizeGB, osDiskType, kubeletDiskType, workloadRuntime, vnetSubnetID, podSubnetID, maxPods, osType, osSKU, maxCount, minCount, enableAutoScaling, scaleDownMode, type, mode, orchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, powerState, availabilityZones, enableNodePublicIP, nodePublicIPPrefixID, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupID, kubeletConfig, linuxOSConfig, enableEncryptionAtHost, enableUltraSSD, enableFIPS, gpuInstanceProfile, creationData) { Name = name; CustomInit(); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs index a53077222929..de7d8b2e2b55 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs @@ -42,6 +42,8 @@ public ManagedClusterAgentPoolProfileProperties() /// 'Ephemeral' /// Possible values include: 'OS', /// 'Temporary' + /// Possible values include: + /// 'OCIContainer', 'WasmWasi' /// The ID of the subnet which agent pool /// nodes and optionally pods will join on startup. /// The ID of the subnet which pods will join @@ -71,8 +73,8 @@ public ManagedClusterAgentPoolProfileProperties() /// agentpool /// The current deployment or /// provisioning state. - /// Describes whether the Agent Pool is - /// Running or Stopped + /// Whether the Agent Pool is running or + /// stopped. /// The list of Availability zones to /// use for nodes. This can only be specified if the AgentPoolType /// property is 'VirtualMachineScaleSets'. @@ -108,13 +110,17 @@ public ManagedClusterAgentPoolProfileProperties() /// GPUInstanceProfile to be used to /// specify GPU MIG instance profile for supported GPU VM SKU. Possible /// values include: 'MIG1g', 'MIG2g', 'MIG3g', 'MIG4g', 'MIG7g' - public ManagedClusterAgentPoolProfileProperties(int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string vnetSubnetID = default(string), string podSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), string osSKU = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixID = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSSD = default(bool?), bool? enableFIPS = default(bool?), string gpuInstanceProfile = default(string)) + /// CreationData to be used to specify the + /// source Snapshot ID if the node pool will be created/upgraded using + /// a snapshot. + public ManagedClusterAgentPoolProfileProperties(int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string osDiskType = default(string), string kubeletDiskType = default(string), string workloadRuntime = default(string), string vnetSubnetID = default(string), string podSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), string osSKU = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string scaleDownMode = default(string), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), PowerState powerState = default(PowerState), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string nodePublicIPPrefixID = default(string), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), double? spotMaxPrice = default(double?), IDictionary tags = default(IDictionary), IDictionary nodeLabels = default(IDictionary), IList nodeTaints = default(IList), string proximityPlacementGroupID = default(string), KubeletConfig kubeletConfig = default(KubeletConfig), LinuxOSConfig linuxOSConfig = default(LinuxOSConfig), bool? enableEncryptionAtHost = default(bool?), bool? enableUltraSSD = default(bool?), bool? enableFIPS = default(bool?), string gpuInstanceProfile = default(string), CreationData creationData = default(CreationData)) { Count = count; VmSize = vmSize; OsDiskSizeGB = osDiskSizeGB; OsDiskType = osDiskType; KubeletDiskType = kubeletDiskType; + WorkloadRuntime = workloadRuntime; VnetSubnetID = vnetSubnetID; PodSubnetID = podSubnetID; MaxPods = maxPods; @@ -147,6 +153,7 @@ public ManagedClusterAgentPoolProfileProperties() EnableUltraSSD = enableUltraSSD; EnableFIPS = enableFIPS; GpuInstanceProfile = gpuInstanceProfile; + CreationData = creationData; CustomInit(); } @@ -193,6 +200,12 @@ public ManagedClusterAgentPoolProfileProperties() [JsonProperty(PropertyName = "kubeletDiskType")] public string KubeletDiskType { get; set; } + /// + /// Gets or sets possible values include: 'OCIContainer', 'WasmWasi' + /// + [JsonProperty(PropertyName = "workloadRuntime")] + public string WorkloadRuntime { get; set; } + /// /// Gets or sets the ID of the subnet which agent pool nodes and /// optionally pods will join on startup. @@ -313,10 +326,17 @@ public ManagedClusterAgentPoolProfileProperties() public string ProvisioningState { get; private set; } /// - /// Gets describes whether the Agent Pool is Running or Stopped + /// Gets or sets whether the Agent Pool is running or stopped. /// + /// + /// When an Agent Pool is first created it is initially Running. The + /// Agent Pool can be stopped by setting this field to Stopped. A + /// stopped Agent Pool stops all of its VMs and does not accrue billing + /// charges. An Agent Pool can only be stopped if it is Running and + /// provisioning state is Succeeded + /// [JsonProperty(PropertyName = "powerState")] - public PowerState PowerState { get; private set; } + public PowerState PowerState { get; set; } /// /// Gets or sets the list of Availability zones to use for nodes. This @@ -462,6 +482,13 @@ public ManagedClusterAgentPoolProfileProperties() [JsonProperty(PropertyName = "gpuInstanceProfile")] public string GpuInstanceProfile { get; set; } + /// + /// Gets or sets creationData to be used to specify the source Snapshot + /// ID if the node pool will be created/upgraded using a snapshot. + /// + [JsonProperty(PropertyName = "creationData")] + public CreationData CreationData { get; set; } + /// /// Validate the object. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs index fb6782d4bb34..2e12bba44cbb 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfile.cs @@ -49,7 +49,9 @@ public ManagedClusterLoadBalancerProfile() /// Desired outbound flow idle /// timeout in minutes. Allowed values are in the range of 4 to 120 /// (inclusive). The default value is 30 minutes. - public ManagedClusterLoadBalancerProfile(ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs = default(ManagedClusterLoadBalancerProfileManagedOutboundIPs), ManagedClusterLoadBalancerProfileOutboundIPPrefixes outboundIPPrefixes = default(ManagedClusterLoadBalancerProfileOutboundIPPrefixes), ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs = default(ManagedClusterLoadBalancerProfileOutboundIPs), IList effectiveOutboundIPs = default(IList), int? allocatedOutboundPorts = default(int?), int? idleTimeoutInMinutes = default(int?)) + /// Enable multiple + /// standard load balancers per AKS cluster or not. + public ManagedClusterLoadBalancerProfile(ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs = default(ManagedClusterLoadBalancerProfileManagedOutboundIPs), ManagedClusterLoadBalancerProfileOutboundIPPrefixes outboundIPPrefixes = default(ManagedClusterLoadBalancerProfileOutboundIPPrefixes), ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs = default(ManagedClusterLoadBalancerProfileOutboundIPs), IList effectiveOutboundIPs = default(IList), int? allocatedOutboundPorts = default(int?), int? idleTimeoutInMinutes = default(int?), bool? enableMultipleStandardLoadBalancers = default(bool?)) { ManagedOutboundIPs = managedOutboundIPs; OutboundIPPrefixes = outboundIPPrefixes; @@ -57,6 +59,7 @@ public ManagedClusterLoadBalancerProfile() EffectiveOutboundIPs = effectiveOutboundIPs; AllocatedOutboundPorts = allocatedOutboundPorts; IdleTimeoutInMinutes = idleTimeoutInMinutes; + EnableMultipleStandardLoadBalancers = enableMultipleStandardLoadBalancers; CustomInit(); } @@ -110,6 +113,13 @@ public ManagedClusterLoadBalancerProfile() [JsonProperty(PropertyName = "idleTimeoutInMinutes")] public int? IdleTimeoutInMinutes { get; set; } + /// + /// Gets or sets enable multiple standard load balancers per AKS + /// cluster or not. + /// + [JsonProperty(PropertyName = "enableMultipleStandardLoadBalancers")] + public bool? EnableMultipleStandardLoadBalancers { get; set; } + /// /// Validate the object. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs index 6e60275cc155..e68974dcd9c6 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs @@ -32,13 +32,18 @@ public ManagedClusterLoadBalancerProfileManagedOutboundIPs() /// Initializes a new instance of the /// ManagedClusterLoadBalancerProfileManagedOutboundIPs class. /// - /// The desired number of outbound IPs + /// The desired number of IPv4 outbound IPs /// created/managed by Azure for the cluster load balancer. Allowed /// values must be in the range of 1 to 100 (inclusive). The default /// value is 1. - public ManagedClusterLoadBalancerProfileManagedOutboundIPs(int? count = default(int?)) + /// The desired number of IPv6 outbound IPs + /// created/managed by Azure for the cluster load balancer. Allowed + /// values must be in the range of 1 to 100 (inclusive). The default + /// value is 0 for single-stack and 1 for dual-stack. + public ManagedClusterLoadBalancerProfileManagedOutboundIPs(int? count = default(int?), int? countIPv6 = default(int?)) { Count = count; + CountIPv6 = countIPv6; CustomInit(); } @@ -48,13 +53,23 @@ public ManagedClusterLoadBalancerProfileManagedOutboundIPs() partial void CustomInit(); /// - /// Gets or sets the desired number of outbound IPs created/managed by - /// Azure for the cluster load balancer. Allowed values must be in the - /// range of 1 to 100 (inclusive). The default value is 1. + /// Gets or sets the desired number of IPv4 outbound IPs + /// created/managed by Azure for the cluster load balancer. Allowed + /// values must be in the range of 1 to 100 (inclusive). The default + /// value is 1. /// [JsonProperty(PropertyName = "count")] public int? Count { get; set; } + /// + /// Gets or sets the desired number of IPv6 outbound IPs + /// created/managed by Azure for the cluster load balancer. Allowed + /// values must be in the range of 1 to 100 (inclusive). The default + /// value is 0 for single-stack and 1 for dual-stack. + /// + [JsonProperty(PropertyName = "countIPv6")] + public int? CountIPv6 { get; set; } + /// /// Validate the object. /// @@ -71,6 +86,14 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.InclusiveMinimum, "Count", 1); } + if (CountIPv6 > 100) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "CountIPv6", 100); + } + if (CountIPv6 < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "CountIPv6", 0); + } } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs index 6ea892e90faa..54bc1bf9d27a 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs @@ -58,12 +58,15 @@ public ManagedClusterWindowsProfile() /// for more details. Possible values include: 'None', /// 'Windows_Server' /// Whether to enable CSI proxy. - public ManagedClusterWindowsProfile(string adminUsername, string adminPassword = default(string), string licenseType = default(string), bool? enableCSIProxy = default(bool?)) + /// The Windows gMSA Profile in the Managed + /// Cluster. + public ManagedClusterWindowsProfile(string adminUsername, string adminPassword = default(string), string licenseType = default(string), bool? enableCSIProxy = default(bool?), WindowsGmsaProfile gmsaProfile = default(WindowsGmsaProfile)) { AdminUsername = adminUsername; AdminPassword = adminPassword; LicenseType = licenseType; EnableCSIProxy = enableCSIProxy; + GmsaProfile = gmsaProfile; CustomInit(); } @@ -123,6 +126,12 @@ public ManagedClusterWindowsProfile() [JsonProperty(PropertyName = "enableCSIProxy")] public bool? EnableCSIProxy { get; set; } + /// + /// Gets or sets the Windows gMSA Profile in the Managed Cluster. + /// + [JsonProperty(PropertyName = "gmsaProfile")] + public WindowsGmsaProfile GmsaProfile { get; set; } + /// /// Validate the object. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PublicNetworkAccess.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PublicNetworkAccess.cs new file mode 100644 index 000000000000..2b42263c9c1e --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PublicNetworkAccess.cs @@ -0,0 +1,22 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + + /// + /// Defines values for PublicNetworkAccess. + /// + public static class PublicNetworkAccess + { + public const string Enabled = "Enabled"; + public const string Disabled = "Disabled"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Resource.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Resource.cs index 19d4fe92e47e..81a63111405e 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Resource.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Resource.cs @@ -18,8 +18,12 @@ namespace Microsoft.Azure.Management.ContainerService.Models using System.Linq; /// - /// The Resource model definition. + /// Resource /// + /// + /// Common fields that are returned in the response for all Azure Resource + /// Manager resources + /// public partial class Resource : IResource { /// @@ -34,15 +38,21 @@ public Resource() /// Initializes a new instance of the Resource class. /// /// Resource location - /// Resource Id - /// Resource name - /// Resource type + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Azure Resource Manager metadata containing + /// createdBy and modifiedBy information. /// Resource tags - public Resource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary)) + public Resource(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary)) { Id = id; Name = name; Type = type; + SystemData = systemData; Location = location; Tags = tags; CustomInit(); @@ -54,23 +64,33 @@ public Resource() partial void CustomInit(); /// - /// Gets resource Id + /// Gets fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} /// [JsonProperty(PropertyName = "id")] public string Id { get; private set; } /// - /// Gets resource name + /// Gets the name of the resource /// [JsonProperty(PropertyName = "name")] public string Name { get; private set; } /// - /// Gets resource type + /// Gets the type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" /// [JsonProperty(PropertyName = "type")] public string Type { get; private set; } + /// + /// Gets azure Resource Manager metadata containing createdBy and + /// modifiedBy information. + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + /// /// Gets or sets resource location /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Snapshot.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Snapshot.cs new file mode 100644 index 000000000000..826711e908d1 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/Snapshot.cs @@ -0,0 +1,138 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A node pool snapshot resource. + /// + [Rest.Serialization.JsonTransformation] + public partial class Snapshot : Resource + { + /// + /// Initializes a new instance of the Snapshot class. + /// + public Snapshot() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Snapshot class. + /// + /// Resource location + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// The name of the resource + /// The type of the resource. E.g. + /// "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// Azure Resource Manager metadata containing + /// createdBy and modifiedBy information. + /// Resource tags + /// CreationData to be used to specify the + /// source agent pool resource ID to create this snapshot. + /// Possible values include: + /// 'NodePool' + /// The version of Kubernetes. + /// The version of node image. + /// Possible values include: 'Linux', + /// 'Windows' + /// Possible values include: 'Ubuntu', + /// 'CBLMariner' + /// The size of the VM. + /// Whether to use a FIPS-enabled OS. + public Snapshot(string location, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), IDictionary tags = default(IDictionary), CreationData creationData = default(CreationData), string snapshotType = default(string), string kubernetesVersion = default(string), string nodeImageVersion = default(string), string osType = default(string), string osSku = default(string), string vmSize = default(string), bool? enableFIPS = default(bool?)) + : base(location, id, name, type, systemData, tags) + { + CreationData = creationData; + SnapshotType = snapshotType; + KubernetesVersion = kubernetesVersion; + NodeImageVersion = nodeImageVersion; + OsType = osType; + OsSku = osSku; + VmSize = vmSize; + EnableFIPS = enableFIPS; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets creationData to be used to specify the source agent + /// pool resource ID to create this snapshot. + /// + [JsonProperty(PropertyName = "properties.creationData")] + public CreationData CreationData { get; set; } + + /// + /// Gets or sets possible values include: 'NodePool' + /// + [JsonProperty(PropertyName = "properties.snapshotType")] + public string SnapshotType { get; set; } + + /// + /// Gets the version of Kubernetes. + /// + [JsonProperty(PropertyName = "properties.kubernetesVersion")] + public string KubernetesVersion { get; private set; } + + /// + /// Gets the version of node image. + /// + [JsonProperty(PropertyName = "properties.nodeImageVersion")] + public string NodeImageVersion { get; private set; } + + /// + /// Gets possible values include: 'Linux', 'Windows' + /// + [JsonProperty(PropertyName = "properties.osType")] + public string OsType { get; private set; } + + /// + /// Gets possible values include: 'Ubuntu', 'CBLMariner' + /// + [JsonProperty(PropertyName = "properties.osSku")] + public string OsSku { get; private set; } + + /// + /// Gets the size of the VM. + /// + [JsonProperty(PropertyName = "properties.vmSize")] + public string VmSize { get; private set; } + + /// + /// Gets whether to use a FIPS-enabled OS. + /// + [JsonProperty(PropertyName = "properties.enableFIPS")] + public bool? EnableFIPS { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + } + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SnapshotType.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SnapshotType.cs new file mode 100644 index 000000000000..502c72d2b324 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SnapshotType.cs @@ -0,0 +1,24 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + + /// + /// Defines values for SnapshotType. + /// + public static class SnapshotType + { + /// + /// The snapshot is a snapshot of a node pool. + /// + public const string NodePool = "NodePool"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SystemData.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SystemData.cs index c553ddd7e502..aad6e33d9909 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SystemData.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/SystemData.cs @@ -34,15 +34,15 @@ public SystemData() /// The type of identity that created the /// resource. Possible values include: 'User', 'Application', /// 'ManagedIdentity', 'Key' - /// The UTC timestamp of resource - /// creation. + /// The timestamp of resource creation + /// (UTC). /// The identity that last modified the /// resource. /// The type of identity that last /// modified the resource. Possible values include: 'User', /// 'Application', 'ManagedIdentity', 'Key' - /// The type of identity that last - /// modified the resource. + /// The timestamp of resource last + /// modification (UTC) public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?)) { CreatedBy = createdBy; @@ -74,7 +74,7 @@ public SystemData() public string CreatedByType { get; set; } /// - /// Gets or sets the UTC timestamp of resource creation. + /// Gets or sets the timestamp of resource creation (UTC). /// [JsonProperty(PropertyName = "createdAt")] public System.DateTime? CreatedAt { get; set; } @@ -94,7 +94,7 @@ public SystemData() public string LastModifiedByType { get; set; } /// - /// Gets or sets the type of identity that last modified the resource. + /// Gets or sets the timestamp of resource last modification (UTC) /// [JsonProperty(PropertyName = "lastModifiedAt")] public System.DateTime? LastModifiedAt { get; set; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/WindowsGmsaProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/WindowsGmsaProfile.cs new file mode 100644 index 000000000000..23899966abbd --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/WindowsGmsaProfile.cs @@ -0,0 +1,82 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Windows gMSA Profile in the managed cluster. + /// + public partial class WindowsGmsaProfile + { + /// + /// Initializes a new instance of the WindowsGmsaProfile class. + /// + public WindowsGmsaProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WindowsGmsaProfile class. + /// + /// Whether to enable Windows gMSA. + /// Specifies the DNS server for Windows gMSA. + /// <br><br> Set it to empty if you have configured the DNS + /// server in the vnet which is used to create the managed + /// cluster. + /// Specifies the root domain name for + /// Windows gMSA. <br><br> Set it to empty if you have + /// configured the DNS server in the vnet which is used to create the + /// managed cluster. + public WindowsGmsaProfile(bool? enabled = default(bool?), string dnsServer = default(string), string rootDomainName = default(string)) + { + Enabled = enabled; + DnsServer = dnsServer; + RootDomainName = rootDomainName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets whether to enable Windows gMSA. + /// + /// + /// Specifies whether to enable Windows gMSA in the managed cluster. + /// + [JsonProperty(PropertyName = "enabled")] + public bool? Enabled { get; set; } + + /// + /// Gets or sets specifies the DNS server for Windows gMSA. + /// &lt;br&gt;&lt;br&gt; Set it to empty if you have + /// configured the DNS server in the vnet which is used to create the + /// managed cluster. + /// + [JsonProperty(PropertyName = "dnsServer")] + public string DnsServer { get; set; } + + /// + /// Gets or sets specifies the root domain name for Windows gMSA. + /// &lt;br&gt;&lt;br&gt; Set it to empty if you have + /// configured the DNS server in the vnet which is used to create the + /// managed cluster. + /// + [JsonProperty(PropertyName = "rootDomainName")] + public string RootDomainName { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/WorkloadRuntime.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/WorkloadRuntime.cs new file mode 100644 index 000000000000..c8419098fc8a --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/WorkloadRuntime.cs @@ -0,0 +1,29 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService.Models +{ + + /// + /// Defines values for WorkloadRuntime. + /// + public static class WorkloadRuntime + { + /// + /// Nodes will use Kubelet to run standard OCI container workloads. + /// + public const string OCIContainer = "OCIContainer"; + /// + /// Nodes will use Krustlet to run WASM workloads using the WASI + /// provider (Preview). + /// + public const string WasmWasi = "WasmWasi"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs index bd9492924145..98084090f587 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs @@ -80,6 +80,13 @@ internal Operations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs index 8e3b99ca6636..5827ac0a80ff 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs @@ -59,7 +59,7 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -91,16 +91,34 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -281,7 +299,7 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -316,16 +334,34 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -508,7 +544,7 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// Updates a private endpoint connection. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -546,16 +582,34 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); @@ -753,7 +807,7 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// Deletes a private endpoint connection. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -778,7 +832,7 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) /// Deletes a private endpoint connection. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -810,16 +864,34 @@ internal PrivateEndpointConnectionsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs index 358740558945..3874f4627f83 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs @@ -33,7 +33,7 @@ public static partial class PrivateEndpointConnectionsOperationsExtensions /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -55,7 +55,7 @@ public static PrivateEndpointConnectionListResult List(this IPrivateEndpointConn /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -82,7 +82,7 @@ public static PrivateEndpointConnectionListResult List(this IPrivateEndpointConn /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -106,7 +106,7 @@ public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOper /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -132,7 +132,7 @@ public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOper /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -155,7 +155,7 @@ public static PrivateEndpointConnection Update(this IPrivateEndpointConnectionsO /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -184,7 +184,7 @@ public static PrivateEndpointConnection Update(this IPrivateEndpointConnectionsO /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -204,7 +204,7 @@ public static void Delete(this IPrivateEndpointConnectionsOperations operations, /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -227,7 +227,7 @@ public static void Delete(this IPrivateEndpointConnectionsOperations operations, /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -247,7 +247,7 @@ public static void BeginDelete(this IPrivateEndpointConnectionsOperations operat /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperations.cs index acaaf2a910c4..7f586159efc0 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperations.cs @@ -58,7 +58,7 @@ internal PrivateLinkResourcesOperations(ContainerServiceClient client) /// https://docs.microsoft.com/azure/aks/private-clusters /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -90,16 +90,34 @@ internal PrivateLinkResourcesOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperationsExtensions.cs index 9d7637a8115a..5e310e534e7b 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateLinkResourcesOperationsExtensions.cs @@ -32,7 +32,7 @@ public static partial class PrivateLinkResourcesOperationsExtensions /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -53,7 +53,7 @@ public static PrivateLinkResourcesListResult List(this IPrivateLinkResourcesOper /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperations.cs index 0578d8853c68..fbcbc24d329a 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperations.cs @@ -54,7 +54,7 @@ internal ResolvePrivateLinkServiceIdOperations(ContainerServiceClient client) /// Gets the private link service ID for the specified managed cluster. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -89,16 +89,34 @@ internal ResolvePrivateLinkServiceIdOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } if (Client.SubscriptionId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } if (resourceGroupName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } if (resourceGroupName != null) { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } if (resourceGroupName.Length < 1) { throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs index f3a7c7e12c96..9943e4a69b79 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ResolvePrivateLinkServiceIdOperationsExtensions.cs @@ -28,7 +28,7 @@ public static partial class ResolvePrivateLinkServiceIdOperationsExtensions /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. @@ -48,7 +48,7 @@ public static PrivateLinkResource POST(this IResolvePrivateLinkServiceIdOperatio /// The operations group for this extension method. /// /// - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. /// /// /// The name of the managed cluster resource. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs index 278eafe1d436..bd6772eb2112 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SdkInfo_ContainerServiceClient.cs @@ -19,26 +19,16 @@ public static IEnumerable> ApiInfo_ContainerServic { return new Tuple[] { - new Tuple("ContainerService", "AgentPools", "2021-07-01"), - new Tuple("ContainerService", "MaintenanceConfigurations", "2021-07-01"), - new Tuple("ContainerService", "ManagedClusters", "2021-07-01"), - new Tuple("ContainerService", "Operations", "2021-07-01"), - new Tuple("ContainerService", "PrivateEndpointConnections", "2021-07-01"), - new Tuple("ContainerService", "PrivateLinkResources", "2021-07-01"), - new Tuple("ContainerService", "ResolvePrivateLinkServiceId", "2021-07-01"), + new Tuple("ContainerService", "AgentPools", "2022-02-01"), + new Tuple("ContainerService", "MaintenanceConfigurations", "2022-02-01"), + new Tuple("ContainerService", "ManagedClusters", "2022-02-01"), + new Tuple("ContainerService", "Operations", "2022-02-01"), + new Tuple("ContainerService", "PrivateEndpointConnections", "2022-02-01"), + new Tuple("ContainerService", "PrivateLinkResources", "2022-02-01"), + new Tuple("ContainerService", "ResolvePrivateLinkServiceId", "2022-02-01"), + new Tuple("ContainerService", "Snapshots", "2022-02-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/containerservice/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Users\\kaiqz\\github\\kaiqzhan\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "111fbceeeb7c2c4905b80fe2ab760e5564b3458a"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SnapshotsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SnapshotsOperations.cs new file mode 100644 index 000000000000..6d53de7c9943 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SnapshotsOperations.cs @@ -0,0 +1,1778 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// SnapshotsOperations operations. + /// + internal partial class SnapshotsOperations : IServiceOperations, ISnapshotsOperations + { + /// + /// Initializes a new instance of the SnapshotsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SnapshotsOperations(ContainerServiceClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ContainerServiceClient + /// + public ContainerServiceClient Client { get; private set; } + + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a snapshot. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Creates or updates a snapshot. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The snapshot to create or update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, Snapshot parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Updates tags on a snapshot. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Resource tags. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> UpdateTagsWithHttpMessagesAsync(string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + TagsObject parameters = new TagsObject(); + if (tags != null) + { + parameters.Tags = tags; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UpdateTags", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(parameters != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a snapshot. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ApiVersion != null) + { + if (Client.ApiVersion.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.ApiVersion", 1); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (Client.SubscriptionId != null) + { + if (Client.SubscriptionId.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (resourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceName"); + } + if (resourceName != null) + { + if (resourceName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceName", 63); + } + if (resourceName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceName, "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); + } + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SnapshotsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SnapshotsOperationsExtensions.cs new file mode 100644 index 000000000000..1d39909d96cc --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/SnapshotsOperationsExtensions.cs @@ -0,0 +1,326 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.ContainerService +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for SnapshotsOperations. + /// + public static partial class SnapshotsOperationsExtensions + { + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + public static IPage List(this ISnapshotsOperations operations) + { + return operations.ListAsync().GetAwaiter().GetResult(); + } + + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this ISnapshotsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + public static IPage ListByResourceGroup(this ISnapshotsOperations operations, string resourceGroupName) + { + return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); + } + + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupAsync(this ISnapshotsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static Snapshot Get(this ISnapshotsOperations operations, string resourceGroupName, string resourceName) + { + return operations.GetAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Gets a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Creates or updates a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The snapshot to create or update. + /// + public static Snapshot CreateOrUpdate(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, Snapshot parameters) + { + return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The snapshot to create or update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, Snapshot parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates tags on a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Resource tags. + /// + public static Snapshot UpdateTags(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary)) + { + return operations.UpdateTagsAsync(resourceGroupName, resourceName, tags).GetAwaiter().GetResult(); + } + + /// + /// Updates tags on a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// Resource tags. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateTagsAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, IDictionary tags = default(IDictionary), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateTagsWithHttpMessagesAsync(resourceGroupName, resourceName, tags, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + public static void Delete(this ISnapshotsOperations operations, string resourceGroupName, string resourceName) + { + operations.DeleteAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a snapshot. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this ISnapshotsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this ISnapshotsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of snapshots in the specified subscription. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListNextAsync(this ISnapshotsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByResourceGroupNext(this ISnapshotsOperations operations, string nextPageLink) + { + return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists snapshots in the specified subscription and resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByResourceGroupNextAsync(this ISnapshotsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +}