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 aa6a090fe8e2e..403bba9dbc14a 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/AgentPoolsOperations.cs @@ -120,7 +120,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -346,7 +346,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -634,7 +634,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -855,7 +855,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1088,7 +1088,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1338,7 +1338,7 @@ internal AgentPoolsOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "agentPoolName"); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; 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 9a4e83db3ffeb..b53e00facb1ec 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ContainerServiceClient.cs @@ -96,6 +96,11 @@ public partial class ContainerServiceClient : ServiceClient public virtual IAgentPoolsOperations AgentPools { get; private set; } + /// + /// Gets the IPrivateEndpointConnectionsOperations. + /// + public virtual IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; private set; } + /// /// Initializes a new instance of the ContainerServiceClient class. /// @@ -342,6 +347,7 @@ private void Initialize() Operations = new Operations(this); ManagedClusters = new ManagedClustersOperations(this); AgentPools = new AgentPoolsOperations(this); + PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; 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 31347cb9b1a69..8f78954b872fc 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IContainerServiceClient.cs @@ -91,5 +91,10 @@ public partial interface IContainerServiceClient : System.IDisposable /// IAgentPoolsOperations AgentPools { get; } + /// + /// Gets the IPrivateEndpointConnectionsOperations. + /// + IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; } + } } 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 c3957a97e4929..88259f23ca048 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IManagedClustersOperations.cs @@ -107,7 +107,12 @@ public partial interface IManagedClustersOperations /// /// /// Gets the accessProfile for the specified role name of the managed - /// cluster with a specified resource group and name. + /// cluster with a specified resource group and name. **WARNING**: This + /// API will be deprecated. Instead use + /// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + /// or + /// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + /// . /// /// /// The name of the resource group. @@ -124,15 +129,16 @@ public partial interface IManagedClustersOperations /// /// 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 /// + [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] Task> GetAccessProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string roleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets cluster admin credential of a managed cluster. diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs new file mode 100644 index 0000000000000..7040a2b527c4b --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/IPrivateEndpointConnectionsOperations.cs @@ -0,0 +1,184 @@ +// +// 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; + + /// + /// PrivateEndpointConnectionsOperations operations. + /// + public partial interface IPrivateEndpointConnectionsOperations + { + /// + /// Gets a list of private endpoint connections in the specified + /// managed cluster. + /// + /// + /// Gets a list of private endpoint connections in the specified + /// managed cluster. The operation returns properties of each private + /// endpoint connection. + /// + /// + /// The name of the resource group. + /// + /// + /// 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> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets the private endpoint connection. + /// + /// + /// Gets the details of the private endpoint connection by managed + /// cluster and resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// 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, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Updates a private endpoint connection. + /// + /// + /// Updates a private endpoint connection in the specified managed + /// cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// Parameters supplied to the Update a private endpoint connection + /// 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a private endpoint connection. + /// + /// + /// Deletes the private endpoint connection in the specified managed + /// cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// 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, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a private endpoint connection. + /// + /// + /// Deletes the private endpoint connection in the specified managed + /// cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// 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 BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} 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 4bbb1c2f654ec..9ed0b27cbf4e2 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperations.cs @@ -84,7 +84,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -278,7 +278,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -496,7 +496,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -651,7 +651,12 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// /// Gets the accessProfile for the specified role name of the managed cluster - /// with a specified resource group and name. + /// with a specified resource group and name. **WARNING**: This API will be + /// deprecated. Instead use + /// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + /// or + /// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + /// . /// /// /// The name of the resource group. @@ -683,6 +688,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) /// /// A response object containing the response body and response headers. /// + [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] public async Task> GetAccessProfileWithHttpMessagesAsync(string resourceGroupName, string resourceName, string roleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) @@ -723,7 +729,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "roleName"); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -945,7 +951,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1165,7 +1171,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1385,7 +1391,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1605,7 +1611,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2001,7 +2007,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) { parameters.Validate(); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2248,7 +2254,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; TagsObject parameters = new TagsObject(); if (tags != null) { @@ -2476,7 +2482,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2686,7 +2692,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) { parameters.Validate(); } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2899,11 +2905,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); } - if (parameters != null) - { - parameters.Validate(); - } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3108,7 +3110,7 @@ internal ManagedClustersOperations(ContainerServiceClient client) throw new ValidationException(ValidationRules.Pattern, "resourceName", "^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$"); } } - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; 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 1514bd1cca6ac..538cb81867a27 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/ManagedClustersOperationsExtensions.cs @@ -154,7 +154,12 @@ public static ManagedClusterUpgradeProfile GetUpgradeProfile(this IManagedCluste /// /// /// Gets the accessProfile for the specified role name of the managed cluster - /// with a specified resource group and name. + /// with a specified resource group and name. **WARNING**: This API will be + /// deprecated. Instead use + /// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + /// or + /// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + /// . /// /// /// The operations group for this extension method. @@ -168,6 +173,7 @@ public static ManagedClusterUpgradeProfile GetUpgradeProfile(this IManagedCluste /// /// The name of the role for managed cluster accessProfile resource. /// + [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string roleName) { return operations.GetAccessProfileAsync(resourceGroupName, resourceName, roleName).GetAwaiter().GetResult(); @@ -178,7 +184,12 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// /// /// Gets the accessProfile for the specified role name of the managed cluster - /// with a specified resource group and name. + /// with a specified resource group and name. **WARNING**: This API will be + /// deprecated. Instead use + /// [ListClusterUserCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) + /// or + /// [ListClusterAdminCredentials](https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) + /// . /// /// /// The operations group for this extension method. @@ -195,6 +206,7 @@ public static ManagedClusterAccessProfile GetAccessProfile(this IManagedClusters /// /// The cancellation token. /// + [System.Obsolete("This operation is deprecated. Please do not use it any longer.")] public static async Task GetAccessProfileAsync(this IManagedClustersOperations operations, string resourceGroupName, string resourceName, string roleName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetAccessProfileWithHttpMessagesAsync(resourceGroupName, resourceName, roleName, null, cancellationToken).ConfigureAwait(false)) 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 94bec78524be0..fed94790239d8 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 @@ -40,8 +40,9 @@ public AgentPool() /// resource. /// Resource type /// Number of agents (VMs) to host docker - /// containers. Allowed values must be in the range of 1 to 100 - /// (inclusive). The default value is 1. + /// containers. Allowed values must be in the range of 0 to 100 + /// (inclusive) for user pools and in the range of 1 to 100 (inclusive) + /// for system pools. The default value is 1. /// Size of agent VMs. Possible values include: /// 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', /// 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', @@ -117,23 +118,38 @@ public AgentPool() /// AgentPoolType represents types of an /// agent pool. Possible values include: 'VirtualMachineScaleSets', /// 'AvailabilitySet' + /// AgentPoolMode represents mode of an agent pool. + /// Possible values include: 'System', 'User' /// Version of orchestrator specified /// when creating the managed cluster. + /// Version of node image + /// Settings for upgrading the + /// agentpool /// The current deployment or /// provisioning state, which only appears in the response. - /// (PREVIEW) Availability zones for - /// nodes. Must use VirtualMachineScaleSets AgentPoolType. + /// Availability zones for nodes. Must + /// use VirtualMachineScaleSets AgentPoolType. /// Enable public IP for nodes /// ScaleSetPriority to be used to /// specify virtual machine scale set priority. Default to regular. - /// Possible values include: 'Low', 'Regular' + /// Possible values include: 'Spot', 'Regular' /// ScaleSetEvictionPolicy to be - /// used to specify eviction policy for low priority virtual machine - /// scale set. Default to Delete. Possible values include: 'Delete', + /// used to specify eviction policy for Spot virtual machine scale set. + /// Default to Delete. Possible values include: 'Delete', /// 'Deallocate' + /// SpotMaxPrice to be used to specify the + /// maximum price you are willing to pay in US Dollars. Possible values + /// are any decimal value greater than zero or -1 which indicates + /// default price to be up-to on-demand. + /// Agent pool tags to be persisted on the agent + /// pool virtual machine scale set. + /// Agent pool node labels to be persisted + /// across all nodes in agent pool. /// Taints added to new nodes during node pool /// create and scale. For example, key=value:NoSchedule. - 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 vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string agentPoolType = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), IList nodeTaints = default(IList)) + /// The ID for Proximity + /// Placement Group. + 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 vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string agentPoolType = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), 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)) : base(id, name, type) { Count = count; @@ -146,13 +162,20 @@ public AgentPool() MinCount = minCount; EnableAutoScaling = enableAutoScaling; AgentPoolType = agentPoolType; + Mode = mode; OrchestratorVersion = orchestratorVersion; + NodeImageVersion = nodeImageVersion; + UpgradeSettings = upgradeSettings; ProvisioningState = provisioningState; AvailabilityZones = availabilityZones; EnableNodePublicIP = enableNodePublicIP; ScaleSetPriority = scaleSetPriority; ScaleSetEvictionPolicy = scaleSetEvictionPolicy; + SpotMaxPrice = spotMaxPrice; + Tags = tags; + NodeLabels = nodeLabels; NodeTaints = nodeTaints; + ProximityPlacementGroupID = proximityPlacementGroupID; CustomInit(); } @@ -163,8 +186,9 @@ public AgentPool() /// /// Gets or sets number of agents (VMs) to host docker containers. - /// Allowed values must be in the range of 1 to 100 (inclusive). The - /// default value is 1. + /// Allowed values must be in the range of 0 to 100 (inclusive) for + /// user pools and in the range of 1 to 100 (inclusive) for system + /// pools. The default value is 1. /// [JsonProperty(PropertyName = "properties.count")] public int? Count { get; set; } @@ -284,6 +308,13 @@ public AgentPool() [JsonProperty(PropertyName = "properties.type")] public string AgentPoolType { get; set; } + /// + /// Gets or sets agentPoolMode represents mode of an agent pool. + /// Possible values include: 'System', 'User' + /// + [JsonProperty(PropertyName = "properties.mode")] + public string Mode { get; set; } + /// /// Gets or sets version of orchestrator specified when creating the /// managed cluster. @@ -291,6 +322,18 @@ public AgentPool() [JsonProperty(PropertyName = "properties.orchestratorVersion")] public string OrchestratorVersion { get; set; } + /// + /// Gets or sets version of node image + /// + [JsonProperty(PropertyName = "properties.nodeImageVersion")] + public string NodeImageVersion { get; set; } + + /// + /// Gets or sets settings for upgrading the agentpool + /// + [JsonProperty(PropertyName = "properties.upgradeSettings")] + public AgentPoolUpgradeSettings UpgradeSettings { get; set; } + /// /// Gets the current deployment or provisioning state, which only /// appears in the response. @@ -299,7 +342,7 @@ public AgentPool() public string ProvisioningState { get; private set; } /// - /// Gets or sets (PREVIEW) Availability zones for nodes. Must use + /// Gets or sets availability zones for nodes. Must use /// VirtualMachineScaleSets AgentPoolType. /// [JsonProperty(PropertyName = "properties.availabilityZones")] @@ -314,19 +357,42 @@ public AgentPool() /// /// Gets or sets scaleSetPriority to be used to specify virtual machine /// scale set priority. Default to regular. Possible values include: - /// 'Low', 'Regular' + /// 'Spot', 'Regular' /// [JsonProperty(PropertyName = "properties.scaleSetPriority")] public string ScaleSetPriority { get; set; } /// /// Gets or sets scaleSetEvictionPolicy to be used to specify eviction - /// policy for low priority virtual machine scale set. Default to - /// Delete. Possible values include: 'Delete', 'Deallocate' + /// policy for Spot virtual machine scale set. Default to Delete. + /// Possible values include: 'Delete', 'Deallocate' /// [JsonProperty(PropertyName = "properties.scaleSetEvictionPolicy")] public string ScaleSetEvictionPolicy { get; set; } + /// + /// Gets or sets spotMaxPrice to be used to specify the maximum price + /// you are willing to pay in US Dollars. Possible values are any + /// decimal value greater than zero or -1 which indicates default price + /// to be up-to on-demand. + /// + [JsonProperty(PropertyName = "properties.spotMaxPrice")] + public double? SpotMaxPrice { get; set; } + + /// + /// Gets or sets agent pool tags to be persisted on the agent pool + /// virtual machine scale set. + /// + [JsonProperty(PropertyName = "properties.tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets agent pool node labels to be persisted across all + /// nodes in agent pool. + /// + [JsonProperty(PropertyName = "properties.nodeLabels")] + public IDictionary NodeLabels { get; set; } + /// /// Gets or sets taints added to new nodes during node pool create and /// scale. For example, key=value:NoSchedule. @@ -334,5 +400,11 @@ public AgentPool() [JsonProperty(PropertyName = "properties.nodeTaints")] public IList NodeTaints { get; set; } + /// + /// Gets or sets the ID for Proximity Placement Group. + /// + [JsonProperty(PropertyName = "properties.proximityPlacementGroupID")] + public string ProximityPlacementGroupID { get; set; } + } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolMode.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolMode.cs new file mode 100644 index 0000000000000..f54700de21675 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolMode.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 AgentPoolMode. + /// + public static class AgentPoolMode + { + public const string System = "System"; + public const string User = "User"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs index 7e876988de79c..7d56da23e895a 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeProfile.cs @@ -44,7 +44,9 @@ public AgentPoolUpgradeProfile() /// Type of the agent pool upgrade profile. /// List of orchestrator types and versions /// available for upgrade. - public AgentPoolUpgradeProfile(string kubernetesVersion, string osType, string id = default(string), string name = default(string), string type = default(string), IList upgrades = default(IList)) + /// LatestNodeImageVersion is the + /// latest AKS supported node image version. + public AgentPoolUpgradeProfile(string kubernetesVersion, string osType, string id = default(string), string name = default(string), string type = default(string), IList upgrades = default(IList), string latestNodeImageVersion = default(string)) { Id = id; Name = name; @@ -52,6 +54,7 @@ public AgentPoolUpgradeProfile() KubernetesVersion = kubernetesVersion; OsType = osType; Upgrades = upgrades; + LatestNodeImageVersion = latestNodeImageVersion; CustomInit(); } @@ -99,6 +102,13 @@ public AgentPoolUpgradeProfile() [JsonProperty(PropertyName = "properties.upgrades")] public IList Upgrades { get; set; } + /// + /// Gets or sets latestNodeImageVersion is the latest AKS supported + /// node image version. + /// + [JsonProperty(PropertyName = "properties.latestNodeImageVersion")] + public string LatestNodeImageVersion { get; set; } + /// /// Validate the object. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.cs new file mode 100644 index 0000000000000..0327533c9485a --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/AgentPoolUpgradeSettings.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; + + /// + /// Settings for upgrading an agentpool + /// + public partial class AgentPoolUpgradeSettings + { + /// + /// Initializes a new instance of the AgentPoolUpgradeSettings class. + /// + public AgentPoolUpgradeSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AgentPoolUpgradeSettings class. + /// + /// Count or percentage of additional nodes to + /// be added during upgrade. If empty uses AKS default + public AgentPoolUpgradeSettings(string maxSurge = default(string)) + { + MaxSurge = maxSurge; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets count or percentage of additional nodes to be added + /// during upgrade. If empty uses AKS default + /// + [JsonProperty(PropertyName = "maxSurge")] + public string MaxSurge { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ConnectionStatus.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ConnectionStatus.cs new file mode 100644 index 0000000000000..a6da9d46d2a3a --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ConnectionStatus.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 ConnectionStatus. + /// + public static class ConnectionStatus + { + public const string Pending = "Pending"; + public const string Approved = "Approved"; + public const string Rejected = "Rejected"; + public const string Disconnected = "Disconnected"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs index 8316cb3d4f5c3..131dfa7b2eb0b 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceLinuxProfile.cs @@ -77,6 +77,13 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Ssh"); } + if (AdminUsername != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(AdminUsername, "^[A-Za-z][-A-Za-z0-9_]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "AdminUsername", "^[A-Za-z][-A-Za-z0-9_]*$"); + } + } if (Ssh != null) { Ssh.Validate(); 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 6bbd20d7c87c5..bb8dc8ebc5e63 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 @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -37,6 +38,8 @@ public ContainerServiceNetworkProfile() /// Network policy used for building /// Kubernetes network. Possible values include: 'calico', /// 'azure' + /// Network mode used for building Kubernetes + /// network. Possible values include: 'transparent', 'bridge' /// A CIDR notation IP range from which to assign /// pod IPs when kubenet is used. /// A CIDR notation IP range from which to @@ -48,18 +51,23 @@ public ContainerServiceNetworkProfile() /// A CIDR notation IP range assigned to /// the Docker bridge network. It must not overlap with any Subnet IP /// ranges or the Kubernetes service address range. + /// The outbound (egress) routing method. + /// Possible values include: 'loadBalancer', + /// 'userDefinedRouting' /// The load balancer sku for the managed /// cluster. Possible values include: 'standard', 'basic' /// Profile of the cluster load /// balancer. - public ContainerServiceNetworkProfile(string networkPlugin = default(string), string networkPolicy = default(string), string podCidr = default(string), string serviceCidr = default(string), string dnsServiceIP = default(string), string dockerBridgeCidr = default(string), string loadBalancerSku = default(string), ManagedClusterLoadBalancerProfile loadBalancerProfile = default(ManagedClusterLoadBalancerProfile)) + 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)) { NetworkPlugin = networkPlugin; NetworkPolicy = networkPolicy; + NetworkMode = networkMode; PodCidr = podCidr; ServiceCidr = serviceCidr; DnsServiceIP = dnsServiceIP; DockerBridgeCidr = dockerBridgeCidr; + OutboundType = outboundType; LoadBalancerSku = loadBalancerSku; LoadBalancerProfile = loadBalancerProfile; CustomInit(); @@ -84,6 +92,13 @@ public ContainerServiceNetworkProfile() [JsonProperty(PropertyName = "networkPolicy")] public string NetworkPolicy { get; set; } + /// + /// Gets or sets network mode used for building Kubernetes network. + /// Possible values include: 'transparent', 'bridge' + /// + [JsonProperty(PropertyName = "networkMode")] + public string NetworkMode { get; set; } + /// /// Gets or sets a CIDR notation IP range from which to assign pod IPs /// when kubenet is used. @@ -114,6 +129,13 @@ public ContainerServiceNetworkProfile() [JsonProperty(PropertyName = "dockerBridgeCidr")] public string DockerBridgeCidr { get; set; } + /// + /// Gets or sets the outbound (egress) routing method. Possible values + /// include: 'loadBalancer', 'userDefinedRouting' + /// + [JsonProperty(PropertyName = "outboundType")] + public string OutboundType { get; set; } + /// /// Gets or sets the load balancer sku for the managed cluster. /// Possible values include: 'standard', 'basic' @@ -130,11 +152,39 @@ public ContainerServiceNetworkProfile() /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { + if (PodCidr != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(PodCidr, "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$")) + { + throw new ValidationException(ValidationRules.Pattern, "PodCidr", "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"); + } + } + if (ServiceCidr != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(ServiceCidr, "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$")) + { + throw new ValidationException(ValidationRules.Pattern, "ServiceCidr", "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"); + } + } + if (DnsServiceIP != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(DnsServiceIP, "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$")) + { + throw new ValidationException(ValidationRules.Pattern, "DnsServiceIP", "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$"); + } + } + if (DockerBridgeCidr != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(DockerBridgeCidr, "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$")) + { + throw new ValidationException(ValidationRules.Pattern, "DockerBridgeCidr", "^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$"); + } + } if (LoadBalancerProfile != null) { LoadBalancerProfile.Validate(); diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceWindowsProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceWindowsProfile.cs index d9f66fb7ef7f6..6ac80c9f17ad2 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceWindowsProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ContainerServiceWindowsProfile.cs @@ -76,6 +76,20 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "AdminPassword"); } + if (AdminUsername != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(AdminUsername, "^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "AdminUsername", "^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$"); + } + } + if (AdminPassword != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(AdminPassword, "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$")) + { + throw new ValidationException(ValidationRules.Pattern, "AdminPassword", "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$"); + } + } } } } 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 e782a0746f073..e266d67139878 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 @@ -70,11 +70,18 @@ public ManagedCluster() /// configuration. /// Profile of Azure Active Directory /// configuration. + /// Parameters to be applied to the + /// cluster-autoscaler when enabled /// Access profile for managed /// cluster API server. + /// ResourceId of the disk encryption + /// set to use for enabling encryption at rest. + /// Identities associated with the + /// cluster. /// The identity of the managed cluster, if /// configured. - public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string dnsPrefix = default(string), string fqdn = default(string), string privateFQDN = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary), string nodeResourceGroup = default(string), bool? enableRBAC = default(bool?), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), ManagedClusterIdentity identity = default(ManagedClusterIdentity)) + /// The managed cluster SKU. + public ManagedCluster(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), int? maxAgentPools = default(int?), string kubernetesVersion = default(string), string dnsPrefix = default(string), string fqdn = default(string), string privateFQDN = default(string), IList agentPoolProfiles = default(IList), ContainerServiceLinuxProfile linuxProfile = default(ContainerServiceLinuxProfile), ManagedClusterWindowsProfile windowsProfile = default(ManagedClusterWindowsProfile), ManagedClusterServicePrincipalProfile servicePrincipalProfile = default(ManagedClusterServicePrincipalProfile), IDictionary addonProfiles = default(IDictionary), string nodeResourceGroup = default(string), bool? enableRBAC = default(bool?), bool? enablePodSecurityPolicy = default(bool?), ContainerServiceNetworkProfile networkProfile = default(ContainerServiceNetworkProfile), ManagedClusterAADProfile aadProfile = default(ManagedClusterAADProfile), ManagedClusterPropertiesAutoScalerProfile autoScalerProfile = default(ManagedClusterPropertiesAutoScalerProfile), ManagedClusterAPIServerAccessProfile apiServerAccessProfile = default(ManagedClusterAPIServerAccessProfile), string diskEncryptionSetID = default(string), IDictionary identityProfile = default(IDictionary), ManagedClusterIdentity identity = default(ManagedClusterIdentity), ManagedClusterSKU sku = default(ManagedClusterSKU)) : base(location, id, name, type, tags) { ProvisioningState = provisioningState; @@ -93,8 +100,12 @@ public ManagedCluster() EnablePodSecurityPolicy = enablePodSecurityPolicy; NetworkProfile = networkProfile; AadProfile = aadProfile; + AutoScalerProfile = autoScalerProfile; ApiServerAccessProfile = apiServerAccessProfile; + DiskEncryptionSetID = diskEncryptionSetID; + IdentityProfile = identityProfile; Identity = identity; + Sku = sku; CustomInit(); } @@ -208,18 +219,44 @@ public ManagedCluster() [JsonProperty(PropertyName = "properties.aadProfile")] public ManagedClusterAADProfile AadProfile { get; set; } + /// + /// Gets or sets parameters to be applied to the cluster-autoscaler + /// when enabled + /// + [JsonProperty(PropertyName = "properties.autoScalerProfile")] + public ManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get; set; } + /// /// Gets or sets access profile for managed cluster API server. /// [JsonProperty(PropertyName = "properties.apiServerAccessProfile")] public ManagedClusterAPIServerAccessProfile ApiServerAccessProfile { get; set; } + /// + /// Gets or sets resourceId of the disk encryption set to use for + /// enabling encryption at rest. + /// + [JsonProperty(PropertyName = "properties.diskEncryptionSetID")] + public string DiskEncryptionSetID { get; set; } + + /// + /// Gets or sets identities associated with the cluster. + /// + [JsonProperty(PropertyName = "properties.identityProfile")] + public IDictionary IdentityProfile { get; set; } + /// /// Gets or sets the identity of the managed cluster, if configured. /// [JsonProperty(PropertyName = "identity")] public ManagedClusterIdentity Identity { get; set; } + /// + /// Gets or sets the managed cluster SKU. + /// + [JsonProperty(PropertyName = "sku")] + public ManagedClusterSKU Sku { get; set; } + /// /// Validate the object. /// @@ -265,10 +302,6 @@ public override void Validate() { NetworkProfile.Validate(); } - if (AadProfile != null) - { - AadProfile.Validate(); - } } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAADProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAADProfile.cs index de674fc3d9bb0..0424342b59acb 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAADProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAADProfile.cs @@ -10,8 +10,9 @@ namespace Microsoft.Azure.Management.ContainerService.Models { - using Microsoft.Rest; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -30,6 +31,11 @@ public ManagedClusterAADProfile() /// /// Initializes a new instance of the ManagedClusterAADProfile class. /// + /// Whether to enable managed AAD. + /// Whether to enable Azure RBAC for + /// Kubernetes authorization. + /// AAD group object IDs that will + /// have admin role of the cluster. /// The client AAD application ID. /// The server AAD application ID. /// The server AAD application @@ -37,8 +43,11 @@ public ManagedClusterAADProfile() /// The AAD tenant ID to use for authentication. /// If not specified, will use the tenant of the deployment /// subscription. - public ManagedClusterAADProfile(string clientAppID, string serverAppID, string serverAppSecret = default(string), string tenantID = default(string)) + public ManagedClusterAADProfile(bool? managed = default(bool?), bool? enableAzureRBAC = default(bool?), IList adminGroupObjectIDs = default(IList), string clientAppID = default(string), string serverAppID = default(string), string serverAppSecret = default(string), string tenantID = default(string)) { + Managed = managed; + EnableAzureRBAC = enableAzureRBAC; + AdminGroupObjectIDs = adminGroupObjectIDs; ClientAppID = clientAppID; ServerAppID = serverAppID; ServerAppSecret = serverAppSecret; @@ -51,6 +60,26 @@ public ManagedClusterAADProfile() /// partial void CustomInit(); + /// + /// Gets or sets whether to enable managed AAD. + /// + [JsonProperty(PropertyName = "managed")] + public bool? Managed { get; set; } + + /// + /// Gets or sets whether to enable Azure RBAC for Kubernetes + /// authorization. + /// + [JsonProperty(PropertyName = "enableAzureRBAC")] + public bool? EnableAzureRBAC { get; set; } + + /// + /// Gets or sets AAD group object IDs that will have admin role of the + /// cluster. + /// + [JsonProperty(PropertyName = "adminGroupObjectIDs")] + public IList AdminGroupObjectIDs { get; set; } + /// /// Gets or sets the client AAD application ID. /// @@ -76,22 +105,5 @@ public ManagedClusterAADProfile() [JsonProperty(PropertyName = "tenantID")] public string TenantID { get; set; } - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ClientAppID == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ClientAppID"); - } - if (ServerAppID == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ServerAppID"); - } - } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.cs index 0655ec233ac59..0ebd1fa134212 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAddonProfile.cs @@ -34,10 +34,13 @@ public ManagedClusterAddonProfile() /// Whether the add-on is enabled or not. /// Key-value pairs for configuring an /// add-on. - public ManagedClusterAddonProfile(bool enabled, IDictionary config = default(IDictionary)) + /// Information of user assigned identity used + /// by this add-on. + public ManagedClusterAddonProfile(bool enabled, IDictionary config = default(IDictionary), ManagedClusterAddonProfileIdentity identity = default(ManagedClusterAddonProfileIdentity)) { Enabled = enabled; Config = config; + Identity = identity; CustomInit(); } @@ -58,6 +61,12 @@ public ManagedClusterAddonProfile() [JsonProperty(PropertyName = "config")] public IDictionary Config { get; set; } + /// + /// Gets information of user assigned identity used by this add-on. + /// + [JsonProperty(PropertyName = "identity")] + public ManagedClusterAddonProfileIdentity Identity { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAddonProfileIdentity.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAddonProfileIdentity.cs new file mode 100644 index 0000000000000..61ad97f955046 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterAddonProfileIdentity.cs @@ -0,0 +1,51 @@ +// +// 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 System.Linq; + + /// + /// Information of user assigned identity used by this add-on. + /// + public partial class ManagedClusterAddonProfileIdentity : UserAssignedIdentity + { + /// + /// Initializes a new instance of the + /// ManagedClusterAddonProfileIdentity class. + /// + public ManagedClusterAddonProfileIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedClusterAddonProfileIdentity class. + /// + /// The resource id of the user assigned + /// identity. + /// The client id of the user assigned + /// identity. + /// The object id of the user assigned + /// identity. + public ManagedClusterAddonProfileIdentity(string resourceId = default(string), string clientId = default(string), string objectId = default(string)) + : base(resourceId, clientId, objectId) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void 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 cc13c8b0551bf..fe1f89d386bc8 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 @@ -37,8 +37,9 @@ public ManagedClusterAgentPoolProfile() /// Unique name of the agent pool profile in the /// context of the subscription and resource group. /// Number of agents (VMs) to host docker - /// containers. Allowed values must be in the range of 1 to 100 - /// (inclusive). The default value is 1. + /// containers. Allowed values must be in the range of 0 to 100 + /// (inclusive) for user pools and in the range of 1 to 100 (inclusive) + /// for system pools. The default value is 1. /// Size of agent VMs. Possible values include: /// 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', /// 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', @@ -114,24 +115,39 @@ public ManagedClusterAgentPoolProfile() /// AgentPoolType represents types of an agent pool. /// Possible values include: 'VirtualMachineScaleSets', /// 'AvailabilitySet' + /// AgentPoolMode represents mode of an agent pool. + /// Possible values include: 'System', 'User' /// Version of orchestrator specified /// when creating the managed cluster. + /// Version of node image + /// Settings for upgrading the + /// agentpool /// The current deployment or /// provisioning state, which only appears in the response. - /// (PREVIEW) Availability zones for - /// nodes. Must use VirtualMachineScaleSets AgentPoolType. + /// Availability zones for nodes. Must + /// use VirtualMachineScaleSets AgentPoolType. /// Enable public IP for nodes /// ScaleSetPriority to be used to /// specify virtual machine scale set priority. Default to regular. - /// Possible values include: 'Low', 'Regular' + /// Possible values include: 'Spot', 'Regular' /// ScaleSetEvictionPolicy to be - /// used to specify eviction policy for low priority virtual machine - /// scale set. Default to Delete. Possible values include: 'Delete', + /// used to specify eviction policy for Spot virtual machine scale set. + /// Default to Delete. Possible values include: 'Delete', /// 'Deallocate' + /// SpotMaxPrice to be used to specify the + /// maximum price you are willing to pay in US Dollars. Possible values + /// are any decimal value greater than zero or -1 which indicates + /// default price to be up-to on-demand. + /// Agent pool tags to be persisted on the agent + /// pool virtual machine scale set. + /// Agent pool node labels to be persisted + /// across all nodes in agent pool. /// Taints added to new nodes during node pool /// create and scale. For example, key=value:NoSchedule. - public ManagedClusterAgentPoolProfile(string name, int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), IList nodeTaints = default(IList)) - : base(count, vmSize, osDiskSizeGB, vnetSubnetID, maxPods, osType, maxCount, minCount, enableAutoScaling, type, orchestratorVersion, provisioningState, availabilityZones, enableNodePublicIP, scaleSetPriority, scaleSetEvictionPolicy, nodeTaints) + /// The ID for Proximity + /// Placement Group. + public ManagedClusterAgentPoolProfile(string name, int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), 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)) + : base(count, vmSize, osDiskSizeGB, vnetSubnetID, maxPods, osType, maxCount, minCount, enableAutoScaling, type, mode, orchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, availabilityZones, enableNodePublicIP, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupID) { Name = name; CustomInit(); @@ -161,6 +177,13 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Name"); } + if (Name != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^[a-z][a-z0-9]{0,11}$")) + { + throw new ValidationException(ValidationRules.Pattern, "Name", "^[a-z][a-z0-9]{0,11}$"); + } + } } } } 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 2caed6228e9b7..b4109c29d2d0f 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 @@ -34,8 +34,9 @@ public ManagedClusterAgentPoolProfileProperties() /// ManagedClusterAgentPoolProfileProperties class. /// /// Number of agents (VMs) to host docker - /// containers. Allowed values must be in the range of 1 to 100 - /// (inclusive). The default value is 1. + /// containers. Allowed values must be in the range of 0 to 100 + /// (inclusive) for user pools and in the range of 1 to 100 (inclusive) + /// for system pools. The default value is 1. /// Size of agent VMs. Possible values include: /// 'Standard_A1', 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', /// 'Standard_A2', 'Standard_A2_v2', 'Standard_A2m_v2', 'Standard_A3', @@ -111,23 +112,38 @@ public ManagedClusterAgentPoolProfileProperties() /// AgentPoolType represents types of an agent pool. /// Possible values include: 'VirtualMachineScaleSets', /// 'AvailabilitySet' + /// AgentPoolMode represents mode of an agent pool. + /// Possible values include: 'System', 'User' /// Version of orchestrator specified /// when creating the managed cluster. + /// Version of node image + /// Settings for upgrading the + /// agentpool /// The current deployment or /// provisioning state, which only appears in the response. - /// (PREVIEW) Availability zones for - /// nodes. Must use VirtualMachineScaleSets AgentPoolType. + /// Availability zones for nodes. Must + /// use VirtualMachineScaleSets AgentPoolType. /// Enable public IP for nodes /// ScaleSetPriority to be used to /// specify virtual machine scale set priority. Default to regular. - /// Possible values include: 'Low', 'Regular' + /// Possible values include: 'Spot', 'Regular' /// ScaleSetEvictionPolicy to be - /// used to specify eviction policy for low priority virtual machine - /// scale set. Default to Delete. Possible values include: 'Delete', + /// used to specify eviction policy for Spot virtual machine scale set. + /// Default to Delete. Possible values include: 'Delete', /// 'Deallocate' + /// SpotMaxPrice to be used to specify the + /// maximum price you are willing to pay in US Dollars. Possible values + /// are any decimal value greater than zero or -1 which indicates + /// default price to be up-to on-demand. + /// Agent pool tags to be persisted on the agent + /// pool virtual machine scale set. + /// Agent pool node labels to be persisted + /// across all nodes in agent pool. /// Taints added to new nodes during node pool /// create and scale. For example, key=value:NoSchedule. - public ManagedClusterAgentPoolProfileProperties(int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string orchestratorVersion = default(string), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), string scaleSetPriority = default(string), string scaleSetEvictionPolicy = default(string), IList nodeTaints = default(IList)) + /// The ID for Proximity + /// Placement Group. + public ManagedClusterAgentPoolProfileProperties(int? count = default(int?), string vmSize = default(string), int? osDiskSizeGB = default(int?), string vnetSubnetID = default(string), int? maxPods = default(int?), string osType = default(string), int? maxCount = default(int?), int? minCount = default(int?), bool? enableAutoScaling = default(bool?), string type = default(string), string mode = default(string), string orchestratorVersion = default(string), string nodeImageVersion = default(string), AgentPoolUpgradeSettings upgradeSettings = default(AgentPoolUpgradeSettings), string provisioningState = default(string), IList availabilityZones = default(IList), bool? enableNodePublicIP = default(bool?), 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)) { Count = count; VmSize = vmSize; @@ -139,13 +155,20 @@ public ManagedClusterAgentPoolProfileProperties() MinCount = minCount; EnableAutoScaling = enableAutoScaling; Type = type; + Mode = mode; OrchestratorVersion = orchestratorVersion; + NodeImageVersion = nodeImageVersion; + UpgradeSettings = upgradeSettings; ProvisioningState = provisioningState; AvailabilityZones = availabilityZones; EnableNodePublicIP = enableNodePublicIP; ScaleSetPriority = scaleSetPriority; ScaleSetEvictionPolicy = scaleSetEvictionPolicy; + SpotMaxPrice = spotMaxPrice; + Tags = tags; + NodeLabels = nodeLabels; NodeTaints = nodeTaints; + ProximityPlacementGroupID = proximityPlacementGroupID; CustomInit(); } @@ -156,8 +179,9 @@ public ManagedClusterAgentPoolProfileProperties() /// /// Gets or sets number of agents (VMs) to host docker containers. - /// Allowed values must be in the range of 1 to 100 (inclusive). The - /// default value is 1. + /// Allowed values must be in the range of 0 to 100 (inclusive) for + /// user pools and in the range of 1 to 100 (inclusive) for system + /// pools. The default value is 1. /// [JsonProperty(PropertyName = "count")] public int? Count { get; set; } @@ -277,6 +301,13 @@ public ManagedClusterAgentPoolProfileProperties() [JsonProperty(PropertyName = "type")] public string Type { get; set; } + /// + /// Gets or sets agentPoolMode represents mode of an agent pool. + /// Possible values include: 'System', 'User' + /// + [JsonProperty(PropertyName = "mode")] + public string Mode { get; set; } + /// /// Gets or sets version of orchestrator specified when creating the /// managed cluster. @@ -284,6 +315,18 @@ public ManagedClusterAgentPoolProfileProperties() [JsonProperty(PropertyName = "orchestratorVersion")] public string OrchestratorVersion { get; set; } + /// + /// Gets or sets version of node image + /// + [JsonProperty(PropertyName = "nodeImageVersion")] + public string NodeImageVersion { get; set; } + + /// + /// Gets or sets settings for upgrading the agentpool + /// + [JsonProperty(PropertyName = "upgradeSettings")] + public AgentPoolUpgradeSettings UpgradeSettings { get; set; } + /// /// Gets the current deployment or provisioning state, which only /// appears in the response. @@ -292,7 +335,7 @@ public ManagedClusterAgentPoolProfileProperties() public string ProvisioningState { get; private set; } /// - /// Gets or sets (PREVIEW) Availability zones for nodes. Must use + /// Gets or sets availability zones for nodes. Must use /// VirtualMachineScaleSets AgentPoolType. /// [JsonProperty(PropertyName = "availabilityZones")] @@ -307,19 +350,42 @@ public ManagedClusterAgentPoolProfileProperties() /// /// Gets or sets scaleSetPriority to be used to specify virtual machine /// scale set priority. Default to regular. Possible values include: - /// 'Low', 'Regular' + /// 'Spot', 'Regular' /// [JsonProperty(PropertyName = "scaleSetPriority")] public string ScaleSetPriority { get; set; } /// /// Gets or sets scaleSetEvictionPolicy to be used to specify eviction - /// policy for low priority virtual machine scale set. Default to - /// Delete. Possible values include: 'Delete', 'Deallocate' + /// policy for Spot virtual machine scale set. Default to Delete. + /// Possible values include: 'Delete', 'Deallocate' /// [JsonProperty(PropertyName = "scaleSetEvictionPolicy")] public string ScaleSetEvictionPolicy { get; set; } + /// + /// Gets or sets spotMaxPrice to be used to specify the maximum price + /// you are willing to pay in US Dollars. Possible values are any + /// decimal value greater than zero or -1 which indicates default price + /// to be up-to on-demand. + /// + [JsonProperty(PropertyName = "spotMaxPrice")] + public double? SpotMaxPrice { get; set; } + + /// + /// Gets or sets agent pool tags to be persisted on the agent pool + /// virtual machine scale set. + /// + [JsonProperty(PropertyName = "tags")] + public IDictionary Tags { get; set; } + + /// + /// Gets or sets agent pool node labels to be persisted across all + /// nodes in agent pool. + /// + [JsonProperty(PropertyName = "nodeLabels")] + public IDictionary NodeLabels { get; set; } + /// /// Gets or sets taints added to new nodes during node pool create and /// scale. For example, key=value:NoSchedule. @@ -327,5 +393,11 @@ public ManagedClusterAgentPoolProfileProperties() [JsonProperty(PropertyName = "nodeTaints")] public IList NodeTaints { get; set; } + /// + /// Gets or sets the ID for Proximity Placement Group. + /// + [JsonProperty(PropertyName = "proximityPlacementGroupID")] + public string ProximityPlacementGroupID { get; set; } + } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs index 89257c8a216a0..94cf9efd55884 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterIdentity.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.ContainerService.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -38,12 +40,20 @@ public ManagedClusterIdentity() /// identity in master components and an auto-created user assigned /// identity in MC_ resource group in agent nodes. Type 'None' will not /// use MSI for the managed cluster, service principal will be used - /// instead. Possible values include: 'SystemAssigned', 'None' - public ManagedClusterIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?)) + /// instead. Possible values include: 'SystemAssigned', 'UserAssigned', + /// 'None' + /// The user identity associated + /// with the managed cluster. This identity will be used in control + /// plane and only one user assigned identity is allowed. The user + /// identity dictionary key references will be ARM resource ids in the + /// form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + public ManagedClusterIdentity(string principalId = default(string), string tenantId = default(string), ResourceIdentityType? type = default(ResourceIdentityType?), IDictionary userAssignedIdentities = default(IDictionary)) { PrincipalId = principalId; TenantId = tenantId; Type = type; + UserAssignedIdentities = userAssignedIdentities; CustomInit(); } @@ -72,10 +82,20 @@ public ManagedClusterIdentity() /// master components and an auto-created user assigned identity in MC_ /// resource group in agent nodes. Type 'None' will not use MSI for the /// managed cluster, service principal will be used instead. Possible - /// values include: 'SystemAssigned', 'None' + /// values include: 'SystemAssigned', 'UserAssigned', 'None' /// [JsonProperty(PropertyName = "type")] public ResourceIdentityType? Type { get; set; } + /// + /// Gets or sets the user identity associated with the managed cluster. + /// This identity will be used in control plane and only one user + /// assigned identity is allowed. The user identity dictionary key + /// references will be ARM resource ids in the form: + /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// + [JsonProperty(PropertyName = "userAssignedIdentities")] + public IDictionary UserAssignedIdentities { get; set; } + } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterIdentityUserAssignedIdentitiesValue.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterIdentityUserAssignedIdentitiesValue.cs new file mode 100644 index 0000000000000..b8a643eb2b6d6 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterIdentityUserAssignedIdentitiesValue.cs @@ -0,0 +1,60 @@ +// +// 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; + + public partial class ManagedClusterIdentityUserAssignedIdentitiesValue + { + /// + /// Initializes a new instance of the + /// ManagedClusterIdentityUserAssignedIdentitiesValue class. + /// + public ManagedClusterIdentityUserAssignedIdentitiesValue() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedClusterIdentityUserAssignedIdentitiesValue class. + /// + /// The principal id of user assigned + /// identity. + /// The client id of user assigned + /// identity. + public ManagedClusterIdentityUserAssignedIdentitiesValue(string principalId = default(string), string clientId = default(string)) + { + PrincipalId = principalId; + ClientId = clientId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the principal id of user assigned identity. + /// + [JsonProperty(PropertyName = "principalId")] + public string PrincipalId { get; private set; } + + /// + /// Gets the client id of user assigned identity. + /// + [JsonProperty(PropertyName = "clientId")] + public string ClientId { get; private set; } + + } +} 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 2c9728a8cd0d9..e3a2c4740ceaa 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 @@ -10,13 +10,14 @@ namespace Microsoft.Azure.Management.ContainerService.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using System.Linq; /// - /// Profile of the managed cluster load balancer + /// Profile of the managed cluster load balancer. /// public partial class ManagedClusterLoadBalancerProfile { @@ -41,12 +42,21 @@ public ManagedClusterLoadBalancerProfile() /// cluster load balancer. /// The effective outbound IP /// resources of the cluster load balancer. - public ManagedClusterLoadBalancerProfile(ManagedClusterLoadBalancerProfileManagedOutboundIPs managedOutboundIPs = default(ManagedClusterLoadBalancerProfileManagedOutboundIPs), ManagedClusterLoadBalancerProfileOutboundIPPrefixes outboundIPPrefixes = default(ManagedClusterLoadBalancerProfileOutboundIPPrefixes), ManagedClusterLoadBalancerProfileOutboundIPs outboundIPs = default(ManagedClusterLoadBalancerProfileOutboundIPs), IList effectiveOutboundIPs = default(IList)) + /// Desired number of allocated + /// SNAT ports per VM. Allowed values must be in the range of 0 to + /// 64000 (inclusive). The default value is 0 which results in Azure + /// dynamically allocating ports. + /// Desired outbound flow idle + /// timeout in minutes. Allowed values must be 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?)) { ManagedOutboundIPs = managedOutboundIPs; OutboundIPPrefixes = outboundIPPrefixes; OutboundIPs = outboundIPs; EffectiveOutboundIPs = effectiveOutboundIPs; + AllocatedOutboundPorts = allocatedOutboundPorts; + IdleTimeoutInMinutes = idleTimeoutInMinutes; CustomInit(); } @@ -83,10 +93,26 @@ public ManagedClusterLoadBalancerProfile() [JsonProperty(PropertyName = "effectiveOutboundIPs")] public IList EffectiveOutboundIPs { get; set; } + /// + /// Gets or sets desired number of allocated SNAT ports per VM. Allowed + /// values must be in the range of 0 to 64000 (inclusive). The default + /// value is 0 which results in Azure dynamically allocating ports. + /// + [JsonProperty(PropertyName = "allocatedOutboundPorts")] + public int? AllocatedOutboundPorts { get; set; } + + /// + /// Gets or sets desired outbound flow idle timeout in minutes. Allowed + /// values must be in the range of 4 to 120 (inclusive). The default + /// value is 30 minutes. + /// + [JsonProperty(PropertyName = "idleTimeoutInMinutes")] + public int? IdleTimeoutInMinutes { get; set; } + /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() @@ -95,6 +121,22 @@ public virtual void Validate() { ManagedOutboundIPs.Validate(); } + if (AllocatedOutboundPorts > 64000) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "AllocatedOutboundPorts", 64000); + } + if (AllocatedOutboundPorts < 0) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "AllocatedOutboundPorts", 0); + } + if (IdleTimeoutInMinutes > 120) + { + throw new ValidationException(ValidationRules.InclusiveMaximum, "IdleTimeoutInMinutes", 120); + } + if (IdleTimeoutInMinutes < 4) + { + throw new ValidationException(ValidationRules.InclusiveMinimum, "IdleTimeoutInMinutes", 4); + } } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs new file mode 100644 index 0000000000000..a379f5ed844f5 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesAutoScalerProfile.cs @@ -0,0 +1,99 @@ +// +// 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; + + /// + /// Parameters to be applied to the cluster-autoscaler when enabled + /// + public partial class ManagedClusterPropertiesAutoScalerProfile + { + /// + /// Initializes a new instance of the + /// ManagedClusterPropertiesAutoScalerProfile class. + /// + public ManagedClusterPropertiesAutoScalerProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedClusterPropertiesAutoScalerProfile class. + /// + public ManagedClusterPropertiesAutoScalerProfile(string balanceSimilarNodeGroups = default(string), string scanInterval = default(string), string scaleDownDelayAfterAdd = default(string), string scaleDownDelayAfterDelete = default(string), string scaleDownDelayAfterFailure = default(string), string scaleDownUnneededTime = default(string), string scaleDownUnreadyTime = default(string), string scaleDownUtilizationThreshold = default(string), string maxGracefulTerminationSec = default(string)) + { + BalanceSimilarNodeGroups = balanceSimilarNodeGroups; + ScanInterval = scanInterval; + ScaleDownDelayAfterAdd = scaleDownDelayAfterAdd; + ScaleDownDelayAfterDelete = scaleDownDelayAfterDelete; + ScaleDownDelayAfterFailure = scaleDownDelayAfterFailure; + ScaleDownUnneededTime = scaleDownUnneededTime; + ScaleDownUnreadyTime = scaleDownUnreadyTime; + ScaleDownUtilizationThreshold = scaleDownUtilizationThreshold; + MaxGracefulTerminationSec = maxGracefulTerminationSec; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "balance-similar-node-groups")] + public string BalanceSimilarNodeGroups { get; set; } + + /// + /// + [JsonProperty(PropertyName = "scan-interval")] + public string ScanInterval { get; set; } + + /// + /// + [JsonProperty(PropertyName = "scale-down-delay-after-add")] + public string ScaleDownDelayAfterAdd { get; set; } + + /// + /// + [JsonProperty(PropertyName = "scale-down-delay-after-delete")] + public string ScaleDownDelayAfterDelete { get; set; } + + /// + /// + [JsonProperty(PropertyName = "scale-down-delay-after-failure")] + public string ScaleDownDelayAfterFailure { get; set; } + + /// + /// + [JsonProperty(PropertyName = "scale-down-unneeded-time")] + public string ScaleDownUnneededTime { get; set; } + + /// + /// + [JsonProperty(PropertyName = "scale-down-unready-time")] + public string ScaleDownUnreadyTime { get; set; } + + /// + /// + [JsonProperty(PropertyName = "scale-down-utilization-threshold")] + public string ScaleDownUtilizationThreshold { get; set; } + + /// + /// + [JsonProperty(PropertyName = "max-graceful-termination-sec")] + public string MaxGracefulTerminationSec { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesIdentityProfileValue.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesIdentityProfileValue.cs new file mode 100644 index 0000000000000..54d95601f6070 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterPropertiesIdentityProfileValue.cs @@ -0,0 +1,48 @@ +// +// 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 System.Linq; + + public partial class ManagedClusterPropertiesIdentityProfileValue : UserAssignedIdentity + { + /// + /// Initializes a new instance of the + /// ManagedClusterPropertiesIdentityProfileValue class. + /// + public ManagedClusterPropertiesIdentityProfileValue() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManagedClusterPropertiesIdentityProfileValue class. + /// + /// The resource id of the user assigned + /// identity. + /// The client id of the user assigned + /// identity. + /// The object id of the user assigned + /// identity. + public ManagedClusterPropertiesIdentityProfileValue(string resourceId = default(string), string clientId = default(string), string objectId = default(string)) + : base(resourceId, clientId, objectId) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKU.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKU.cs new file mode 100644 index 0000000000000..d65bbe1e5ee84 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKU.cs @@ -0,0 +1,60 @@ +// +// 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; + + public partial class ManagedClusterSKU + { + /// + /// Initializes a new instance of the ManagedClusterSKU class. + /// + public ManagedClusterSKU() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedClusterSKU class. + /// + /// Name of a managed cluster SKU. Possible values + /// include: 'Basic' + /// Tier of a managed cluster SKU. Possible values + /// include: 'Paid', 'Free' + public ManagedClusterSKU(string name = default(string), string tier = default(string)) + { + Name = name; + Tier = tier; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of a managed cluster SKU. Possible values + /// include: 'Basic' + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets tier of a managed cluster SKU. Possible values + /// include: 'Paid', 'Free' + /// + [JsonProperty(PropertyName = "tier")] + public string Tier { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKUName.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKUName.cs new file mode 100644 index 0000000000000..14f57ca0cf5af --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKUName.cs @@ -0,0 +1,21 @@ +// +// 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 ManagedClusterSKUName. + /// + public static class ManagedClusterSKUName + { + public const string Basic = "Basic"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKUTier.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKUTier.cs new file mode 100644 index 0000000000000..e16fb8555fee6 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ManagedClusterSKUTier.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 ManagedClusterSKUTier. + /// + public static class ManagedClusterSKUTier + { + public const string Paid = "Paid"; + public const string Free = "Free"; + } +} 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 0bface25a4188..5efd97ca952a5 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 @@ -72,6 +72,20 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "AdminUsername"); } + if (AdminUsername != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(AdminUsername, "^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "AdminUsername", "^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$"); + } + } + if (AdminPassword != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(AdminPassword, "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$")) + { + throw new ValidationException(ValidationRules.Pattern, "AdminPassword", "^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\\^&\\*\\(\\)])[a-zA-Z\\d!@#$%\\^&\\*\\(\\)]{12,123}$"); + } + } } } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkMode.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkMode.cs new file mode 100644 index 0000000000000..10b074c11ffce --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/NetworkMode.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 NetworkMode. + /// + public static class NetworkMode + { + public const string Transparent = "transparent"; + public const string Bridge = "bridge"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OutboundType.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OutboundType.cs new file mode 100644 index 0000000000000..642cefaa5d57a --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/OutboundType.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 OutboundType. + /// + public static class OutboundType + { + public const string LoadBalancer = "loadBalancer"; + public const string UserDefinedRouting = "userDefinedRouting"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpoint.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpoint.cs new file mode 100644 index 0000000000000..ebc2b08ac7c5c --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpoint.cs @@ -0,0 +1,51 @@ +// +// 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; + + /// + /// Private endpoint which a connection belongs to. + /// + public partial class PrivateEndpoint + { + /// + /// Initializes a new instance of the PrivateEndpoint class. + /// + public PrivateEndpoint() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpoint class. + /// + /// The resource Id for private endpoint + public PrivateEndpoint(string id = default(string)) + { + Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource Id for private endpoint + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpointConnection.cs new file mode 100644 index 0000000000000..cc597faa0ab85 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpointConnection.cs @@ -0,0 +1,116 @@ +// +// 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.Azure; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A private endpoint connection + /// + [Rest.Serialization.JsonTransformation] + public partial class PrivateEndpointConnection : IResource + { + /// + /// Initializes a new instance of the PrivateEndpointConnection class. + /// + public PrivateEndpointConnection() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateEndpointConnection class. + /// + /// A collection of + /// information about the state of the connection between service + /// consumer and provider. + /// The ID of the private endpoint connection. + /// The name of the private endpoint + /// connection. + /// The resource type. + /// The current provisioning state. + /// Possible values include: 'Succeeded', 'Creating', 'Deleting', + /// 'Failed' + /// The resource of private + /// endpoint. + public PrivateEndpointConnection(PrivateLinkServiceConnectionState privateLinkServiceConnectionState, string id = default(string), string name = default(string), string type = default(string), string provisioningState = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint)) + { + Id = id; + Name = name; + Type = type; + ProvisioningState = provisioningState; + PrivateEndpoint = privateEndpoint; + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the ID of the private endpoint connection. + /// + [JsonProperty(PropertyName = "id")] + public string Id { get; private set; } + + /// + /// Gets the name of the private endpoint connection. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the resource type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; private set; } + + /// + /// Gets the current provisioning state. Possible values include: + /// 'Succeeded', 'Creating', 'Deleting', 'Failed' + /// + [JsonProperty(PropertyName = "properties.provisioningState")] + public string ProvisioningState { get; private set; } + + /// + /// Gets or sets the resource of private endpoint. + /// + [JsonProperty(PropertyName = "properties.privateEndpoint")] + public PrivateEndpoint PrivateEndpoint { get; set; } + + /// + /// Gets or sets a collection of information about the state of the + /// connection between service consumer and provider. + /// + [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] + public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PrivateLinkServiceConnectionState == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PrivateLinkServiceConnectionState"); + } + } + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpointConnectionListResult.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpointConnectionListResult.cs new file mode 100644 index 0000000000000..b8c1b564e101b --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpointConnectionListResult.cs @@ -0,0 +1,55 @@ +// +// 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.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A list of private endpoint connections + /// + public partial class PrivateEndpointConnectionListResult + { + /// + /// Initializes a new instance of the + /// PrivateEndpointConnectionListResult class. + /// + public PrivateEndpointConnectionListResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// PrivateEndpointConnectionListResult class. + /// + /// The collection value. + public PrivateEndpointConnectionListResult(IList value = default(IList)) + { + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the collection value. + /// + [JsonProperty(PropertyName = "value")] + public IList Value { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpointConnectionProvisioningState.cs new file mode 100644 index 0000000000000..2fcdcd5b63286 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateEndpointConnectionProvisioningState.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 PrivateEndpointConnectionProvisioningState. + /// + public static class PrivateEndpointConnectionProvisioningState + { + public const string Succeeded = "Succeeded"; + public const string Creating = "Creating"; + public const string Deleting = "Deleting"; + public const string Failed = "Failed"; + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkServiceConnectionState.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkServiceConnectionState.cs new file mode 100644 index 0000000000000..79f291e1f0b74 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/PrivateLinkServiceConnectionState.cs @@ -0,0 +1,65 @@ +// +// 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; + + /// + /// The state of a private link service connection. + /// + public partial class PrivateLinkServiceConnectionState + { + /// + /// Initializes a new instance of the PrivateLinkServiceConnectionState + /// class. + /// + public PrivateLinkServiceConnectionState() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PrivateLinkServiceConnectionState + /// class. + /// + /// The private link service connection status. + /// Possible values include: 'Pending', 'Approved', 'Rejected', + /// 'Disconnected' + /// The private link service connection + /// description. + public PrivateLinkServiceConnectionState(string status = default(string), string description = default(string)) + { + Status = status; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the private link service connection status. Possible + /// values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the private link service connection description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceIdentityType.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceIdentityType.cs index d626dfec45611..6a35a334beff6 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceIdentityType.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ResourceIdentityType.cs @@ -23,6 +23,8 @@ public enum ResourceIdentityType { [EnumMember(Value = "SystemAssigned")] SystemAssigned, + [EnumMember(Value = "UserAssigned")] + UserAssigned, [EnumMember(Value = "None")] None } @@ -39,6 +41,8 @@ internal static string ToSerializedValue(this ResourceIdentityType value) { case ResourceIdentityType.SystemAssigned: return "SystemAssigned"; + case ResourceIdentityType.UserAssigned: + return "UserAssigned"; case ResourceIdentityType.None: return "None"; } @@ -51,6 +55,8 @@ internal static string ToSerializedValue(this ResourceIdentityType value) { case "SystemAssigned": return ResourceIdentityType.SystemAssigned; + case "UserAssigned": + return ResourceIdentityType.UserAssigned; case "None": return ResourceIdentityType.None; } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs index 5edcae14e830e..6fdb73455a4ef 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/ScaleSetPriority.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.ContainerService.Models /// public static class ScaleSetPriority { - public const string Low = "Low"; + public const string Spot = "Spot"; public const string Regular = "Regular"; } } diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/UserAssignedIdentity.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/UserAssignedIdentity.cs new file mode 100644 index 0000000000000..70a04cf5899bc --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Models/UserAssignedIdentity.cs @@ -0,0 +1,67 @@ +// +// 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; + + public partial class UserAssignedIdentity + { + /// + /// Initializes a new instance of the UserAssignedIdentity class. + /// + public UserAssignedIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserAssignedIdentity class. + /// + /// The resource id of the user assigned + /// identity. + /// The client id of the user assigned + /// identity. + /// The object id of the user assigned + /// identity. + public UserAssignedIdentity(string resourceId = default(string), string clientId = default(string), string objectId = default(string)) + { + ResourceId = resourceId; + ClientId = clientId; + ObjectId = objectId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the resource id of the user assigned identity. + /// + [JsonProperty(PropertyName = "resourceId")] + public string ResourceId { get; set; } + + /// + /// Gets or sets the client id of the user assigned identity. + /// + [JsonProperty(PropertyName = "clientId")] + public string ClientId { get; set; } + + /// + /// Gets or sets the object id of the user assigned identity. + /// + [JsonProperty(PropertyName = "objectId")] + public string ObjectId { get; set; } + + } +} 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 94e0149a5c068..f9d978f6ec81f 100644 --- a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/Operations.cs @@ -70,7 +70,7 @@ internal Operations(ContainerServiceClient client) /// public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - string apiVersion = "2019-10-01"; + string apiVersion = "2020-06-01"; // 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 new file mode 100644 index 0000000000000..be2ac26dc66e8 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperations.cs @@ -0,0 +1,986 @@ +// +// 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; + + /// + /// PrivateEndpointConnectionsOperations operations. + /// + internal partial class PrivateEndpointConnectionsOperations : IServiceOperations, IPrivateEndpointConnectionsOperations + { + /// + /// Initializes a new instance of the PrivateEndpointConnectionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal PrivateEndpointConnectionsOperations(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 private endpoint connections in the specified managed + /// cluster. + /// + /// + /// Gets a list of private endpoint connections in the specified managed + /// cluster. The operation returns properties of each private endpoint + /// connection. + /// + /// + /// The name of the resource group. + /// + /// + /// 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> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + 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]$"); + } + } + string apiVersion = "2020-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + 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}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections").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 (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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 the private endpoint connection. + /// + /// + /// Gets the details of the private endpoint connection by managed cluster and + /// resource group. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// 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, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + 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 (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + string apiVersion = "2020-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + 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/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}").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)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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; + } + + /// + /// Updates a private endpoint connection. + /// + /// + /// Updates a private endpoint connection in the specified managed cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// Parameters supplied to the Update a private endpoint connection 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> UpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + 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 (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + if (parameters == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } + string apiVersion = "2020-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("parameters", parameters); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Update", 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/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}").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)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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) + { + 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 private endpoint connection. + /// + /// + /// Deletes the private endpoint connection in the specified managed cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a private endpoint connection. + /// + /// + /// Deletes the private endpoint connection in the specified managed cluster. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// 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 BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + 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 (privateEndpointConnectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); + } + string apiVersion = "2020-06-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("resourceName", resourceName); + tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", 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/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}").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)); + _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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; + } + + } +} diff --git a/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs new file mode 100644 index 0000000000000..45b67474e47e8 --- /dev/null +++ b/sdk/containerservice/Microsoft.Azure.Management.ContainerService/src/Generated/PrivateEndpointConnectionsOperationsExtensions.cs @@ -0,0 +1,287 @@ +// +// 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.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for PrivateEndpointConnectionsOperations. + /// + public static partial class PrivateEndpointConnectionsOperationsExtensions + { + /// + /// Gets a list of private endpoint connections in the specified managed + /// cluster. + /// + /// + /// Gets a list of private endpoint connections in the specified managed + /// cluster. The operation returns properties of each private endpoint + /// connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + public static PrivateEndpointConnectionListResult List(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName) + { + return operations.ListAsync(resourceGroupName, resourceName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of private endpoint connections in the specified managed + /// cluster. + /// + /// + /// Gets a list of private endpoint connections in the specified managed + /// cluster. The operation returns properties of each private endpoint + /// connection. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The cancellation token. + /// + public static async Task ListAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets the private endpoint connection. + /// + /// + /// Gets the details of the private endpoint connection by managed cluster and + /// resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + public static PrivateEndpointConnection Get(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName) + { + return operations.GetAsync(resourceGroupName, resourceName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Gets the private endpoint connection. + /// + /// + /// Gets the details of the private endpoint connection by managed cluster and + /// resource group. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Updates a private endpoint connection. + /// + /// + /// Updates a private endpoint connection in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// Parameters supplied to the Update a private endpoint connection operation. + /// + public static PrivateEndpointConnection Update(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters) + { + return operations.UpdateAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters).GetAwaiter().GetResult(); + } + + /// + /// Updates a private endpoint connection. + /// + /// + /// Updates a private endpoint connection in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// Parameters supplied to the Update a private endpoint connection operation. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, PrivateEndpointConnection parameters, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a private endpoint connection. + /// + /// + /// Deletes the private endpoint connection in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + public static void Delete(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName) + { + operations.DeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a private endpoint connection. + /// + /// + /// Deletes the private endpoint connection in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Deletes a private endpoint connection. + /// + /// + /// Deletes the private endpoint connection in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + public static void BeginDelete(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName) + { + operations.BeginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a private endpoint connection. + /// + /// + /// Deletes the private endpoint connection in the specified managed cluster. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the managed cluster resource. + /// + /// + /// The name of the private endpoint connection. + /// + /// + /// The cancellation token. + /// + public static async Task BeginDeleteAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string resourceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} 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 97fb448c10159..8345ff9341999 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,25 +19,15 @@ public static IEnumerable> ApiInfo_ContainerServic { return new Tuple[] { - new Tuple("ContainerService", "AgentPools", "2019-10-01"), + new Tuple("ContainerService", "AgentPools", "2020-06-01"), new Tuple("ContainerService", "ContainerServices", "2017-07-01"), new Tuple("ContainerService", "ContainerServices", "2019-08-01"), - new Tuple("ContainerService", "ManagedClusters", "2019-10-01"), + new Tuple("ContainerService", "ManagedClusters", "2020-06-01"), new Tuple("ContainerService", "OpenShiftManagedClusters", "2019-04-30"), - new Tuple("ContainerService", "Operations", "2019-10-01"), + new Tuple("ContainerService", "Operations", "2020-06-01"), + new Tuple("ContainerService", "PrivateEndpointConnections", "2020-06-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@3.0.6187"; - 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=latest --reflect-api-versions --tag=package-2019-10 --csharp-sdks-folder=C:\\AME\\erich-net-sdk\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "6282f28ce35e515f544c4ad38e5f7b8eef69e817"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -