Disabling a Version of a Google Cloud Key
Use the post /v1/cckm/google/keys/{id}/versions/{versionID}/disable
API to disable a particular version of a Google Cloud key with the given ID. The state of a key version changes from ENABLED
to DISABLED
.
Syntax
curl -k '<IP>/api/v1/cckm/google/keys/{id}/versions/{versionID}/disable' -X POST -H 'Authorization: Bearer AUTHTOKEN' -H 'accept: application/json' --compressed
Here, {id}
represents the resource ID of the parent Google Cloud key and {versionID}
represents the resource ID of the key version to be disabled.
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/google/keys/ecc73bfb-7605-4263-abb8-84fe431d35fb/versions/e2f79e23-749d-4579-bef1-5777a4651e9e/disable' -X POST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiI0MmFmZDExNy02YzllLTRhNGUtOTAwYS1lYjlhNDNjYWE5ZDIiLCJzdWIiOiJsb2NhbHwzMTI5ODdkMS0wOWNiLTQxZTEtOThmNy1jZjRhNzgwNTZiMTMiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNDVmOWE3NWUtMzI1NC00NWJkLWE0NzYtOWU2NWUyNjdmNGVkIiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6IjdiYzNkOWM4LWRiYTQtNDVmMy05YWNiLWI3NGM2MzQyYzYyMCIsImlhdCI6MTYxNDc1MTg1MSwiZXhwIjoxNjE0NzUyMTUxfQ.ahdxfM7-WA4u7sotHy6qelc9MkoZytst7oZWsvE7Cr0' --compressed
Example Response
{
"id": "e2f79e23-749d-4579-bef1-5777a4651e9e",
"uri": "kylo:kylo:cckm:gcp-key-versions:e2f79e23-749d-4579-bef1-5777a4651e9e",
"account": "kylo:kylo:admin:accounts:kylo",
"createdAt": "2021-05-05T06:32:29.029189Z",
"updatedAt": "2021-05-05T08:22:03.160587755Z",
"parent_key_name": "projects/gemalto-kyloeng/locations/global/keyRings/demo-key-ring/cryptoKeys/doc-test",
"parent_key_id": "ecc73bfb-7605-4263-abb8-84fe431d35fb",
"key_ring_name": "projects/gemalto-kyloeng/locations/global/keyRings/demo-key-ring",
"version": 2,
"is_primary": true,
"key_material_origin": "native",
"deleted": false,
"gone": false,
"gcp_key_version_params": {
"name": "projects/gemalto-kyloeng/locations/global/keyRings/demo-key-ring/cryptoKeys/doc-test/cryptoKeyVersions/2",
"state": "DISABLED",
"protectionLevel": "SOFTWARE",
"algorithm": "GOOGLE_SYMMETRIC_ENCRYPTION",
"createTime": "2021-05-05T06:33:47.319389Z",
"generateTime": "2021-05-05T06:33:47.319389Z",
"destroyEventTime": null
}
}
The sample output displays that the version with the ID e2f79e23-749d-4579-bef1-5777a4651e9e
of a Google Cloud key with the ID ecc73bfb-7605-4263-abb8-84fe431d35fb
has been DISABLED
.
To enable a DISABLED
version, run the /v1/cckm/google/keys/{id}/versions/{versionID}/enable
API. Refer to Enabling a Version of a Google Cloud Key.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.