Initializes a location-level encryption key specification. An error will be thrown if the location has resources already created before the initialization. Once the encryption specification is initialized at a location, it is immutable and all newly created resources under the location will be encrypted with the existing specification.
HTTP request
POST https://{endpoint}/v2/{encryptionSpec.name=projects/*/locations/*/encryptionSpec}:initialize
Required. The name of customer-managed encryption key that is used to secure a resource and its sub-resources. If empty, the resource is secured by the default Google encryption key. Only the key in the same location as this resource is allowed to be used for encryption. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}
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-03-05 UTC."],[[["This endpoint initializes a location-level encryption key specification, which is immutable once set, for all newly created resources under that location."],["The HTTP request is a POST method to a specific endpoint with a predefined format using gRPC Transcoding syntax."],["The request requires an `encryptionSpec.name` path parameter in a specified format, indicating the resource name of the encryption key specification, and requires the `encryptionSpec.kmsKey` inside the body to be set."],["The `encryptionSpec.kmsKey` must be a customer-managed key in the same location as the resource, otherwise the default Google encryption key is used."],["Successful requests return an instance of `Operation`, and proper OAuth scopes are needed for authorization, either `https://www.googleapis.com/auth/cloud-platform` or `https://www.googleapis.com/auth/dialogflow`."]]],[]]