Claude Platform Docs

数据控制

获取 Google-Managed 数据控制
beta.user_profiles.providers.google.data_controls.retrieve(user_profile_id, **kwargs) -> BetaGoogleManagedDataControls
GET/v1/user_profiles/{user_profile_id}/providers/google/data_controls
Requires anthropic-beta: google-managed-data-controls-2026-09-01. Learn how to send beta headers.

获取该配置文件用于 Google Cloud's Agent Platform 上的 Claude 的加密密钥和存储桶,以及每个区域的状态。

更新 Google-Managed 数据控制
beta.user_profiles.providers.google.data_controls.update(user_profile_id, **kwargs) -> BetaGoogleManagedDataControls
POST/v1/user_profiles/{user_profile_id}/providers/google/data_controls
Requires anthropic-beta: google-managed-data-controls-2026-09-01. Learn how to send beta headers.

开启或关闭某项控制,或更改某个区域所设置的密钥或存储桶。您未包含的控制和区域将保持不变。

Models
class BetaGoogleManagedBucketReference { bucket_name, project_number }

A Cloud Storage bucket, named by the project that holds it and by its own name.

bucket_name: String

The bucket's Cloud Storage name.

project_number: String

The number of the Google Cloud project that holds the bucket, in decimal.

type BetaGoogleManagedCMEKControl = BetaGoogleManagedCMEKDisabled | BetaGoogleManagedCMEKEnabled

The customer-managed encryption key control, discriminated by type.

One of the following:

How to set the cmek control, discriminated by type.

One of the following:
class BetaGoogleManagedCMEKDisabledParams { type: :disabled }

Turns the control off and removes every region's key.

type: :disabled
class BetaGoogleManagedCMEKEnabledParams { type: :enabled, external_key_ids }

Turns the control on, or changes its keys while it is on.

type: :enabled
external_key_ids: optional Hash[Symbol, String | nil] | nil

The External Key to use in each region, keyed by region code, such as us or eu. An External Key ID (ekey_...) sets that region's key, null removes it, and a region you leave out keeps its key. While the control is on, at least one region must have a key.

class BetaGoogleManagedCMEKDisabled { type: :disabled, retired_keys }

The control is off and has no keys.

type: :disabled
retired_keys: Array[BetaGoogleManagedRetiredKey { expires_at, external_key_id, region }]

Keys that a region has retired, earliest expires_at first.

expires_at: Time

When this entry is removed, in RFC 3339 format.

formatdate-time
external_key_id: String

The ID of the retired External Key (ekey_...).

region: String

The code of the region that retired the key.

class BetaGoogleManagedCMEKDisabledParams { type: :disabled }

Turns the control off and removes every region's key.

type: :disabled
class BetaGoogleManagedCMEKEnabled { type: :enabled, external_key_ids, retired_keys, status }

The control is on and has a key for at least one region.

class BetaGoogleManagedCMEKEnabledParams { type: :enabled, external_key_ids }

Turns the control on, or changes its keys while it is on.

type: :enabled
external_key_ids: optional Hash[Symbol, String | nil] | nil

The External Key to use in each region, keyed by region code, such as us or eu. An External Key ID (ekey_...) sets that region's key, null removes it, and a region you leave out keeps its key. While the control is on, at least one region must have a key.

class BetaGoogleManagedCMEKRegionActive { type: :active, effective_external_key_id, error, 2 more }

The configured key passed validation, and the region applies it.

type: :active
effective_external_key_id: String | nil

The ID of the External Key that the region applies now (ekey_...). While a replacement key is pending or failed, this is the previous key. null when the region applies no key.

error: String | nil

Why Google Cloud KMS refused the region's latest use of the key. null when the region has no refusal to report. A null does not mean that the key works.

last_checked_at: Time | nil

When the region last got a successful answer from Google Cloud KMS for the key, in RFC 3339 format. null when it has none to report.

formatdate-time
validated_at: Time

When the status last became active, in RFC 3339 format.

formatdate-time
class BetaGoogleManagedCMEKRegionFailed { type: :failed, effective_external_key_id, error }

The region stopped retrying validation before the configured key passed. To restart validation, send the region a key again. It can be the same key.

type: :failed
effective_external_key_id: String | nil

The ID of the External Key that the region applies now (ekey_...). While a replacement key is pending or failed, this is the previous key. null when the region applies no key.

error: String

Why the region cannot use the configured key.

class BetaGoogleManagedCMEKRegionNotConfigured { type: :not_configured, effective_external_key_id }

No key is set for this region.

type: :not_configured
effective_external_key_id: String | nil

The ID of the External Key that the region applies now (ekey_...). While a replacement key is pending or failed, this is the previous key. null when the region applies no key.

class BetaGoogleManagedCMEKRegionPending { type: :pending, effective_external_key_id, error }

The region is validating the configured key, or the key has passed validation and the region has not started to apply it.

type: :pending
effective_external_key_id: String | nil

The ID of the External Key that the region applies now (ekey_...). While a replacement key is pending or failed, this is the previous key. null when the region applies no key.

error: String | nil

Why the latest validation attempt failed. null when no attempt has failed.

One region's status for the cmek control, discriminated by type.

One of the following:
class BetaGoogleManagedCMEKRegionSuspended { type: :suspended, effective_external_key_id }

Anthropic has withdrawn or paused its approval of customer-managed keys for this profile, so the region does not apply the control.

type: :suspended
effective_external_key_id: String | nil

The ID of the External Key that the region applies now (ekey_...). While a replacement key is pending or failed, this is the previous key. null when the region applies no key.

class BetaGoogleManagedDataControls { type: :google_managed_data_controls, bucket_label_value, cmek, 3 more }

A user profile's encryption key and storage bucket settings for Claude on Google Cloud's Agent Platform. Every user profile has one of these objects. You can read and update it, but not create or delete it. Keys and buckets are set for each region. A request's region depends on the Google endpoint it is sent to: us is the US multi-region endpoint and the regional endpoint of every location whose name starts with us-, eu is the EU multi-region endpoint and the regional endpoint of every location whose name starts with europe-, sg is the asia-southeast1 regional endpoint, and global is the global endpoint, wherever Google serves the request. Anthropic may add regions.

class BetaGoogleManagedRetiredBucket { bucket_name, expires_at, project_number, region }

A bucket that a region has retired. Until expires_at, keep the bucket and Anthropic's access to it as they were when the bucket passed verification.

bucket_name: String

The bucket's Cloud Storage name.

expires_at: Time

When this entry is removed, in RFC 3339 format.

formatdate-time
project_number: String

The number of the Google Cloud project that holds the bucket, in decimal.

region: String

The code of the region that retired the bucket.

class BetaGoogleManagedRetiredKey { expires_at, external_key_id, region }

A key that a region has retired. Keep the key usable until expires_at.

expires_at: Time

When this entry is removed, in RFC 3339 format.

formatdate-time
external_key_id: String

The ID of the retired External Key (ekey_...).

region: String

The code of the region that retired the key.

class BetaGoogleManagedStorageBucket { bucket_name, kms_key_name, location, 2 more }

The bucket configured for a region.

bucket_name: String

The bucket's Cloud Storage name.

kms_key_name: String | nil

The resource name of the Cloud KMS key that the bucket encrypts objects under by default. null until the region has confirmed the bucket, and when the bucket has no default key.

location: String | nil

The bucket's location, as Cloud Storage reports it. null until the region has confirmed the bucket.

project_id: String | nil

The ID of the project that holds the bucket. null until the region has confirmed the bucket.

project_number: String

The number of the Google Cloud project that holds the bucket, in decimal.

type BetaGoogleManagedStorageControl = BetaGoogleManagedStorageDisabled | BetaGoogleManagedStorageEnabled

The customer-owned storage control, discriminated by type.

One of the following:

How to set the storage control, discriminated by type.

One of the following:
class BetaGoogleManagedStorageDisabled { type: :disabled, retired_buckets }

The control is off and has no buckets.

type: :disabled
retired_buckets: Array[BetaGoogleManagedRetiredBucket { bucket_name, expires_at, project_number, region }]

Buckets that a region has retired, earliest expires_at first.

bucket_name: String

The bucket's Cloud Storage name.

expires_at: Time

When this entry is removed, in RFC 3339 format.

formatdate-time
project_number: String

The number of the Google Cloud project that holds the bucket, in decimal.

region: String

The code of the region that retired the bucket.

class BetaGoogleManagedStorageDisabledParams { type: :disabled }

Turns the control off and removes every region's bucket.

type: :disabled
class BetaGoogleManagedStorageEnabled { type: :enabled, buckets, retired_buckets, status }

The control is on and has a bucket for at least one region.

class BetaGoogleManagedStorageEnabledParams { type: :enabled, buckets }

Turns the control on, or changes its buckets while it is on.

type: :enabled
buckets: optional Hash[Symbol, BetaGoogleManagedBucketReference { bucket_name, project_number } | nil]

The bucket to use in each region, keyed by region code, such as us or eu. An object with project_number and bucket_name sets that region's bucket, null removes it, and a region you leave out keeps its bucket. A bucket can serve only one region. While the control is on, at least one region must have a bucket.

bucket_name: String

The bucket's Cloud Storage name.

project_number: String

The number of the Google Cloud project that holds the bucket, in decimal.

class BetaGoogleManagedStorageFailedCheck { check, message, role }

One check that a verification attempt failed.

class BetaGoogleManagedStorageRegionActive { type: :active, effective_bucket, failed_checks, validated_at }

The configured bucket passed verification, and the region applies it.

class BetaGoogleManagedStorageRegionFailed { type: :failed, effective_bucket, failed_checks }

The region stopped retrying verification before the configured bucket passed. To restart verification, send the region a bucket again. It can be the same bucket.

class BetaGoogleManagedStorageRegionNotConfigured { type: :not_configured, effective_bucket }

No bucket is set for this region.

type: :not_configured
effective_bucket: BetaGoogleManagedBucketReference { bucket_name, project_number } | nil

The bucket that the region applies now. While a replacement bucket is pending or failed, this is the previous bucket. null when the region applies no bucket.

bucket_name: String

The bucket's Cloud Storage name.

project_number: String

The number of the Google Cloud project that holds the bucket, in decimal.

class BetaGoogleManagedStorageRegionPending { type: :pending, effective_bucket, failed_checks }

The region is verifying the configured bucket.

One region's status for the storage control, discriminated by type.

One of the following:
class BetaGoogleManagedStorageRegionSuspended { type: :suspended, effective_bucket }

Anthropic has withdrawn or paused its approval of customer-owned storage for this profile, so the region does not apply the control.

type: :suspended
effective_bucket: BetaGoogleManagedBucketReference { bucket_name, project_number } | nil

The bucket that the region applies now. While a replacement bucket is pending or failed, this is the previous bucket. null when the region applies no bucket.

bucket_name: String

The bucket's Cloud Storage name.

project_number: String

The number of the Google Cloud project that holds the bucket, in decimal.