Method: customers.accountLinks.mutate

创建或移除帐号关联。从 V5 开始,不支持通过 AccountLinkService.MutateAccountLink 创建。请改用 AccountLinkService.CreateAccountLink。

抛出的错误列表:AccountLinkError AuthenticationError AuthorizationError FieldMaskError HeaderError InternalError MutateError QuotaError RequestError

HTTP 请求

POST https://googleads.googleapis.com/v15/customers/{customerId}/accountLinks:mutate

网址采用 gRPC 转码语法。

路径参数

参数
customerId

string

必需。要修改的客户的 ID。

请求正文

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

JSON 表示法
{
  "operation": {
    object (AccountLinkOperation)
  },
  "partialFailure": boolean,
  "validateOnly": boolean
}
字段
operation

object (AccountLinkOperation)

必需。要在关联上执行的操作。

partialFailure

boolean

如果为 true,则会执行成功的操作,并且无效操作将返回错误。如果为 false,则当且仅当所有操作均有效时,所有操作都将在一个事务中执行。默认值为 false。

validateOnly

boolean

如果为 true,则对请求进行验证,但不会执行该请求。系统只会返回错误,不会返回结果。

响应正文

账号关联转变的响应消息。

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "result": {
    object (MutateAccountLinkResult)
  },
  "partialFailureError": {
    object (Status)
  }
}
字段
result

object (MutateAccountLinkResult)

mutate 的结果。

partialFailureError

object (Status)

与部分失败模式下的操作失败相关的错误。仅当 partialFailure = true 并且操作中出现所有错误时,才返回 partialFailure。如果在操作之外发生任何错误(例如身份验证错误),我们将返回 RPC 级错误。

授权范围

需要以下 OAuth 作用域:

  • https://www.googleapis.com/auth/adwords

有关详情,请参阅 OAuth 2.0 概览

AccountLinkOperation

对帐号关联的一项更新。

JSON 表示法
{
  "updateMask": string,

  // Union field operation can be only one of the following:
  "update": {
    object (AccountLink)
  },
  "remove": string
  // End of list of possible types for union field operation.
}
字段
updateMask

string (FieldMask format)

用于确定更新中修改哪些资源字段的 FieldMask。

这是以逗号分隔的完全限定字段名称列表。示例:"user.displayName,photo"

联合字段 operation。要执行的操作。operation 只能是下列其中一项:
update

object (AccountLink)

更新操作:账号关联应具有有效的资源名称。

remove

string

移除操作:要移除的账号关联的资源名称应采用以下格式:

customers/{customerId}/accountLinks/{accountLinkId}

MutateAccountLinkResult

帐号关联结果。

JSON 表示法
{
  "resourceName": string
}
字段
resourceName

string

如果操作成功,系统会返回此错误代码。