删除 External Storage
anthropic-beta: efs-2026-10-01. Learn how to send beta headers.删除 External Storage。处于待配置或可用状态,或处于活跃状态但从未附加过的存储会被立即删除,
除非某个 Enterprise Frontier Safeguards 工作区策略列出了它。其他存储会返回 400,并说明下一步该怎么做。
对于 draining 状态的存储,该 400 可能意味着此次删除已启动了一项无法撤销的移除操作。
要进行确认,请获取该存储:如果 status.removal_started 为 true,请稍后再次删除以完成操作。
Parameters
The External Storage ID, which starts with estrg_. Through Claude Platform on AWS, storage whose provider_config.type is aws has its bucket ARN as its ID instead: arn:<partition>:s3:::<bucket_name>, where <partition> is the partition of the bucket's region.
body BetaOrganizationExternalStorageDeleteParams
Betas []AnthropicBeta OptionalHeader parameterThis endpoint is in beta: requests must send efs-2026-10-01 in this header.
This endpoint is in beta: requests must send efs-2026-10-01 in this header.
const AnthropicBetaMessageBatches2024_09_24 AnthropicBeta = "message-batches-2024-09-24"Deprecated
const AnthropicBetaPromptCaching2024_07_31 AnthropicBeta = "prompt-caching-2024-07-31"Deprecated
const AnthropicBetaPDFs2024_09_25 AnthropicBeta = "pdfs-2024-09-25"Deprecated
const AnthropicBetaTokenCounting2024_11_01 AnthropicBeta = "token-counting-2024-11-01"Deprecated
const AnthropicBetaTokenEfficientTools2025_02_19 AnthropicBeta = "token-efficient-tools-2025-02-19"Deprecated
const AnthropicBetaFilesAPI2025_04_14 AnthropicBeta = "files-api-2025-04-14"Deprecated
const AnthropicBetaExtendedCacheTTL2025_04_11 AnthropicBeta = "extended-cache-ttl-2025-04-11"Deprecated
const AnthropicBetaSkills2025_10_02 AnthropicBeta = "skills-2025-10-02"Deprecated
const AnthropicBetaCacheDiagnosis2026_04_07 AnthropicBeta = "cache-diagnosis-2026-04-07"Deprecated
const AnthropicBetaCEUserManagement2026_07_13 AnthropicBeta = "ce-user-management-2026-07-13"Deprecated
Returns
type BetaDeletedExternalStorage struct { Type: "external_storage_deleted"; ID }
Type ExternalStorageDeleted
The External Storage ID, which starts with estrg_. Through Claude Platform on AWS, storage whose provider_config.type is aws has its bucket ARN as its ID instead: arn:<partition>:s3:::<bucket_name>, where <partition> is the partition of the bucket's region.
Errors
Any method can also return the general HTTP errors.
The External Storage is active or draining, so this delete didn't erase it. The message says what to do next. On draining storage this delete may have started a removal that can't be undone: get the storage and read status.removal_started.
The External Storage can't be deleted while an Enterprise Frontier Safeguards workspace policy lists it as allowed storage.
On Claude Platform on AWS, the External Storage ID in the request is neither a bucket ARN nor an estrg_ ID, or is the estrg_ ID of AWS storage. Name AWS storage by its bucket ARN, arn:<partition>:s3:::<bucket_name>, which responses return as its id.
The request came from a Claude sandbox with restricted network access, which is not allowed to make this request. Send it from outside the sandbox, or from a sandbox with unrestricted network access.
package main
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go/v2"
"github.com/anthropics/anthropic-sdk-go/v2/option"
)
func main() {
client := anthropic.NewClient(
option.WithAPIKey("my-anthropic-api-key"),
)
betaDeletedExternalStorage, err := client.Beta.Organization.ExternalStorage.Delete(
context.TODO(),
"external_storage_id",
anthropic.BetaOrganizationExternalStorageDeleteParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", betaDeletedExternalStorage.ID)
}{
"id": "estrg_01SDCCSbTxrXDpWc1phhtcfK",
"type": "external_storage_deleted"
}Returns Examples
{
"id": "estrg_01SDCCSbTxrXDpWc1phhtcfK",
"type": "external_storage_deleted"
}