- [HTTP request](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances/patch#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances/patch#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances/patch#body.request_body)
- [Response body](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances/patch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances/patch#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances/patch#body.aspect_1)

Updates a plugin instance in the API hub. The following fields in the `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances#PluginInstance` can be updated currently:

- `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances#PluginInstance.FIELDS.display_name`
- \[schedule_cron_expression\]\[PluginInstance.actions.schedule_cron_expression\]

The `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances/patch#body.QUERY_PARAMETERS.update_mask` should be used to specify the fields being updated.

To update the `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances#PluginInstance.FIELDS.auth_config` and `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances#PluginInstance.FIELDS.additional_config` of the plugin instance, use the `instances.applyConfig` method.

### HTTP request

`PATCH https://apihub.googleapis.com/v1/{pluginInstance.name=projects/*/locations/*/plugins/*/instances/*}`

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

### Path parameters

| Parameters ||
|---|---|
| `pluginInstance.name` | `string` Identifier. The unique name of the plugin instance resource. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}` |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Optional. The list of fields to update. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances#PluginInstance`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/projects.locations.plugins.instances#PluginInstance`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/apihub.readwrite`
- `
  https://www.googleapis.com/auth/cloud-platform`

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:

- `apihub.plugininstances.update`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).