Claude Platform Docs

Clés externes

Créer une clé externe
BetaExternalKey beta().organization().externalKeys().create(params, requestOptions = RequestOptions.none())
POST/v1/organizations/external_keys

Créez une configuration de clé externe appartenant à l'organisation de l'appelant.

Lister les clés externes
ExternalKeyListPage beta().organization().externalKeys().list(params = ExternalKeyListParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/external_keys

Listez les configurations de clés externes de l'organisation de l'appelant.

Obtenir une clé externe
BetaExternalKey beta().organization().externalKeys().retrieve(params = ExternalKeyRetrieveParams.none(), requestOptions = RequestOptions.none())
GET/v1/organizations/external_keys/{external_key_id}

Récupérez une configuration de clé externe unique de l'organisation de l'appelant par son ID.

Mettre à jour une clé externe
BetaExternalKey beta().organization().externalKeys().update(params = ExternalKeyUpdateParams.none(), requestOptions = RequestOptions.none())
POST/v1/organizations/external_keys/{external_key_id}

Mettez à jour partiellement une configuration de clé externe. Les champs omis restent inchangés.

Supprimer une clé externe
ExternalKeyDeleteResponse beta().organization().externalKeys().delete(params = ExternalKeyDeleteParams.none(), requestOptions = RequestOptions.none())
DELETE/v1/organizations/external_keys/{external_key_id}

Supprimez une configuration de clé externe.

Valider une clé externe
ExternalKeyValidateResponse beta().organization().externalKeys().validate(params = ExternalKeyValidateParams.none(), requestOptions = RequestOptions.none())
POST/v1/organizations/external_keys/{external_key_id}/validate

Validez une configuration de clé externe auprès du KMS du client.

Models
class BetaAwsExternalKeyConfig { type = "aws"; kmsArn; region; roleArn; }
JsonValue type = "aws"
String kmsArn

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
Optional<String> region

AWS region. Derived from kms_arn if omitted.

Optional<String> roleArn⁠Deprecated

IAM role ARN. Deprecated — Anthropic reaches the KMS key through its own intermediate role (or, on Claude Platform on AWS, with credentials AWS issues for the Workspace); this field is ignored.

class BetaAzureExternalKeyConfig { type = "azure"; keyName; tenantId; /* 2 more */ }
JsonValue type = "azure"
String keyName

Name of the key within the vault.

String tenantId

Azure AD tenant ID.

String vaultUri

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

Optional<String> clientId

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 BetaAzureExternalKeyConfigParam { type = "azure"; keyName; tenantId; /* 2 more */ }

Azure Key Vault provider configuration.

JsonValue type = "azure"
String keyName

Name of the key within the vault.

String tenantId

Azure AD tenant ID.

String vaultUri

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

Optional<String> clientId

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 BetaExternalKey { 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 BetaExternalKeyAttachedAttachment { type = "attached"; }
JsonValue type = "attached"
class BetaExternalKeyUnattachedAttachment { type = "unattached"; }
JsonValue type = "unattached"
class BetaGcpExternalKeyConfig { type = "gcp"; keyName; }
JsonValue type = "gcp"
String keyName

Full resource name of the Cloud KMS key.