API Keys (iam/v2)

Update an API Key

General Availability

Make a request to update an API key.

patch/iam/v2/api-keys/{id}

Path parameters

idstring required

The unique identifier for the API key.

Request body

api_version'iam/v2'

APIVersion defines the schema version of this representation of a resource.

kind'ApiKey'

Kind defines the object this REST resource represents.

idstring

ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object kinds or objects of the same kind within a different scope/namespace ("space").

Example request

{
  "id": "dlz-f3a90de",
  "metadata": {
    "self": "https://api.confluent.cloud/iam/v2/api-keys/ak-12345",
    "resource_name": "crn://confluent.cloud/organization=9bb441c4-edef-46ac-8a41-c49e44a3fd9a/api-key=ak-12345",
    "created_at": "2006-01-02T15:04:05-07:00",
    "updated_at": "2006-01-02T15:04:05-07:00",
    "deleted_at": "2006-01-02T15:04:05-07:00"
  },
  "spec": {
    "secret": "R15hoiDIq8Nxu/lY4mPO3DwAVIfU5W7OI+efsB607mLgHTnVW5XJGVqX2ysDx987",
    "display_name": "CI kafka access key",
    "description": "This API key provides kafka access to cluster x",
    "expires_at": "2026-01-01T00:00:00Z"
  }
}

Response

API Key.

api_version'iam/v2' required

APIVersion defines the schema version of this representation of a resource.

kind'ApiKey' required

Kind defines the object this REST resource represents.

idstring required

ID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object kinds or objects of the same kind within a different scope/namespace ("space").

Example response

{
  "id": "dlz-f3a90de",
  "metadata": {
    "self": "https://api.confluent.cloud/iam/v2/api-keys/ak-12345",
    "resource_name": "crn://confluent.cloud/organization=9bb441c4-edef-46ac-8a41-c49e44a3fd9a/api-key=ak-12345",
    "created_at": "2006-01-02T15:04:05-07:00",
    "updated_at": "2006-01-02T15:04:05-07:00",
    "deleted_at": "2006-01-02T15:04:05-07:00"
  },
  "spec": {
    "secret": "R15hoiDIq8Nxu/lY4mPO3DwAVIfU5W7OI+efsB607mLgHTnVW5XJGVqX2ysDx987",
    "display_name": "CI kafka access key",
    "description": "This API key provides kafka access to cluster x",
    "expires_at": "2026-01-01T00:00:00Z",
    "owner": {
      "id": "u-a83k9b",
      "related": "https://api.confluent.cloud/iam/v2/users/u-a83k9b",
      "resource_name": "https://api.confluent.cloud/user=u-a83k9b"
    },
    "resource": {
      "id": "lkc-c29js0",
      "related": "https://api.confluent.cloud/cmk/v2/clusters/lkc-c29js0",
      "resource_name": "https://api.confluent.cloud/organization=9bb441c4-edef-46ac-8a41-c49e44a3fd9a/environment=env-abc123/cloud-cluster=lkc-c29js0"
    }
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.