# Method: folders.locations.securityHealthAnalyticsCustomModules.patch

- [HTTP request](https://docs.cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules/patch#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules/patch#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules/patch#body.request_body)
- [Response body](https://docs.cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules/patch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules/patch#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules/patch#body.aspect_1)
- [Try it!](https://docs.cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules/patch#try-it)

Updates the `https://docs.cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules#SecurityHealthAnalyticsCustomModule` under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name and custom configuration of a module is supported on resident modules only.

### HTTP request

`PATCH https://securitycentermanagement.googleapis.com/v1/{securityHealthAnalyticsCustomModule.name=folders/*/locations/*/securityHealthAnalyticsCustomModules/*}`

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

### Path parameters

| Parameters ||
|---|---|
| `securityHealthAnalyticsCustomModule.name` | `string` Identifier. The full resource name of the custom module, in one of the following formats: - `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` - `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Optional. Required. The fields to update. The following values are valid: - `customConfig` - `enablementState` If you omit this field or set it to the wildcard value `*`, then all eligible fields are updated. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |
| `validateOnly` | `boolean` Optional. When set to `true`, the request will be validated (including IAM checks), but no module will be updated. An `OK` response indicates that the request is valid, while an error response indicates that the request is invalid. If the request is valid, a subsequent request to update the module could still fail for one of the following reasons: - The state of your cloud resources changed; for example, you lost a required IAM permission - An error occurred during creation of the module Defaults to `false`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules#SecurityHealthAnalyticsCustomModule`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/security-command-center/docs/reference/security-center-management/rest/v1/folders.locations.securityHealthAnalyticsCustomModules#SecurityHealthAnalyticsCustomModule`.

### Authorization scopes

Requires the following OAuth scope:

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

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

### IAM Permissions

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

- `securitycentermanagement.securityHealthAnalyticsCustomModules.update`

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