Set-AzActionGroup
语法
ByPropertyName (默认值)
Set-AzActionGroup
-ResourceGroupName <String>
-Name <String>
-ShortName <String>
-Receiver <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Insights.OutputClasses.PSActionGroupReceiverBase]>
[-DisableGroup]
[-Tag <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByResourceId
Set-AzActionGroup
-ShortName <String>
-Receiver <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Insights.OutputClasses.PSActionGroupReceiverBase]>
-ResourceId <String>
[-DisableGroup]
[-Tag <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzActionGroup
-InputObject <PSActionGroupResource>
[-ShortName <String>]
[-DisableGroup]
[-Tag <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
Set-AzActionGroup cmdlet 创建新的或更新现有作组
示例
示例 1:创建作组
PS C:\>$email1 = New-AzActionGroupReceiver -Name 'user1' -EmailReceiver -EmailAddress 'user1@example.com'
PS C:\>$sms1 = New-AzActionGroupReceiver -Name 'user2' -SmsReceiver -CountryCode '1' -PhoneNumber '5555555555'
PS C:\>Set-AzActionGroup -Name $actionGroupName -ResourceGroup $resourceGroupName -ShortName $shortName -Receiver $email1,$sms1
前两个命令创建两个接收器。
最后一个命令创建一个作组,包括两个接收方。
参数
-Confirm
在运行 cmdlet 之前,提示你进行确认。
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DefaultProfile
用于与 azure 通信的凭据、帐户、租户和订阅
参数属性
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-DisableGroup
禁用作组。
参数属性
参数集
ByPropertyName
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByResourceId
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
作组资源
ByInputObject
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
-Name
作组的名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByPropertyName
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-Receiver
作组的接收方列表。
参数属性
参数集
ByPropertyName
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByResourceId
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-ResourceGroupName
资源组名称
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByPropertyName
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-ResourceId
资源 i
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByResourceId
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-ShortName
操作组的短名称。
参数属性
| 类型: | String
|
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
ByPropertyName
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByResourceId
| Position: | Named |
| 必需: | True |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-Tag
作组资源的标记
参数属性
参数集
ByPropertyName
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
ByResourceId
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | 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。
输出