# Method: accounts.channelPartnerLinks.patch

- [HTTP request](https://docs.cloud.google.com/channel/docs/reference/rest/v1alpha1/accounts.channelPartnerLinks/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/channel/docs/reference/rest/v1alpha1/accounts.channelPartnerLinks/patch#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/channel/docs/reference/rest/v1alpha1/accounts.channelPartnerLinks/patch#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/channel/docs/reference/rest/v1alpha1/accounts.channelPartnerLinks/patch#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/channel/docs/reference/rest/v1alpha1/accounts.channelPartnerLinks/patch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/channel/docs/reference/rest/v1alpha1/accounts.channelPartnerLinks/patch#body.aspect)
- [Try it!](https://docs.cloud.google.com/channel/docs/reference/rest/v1alpha1/accounts.channelPartnerLinks/patch#try-it)

Updates a channel partner link. Distributors call this method to change a link's status. For example, to suspend a partner link. You must be a distributor to call this method.

Possible error codes:

- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT:
  - Required request parameters are missing or invalid.
  - Link state cannot change from invited to active or suspended.
  - Cannot send resellerCloudIdentityId, invite_url, or name in update mask.
- NOT_FOUND: ChannelPartnerLink resource not found.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The updated `https://docs.cloud.google.com/channel/docs/reference/rest/v1alpha1/accounts.channelPartnerLinks#ChannelPartnerLink` resource.

### HTTP request

`PATCH https://cloudchannel.googleapis.com/v1alpha1/{name=accounts/*/channelPartnerLinks/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the channel partner link to cancel. Name uses the format: accounts/{account_id}/channelPartnerLinks/{id} where {id} is the Cloud Identity ID of the partner. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "channelPartnerLink": { object (`https://docs.cloud.google.com/channel/docs/reference/rest/v1alpha1/accounts.channelPartnerLinks#ChannelPartnerLink`) }, "updateMask": string } ``` |

| Fields ||
|---|---|
| `channelPartnerLink` | ``object (`https://docs.cloud.google.com/channel/docs/reference/rest/v1alpha1/accounts.channelPartnerLinks#ChannelPartnerLink`)`` Required. The channel partner link to update. Only channelPartnerLink.link_state is allowed for updates. |
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Required. The update mask that applies to the resource. The only allowable value for an update mask is channelPartnerLink.link_state. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/channel/docs/reference/rest/v1alpha1/accounts.channelPartnerLinks#ChannelPartnerLink`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/apps.order`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).