Skip to content

Commit

Permalink
[HDInsight] Update api version to 2024-08-01-preview (Azure#25885)
Browse files Browse the repository at this point in the history
* Init generated code.

* init readme file

* New commands and feature.

* Update help docs.

* Update test

* Update docs

* Update help doc.

* Update test

* Added some test records.

* Update help doc.

* New cmdlet `Update-AzHDInsightCluster`

* Update test cases.

* Update test and a doc

* Fix lint error

* Fix

* Fix

* Update changelog.

* Update

* Update help doc.

---------

Co-authored-by: v-yuchenli <[email protected]>
  • Loading branch information
yuc-Li and v-yuchenli authored Aug 23, 2024
1 parent 5af1f12 commit 6b26735
Show file tree
Hide file tree
Showing 106 changed files with 25,700 additions and 9,000 deletions.
4 changes: 4 additions & 0 deletions src/Accounts/Accounts/Utilities/CommandMappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2983,9 +2983,12 @@
"Add-AzHDInsightSecurityProfile": {},
"Add-AzHDInsightStorage": {},
"Disable-AzHDInsightAzureMonitor": {},
"Disable-AzHDInsightAzureMonitorAgent": {},
"Disable-AzHDInsightMonitoring": {},
"Enable-AzHDInsightAzureMonitor": {},
"Enable-AzHDInsightAzureMonitorAgent": {},
"Enable-AzHDInsightMonitoring": {},
"Enable-AzHDInsightMonitoringAgent": {},
"Get-AzHDInsightAzureMonitor": {},
"Get-AzHDInsightCluster": {},
"Get-AzHDInsightClusterAutoscaleConfiguration": {},
Expand All @@ -2998,6 +3001,7 @@
"Get-AzHDInsightScriptActionHistory": {},
"Invoke-AzHDInsightHiveJob": {},
"New-AzHDInsightCluster": {},
"Update-AzHDInsightCluster": {},
"New-AzHDInsightClusterAutoscaleConfiguration": {},
"New-AzHDInsightClusterAutoscaleScheduleCondition": {},
"New-AzHDInsightClusterConfig": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ internal ClustersOperations (HDInsightManagementClient client)
/// <param name='tags'>
/// The resource tags.
/// </param>
/// <param name='identity'>
/// The identity of the cluster, if configured.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
Expand All @@ -96,7 +99,7 @@ internal ClustersOperations (HDInsightManagementClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Cluster>> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, System.Collections.Generic.IDictionary<string, string> tags = default(System.Collections.Generic.IDictionary<string, string>), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public async System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<Cluster>> UpdateWithHttpMessagesAsync(string resourceGroupName, string clusterName, System.Collections.Generic.IDictionary<string, string> tags = default(System.Collections.Generic.IDictionary<string, string>), ClusterIdentity identity = default(ClusterIdentity), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{


Expand All @@ -123,9 +126,10 @@ internal ClustersOperations (HDInsightManagementClient client)
}

ClusterPatchParameters parameters = new ClusterPatchParameters();
if(tags != null)
if(tags != null||identity != null)
{
parameters.Tags = tags;
parameters.Identity = identity;
}
// Tracing
bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled;
Expand Down Expand Up @@ -1524,7 +1528,10 @@ internal ClustersOperations (HDInsightManagementClient client)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters");
}

if (parameters != null)
{
parameters.Validate();
}
if (this.Client.SubscriptionId == null)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public static Cluster Create(this IClustersOperations operations, string resourc
/// <param name='clusterName'>
/// The name of the cluster.
/// </param>
public static Cluster Update(this IClustersOperations operations, string resourceGroupName, string clusterName, System.Collections.Generic.IDictionary<string, string> tags = default(System.Collections.Generic.IDictionary<string, string>))
public static Cluster Update(this IClustersOperations operations, string resourceGroupName, string clusterName, System.Collections.Generic.IDictionary<string, string> tags = default(System.Collections.Generic.IDictionary<string, string>), ClusterIdentity identity = default(ClusterIdentity))
{
return ((IClustersOperations)operations).UpdateAsync(resourceGroupName, clusterName, tags).GetAwaiter().GetResult();
return ((IClustersOperations)operations).UpdateAsync(resourceGroupName, clusterName, tags, identity).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -83,9 +83,9 @@ public static Cluster Create(this IClustersOperations operations, string resourc
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<Cluster> UpdateAsync(this IClustersOperations operations, string resourceGroupName, string clusterName, System.Collections.Generic.IDictionary<string, string> tags = default(System.Collections.Generic.IDictionary<string, string>), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task<Cluster> UpdateAsync(this IClustersOperations operations, string resourceGroupName, string clusterName, System.Collections.Generic.IDictionary<string, string> tags = default(System.Collections.Generic.IDictionary<string, string>), ClusterIdentity identity = default(ClusterIdentity), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, clusterName, tags, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, clusterName, tags, identity, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ internal ConfigurationsOperations (HDInsightManagementClient client)

}
/// <summary>
/// Configures the HTTP settings on the specified cluster. This API is deprecated, please use UpdateGatewaySettings in cluster endpoint instead.
/// Configures the HTTP settings on the specified cluster. This API is
/// deprecated, please use UpdateGatewaySettings in cluster endpoint instead.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
Expand Down
Loading

0 comments on commit 6b26735

Please sign in to comment.