Action Groups - Enable Receiver
在作组中启用接收方。 这会将接收方的状态从“已禁用”更改为“已启用”。 仅电子邮件或短信接收方支持此作。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe?api-version=2021-09-01
		URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 | 
|---|---|---|---|---|
| 
						 action 
					 | 
					path | True | 
			 string  | 
					
						 作组的名称。  | 
				
| 
						 resource 
					 | 
					path | True | 
			 string minLength: 1maxLength: 90  | 
					
						 资源组的名称。 名称不区分大小写。  | 
				
| 
						 subscription 
					 | 
					path | True | 
			 string minLength: 1 | 
					
						 目标订阅的 ID。  | 
				
| 
						 api-version 
					 | 
					query | True | 
			 string minLength: 1 | 
					
						 用于此作的 API 版本。  | 
				
请求正文
| 名称 | 必需 | 类型 | 说明 | 
|---|---|---|---|
| receiverName | True | 
			 string  | 
	
		 要重新订阅的接收方的名称。  | 
响应
| 名称 | 类型 | 说明 | 
|---|---|---|
| 200 OK | 
		 已成功启用接收方。  | 
|
| Other Status Codes | 
		 已在作组中启用接收方。  | 
|
| Other Status Codes | 
		 发生错误且无法启用接收方,例如:404:未找到作组或作组中找不到匹配的接收方。  | 
安全性
azure_auth
Azure Active Directory OAuth2 流
					类型: 
					oauth2
					流向: 
					implicit
					授权 URL: 
					https://login.microsoftonline.com/common/oauth2/authorize
			
作用域
| 名称 | 说明 | 
|---|---|
| user_impersonation | 模拟用户帐户 | 
示例
Enable the receiver
示例请求
示例响应
定义
| 名称 | 说明 | 
|---|---|
| 
							Enable | 
						
							 描述应重新订阅的接收方。  | 
					
| 
							Error | 
						
							 描述错误响应的格式。  | 
					
EnableRequest 
			
			描述应重新订阅的接收方。
| 名称 | 类型 | 说明 | 
|---|---|---|
| receiverName | 
			 string  | 
	
		 要重新订阅的接收方的名称。  | 
ErrorResponse 
			
			描述错误响应的格式。
| 名称 | 类型 | 说明 | 
|---|---|---|
| code | 
			 string  | 
	
		 错误代码  | 
| message | 
			 string  | 
	
		 指示操作失败的原因的错误消息。  |