Provisions a CMEK key for use in a location of a customer's project. This method will also conduct location validation on the provided cmekConfig to make sure the key is valid and can be used in the selected location.
Required. The name of the CmekConfig of the form projects/{project}/locations/{location}/cmekConfig or projects/{project}/locations/{location}/cmekConfigs/{cmekConfig}.
Query parameters
Parameters
setDefault
boolean
Set the following CmekConfig as the default to be used for child resources if one is not specified.
Request body
The request body contains an instance of CmekConfig.
Response body
If successful, the response body contains an instance of Operation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[[["\u003cp\u003eThis endpoint allows you to provision a Customer-Managed Encryption Key (CMEK) for use within a specified location of a customer's project, validating its usability in that location.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePATCH\u003c/code\u003e method, which uses gRPC Transcoding syntax, updates a \u003ccode\u003eCmekConfig\u003c/code\u003e resource identified by its name within the URL path.\u003c/p\u003e\n"],["\u003cp\u003eYou can use the \u003ccode\u003esetDefault\u003c/code\u003e query parameter to designate the updated \u003ccode\u003eCmekConfig\u003c/code\u003e as the default for any child resources within the project location.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires an instance of \u003ccode\u003eCmekConfig\u003c/code\u003e within the request body, and successful operations return an instance of \u003ccode\u003eOperation\u003c/code\u003e in the response body.\u003c/p\u003e\n"],["\u003cp\u003eUpdating the \u003ccode\u003eCmekConfig\u003c/code\u003e requires the \u003ccode\u003ediscoveryengine.cmekConfigs.update\u003c/code\u003e IAM permission and the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.cmekConfigs.patch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n\nProvisions a CMEK key for use in a location of a customer's project. This method will also conduct location validation on the provided cmekConfig to make sure the key is valid and can be used in the selected location.\n\n### HTTP request\n\n`PATCH https://discoveryengine.googleapis.com/v1beta/{config.name=projects/*/locations/*/cmekConfigs/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [CmekConfig](/generative-ai-app-builder/docs/reference/rest/v1beta/projects.locations.cmekConfigs#CmekConfig).\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/generative-ai-app-builder/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `discoveryengine.cmekConfigs.update`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]