Claude Platform Docs

Obtener clave externa

$client->beta->organization->externalKeys->retrieve(string externalKeyID): ExternalKey
GET/v1/organizations/external_keys/{external_key_id}

Recupera una sola configuración de clave externa de la organización del llamador por ID.

Parameters
externalKeyID: string⁠Path parameter

ID of the External Key.

Returns
class ExternalKey { $type = 'external_key'; $id; $attachment; /* 6 more */ }
"external_key" type
string id

Identifier of the external key config: a tagged ID prefixed ekey_, or, on Claude Platform on AWS, an AWS KMS key's ARN.

Attachment attachment

Whether any workspace uses this config to encrypt its data — counting live and archived workspaces (an archived workspace's data remains encrypted under the config), excluding deleted ones. Only an attached config is used by the encryption path; an unattached config is inert and can be deleted.

\Datetime createdAt
?string displayName

Human-friendly display name. Null if none was set.

string geo

Data residency geo. Selects the region this key is used in.

ProviderConfig providerConfig

KMS provider identity and auth coordinates.

\Datetime updatedAt
?string userProfileID

ID of the user profile the key is bound to, or null if the key is not bound to one. A key bound to a user profile can only be attached to a Workspace that has the same user profile. A key that isn't bound can be attached to a Workspace whatever its user profile.

Obtener clave externa
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Anthropic\Client;

$client = new Client(apiKey: 'my-anthropic-api-key');

$betaExternalKey = $client->beta->organization->externalKeys->retrieve(
  'external_key_id'
);

var_dump($betaExternalKey);
Returns Examples
Response 200
{
  "id": "ekey_01SDCCSbTxrXDpWc1phhtcfK",
  "attachment": {
    "type": "attached"
  },
  "created_at": "2024-10-30T23:58:27.427722Z",
  "display_name": "prod-us-key",
  "geo": "us",
  "provider_config": {
    "kms_arn": "arn:aws:kms:us-east-1:111122223333:key/abcd1234-5678-90ab-cdef-000011112222",
    "type": "aws",
    "region": "us-east-1",
    "role_arn": "arn:aws:iam::111122223333:role/anthropic-cmek"
  },
  "type": "external_key",
  "updated_at": "2024-10-30T23:58:27.427722Z",
  "user_profile_id": "uprof_01SDCCSbTxrXDpWc1phhtcfK"
}