Claude Platform Docs

Adicionar workspace à regra de federação

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

Requer um token de acesso OAuth com o escopo org:admin, obtido via ant auth login --scope org:admin ou uma regra de federação de identidade de workload; chaves de Admin API não são aceitas. Consulte Gerenciar WIF com a Admin API.

Habilite uma regra de federação para um workspace.

Idempotente; habilitar novamente retorna a habilitação existente. A regra e o workspace devem pertencer à sua organização. A associação da conta de serviço de destino da regra a este workspace não é verificada na habilitação: a troca de tokens para este workspace é rejeitada, a menos que o destino seja membro (ele é implicitamente membro do workspace padrão). Regras arquivadas são rejeitadas com 400. Chamadores OAuth só podem gerenciar regras cujo oauth_scope seja workspace:developer ou workspace:inference; outros escopos exigem uma sessão do Console.

Parameters
--federation-rule-id: string⁠Path parameter

ID of the federation rule.

--workspace-id: string

Tagged ID of the workspace to enable this rule for.

--beta: optional array of AnthropicBeta⁠Header parameter

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

Returns
beta_federation_rule_workspace: object{ type: "federation_rule_workspace", created_at, created_by_actor_id, 3 more }
type: "federation_rule_workspace"
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.

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.

Adicionar workspace à regra de federação
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"
}