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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/Accounts/Accounts/Utilities/CommandMappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3233,6 +3233,7 @@
"Get-AzHDInsightCluster": {},
"Update-AzHDInsightCluster": {},
"Get-AzHDInsightClusterAutoscaleConfiguration": {},
"Get-AzHDInsightClusterGatewayEntraUserInfo": {},
"Get-AzHDInsightHost": {},
"Get-AzHDInsightJob": {},
"Get-AzHDInsightJobOutput": {},
Expand Down
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
8 changes: 4 additions & 4 deletions src/HDInsight/HDInsight.Test/ScenarioTests/Common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ class ClusterCommonCreateParameter{
#>
function Prepare-ClusterCreateParameter{
param(
[string] $clusterName="ps",
[string] $location="eastus",
[string] $clusterName="az1",
[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] $clusterType="Hadoop",
[string] $virtualNetworkId="/subscriptions/964c10bb-8a6c-43bc-83d3-6b318c6c7305/resourceGroups/yukundemo1/providers/Microsoft.Network/virtualNetworks/yk02networkeastasia",
[string] $subnet="default"
)

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 "5.1" `
-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 @@ -78,16 +78,18 @@ 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

#$workspaceName = "yk-test-log-workspace2"
#$resourceGroupName = "yukundemo1"

$workspaceName = "yk-Log-Analytics"
$resourceGroupName = "yukundemo1"
# create cluster that will be used throughout test
$cluster = Get-AzHDInsightCluster -ResourceGroupName yuchen-ps-test -ClusterName spark51
$cluster = Get-AzHDInsightCluster -ResourceGroupName "wut-tip2-esp" -ClusterName "test5-wut-tip2"
Assert-NotNull $cluster

$workspaceName = "ps-la"
$resourceGroupName = $cluster.ResourceGroup

#create a new Log Analytics Workspace
$workspace = Get-AzOperationalInsightsWorkspace -Name $workspaceName -ResourceGroupName $resourceGroupName
Expand All @@ -102,7 +104,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,28 @@ 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 TestUpdateAndGetEntraUserInfo()
{
TestRunner.RunTestScript("Test-UpdateAndGetEntraUserInfo");
}

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