Updating OCI Key Attributes
Use the patch /v1/cckm/oci/keys/{id}
API to update the OCI key attributes such as defined tags, display name, and free form tags.
Syntax
curl -k '<IP>/api/v1/cckm/oci/keys/{id}' -X PATCH 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' -H 'accept: application/json' --data-binary $'{\n \n "freeform_tags": {\n "Department": "Finance"\n }\n}' --compressed
Here, {id}
is the resource ID of the OCI key.
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authentication token. |
defined_tags | JSON | Defined tags for the key. A tag consists of a namespace, key, and value. |
display_name | string | Name for the key. |
freeform_tags | JSON | Freeform tags for the key. A freeform tag is a simple key-value pair with no predefined name, type, or namespace. |
name (optional) | string | Name for the OCI key. Applicable only to OCI keys. |
policy (optiona) | string | Policy for the OCI key. Applicable only to OCI keys. |
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/oci/keys/90671f17-28ff-4f93-86dc-ff08983469e7' -X PATCH -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiIxYzU1ZWY0Yi01MThjLTQ5ZmMtODRmMy1mYjk4MGY4YTQ3ODQiLCJzdWIiOiJsb2NhbHwyZjBmZWViNC02MjkwLTQ4ZWQtYmU1Yy0wYmU4NTVkMzE4NzMiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiODU3ZDEyYjItNjljZi00OWY1LThkYjktMjI0NWMwODNiODg5Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImQ2MzEyMzg3LWVjNWEtNGZiNC05ODMzLTNkY2RmYTUzYThmNyIsImlhdCI6MTY0Mzg2MjM0OSwiZXhwIjoxNjQzODYyNjQ5fQ.-rnMB2EbfmeovnohfNMkR4hDTIREpd2wDbPKUn5_8Gg' -H 'Content-Type: application/json' -H 'accept: application/json' --data-binary $'{\n \n "freeform_tags": {\n "Department": "Finance"\n }\n}' --compressed
Example Response
{
"id": "90671f17-28ff-4f93-86dc-ff08983469e7",
"uri": "kylo:kylo:cckm:oci-key:testocikeypkv-90671f17-28ff-4f93-86dc-ff08983469e7",
"account": "kylo:kylo:admin:accounts:kylo",
"createdAt": "2022-02-03T04:19:01.876714Z",
"updatedAt": "2022-02-03T04:26:40.508052712Z",
"vault_id": "5e9ee2f1-1b90-4b7d-b319-2b0848e78e75",
"tenancy": "gemaltoproductdev",
"region": "us-ashburn-1",
"key_material_origin": "native",
"refreshed_at": "2022-02-03T04:19:41.875578Z",
"oci_params": {
"compartment_id": "ocid1.tenancy.oc1..aaaaaaaadixb52q2mvlsn634ql5aaal6hb2vg7audpd4d4mcf5zluymff6sq",
"current_key_version": "ocid1.keyversion.oc1.iad.b5q6uxdhaahdg.avevmh5vpnaaa.abuwcljtj23rs56toawxq7tsfu2w5wsg3j7sh72yqdej2dr4hwb5lrnf7tna",
"display_name": "TestOciKeypkv",
"key_id": "ocid1.key.oc1.iad.b5q6uxdhaahdg.abuwcljt5pb3bx4orok7zf7nz5buojyovsqi45jvhhuc2cpqh4vglo5zsuaa",
"algorithm": "AES",
"length": 32,
"lifecycle_state": "UPDATING",
"time_created": "2022-02-03T04:19:01.547Z",
"vault_name": "cckmqa-automation",
"defined_tags": {},
"freeform_tags": {
"Department": "Finance"
},
"protection_mode": "SOFTWARE",
"is_primary": true
}
}
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.