Skip to content

[HDInsight] Update api version to 2025-01-15-preview #27837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 45 commits into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
cbbf936
add cmd: Set-AzHDInsightGatewaySettings ; Get-AzHDInsightClusterGatew…
v-yukunli May 16, 2025
eb3b5ce
update HDInsight.csproj
v-yukunli May 16, 2025
62abc3a
update HDInsight.csproj
v-yukunli May 16, 2025
5dbb7c3
update test
v-yukunli May 19, 2025
59fb028
update test
v-yukunli May 20, 2025
9c3da94
update test
v-yukunli May 20, 2025
50748d3
update test
v-yukunli May 20, 2025
305ee7e
update sessionRecords
v-yukunli May 22, 2025
ae54404
Merge branch 'Azure:main' into hdi-ps-sdk-2025-01-15
2258093686 May 26, 2025
24646c9
change command
v-yukunli May 28, 2025
dab854c
change NewAzureCmd ,SetGatewayCmd
v-yukunli Jun 4, 2025
7ea2ce3
run test
v-yukunli Jun 4, 2025
72fab04
update entra user parameter
v-yukunli Jun 5, 2025
3032d57
playback test
v-yukunli Jun 6, 2025
257a2bd
update test
v-yukunli Jun 6, 2025
abda54b
update help
v-yukunli Jun 6, 2025
8fe4226
update test , help
v-yukunli Jun 6, 2025
ef9bffa
update test
v-yukunli Jun 6, 2025
895c55d
update help and Set-AzHDInsightGatewayCredential Output
v-yukunli Jun 9, 2025
4a63537
New-AzHDInsightCluster add wasb+msi
v-yukunli Jun 9, 2025
5c0721e
update test
v-yukunli Jun 9, 2025
ba05848
update common.ps1
v-yukunli Jun 11, 2025
f038737
update changeLog,help,sessionRecords
v-yukunli Jun 11, 2025
7877ac5
update changeLog
v-yukunli Jun 12, 2025
f04e891
update changeLog
v-yukunli Jun 12, 2025
a009047
change AzureHDInsightGatewaySettings
v-yukunli Jun 13, 2025
83c0b48
add package System.IdentityModel.Tokens.Jwt
v-yukunli Jun 13, 2025
bbedd6c
update HDInsight.csproj
v-yukunli Jun 13, 2025
b851ee8
add System.IdentityModel.Tokens.Jwt to code
v-yukunli Jun 13, 2025
52c37e3
update csproj
v-yukunli Jun 16, 2025
8f2cb53
remove Microsoft.Graph
v-yukunli Jun 17, 2025
ec9a846
remove space
v-yukunli Jun 17, 2025
aaa7b73
update ClusterConfigurationUtils
v-yukunli Jun 17, 2025
612a82b
update GetHDInsightGatewayEntraUser
v-yukunli Jun 17, 2025
e12ca99
update GetHDInsightGatewayEntraUser
v-yukunli Jun 17, 2025
013b2fa
update TestCreateEntraCluster.json
v-yukunli Jun 18, 2025
e72babd
Modify sensitive information
v-yukunli Jun 18, 2025
64882ec
Modify sensitive information
v-yukunli Jun 18, 2025
d916082
update EntraUserIdentity parameter type
v-yukunli Jun 20, 2025
2eb3c68
update help
v-yukunli Jun 20, 2025
5112bf3
update help,ClusterConfigurationUtils.cs
v-yukunli Jun 20, 2025
297c401
update help
v-yukunli Jun 23, 2025
cbc8861
update help
v-yukunli Jun 23, 2025
0472956
update ClusterConfigurationUtils
v-yukunli Jun 23, 2025
0b0d74d
update help
v-yukunli Jun 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ public HDInsightManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClien
/// <param name='rootHandler'>
/// Optional. The http client handler used to handle http transport.
/// </param>
/// <param name='handlers'>
/// Optional. The delegating handlers to add to the http client pipeline.
/// </param>
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
Expand Down Expand Up @@ -353,7 +356,7 @@ private void Initialize()
this.ScriptExecutionHistory = new ScriptExecutionHistoryOperations(this);
this.VirtualMachines = new VirtualMachinesOperations(this);
this.BaseUri = new System.Uri("https://management.azure.com");
this.ApiVersion = "2024-08-01-preview";
this.ApiVersion = "2025-01-15-preview";
this.AcceptLanguage = "en-US";
this.LongRunningOperationRetryTimeout = 30;
this.GenerateClientRequestId = true;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// 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.HDInsight.Models
{
using System.Linq;

/// <summary>
/// Details of an Entra user for gateway access.
/// </summary>
public partial class EntraUserInfo
{
/// <summary>
/// Initializes a new instance of the EntraUserInfo class.
/// </summary>
public EntraUserInfo()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the EntraUserInfo class.
/// </summary>

/// <param name="objectId">The unique object ID of the Entra user or client ID of the enterprise
/// applications.
/// </param>

/// <param name="displayName">The display name of the Entra user.
/// </param>

/// <param name="upn">The User Principal Name (UPN) of the Entra user. It may be empty in certain
/// cases, such as for enterprise applications.
/// </param>
public EntraUserInfo(string objectId = default(string), string displayName = default(string), string upn = default(string))

{
this.ObjectId = objectId;
this.DisplayName = displayName;
this.Upn = upn;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();


/// <summary>
/// Gets or sets the unique object ID of the Entra user or client ID of the
/// enterprise applications.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "objectId")]
public string ObjectId {get; set; }

/// <summary>
/// Gets or sets the display name of the Entra user.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "displayName")]
public string DisplayName {get; set; }

/// <summary>
/// Gets or sets the User Principal Name (UPN) of the Entra user. It may be
/// empty in certain cases, such as for enterprise applications.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "upn")]
public string Upn {get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ public GatewaySettings()

/// <param name="password">The gateway settings user password.
/// </param>
public GatewaySettings(string isCredentialEnabled = default(string), string userName = default(string), string password = default(string))

/// <param name="restAuthEntraUsers">List of Entra users for gateway access.
/// </param>
public GatewaySettings(string isCredentialEnabled = default(string), string userName = default(string), string password = default(string), System.Collections.Generic.IList<EntraUserInfo> restAuthEntraUsers = default(System.Collections.Generic.IList<EntraUserInfo>))

{
this.IsCredentialEnabled = isCredentialEnabled;
this.UserName = userName;
this.Password = password;
this.RestAuthEntraUsers = restAuthEntraUsers;
CustomInit();
}

Expand Down Expand Up @@ -66,5 +70,11 @@ public GatewaySettings()
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "restAuthCredential.password")]
public string Password {get; private set; }

/// <summary>
/// Gets or sets list of Entra users for gateway access.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "restAuthEntraUsers")]
public System.Collections.Generic.IList<EntraUserInfo> RestAuthEntraUsers {get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ namespace Microsoft.Azure.Management.HDInsight.Models
using System.Linq;

/// <summary>
/// The update gateway settings request parameters.
/// The update gateway settings request parameters. Note either basic or entra
/// user should be provided at a time.
/// </summary>
public partial class UpdateGatewaySettingsParameters
{
Expand All @@ -33,12 +34,16 @@ public UpdateGatewaySettingsParameters()

/// <param name="password">The gateway settings user password.
/// </param>
public UpdateGatewaySettingsParameters(bool? isCredentialEnabled = default(bool?), string userName = default(string), string password = default(string))

/// <param name="restAuthEntraUsers">List of Entra users for gateway access.
/// </param>
public UpdateGatewaySettingsParameters(bool? isCredentialEnabled = default(bool?), string userName = default(string), string password = default(string), System.Collections.Generic.IList<EntraUserInfo> restAuthEntraUsers = default(System.Collections.Generic.IList<EntraUserInfo>))

{
this.IsCredentialEnabled = isCredentialEnabled;
this.UserName = userName;
this.Password = password;
this.RestAuthEntraUsers = restAuthEntraUsers;
CustomInit();
}

Expand Down Expand Up @@ -66,5 +71,11 @@ public UpdateGatewaySettingsParameters()
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "restAuthCredential.password")]
public string Password {get; set; }

/// <summary>
/// Gets or sets list of Entra users for gateway access.
/// </summary>
[Newtonsoft.Json.JsonProperty(PropertyName = "restAuthEntraUsers")]
public System.Collections.Generic.IList<EntraUserInfo> RestAuthEntraUsers {get; set; }
}
}
22 changes: 11 additions & 11 deletions src/HDInsight/HDInsight.Management.Sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ skip-csproj: true

###
``` yaml
commit: 339220060c53b1f6c04cdfa10dc577a9a961572f
commit: 881a35f96dbb1f7cf7c83dd00ed29a628804464d
input-file:
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/applications.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/cluster.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/configurations.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/extensions.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/locations.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/operations.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/privateEndpointConnections.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/privateLinkResources.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/scriptActions.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/virtualMachines.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/applications.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/cluster.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/configurations.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/extensions.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/locations.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/operations.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/privateEndpointConnections.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/privateLinkResources.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/scriptActions.json
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/virtualMachines.json

output-folder: Generated

Expand Down
17 changes: 10 additions & 7 deletions src/HDInsight/HDInsight.Test/ScenarioTests/Common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ class ClusterCommonCreateParameter{
[string] $minSupportedTlsVersion
[string] $virtualNetworkId
[string] $subnet
[string] $version

ClusterCommonCreateParameter([string] $clusterName, [string] $location, [string] $resourceGroupName,
[string] $storageAccountResourceId, [string] $clusterType, [int] $clusterSizeInNodes,
[string] $storageAccountKey, [System.Management.Automation.PSCredential] $httpCredential,
[System.Management.Automation.PSCredential] $sshCredential, [string] $minSupportedTlsVersion,
[string] $virtualNetworkId,[string] $subnet){
[string] $virtualNetworkId,[string] $subnet,[string] $version){
$this.clusterName=$clusterName
$this.location=$location
$this.resourceGroupName=$resourceGroupName
Expand All @@ -100,6 +101,7 @@ class ClusterCommonCreateParameter{
$this.minSupportedTlsVersion=$minSupportedTlsVersion
$this.virtualNetworkId=$virtualNetworkId
$this.subnet=$subnet
$this.version=$version
}
}

Expand All @@ -110,12 +112,13 @@ class ClusterCommonCreateParameter{
function Prepare-ClusterCreateParameter{
param(
[string] $clusterName="ps",
[string] $location="eastus",
[string] $location="East Asia",
[string] $resourceGroupName="group-ps-test",
[string] $storageAccountName="storagepstest",
[string] $clusterType="Spark",
[string] $virtualNetworkId="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yuchen-ps-test/providers/Microsoft.Network/virtualNetworks/hdi-vn-0",
[string] $subnet="default"
[string] $clusterType="Hadoop",
[string] $virtualNetworkId="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group-ps-test/providers/Microsoft.Network/virtualNetworks/hdi-vn-0",
[string] $subnet="default",
[string] $version="5.1"
)

$clusterName=Generate-Name($clusterName)
Expand All @@ -132,7 +135,7 @@ function Prepare-ClusterCreateParameter{
$storageAccountKey=$storageAccountKey[0].Value

$httpUser="admin"
$textPassword= "YourPw!00953"
$textPassword= "Password"
$httpPassword=ConvertTo-SecureString $textPassword -AsPlainText -Force
$sshUser="sshuser"
$sshPassword=$httpPassword
Expand All @@ -143,7 +146,7 @@ function Prepare-ClusterCreateParameter{
$minSupportedTlsVersion="1.2"
return [ClusterCommonCreateParameter]::new($clusterName, $location, $resourceGroupName, $storageAccountResourceId,
$clusterType, $clusterSizeInNodes, $storageAccountKey, $httpCredential,
$sshCredential, $minSupportedTlsVersion, $virtualNetworkId, $subnet)
$sshCredential, $minSupportedTlsVersion, $virtualNetworkId, $subnet,$version)
}

<#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function Test-AutoscaleRelatedCommands{
$cluster = New-AzHDInsightCluster -Location $params.location -ResourceGroupName $params.resourceGroupName `
-ClusterName $params.clusterName -ClusterSizeInNodes $params.clusterSizeInNodes -ClusterType $params.clusterType `
-StorageAccountResourceId $params.storageAccountResourceId -StorageAccountKey $params.storageAccountKey `
-HttpCredential $params.httpCredential -SshCredential $params.sshCredential `
-HttpCredential $params.httpCredential -SshCredential $params.sshCredential -Version $params.version `
-MinSupportedTlsVersion $params.minSupportedTlsVersion -VirtualNetworkId $params.virtualNetworkId -SubnetName "default"

Assert-NotNull $cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function Test-AzureMonitorRelatedCommands{
$cluster = New-AzHDInsightCluster -Location $params.location -ResourceGroupName $params.resourceGroupName `
-ClusterName $params.clusterName -ClusterSizeInNodes $params.clusterSizeInNodes -ClusterType $params.clusterType `
-StorageAccountResourceId $params.storageAccountResourceId -StorageAccountKey $params.storageAccountKey `
-HttpCredential $params.httpCredential -SshCredential $params.sshCredential -Version 5.1 `
-HttpCredential $params.httpCredential -SshCredential $params.sshCredential -Version $params.version `
-MinSupportedTlsVersion $params.minSupportedTlsVersion -VirtualNetworkId $params.virtualNetworkId -SubnetName "default"
Assert-NotNull $cluster

Expand Down Expand Up @@ -78,12 +78,12 @@ function Test-AzureMonitorAgentRelatedCommands{
# Create some resources that will be used throughout test
try
{
$location = "East US"
# $location = "East Asia"
# prepare parameter for creating parameter
# $params= Prepare-ClusterCreateParameter -location $location

# create cluster that will be used throughout test
$cluster = Get-AzHDInsightCluster -ResourceGroupName yuchen-ps-test -ClusterName spark51
$cluster = Get-AzHDInsightCluster -ResourceGroupName "group-ps-test" -ClusterName "ps-test-cluster"
Assert-NotNull $cluster

$workspaceName = "ps-la"
Expand All @@ -102,7 +102,7 @@ function Test-AzureMonitorAgentRelatedCommands{

Assert-NotNull $workspaceId
Assert-NotNull $primaryKey
Enable-AzHDInsightAzureMonitorAgent -ClusterName $cluster.Name -ResourceGroup $cluster.ResourceGroup -WorkspaceId $workspaceId -Primary $primaryKey
Enable-AzHDInsightAzureMonitorAgent -ClusterName $cluster.Name -ResourceGroup $cluster.ResourceGroup -WorkspaceId $workspaceId -PrimaryKey $primaryKey

$result = Get-AzHDInsightAzureMonitorAgent -ClusterName $cluster.Name -ResourceGroupName $cluster.ResourceGroup
Assert-True {$result.ClusterMonitoringEnabled}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@ public HDInsightClusterTests(ITestOutputHelper output) : base(output)
{
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestCreateClusterWithWasbAndMSI()
{
TestRunner.RunTestScript("Test-CreateClusterWithWasbAndMSI");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestCreateEntraCluster()
{
TestRunner.RunTestScript("Test-CreateEntraCluster");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestClusterRelatedCommands()
Expand Down
Loading