Skip to content

Commit 9de8e47

Browse files
[HDInsight] Update api version to 2025-01-15-preview (#27837)
Co-authored-by: Yukun Li (Beyondsoft) <[email protected]>
1 parent f88669c commit 9de8e47

File tree

50 files changed

+49053
-12885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+49053
-12885
lines changed

src/HDInsight/HDInsight.Management.Sdk/Generated/HDInsightManagementClient.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ public HDInsightManagementClient(System.Uri baseUri, Microsoft.Rest.ServiceClien
310310
/// <param name='rootHandler'>
311311
/// Optional. The http client handler used to handle http transport.
312312
/// </param>
313+
/// <param name='handlers'>
314+
/// Optional. The delegating handlers to add to the http client pipeline.
315+
/// </param>
313316
/// <exception cref="System.ArgumentNullException">
314317
/// Thrown when a required parameter is null
315318
/// </exception>
@@ -353,7 +356,7 @@ private void Initialize()
353356
this.ScriptExecutionHistory = new ScriptExecutionHistoryOperations(this);
354357
this.VirtualMachines = new VirtualMachinesOperations(this);
355358
this.BaseUri = new System.Uri("https://management.azure.com");
356-
this.ApiVersion = "2024-08-01-preview";
359+
this.ApiVersion = "2025-01-15-preview";
357360
this.AcceptLanguage = "en-US";
358361
this.LongRunningOperationRetryTimeout = 30;
359362
this.GenerateClientRequestId = true;
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.HDInsight.Models
7+
{
8+
using System.Linq;
9+
10+
/// <summary>
11+
/// Details of an Entra user for gateway access.
12+
/// </summary>
13+
public partial class EntraUserInfo
14+
{
15+
/// <summary>
16+
/// Initializes a new instance of the EntraUserInfo class.
17+
/// </summary>
18+
public EntraUserInfo()
19+
{
20+
CustomInit();
21+
}
22+
23+
/// <summary>
24+
/// Initializes a new instance of the EntraUserInfo class.
25+
/// </summary>
26+
27+
/// <param name="objectId">The unique object ID of the Entra user or client ID of the enterprise
28+
/// applications.
29+
/// </param>
30+
31+
/// <param name="displayName">The display name of the Entra user.
32+
/// </param>
33+
34+
/// <param name="upn">The User Principal Name (UPN) of the Entra user. It may be empty in certain
35+
/// cases, such as for enterprise applications.
36+
/// </param>
37+
public EntraUserInfo(string objectId = default(string), string displayName = default(string), string upn = default(string))
38+
39+
{
40+
this.ObjectId = objectId;
41+
this.DisplayName = displayName;
42+
this.Upn = upn;
43+
CustomInit();
44+
}
45+
46+
/// <summary>
47+
/// An initialization method that performs custom operations like setting defaults
48+
/// </summary>
49+
partial void CustomInit();
50+
51+
52+
/// <summary>
53+
/// Gets or sets the unique object ID of the Entra user or client ID of the
54+
/// enterprise applications.
55+
/// </summary>
56+
[Newtonsoft.Json.JsonProperty(PropertyName = "objectId")]
57+
public string ObjectId {get; set; }
58+
59+
/// <summary>
60+
/// Gets or sets the display name of the Entra user.
61+
/// </summary>
62+
[Newtonsoft.Json.JsonProperty(PropertyName = "displayName")]
63+
public string DisplayName {get; set; }
64+
65+
/// <summary>
66+
/// Gets or sets the User Principal Name (UPN) of the Entra user. It may be
67+
/// empty in certain cases, such as for enterprise applications.
68+
/// </summary>
69+
[Newtonsoft.Json.JsonProperty(PropertyName = "upn")]
70+
public string Upn {get; set; }
71+
}
72+
}

src/HDInsight/HDInsight.Management.Sdk/Generated/Models/GatewaySettings.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,16 @@ public GatewaySettings()
3333

3434
/// <param name="password">The gateway settings user password.
3535
/// </param>
36-
public GatewaySettings(string isCredentialEnabled = default(string), string userName = default(string), string password = default(string))
36+
37+
/// <param name="restAuthEntraUsers">List of Entra users for gateway access.
38+
/// </param>
39+
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>))
3740

3841
{
3942
this.IsCredentialEnabled = isCredentialEnabled;
4043
this.UserName = userName;
4144
this.Password = password;
45+
this.RestAuthEntraUsers = restAuthEntraUsers;
4246
CustomInit();
4347
}
4448

@@ -66,5 +70,11 @@ public GatewaySettings()
6670
/// </summary>
6771
[Newtonsoft.Json.JsonProperty(PropertyName = "restAuthCredential.password")]
6872
public string Password {get; private set; }
73+
74+
/// <summary>
75+
/// Gets or sets list of Entra users for gateway access.
76+
/// </summary>
77+
[Newtonsoft.Json.JsonProperty(PropertyName = "restAuthEntraUsers")]
78+
public System.Collections.Generic.IList<EntraUserInfo> RestAuthEntraUsers {get; set; }
6979
}
7080
}

src/HDInsight/HDInsight.Management.Sdk/Generated/Models/UpdateGatewaySettingsParameters.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ namespace Microsoft.Azure.Management.HDInsight.Models
88
using System.Linq;
99

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

3435
/// <param name="password">The gateway settings user password.
3536
/// </param>
36-
public UpdateGatewaySettingsParameters(bool? isCredentialEnabled = default(bool?), string userName = default(string), string password = default(string))
37+
38+
/// <param name="restAuthEntraUsers">List of Entra users for gateway access.
39+
/// </param>
40+
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>))
3741

3842
{
3943
this.IsCredentialEnabled = isCredentialEnabled;
4044
this.UserName = userName;
4145
this.Password = password;
46+
this.RestAuthEntraUsers = restAuthEntraUsers;
4247
CustomInit();
4348
}
4449

@@ -66,5 +71,11 @@ public UpdateGatewaySettingsParameters()
6671
/// </summary>
6772
[Newtonsoft.Json.JsonProperty(PropertyName = "restAuthCredential.password")]
6873
public string Password {get; set; }
74+
75+
/// <summary>
76+
/// Gets or sets list of Entra users for gateway access.
77+
/// </summary>
78+
[Newtonsoft.Json.JsonProperty(PropertyName = "restAuthEntraUsers")]
79+
public System.Collections.Generic.IList<EntraUserInfo> RestAuthEntraUsers {get; set; }
6980
}
7081
}

src/HDInsight/HDInsight.Management.Sdk/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ skip-csproj: true
2929
3030
###
3131
``` yaml
32-
commit: 339220060c53b1f6c04cdfa10dc577a9a961572f
32+
commit: 881a35f96dbb1f7cf7c83dd00ed29a628804464d
3333
input-file:
34-
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/applications.json
35-
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/cluster.json
36-
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/configurations.json
37-
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/extensions.json
38-
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/locations.json
39-
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/operations.json
40-
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/privateEndpointConnections.json
41-
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/privateLinkResources.json
42-
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/scriptActions.json
43-
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2024-08-01-preview/virtualMachines.json
34+
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/applications.json
35+
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/cluster.json
36+
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/configurations.json
37+
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/extensions.json
38+
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/locations.json
39+
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/operations.json
40+
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/privateEndpointConnections.json
41+
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/privateLinkResources.json
42+
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/scriptActions.json
43+
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2025-01-15-preview/virtualMachines.json
4444

4545
output-folder: Generated
4646

src/HDInsight/HDInsight.Test/ScenarioTests/Common.ps1

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,13 @@ class ClusterCommonCreateParameter{
8282
[string] $minSupportedTlsVersion
8383
[string] $virtualNetworkId
8484
[string] $subnet
85+
[string] $version
8586

8687
ClusterCommonCreateParameter([string] $clusterName, [string] $location, [string] $resourceGroupName,
8788
[string] $storageAccountResourceId, [string] $clusterType, [int] $clusterSizeInNodes,
8889
[string] $storageAccountKey, [System.Management.Automation.PSCredential] $httpCredential,
8990
[System.Management.Automation.PSCredential] $sshCredential, [string] $minSupportedTlsVersion,
90-
[string] $virtualNetworkId,[string] $subnet){
91+
[string] $virtualNetworkId,[string] $subnet,[string] $version){
9192
$this.clusterName=$clusterName
9293
$this.location=$location
9394
$this.resourceGroupName=$resourceGroupName
@@ -100,6 +101,7 @@ class ClusterCommonCreateParameter{
100101
$this.minSupportedTlsVersion=$minSupportedTlsVersion
101102
$this.virtualNetworkId=$virtualNetworkId
102103
$this.subnet=$subnet
104+
$this.version=$version
103105
}
104106
}
105107

@@ -110,12 +112,13 @@ class ClusterCommonCreateParameter{
110112
function Prepare-ClusterCreateParameter{
111113
param(
112114
[string] $clusterName="ps",
113-
[string] $location="eastus",
115+
[string] $location="East Asia",
114116
[string] $resourceGroupName="group-ps-test",
115117
[string] $storageAccountName="storagepstest",
116-
[string] $clusterType="Spark",
117-
[string] $virtualNetworkId="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yuchen-ps-test/providers/Microsoft.Network/virtualNetworks/hdi-vn-0",
118-
[string] $subnet="default"
118+
[string] $clusterType="Hadoop",
119+
[string] $virtualNetworkId="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group-ps-test/providers/Microsoft.Network/virtualNetworks/hdi-vn-0",
120+
[string] $subnet="default",
121+
[string] $version="5.1"
119122
)
120123

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

134137
$httpUser="admin"
135-
$textPassword= "YourPw!00953"
138+
$textPassword= "Password"
136139
$httpPassword=ConvertTo-SecureString $textPassword -AsPlainText -Force
137140
$sshUser="sshuser"
138141
$sshPassword=$httpPassword
@@ -143,7 +146,7 @@ function Prepare-ClusterCreateParameter{
143146
$minSupportedTlsVersion="1.2"
144147
return [ClusterCommonCreateParameter]::new($clusterName, $location, $resourceGroupName, $storageAccountResourceId,
145148
$clusterType, $clusterSizeInNodes, $storageAccountKey, $httpCredential,
146-
$sshCredential, $minSupportedTlsVersion, $virtualNetworkId, $subnet)
149+
$sshCredential, $minSupportedTlsVersion, $virtualNetworkId, $subnet,$version)
147150
}
148151

149152
<#

src/HDInsight/HDInsight.Test/ScenarioTests/HDInsightAutoscaleTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function Test-AutoscaleRelatedCommands{
2828
$cluster = New-AzHDInsightCluster -Location $params.location -ResourceGroupName $params.resourceGroupName `
2929
-ClusterName $params.clusterName -ClusterSizeInNodes $params.clusterSizeInNodes -ClusterType $params.clusterType `
3030
-StorageAccountResourceId $params.storageAccountResourceId -StorageAccountKey $params.storageAccountKey `
31-
-HttpCredential $params.httpCredential -SshCredential $params.sshCredential `
31+
-HttpCredential $params.httpCredential -SshCredential $params.sshCredential -Version $params.version `
3232
-MinSupportedTlsVersion $params.minSupportedTlsVersion -VirtualNetworkId $params.virtualNetworkId -SubnetName "default"
3333

3434
Assert-NotNull $cluster

src/HDInsight/HDInsight.Test/ScenarioTests/HDInsightAzureMonitorTests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function Test-AzureMonitorRelatedCommands{
2929
$cluster = New-AzHDInsightCluster -Location $params.location -ResourceGroupName $params.resourceGroupName `
3030
-ClusterName $params.clusterName -ClusterSizeInNodes $params.clusterSizeInNodes -ClusterType $params.clusterType `
3131
-StorageAccountResourceId $params.storageAccountResourceId -StorageAccountKey $params.storageAccountKey `
32-
-HttpCredential $params.httpCredential -SshCredential $params.sshCredential -Version 5.1 `
32+
-HttpCredential $params.httpCredential -SshCredential $params.sshCredential -Version $params.version `
3333
-MinSupportedTlsVersion $params.minSupportedTlsVersion -VirtualNetworkId $params.virtualNetworkId -SubnetName "default"
3434
Assert-NotNull $cluster
3535

@@ -78,12 +78,12 @@ function Test-AzureMonitorAgentRelatedCommands{
7878
# Create some resources that will be used throughout test
7979
try
8080
{
81-
$location = "East US"
81+
# $location = "East Asia"
8282
# prepare parameter for creating parameter
8383
# $params= Prepare-ClusterCreateParameter -location $location
8484

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

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

103103
Assert-NotNull $workspaceId
104104
Assert-NotNull $primaryKey
105-
Enable-AzHDInsightAzureMonitorAgent -ClusterName $cluster.Name -ResourceGroup $cluster.ResourceGroup -WorkspaceId $workspaceId -Primary $primaryKey
105+
Enable-AzHDInsightAzureMonitorAgent -ClusterName $cluster.Name -ResourceGroup $cluster.ResourceGroup -WorkspaceId $workspaceId -PrimaryKey $primaryKey
106106

107107
$result = Get-AzHDInsightAzureMonitorAgent -ClusterName $cluster.Name -ResourceGroupName $cluster.ResourceGroup
108108
Assert-True {$result.ClusterMonitoringEnabled}

src/HDInsight/HDInsight.Test/ScenarioTests/HDInsightClusterTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ public HDInsightClusterTests(ITestOutputHelper output) : base(output)
2525
{
2626
}
2727

28+
[Fact]
29+
[Trait(Category.AcceptanceType, Category.CheckIn)]
30+
public void TestCreateClusterWithWasbAndMSI()
31+
{
32+
TestRunner.RunTestScript("Test-CreateClusterWithWasbAndMSI");
33+
}
34+
35+
[Fact]
36+
[Trait(Category.AcceptanceType, Category.CheckIn)]
37+
public void TestCreateEntraCluster()
38+
{
39+
TestRunner.RunTestScript("Test-CreateEntraCluster");
40+
}
41+
2842
[Fact]
2943
[Trait(Category.AcceptanceType, Category.CheckIn)]
3044
public void TestClusterRelatedCommands()

0 commit comments

Comments
 (0)