Claude Platform Docs

外部キー

外部キーを作成
organization.external_keys.create(**kwargs) -> ExternalKey
POST/v1/organizations/external_keys

呼び出し元の組織が所有する外部キー設定を作成します。

外部キー一覧を取得
organization.external_keys.list(**kwargs) -> SyncPageCursor[ExternalKey]
GET/v1/organizations/external_keys

呼び出し元の組織内の外部キー設定を一覧表示します。

外部キーを取得
organization.external_keys.retrieve(external_key_id) -> ExternalKey
GET/v1/organizations/external_keys/{external_key_id}

呼び出し元の組織内の単一の外部キー設定をIDで取得します。

外部キーを更新
organization.external_keys.update(external_key_id, **kwargs) -> ExternalKey
POST/v1/organizations/external_keys/{external_key_id}

外部キー設定を部分的に更新します。省略されたフィールドは変更されません。

外部キーを削除
organization.external_keys.delete(external_key_id) -> ExternalKeyDeleteResponse
DELETE/v1/organizations/external_keys/{external_key_id}

外部キー設定を削除します。

外部キーを検証
organization.external_keys.validate(external_key_id) -> ExternalKeyValidateResponse
POST/v1/organizations/external_keys/{external_key_id}/validate

顧客のKMSに対して外部キー設定を検証します。

Models
class AWSExternalKeyConfig: type: "aws"; kms_arn; region
type: Literal["aws"]
kms_arn: str

Full ARN of the AWS KMS key. On Claude Platform on AWS the key must be a single-Region key in your organization's own AWS account; cross-account keys, multi-Region keys, and alias ARNs are rejected.

maxLength2048
region: Optional[str]

AWS region. Derived from kms_arn if omitted.

class AzureExternalKeyConfig: type: "azure"; key_name; tenant_id; ... # 2 more
type: Literal["azure"]
key_name: str

Name of the key within the vault.

tenant_id: str

Azure AD tenant ID.

vault_uri: str

Key Vault data-plane URI — https://{vault-name}.vault.azure.net or https://{hsm-name}.managedhsm.azure.net.

client_id: Optional[str]

Azure AD application (client) ID. Omit to use Anthropic's multitenant app. Provide only if using a single-tenant app registration in the customer's directory.

class AzureExternalKeyConfigParam: type: "azure"; key_name; tenant_id; ... # 2 more

Azure Key Vault provider configuration.

type: Literal["azure"]
key_name: str

Name of the key within the vault.

tenant_id: str

Azure AD tenant ID.

vault_uri: str

Key Vault data-plane URI — https://{vault-name}.vault.azure.net or https://{hsm-name}.managedhsm.azure.net.

client_id: Optional[str]

Azure AD application (client) ID. Omit to use Anthropic's multitenant app. Provide only if using a single-tenant app registration in the customer's directory.

class ExternalKey: type: "external_key"; id; attachment; ... # 5 more

CMEK external key config belonging to the caller's organization.

Configs are organization-scoped. Workspaces attach to a config; once any workspace references it, the provider fields become effectively immutable (existing encrypted data needs the config for decrypt).

class ExternalKeyAttachedAttachment: type: "attached"
type: Literal["attached"]
defaultattached
class ExternalKeyUnattachedAttachment: type: "unattached"
type: Literal["unattached"]
defaultunattached
class GCPExternalKeyConfig: type: "gcp"; key_name
type: Literal["gcp"]
key_name: str

Full resource name of the Cloud KMS key.

class ExternalKeyDeleteResponse: type: "external_key_deleted"; id
type: Literal["external_key_deleted"]
defaultexternal_key_deleted
id: str

ID of the deleted External Key.

class ExternalKeyValidateResponse: type: "external_key_validation"; error; status

Result of a validation roundtrip against the customer's KMS.

HTTP 200 for both outcomes — the operation completed; status says whether the key works.

type: Literal["external_key_validation"]
defaultexternal_key_validation
error: Optional[str]

Error message when status is failure. Null otherwise.

status: Literal["failure", "success"]

success — encrypt/decrypt roundtrip succeeded. failure — the roundtrip failed or timed out; see error.

One of the following:
"failure"
"success"