Skip to content

Commit 403571c

Browse files
author
Zhenyu Zhou
committed
Update help doc of new-azhdinsightcluster
1 parent 1c3e574 commit 403571c

File tree

14 files changed

+14057
-6820
lines changed

14 files changed

+14057
-6820
lines changed

src/HDInsight/HDInsight.Test/ScenarioTests/HDInsightClusterTests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ function Test-CreateClusterWithRelayOutoundAndPrivateLink{
290290
$params= Prepare-ClusterCreateParameter -location "South Central US"
291291

292292
# Private Link requires vnet has firewall, this is difficult to create dynamically, just hardcode here
293-
$vnetId="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/fakevnet"
293+
$vnetId= "/subscriptions/964c10bb-8a6c-43bc-83d3-6b318c6c7305/resourceGroups/zzy-test-rg/providers/Microsoft.Network/virtualNetworks/zzytestvnet"#"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/fakevnet"
294294
$subnetName="default"
295295

296296
# create cluster
@@ -299,7 +299,7 @@ function Test-CreateClusterWithRelayOutoundAndPrivateLink{
299299
-StorageAccountResourceId $params.storageAccountResourceId -StorageAccountKey $params.storageAccountKey `
300300
-HttpCredential $params.httpCredential -SshCredential $params.sshCredential `
301301
-MinSupportedTlsVersion $params.minSupportedTlsVersion `
302-
-VirtualNetworkId $vnetId -SubnetName $subnetName -Version 3.6 `
302+
-VirtualNetworkId $vnetId -SubnetName $subnetName -Version 4.0 `
303303
-ResourceProviderConnection Outbound -PrivateLink Enabled
304304

305305
Assert-AreEqual $cluster.NetworkProperties.ResourceProviderConnection Outbound
@@ -467,7 +467,7 @@ function Test-CreateClusterWithPrivateLinkConfiguration{
467467
$params= Prepare-ClusterCreateParameter -location "South Central US"
468468

469469
# Private Link requires vnet has firewall, this is difficult to create dynamically, just hardcode here
470-
$vnetId="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/fakevnet"
470+
$vnetId= "/subscriptions/964c10bb-8a6c-43bc-83d3-6b318c6c7305/resourceGroups/zzy-test-rg/providers/Microsoft.Network/virtualNetworks/zzytestvnet"#"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Network/virtualNetworks/fakevnet"
471471
$subnetName="default"
472472

473473
$ipConfigName="ipconfig"

src/HDInsight/HDInsight.Test/SessionRecords/Commands.HDInsight.Test.ScenarioTests.HDInsightAutoscaleTests/TestAutoscaleRelatedCommands.json

Lines changed: 1257 additions & 692 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight.Test/SessionRecords/Commands.HDInsight.Test.ScenarioTests.HDInsightAzureMonitorTests/TestAzureMonitorRelatedCommands.json

Lines changed: 1009 additions & 570 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight.Test/SessionRecords/Commands.HDInsight.Test.ScenarioTests.HDInsightClusterTests/TestClusterRelatedCommands.json

Lines changed: 725 additions & 705 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight.Test/SessionRecords/Commands.HDInsight.Test.ScenarioTests.HDInsightClusterTests/TestCreateClusterWithComputeIsolation.json

Lines changed: 543 additions & 542 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight.Test/SessionRecords/Commands.HDInsight.Test.ScenarioTests.HDInsightClusterTests/TestCreateClusterWithEncryptionAtHost.json

Lines changed: 2323 additions & 522 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight.Test/SessionRecords/Commands.HDInsight.Test.ScenarioTests.HDInsightClusterTests/TestCreateClusterWithEncryptionInTransit.json

Lines changed: 1573 additions & 528 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight.Test/SessionRecords/Commands.HDInsight.Test.ScenarioTests.HDInsightClusterTests/TestCreateClusterWithKafkaRestProxy.json

Lines changed: 477 additions & 664 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight.Test/SessionRecords/Commands.HDInsight.Test.ScenarioTests.HDInsightClusterTests/TestCreateClusterWithLoadBasedAutoscale.json

Lines changed: 587 additions & 721 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight.Test/SessionRecords/Commands.HDInsight.Test.ScenarioTests.HDInsightClusterTests/TestCreateClusterWithScheduleBasedAutoscale.json

Lines changed: 867 additions & 491 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight.Test/SessionRecords/Commands.HDInsight.Test.ScenarioTests.HDInsightHostTests/TestHostRelatedCommands.json

Lines changed: 604 additions & 761 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight.Test/SessionRecords/Commands.HDInsight.Test.ScenarioTests.HDInsightSetGatewayCredentialTest/TestSetGatewayCredential.json

Lines changed: 4081 additions & 618 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight/ManagementCommands/NewAzureHDInsightClusterCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Azure.Commands.Common.Authentication;
1616
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
1717
using Microsoft.Azure.Commands.Common.MSGraph.Version1_0;
18+
using Microsoft.Azure.Commands.Common.MSGraph.Version1_0.Applications;
1819
using Microsoft.Azure.Commands.Common.MSGraph.Version1_0.Applications.Models;
1920
using Microsoft.Azure.Commands.HDInsight.Commands;
2021
using Microsoft.Azure.Commands.HDInsight.Models;
@@ -666,18 +667,18 @@ private Guid GetApplicationId(Guid applicationId)
666667
}
667668

668669
MicrosoftGraphClient graphClient = AzureSession.Instance.ClientFactory.CreateArmClient<MicrosoftGraphClient>(
669-
DefaultProfile.DefaultContext, AzureEnvironment.Endpoint.Graph);
670+
DefaultProfile.DefaultContext, AzureEnvironment.ExtendedEndpoint.MicrosoftGraphUrl);
670671

671672
graphClient.TenantID = DefaultProfile.DefaultContext.Tenant.Id.ToString();
672673

673674
MicrosoftGraphServicePrincipal sp = null;
674675
try
675676
{
676-
sp = graphClient.ServicePrincipals.GetServicePrincipalWithHttpMessagesAsync(ObjectId.ToString()).Result.Body;//graphClient.ServicePrincipals.Get(ObjectId.ToString());
677+
sp = graphClient.ServicePrincipals.GetServicePrincipal(ObjectId.ToString());
677678
}
678679
catch (Exception e)
679680
{
680-
string errorMessage = e.Message + ". Please specify Application Id explicitly by providing ApplicationId parameter and retry.";
681+
string errorMessage =$"Can not find service princaipl per the parameter ObjectId:{ObjectId}, the error message is '{e.Message}'."+ " Please specify Application Id explicitly by providing ApplicationId parameter and retry.";
681682
throw new Exception(errorMessage);
682683
}
683684

src/HDInsight/HDInsight/help/New-AzHDInsightCluster.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ New-AzHDInsightCluster [-Location] <String> [-ResourceGroupName] <String> [-Clus
100100
## DESCRIPTION
101101
The New-AzHDInsightCluster creates an Azure HDInsight cluster by using the specified parameters or by using a configuration object that is created by using the New-AzHDInsightClusterConfig cmdlet.
102102

103+
The cmdlet may call below Microsoft Graph API according to input parameters:
104+
105+
- GET /servicePrincipals/{id}
106+
103107
## EXAMPLES
104108

105109
### Example 1: Create an Azure HDInsight cluster

0 commit comments

Comments
 (0)