迁移到适用于 HDInsight 群集的基于 Azure Resource Manager 的开发工具Migrating to Azure Resource Manager-based development tools for HDInsight clusters

HDInsight 即将淘汰适用于 HDInsight 的基于 Azure 服务管理器 (ASM) 的工具。HDInsight is deprecating Azure Service Manager (ASM)-based tools for HDInsight. 如果一直在使用 Azure PowerShell、Azure 经典 CLI 或 HDInsight.NET SDK 来处理 HDInsight 群集,我们建议跟随潮流,使用 Azure 资源管理器的 PowerShell、CLI 和 .NET SDK 版本。If you have been using Azure PowerShell, Azure Classic CLI, or the HDInsight .NET SDK to work with HDInsight clusters, you are encouraged to use the Azure Resource Manager versions of PowerShell, CLI, and .NET SDK going forward. 本文章提供有关如何迁移到基于资源管理器的新方法的指导。This article provides pointers on how to migrate to the new Resource Manager-based approach. 本文档将重点介绍适用于 HDInsight 的 ASM 与资源管理器方法之间的差异(如果适用)。Wherever applicable, this document highlights the differences between the ASM and Resource Manager approaches for HDInsight.

Important

2017 年 1 月 1 日,对基于 ASM 的 PowerShell、CLI 和 .NET SDK 的支持将会终止。The support for ASM based PowerShell, CLI, and .NET SDK will discontinue on January 1, 2017.

Note

本文进行了更新,以便使用新的 Azure PowerShell Az 模块。This article has been updated to use the new Azure PowerShell Az module. 你仍然可以使用 AzureRM 模块,至少在 2020 年 12 月之前,它将继续接收 bug 修补程序。You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. 若要详细了解新的 Az 模块和 AzureRM 兼容性,请参阅新 Azure Powershell Az 模块简介To learn more about the new Az module and AzureRM compatibility, see Introducing the new Azure PowerShell Az module. 有关 Az 模块安装说明,请参阅安装 Azure PowerShellFor Az module installation instructions, see Install Azure PowerShell.

将 Azure 经典 CLI 迁移到 Azure 资源管理器Migrating Azure Classic CLI to Azure Resource Manager

Important

Azure CLI 未提供针对使用 HDInsight 群集的支持。Azure CLI does not provide support for working with HDInsight clusters. 因此,仍可通过 Azure 经典 CLI 来使用 HDInsight,但是 Azure 经典 CLI 已弃用。You can still use Azure Classic CLI with HDInsight, however Azure Classic CLI is deprecated.

以下是通过 Azure 经典 CLI 使用 HDInsight 的基本命令:The following are the basic commands for working with HDInsight through Azure CLassic CLI:

  • azure hdinsight cluster create - 创建新的 HDInsight 群集- creates a new HDInsight cluster
  • azure hdinsight cluster delete - 删除现有 HDInsight 群集- deletes an existing HDInsight cluster
  • azure hdinsight cluster show - 显示有关现有群集的信息- display information about an existing cluster
  • azure hdinsight cluster list - 列出 Azure 订阅的 HDInsight 群集- lists HDInsight clusters for your Azure subscription

使用 -h 开关可以检查每个命令可用的参数和开关。Use the -h switch to inspect the parameters and switches available for each command.

新命令New commands

可用于 Azure Resource Manager 的新命令包括:New commands available with Azure Resource Manager are:

  • azure hdinsight cluster resize - 动态更改群集中的辅助角色节点数目- dynamically changes the number of worker nodes in the cluster
  • azure hdinsight cluster enable-http-access - 启用对群集的 HTTPs 访问(默认为打开)- enables HTTPs access to the cluster (on by default)
  • azure hdinsight cluster disable-http-access - 禁用对群集的 HTTPs 访问- disables HTTPs access to the cluster
  • azure hdinsight script-action - 在群集上提供用于创建/管理脚本操作的命令- provides commands for creating/managing Script Actions on a cluster
  • azure hdinsight config - 提供用于创建配置文件的命令,该配置文件可与 hdinsight cluster create 命令一起使用以提供配置信息。- provides commands for creating a configuration file that can be used with the hdinsight cluster create command to provide configuration information.

已弃用的命令Deprecated commands

如果使用 azure hdinsight job 命令将作业提交到 HDInsight 群集,则这些命令无法通过资源管理器命令提供。If you use the azure hdinsight job commands to submit jobs to your HDInsight cluster, these commands are not available through the Resource Manager commands. 如果需要以编程方式通过脚本将作业提交到 HDInsight,应改用 HDInsight 提供的 REST API。If you need to programmatically submit jobs to HDInsight from scripts, you should instead use the REST APIs provided by HDInsight. 有关如何使用 REST API 提交作业的详细信息,请参阅以下文档。For more information on submitting jobs using REST APIs, see the following documents.

有关以其他交互方式运行 Apache Hadoop MapReduce、Apache Hive 和 Apache Pig 的信息,请参阅将 MapReduce 与 HDInsight 上的 Hadoop 配合使用将 Apache Hive 与 HDInsight 上的 Apache Hadoop 配合使用将 Apache Pig 与 HDInsight 上的 Apache Hadoop 配合使用For information on other ways to run Apache Hadoop MapReduce, Apache Hive, and Apache Pig interactively, see Use MapReduce with Hadoop on HDInsight, Use Apache Hive with Apache Hadoop on HDInsight, and Use Apache Pig with Apache Hadoop on HDInsight.

示例Examples

创建群集Creating a cluster

  • 旧命令 (ASM) -Old command (ASM) - azure hdinsight cluster create myhdicluster --location northeurope --osType linux --storageAccountName mystorage --storageAccountKey <storagekey> --storageContainer mycontainer --userName admin --password mypassword --sshUserName sshuser --sshPassword mypassword
  • 新命令 -New command - azure hdinsight cluster create myhdicluster -g myresourcegroup --location northeurope --osType linux --clusterType hadoop --defaultStorageAccountName mystorage --defaultStorageAccountKey <storagekey> --defaultStorageContainer mycontainer --userName admin -password mypassword --sshUserName sshuser --sshPassword mypassword

删除群集Deleting a cluster

  • 旧命令 (ASM) -Old command (ASM) - azure hdinsight cluster delete myhdicluster
  • 新命令 -New command - azure hdinsight cluster delete mycluster -g myresourcegroup

列出群集List clusters

  • 旧命令 (ASM) -Old command (ASM) - azure hdinsight cluster list
  • 新命令 -New command - azure hdinsight cluster list

Note

运行 list 命令时,使用 -g 指定资源组只会返回指定资源组中的群集。For the list command, specifying the resource group using -g will return only the clusters in the specified resource group.

显示群集信息Show cluster information

  • 旧命令 (ASM) -Old command (ASM) - azure hdinsight cluster show myhdicluster
  • 新命令 -New command - azure hdinsight cluster show myhdicluster -g myresourcegroup

将 Azure PowerShell 迁移到 Azure Resource ManagerMigrating Azure PowerShell to Azure Resource Manager

有关处于 Azure 资源管理器模式的 Azure PowerShell 的一般信息,请参阅将 Azure PowerShell 与 Azure 资源管理器配合使用The general information about Azure PowerShell in the Azure Resource Manager mode can be found at Using Azure PowerShell with Azure Resource Manager.

Azure PowerShell 资源管理器 cmdlet 可与 ASM cmdlet 一同安装。The Azure PowerShell Resource Manager cmdlets can be installed side by side with the ASM cmdlets. 两种模式下的 cmdlet 可按其名称来区分。The cmdlets from the two modes can be distinguished by their names. 资源管理器模式下的 cmdlet 名称中包含 AzHDInsight,而在 ASM 模式下则包含 AzureHDInsight。The Resource Manager mode has AzHDInsight in the cmdlet names comparing to AzureHDInsight in the ASM mode. 例如,前者为 New-AzHDInsightCluster,后者为New-AzureHDInsightCluster。For example, New-AzHDInsightCluster vs. New-AzureHDInsightCluster. 某些参数和开关可能有新名称,并且在使用资源管理器时,有许多新参数可供使用。Parameters and switches may have news names, and there are many new parameters available when using Resource Manager. 例如,多个 cmdlet 需要名为 -ResourceGroupName 的新开关。For example, several cmdlets require a new switch called -ResourceGroupName.

在使用这些 HDInsight cmdlet 之前,必须先连接到 Azure 帐户并创建新资源组:Before you can use the HDInsight cmdlets, you must connect to your Azure account, and create a new resource group:

已重命名的 cmdletRenamed cmdlets

在 Windows PowerShell 控制台中列出 HDInsight ASM cmdlet:To list the HDInsight ASM cmdlets in Windows PowerShell console:

help *azurermhdinsight*

下表列出了 ASM cmdlet 及其在资源管理器模式下的名称:The following table lists the ASM cmdlets and their names in Resource Manager mode:

ASM cmdletASM cmdlets 资源管理器 cmdletResource Manager cmdlets
Add-AzureHDInsightConfigValuesAdd-AzureHDInsightConfigValues Add-AzHDInsightConfigValuesAdd-AzHDInsightConfigValues
Add-AzureHDInsightMetastoreAdd-AzureHDInsightMetastore Add-AzHDInsightMetastoreAdd-AzHDInsightMetastore
Add-AzureHDInsightScriptActionAdd-AzureHDInsightScriptAction Add-AzHDInsightScriptActionAdd-AzHDInsightScriptAction
Add-AzureHDInsightStorageAdd-AzureHDInsightStorage Add-AzHDInsightStorageAdd-AzHDInsightStorage
Get-AzureHDInsightClusterGet-AzureHDInsightCluster Get-AzHDInsightClusterGet-AzHDInsightCluster
Get-AzureHDInsightJobGet-AzureHDInsightJob Get-AzHDInsightJobGet-AzHDInsightJob
Get-AzureHDInsightJobOutputGet-AzureHDInsightJobOutput Get-AzHDInsightJobOutputGet-AzHDInsightJobOutput
Get-AzureHDInsightPropertiesGet-AzureHDInsightProperties Get-AzHDInsightPropertiesGet-AzHDInsightProperties
Grant-AzureHDInsightHttpServicesAccessGrant-AzureHDInsightHttpServicesAccess Grant-AzHDInsightHttpServicesAccessGrant-AzHDInsightHttpServicesAccess
Grant-AzureHdinsightRdpAccessGrant-AzureHdinsightRdpAccess Grant-AzHDInsightRdpServicesAccessGrant-AzHDInsightRdpServicesAccess
Invoke-AzureHDInsightHiveJobInvoke-AzureHDInsightHiveJob Invoke-AzHDInsightHiveJobInvoke-AzHDInsightHiveJob
New-AzureHDInsightClusterNew-AzureHDInsightCluster New-AzHDInsightClusterNew-AzHDInsightCluster
New-AzureHDInsightClusterConfigNew-AzureHDInsightClusterConfig New-AzHDInsightClusterConfigNew-AzHDInsightClusterConfig
New-AzureHDInsightHiveJobDefinitionNew-AzureHDInsightHiveJobDefinition New-AzHDInsightHiveJobDefinitionNew-AzHDInsightHiveJobDefinition
New-AzureHDInsightMapReduceJobDefinitionNew-AzureHDInsightMapReduceJobDefinition New-AzHDInsightMapReduceJobDefinitionNew-AzHDInsightMapReduceJobDefinition
New-AzureHDInsightPigJobDefinitionNew-AzureHDInsightPigJobDefinition New-AzHDInsightPigJobDefinitionNew-AzHDInsightPigJobDefinition
New-AzureHDInsightSqoopJobDefinitionNew-AzureHDInsightSqoopJobDefinition New-AzHDInsightSqoopJobDefinitionNew-AzHDInsightSqoopJobDefinition
New-AzureHDInsightStreamingMapReduceJobDefinitionNew-AzureHDInsightStreamingMapReduceJobDefinition New-AzHDInsightStreamingMapReduceJobDefinitionNew-AzHDInsightStreamingMapReduceJobDefinition
Remove-AzureHDInsightClusterRemove-AzureHDInsightCluster Remove-AzHDInsightClusterRemove-AzHDInsightCluster
Revoke-AzureHDInsightHttpServicesAccessRevoke-AzureHDInsightHttpServicesAccess Revoke-AzHDInsightHttpServicesAccessRevoke-AzHDInsightHttpServicesAccess
Revoke-AzureHdinsightRdpAccessRevoke-AzureHdinsightRdpAccess Revoke-AzHDInsightRdpServicesAccessRevoke-AzHDInsightRdpServicesAccess
Set-AzureHDInsightClusterSizeSet-AzureHDInsightClusterSize Set-AzHDInsightClusterSizeSet-AzHDInsightClusterSize
Set-AzureHDInsightDefaultStorageSet-AzureHDInsightDefaultStorage Set-AzHDInsightDefaultStorageSet-AzHDInsightDefaultStorage
Start-AzureHDInsightJobStart-AzureHDInsightJob Start-AzHDInsightJobStart-AzHDInsightJob
Stop-AzureHDInsightJobStop-AzureHDInsightJob Stop-AzHDInsightJobStop-AzHDInsightJob
Use-AzureHDInsightClusterUse-AzureHDInsightCluster Use-AzHDInsightClusterUse-AzHDInsightCluster
Wait-AzureHDInsightJobWait-AzureHDInsightJob Wait-AzHDInsightJobWait-AzHDInsightJob

新 cmdletNew cmdlets

以下是只能在资源管理器模式下使用的新 cmdlet。The following are the new cmdlets that are only available in Resource Manager mode.

与脚本操作相关的 cmdlet:Script action-related cmdlets:

  • Get-AzHDInsightPersistedScriptAction:获取群集的持久性脚本操作,并按时间顺序列出这些操作,或获取有关指定持久性脚本操作的详细信息。Get-AzHDInsightPersistedScriptAction: Gets the persisted script actions for a cluster and lists them in chronological order, or gets details for a specified persisted script action.
  • Get-AzHDInsightScriptActionHistory:获取群集的脚本操作历史记录,并按时间顺序逆序列出这些操作,或获取有关以前执行的脚本操作的详细信息。Get-AzHDInsightScriptActionHistory: Gets the script action history for a cluster and lists it in reverse chronological order, or gets details of a previously executed script action.
  • Remove-AzHDInsightPersistedScriptAction:从 HDInsight 群集中删除持久性脚本操作。Remove-AzHDInsightPersistedScriptAction: Removes a persisted script action from an HDInsight cluster.
  • Set-AzHDInsightPersistedScriptAction:将以前执行的脚本操作设置为持久性脚本操作。Set-AzHDInsightPersistedScriptAction: Sets a previously executed script action to be a persisted script action.
  • Submit-AzHDInsightScriptAction:将新的脚本操作提交到 Azure HDInsight 群集。Submit-AzHDInsightScriptAction: Submits a new script action to an Azure HDInsight cluster.

有关其他用法信息,请参阅使用脚本操作自定义基于 Linux 的 HDInsight 群集For additional usage information, see Customize Linux-based HDInsight clusters using Script Action.

示例Examples

创建群集Create cluster

旧命令 (ASM):Old command (ASM):

New-AzureHDInsightCluster `
    -Name $clusterName `
    -Location $location `
    -DefaultStorageAccountName "$storageAccountName.blob.core.chinacloudapi.cn" `
    -DefaultStorageAccountKey $storageAccountKey `
    -DefaultStorageContainerName $containerName `
    -ClusterSizeInNodes 2 `
    -ClusterType Hadoop `
    -OSType Linux `
    -Version "3.2" `
    -Credential $httpCredential `
    -SshCredential $sshCredential

新命令:New command:

New-AzHDInsightCluster `
    -ClusterName $clusterName `
    -ResourceGroupName $resourceGroupName `
    -Location $location `
    -DefaultStorageAccountName "$storageAccountName.blob.core.chinacloudapi.cn" `
    -DefaultStorageAccountKey $storageAccountKey `
    -DefaultStorageContainer $containerName  `
    -ClusterSizeInNodes 2 `
    -ClusterType Hadoop `
    -OSType Linux `
    -Version "3.2" `
    -HttpCredential $httpcredentials `
    -SshCredential $sshCredentials

删除群集Delete cluster

旧命令 (ASM):Old command (ASM):

Remove-AzureHDInsightCluster -name $clusterName 

新命令:New command:

Remove-AzHDInsightCluster -ResourceGroupName $resourceGroupName -ClusterName $clusterName 

列出群集List cluster

旧命令 (ASM):Old command (ASM):

Get-AzureHDInsightCluster

新命令:New command:

Get-AzHDInsightCluster 

显示群集Show cluster

旧命令 (ASM):Old command (ASM):

Get-AzureHDInsightCluster -Name $clusterName

新命令:New command:

Get-AzHDInsightCluster -ResourceGroupName $resourceGroupName -clusterName $clusterName

其他示例Other samples

迁移到新的 HDInsight .NET SDKMigrating to the new HDInsight .NET SDK

基于 Azure 服务管理 (ASM) 的 HDInsight.NET SDK 现已弃用。The Azure Service Management-based (ASM) HDInsight .NET SDK is now deprecated. 建议使用基于 Azure 资源管理器的 基于资源管理器的 HDInsight .NET SDKYou are encouraged to use the Azure Resource Management-based Resource Manager-based HDInsight .NET SDK. 以下基于 ASM 的 HDInsight 包即将弃用。The following ASM-based HDInsight packages are being deprecated.

  • Microsoft.WindowsAzure.Management.HDInsight
  • Microsoft.Hadoop.Client

本部分提供有关如何使用基于资源管理器的 SDK 来执行特定任务的详细指导。This section provides pointers to more information on how to perform certain tasks using the Resource Manager-based SDK.

如何...使用基于资源管理器的 HDInsight SDKHow to... using the Resource Manager-based HDInsight SDK 链接Links
使用 .NET SDK 创建 HDInsight 群集Create HDInsight clusters using .NET SDK 请参阅使用 .NET SDK 创建 HDInsight 群集See Create HDInsight clusters using .NET SDK
配合使用脚本操作与 .NET SDK 自定义群集Customize a cluster using Script Action with .NET SDK 请参阅使用脚本操作自定义 HDInsight Linux 群集See Customize HDInsight Linux clusters using Script Action
配合使用 Azure Active Directory 与 .NET SDK 以交互方式对应用程序进行身份验证Authenticate applications interactively using Azure Active Directory with .NET SDK 请参阅使用 .NET SDK 运行 Apache Hive 查询See Run Apache Hive queries using .NET SDK. 本文中的代码片段使用交互式身份验证方法。The code snippet in this article uses the interactive authentication approach.
配合使用 Azure Active Directory 与 .NET SDK 以非交互方式对应用程序进行身份验证Authenticate applications non-interactively using Azure Active Directory with .NET SDK 请参阅为 HDInsight 创建非交互式应用程序See Create non-interactive applications for HDInsight
使用 .NET SDK 提交 Apache Hive 作业Submit an Apache Hive job using .NET SDK 请参阅提交 Apache Hive 作业See Submit Apache Hive jobs
使用 .NET SDK 提交 Apache Pig 作业Submit an Apache Pig job using .NET SDK 请参阅提交 Apache Pig 作业See Submit Apache Pig jobs
使用 .NET SDK 提交 Apache Sqoop 作业Submit an Apache Sqoop job using .NET SDK 请参阅提交 Apache Sqoop 作业See Submit Apache Sqoop jobs
使用 .NET SDK 列出 HDInsight 群集List HDInsight clusters using .NET SDK 请参阅列出 HDInsight 群集See List HDInsight clusters
使用 .NET SDK 缩放 HDInsight 群集Scale HDInsight clusters using .NET SDK 请参阅缩放 HDInsight 群集See Scale HDInsight clusters
使用 .NET SDK 授予/吊销对 HDInsight 群集的访问权限Grant/revoke access to HDInsight clusters using .NET SDK 请参阅授予/吊销对 HDInsight 群集的访问权限See Grant/revoke access to HDInsight clusters
使用 .NET SDK 更新 HDInsight 群集的 HTTP 用户凭据Update HTTP user credentials for HDInsight clusters using .NET SDK 请参阅更新 HDInsight 群集的 HTTP 用户凭据See Update HTTP user credentials for HDInsight clusters
使用 .NET SDK 查找 HDInsight 群集的默认存储帐户Find the default storage account for HDInsight clusters using .NET SDK 请参阅查找 HDInsight 群集的默认存储帐户See Find the default storage account for HDInsight clusters
使用 .NET SDK 删除 HDInsight 群集Delete HDInsight clusters using .NET SDK 请参阅删除 HDInsight 群集See Delete HDInsight clusters

示例Examples

以下是有关如何使用基于 ASM 的 SDK 和基于资源管理器的 SDK 的等效代码段来执行操作的一些示例。Following are some examples on how an operation is performed using the ASM-based SDK and the equivalent code snippet for the Resource Manager-based SDK.

创建群集 CRUD 客户端Creating a cluster CRUD client

  • 旧命令 (ASM)Old command (ASM)

      //Certificate auth
      //This logs the application in using a subscription administration certificate, which is not offered in Azure Resource Manager
    
      const string subid = "454467d4-60ca-4dfd-a556-216eeeeeeee1";
      var cred = new HDInsightCertificateCredential(new Guid(subid), new X509Certificate2(@"path\to\certificate.cer"));
      var client = HDInsightClient.Connect(cred);
    
  • 新命令(服务主体授权)New command (Service principal authorization)

      //Service principal auth
      //This will log the application in as itself, rather than on behalf of a specific user.
      //For details, including how to set up the application, see:
      //   https://docs.azure.cn/hdinsight/hdinsight-create-non-interactive-authentication-dotnet-applications/
    
      var authFactory = new AuthenticationFactory();
    
      var account = new AzureAccount { Type = AzureAccount.AccountType.ServicePrincipal, Id = clientId };
    
      var env = AzureEnvironment.PublicEnvironments[EnvironmentName.AzureChinaCloud];
    
      var accessToken = authFactory.Authenticate(account, env, tenantId, secretKey, ShowDialog.Never).AccessToken;
    
      var creds = new TokenCloudCredentials(subId.ToString(), accessToken);
    
      _hdiManagementClient = new HDInsightManagementClient(creds, new Uri("https://management.chinacloudapi.cn/"));
    
  • 新命令(用户授权)New command (User authorization)

      //User auth
      //This will log the application in on behalf of the user.
      //The end-user will see a login popup.
    
      var authFactory = new AuthenticationFactory();
    
      var account = new AzureAccount { Type = AzureAccount.AccountType.User, Id = username };
    
      var env = AzureEnvironment.PublicEnvironments[EnvironmentName.AzureChinaCloud];
    
      var accessToken = authFactory.Authenticate(account, env, AuthenticationFactory.CommonAdTenant, password, ShowDialog.Auto).AccessToken;
    
      var creds = new TokenCloudCredentials(subId.ToString(), accessToken);
    
      _hdiManagementClient = new HDInsightManagementClient(creds, new Uri("https://management.chinacloudapi.cn/"));
    

创建群集Creating a cluster

  • 旧命令 (ASM)Old command (ASM)

      var clusterInfo = new ClusterCreateParameters
                  {
                      Name = dnsName,
                      DefaultStorageAccountKey = key,
                      DefaultStorageContainer = defaultStorageContainer,
                      DefaultStorageAccountName = storageAccountDnsName,
                      ClusterSizeInNodes = 1,
                      ClusterType = type,
                      Location = "China North",
                      UserName = "admin",
                      Password = "*******",
                      Version = version,
                      HeadNodeSize = NodeVMSize.Large,
                  };
      clusterInfo.CoreConfiguration.Add(new KeyValuePair<string, string>("config1", "value1"));
      client.CreateCluster(clusterInfo);
    
  • 新命令New command

      var clusterCreateParameters = new ClusterCreateParameters
          {
              Location = "China North",
              ClusterType = "Hadoop",
              Version = "3.1",
              OSType = OSType.Linux,
              DefaultStorageAccountName = "mystorage.blob.core.chinacloudapi.cn",
              DefaultStorageAccountKey =
                  "O9EQvp3A3AjXq/W27rst1GQfLllhp0gUeiUUn2D8zX2lU3taiXSSfqkZlcPv+nQcYUxYw==",
              UserName = "hadoopuser",
              Password = "*******",
              HeadNodeSize = "ExtraLarge",
              RdpUsername = "hdirp",
              RdpPassword = ""*******",
              RdpAccessExpiry = new DateTime(2025, 3, 1),
              ClusterSizeInNodes = 5
          };
      var coreConfigs = new Dictionary<string, string> {{"config1", "value1"}};
      clusterCreateParameters.Configurations.Add(ConfigurationKey.CoreSite, coreConfigs);
    

启用 HTTP 访问Enabling HTTP access

  • 旧命令 (ASM)Old command (ASM)

      client.EnableHttp(dnsName, "China North", "admin", "*******");
    
  • 新命令New command

      var httpParams = new HttpSettingsParameters
      {
             HttpUserEnabled = true,
             HttpUsername = "admin",
             HttpPassword = "*******",
      };
      client.Clusters.ConfigureHttpSettings(resourceGroup, dnsname, httpParams);
    

删除群集Deleting a cluster

  • 旧命令 (ASM)Old command (ASM)

      client.DeleteCluster(dnsName);
    
  • 新命令New command

      client.Clusters.Delete(resourceGroup, dnsname);