Method: tasks.pushNotificationConfigs.create

为任务创建推送通知配置。

HTTP 请求

POST https://ces.googleapis.com/tasks/{taskId}/pushNotificationConfigs

网址采用 gRPC 转码语法。

路径参数

参数
taskId

string

相应配置所关联的任务的 ID。

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{
  "tenant": string,
  "id": string,
  "url": string,
  "token": string,
  "authentication": {
    object (AuthenticationInfo)
  }
}
字段
tenant

string

可选。不透明的路由标识符。如果设置了该字段,则必须与代理卡片中所选 AgentInterfacetenant 值一致。

id

string

推送通知配置详细信息。相应推送通知配置的唯一标识符(例如 UUID)。

url

string

必需。应发送通知的网址。

token

string

相应任务或会话的唯一令牌。

authentication

object (AuthenticationInfo)

发送通知所需的身份验证信息。

响应正文

如果成功,响应正文将包含一个新创建的 TaskPushNotificationConfig 实例。

授权范围

需要以下 OAuth 范围之一:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/ces

如需了解详情,请参阅 Authentication Overview