Update-AzLoad
语法
Default (默认值)
Update-AzLoad
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-EncryptionIdentity <String>]
[-EncryptionKey <String>]
[-IdentityType <ManagedServiceIdentityType>]
[-IdentityUserAssigned <Hashtable>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
示例
示例 1:使用标记更新Azure 负载测试资源
$tag = @{"key0" = "value0"}
Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -Tag $tag
Name Resource group Location DataPlane URL
---- -------------- -------- -------------
sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
此命令使用提供的标记更新名为 sample-rg 的资源组中名为 sampleres 的 Azure 负载测试 资源。
示例 2:更新Azure 负载测试资源以使用 CMK 加密 System-Assigned 标识
Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -IdentityType "SystemAssigned" -EncryptionIdentity "SystemAssigned" -EncryptionKey "https://sample-akv.vault.azure.net/keys/cmk/2d1ccd5c50234ea2a0858fe148b69cde"
Name Resource group Location DataPlane URL
---- -------------- -------- -------------
sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
此命令将更新名为 sample-rg 的资源组中名为 sampleres 的资源Azure 负载测试,以使用系统分配的标识访问 CMK 加密的加密密钥。
示例 3:更新Azure 负载测试资源以删除现有 User-Assigned 托管标识
$userAssigned = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1" = @{}; "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity2" = $null}
Update-AzLoad -Name sampleres -ResourceGroupName sample-rg -IdentityType "SystemAssigned,UserAssigned" -IdentityUserAssigned $userAssigned
Name Resource group Location DataPlane URL
---- -------------- -------- -------------
sampleres sample-rg eastus 00000000-0000-0000-0000-000000000000.eastus.cnt-prod.loadtesting.azure.com
此命令更新名为 sample-rg 的资源组中的Azure 负载测试资源,以删除用户分配的托管标识“/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft。如果已分配给资源,则 ManagedIdentity/userAssignedIdentities/identity2”。
参数
-AsJob
以作业身份运行命令
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-DefaultProfile
用于与Azure通信的凭据、帐户、租户和订阅。
参数属性
类型: PSObject
默认值: None
支持通配符: False
不显示: False
别名: AzureRMContext, AzureCredential
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-EncryptionIdentity
客户管理的密钥设置的托管标识,用于定义应使用哪些标识进行身份验证来密钥保管库。
例如:“SystemAssigned”使用系统分配的托管标识,而“/subscriptions/fa5fc227-a624-475e-b696-cdd604c735bc/resourceGroups/<resource group>/providers/Microsoft。ManagedIdentity/userAssignedIdentities/myId' 使用给定的用户分配的托管标识。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-EncryptionKey
加密密钥 URL(版本控制)。
例如:https://contosovault.vault.azure.net/keys/contosokek/562a4bb76b524a1493a6afe8e536ee78。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-IdentityType
托管标识的类型。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-IdentityUserAssigned
与资源关联的用户分配标识的列表。
用户标识将是 ARM 资源 ID。
用户分配标识是一个哈希表,其键采用 ARM 资源 ID '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft的形式。ManagedIdentity/userAssignedIdentities/{identityName}。
键的值可以是空对象({})来分配标识并$null删除现有标识。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Name
Azure 负载测试资源的名称。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
别名: LoadTestName
参数集
(All)
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-NoWait
异步运行命令
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-ResourceGroupName
资源组的名称。
参数属性
类型: String
默认值: None
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: True
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-SubscriptionId
订阅的 ID。
参数属性
类型: String
默认值: (Get-AzContext).Subscription.Id
支持通配符: False
不显示: False
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-Tag
以哈希表的形式设置为服务器上的标记的键值对。
例如:@{key0=“value0”;key1=$null;key2=“value2”}。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
-WhatIf
显示 cmdlet 运行时会发生什么情况。
命令脚本未运行。
参数属性
参数集
(All)
Position: Named
必需: False
来自管道的值: False
来自管道的值(按属性名称): False
来自剩余参数的值: False
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters 。
输出