Claude Platform Docs

Tambahkan Workspace Aturan Federasi

$ ant beta:organization:federation:rules:workspaces add
POST/v1/organizations/federation_rules/{federation_rule_id}/workspaces

Memerlukan token akses OAuth dengan cakupan org:admin, dari ant auth login --scope org:admin atau aturan workload identity federation; kunci Admin API tidak diterima. Lihat Kelola WIF dengan Admin API.

Aktifkan aturan federasi untuk sebuah workspace.

Idempoten; pengaktifan ulang mengembalikan pengaktifan yang sudah ada. Aturan dan workspace harus sama-sama milik organisasi Anda. Keanggotaan akun layanan target aturan di workspace ini tidak diperiksa saat pengaktifan: pertukaran token ke workspace ini ditolak kecuali target adalah anggota (target secara implisit merupakan anggota workspace default). Aturan yang diarsipkan ditolak dengan 400. Pemanggil OAuth hanya dapat mengelola aturan yang oauth_scope-nya adalah workspace:developer atau workspace:inference; cakupan lain memerlukan sesi Console.

Parameters
--federation-rule-id: string

Path param: ID of the federation rule.

--workspace-id: string

Body param: Tagged ID of the workspace to enable this rule for.

--beta: optional array of AnthropicBeta

Header param: Optional header to specify the beta version(s) you want to use.

Returns
beta_federation_rule_workspace: object{ created_at, created_by_actor_id, federation_rule_id, 3 more }
created_at: string

When this workspace was enabled for the rule.

formatdate-time
created_by_actor_id: string

Tagged ID (user_... or svac_...) of the actor that enabled this workspace for the rule, if known.

federation_rule_id: string

Tagged ID of the federation rule.

type: "federation_rule_workspace"
workspace_id: string

Tagged ID of the workspace this rule is enabled for.

workspace_name: string

Workspace display name. Populated when listing; null in the enable response.

Tambahkan Workspace Aturan Federasi
ant beta:organization:federation:rules:workspaces add \
  --api-key my-anthropic-api-key \
  --federation-rule-id federation_rule_id \
  --workspace-id workspace_id
Returns Examples
Response 200
{
  "created_at": "2024-10-30T23:58:27.427722Z",
  "created_by_actor_id": "created_by_actor_id",
  "federation_rule_id": "federation_rule_id",
  "type": "federation_rule_workspace",
  "workspace_id": "workspace_id",
  "workspace_name": "workspace_name"
}