更新保管库
anthropic-beta: managed-agents-2026-04-01. Learn how to send beta headers.更新保管库
Parameters
Unique identifier of the vault to update.
params BetaVaultUpdateParams
DisplayName param.Opt[string] OptionalUpdated human-readable name for the vault. 1-255 characters.
Updated human-readable name for the vault. 1-255 characters.
Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omitted keys are preserved.
Betas []AnthropicBeta OptionalHeader parameterThis endpoint is in beta: requests must send managed-agents-2026-04-01 in this header.
This endpoint is in beta: requests must send managed-agents-2026-04-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
WorkspaceID param.Opt[string] OptionalHeader parameterOptional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).
Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).
Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.
Returns
type BetaManagedAgentsVault struct { Type: "vault"; ID; ArchivedAt; /* 4 more */ }A vault that stores credentials for use by agents during sessions.
A vault that stores credentials for use by agents during sessions.
The unique ID of the vault (vlt_...).
ArchivedAt TimeWhen the vault was archived. Null if not archived.
When the vault was archived. Null if not archived.
CreatedAt TimeA timestamp in RFC 3339 format
A timestamp in RFC 3339 format
Human-readable name for the vault.
Arbitrary key-value metadata attached to the vault.
UpdatedAt TimeA timestamp in RFC 3339 format
A timestamp in RFC 3339 format
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"),
)
betaManagedAgentsVault, err := client.Beta.Vaults.Update(
context.TODO(),
"vlt_011CZkZDLs7fYzm1hXNPeRjv",
anthropic.BetaVaultUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", betaManagedAgentsVault.ID)
}{
"id": "vlt_011CZkZDLs7fYzm1hXNPeRjv",
"archived_at": null,
"created_at": "2026-03-15T10:00:00Z",
"display_name": "Example vault",
"metadata": {
"environment": "production"
},
"type": "vault",
"updated_at": "2026-03-15T10:00:00Z"
}Returns Examples
{
"id": "vlt_011CZkZDLs7fYzm1hXNPeRjv",
"archived_at": null,
"created_at": "2026-03-15T10:00:00Z",
"display_name": "Example vault",
"metadata": {
"environment": "production"
},
"type": "vault",
"updated_at": "2026-03-15T10:00:00Z"
}