Claude Platform Docs

페더레이션 규칙 보관

organization.federation.rules.archive(federation_rule_id) -> FederationRule
POST/v1/organizations/federation_rules/{federation_rule_id}/archive

org:admin 범위가 있는 OAuth 액세스 토큰이 필요합니다. 이 토큰은 ant auth login --scope org:admin 또는 워크로드 ID 페더레이션 규칙에서 얻을 수 있으며, Admin API 키는 허용되지 않습니다. Admin API로 WIF 관리를 참조하세요.

페더레이션 규칙을 보관합니다.

이 규칙을 통한 토큰 교환은 즉시 중단됩니다. 멱등성을 가지며, 다시 보관하면 원래 archived_at과 함께 규칙이 반환됩니다. 보관하면 규칙의 워크스페이스 대상 지정이 해제됩니다(workspace_id와 workspace_ids가 비워짐). 보관 전에 이미 발급된 토큰은 만료될 때까지 유효합니다. OAuth 호출자는 oauth_scope가 workspace:developer 또는 workspace:inference인 규칙만 관리할 수 있으며, 다른 범위에는 Console 세션이 필요합니다.

Parameters
federation_rule_id: str⁠Path parameter

ID of the federation rule to archive.

Returns
class FederationRule: type: "federation_rule"; id; applies_to_all_workspaces; ... # 15 more

Authorization rule binding an external OIDC identity to Anthropic.

Evaluates the match conditions and mints an OAuth access token for the resolved target, scoped to a single workspace where the rule is enabled (chosen by the caller at exchange time when the rule is enabled for more than one). For rules enabled via workspace_ids or applies_to_all_workspaces, the target service account must be a member of that workspace (it is implicitly a member of the default workspace); rules carrying only the legacy workspace_id binding do not enforce this.

페더레이션 규칙 보관
import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ.get(
        "ANTHROPIC_API_KEY"
    ),  # This is the default and can be omitted
)
federation_rule = client.organization.federation.rules.archive(
    "federation_rule_id",
)
print(federation_rule.id)
Returns Examples
Response 200
{
  "id": "fdrl_01SDCCSbTxrXDpWc1phhtcfK",
  "applies_to_all_workspaces": true,
  "archived_at": "2019-12-27T18:11:19.117Z",
  "archived_by_actor_id": "archived_by_actor_id",
  "attributes": {
    "foo": "string"
  },
  "created_at": "2024-10-30T23:58:27.427722Z",
  "created_by_actor_id": "created_by_actor_id",
  "description": "description",
  "issuer_id": "issuer_id",
  "issuer_name": "issuer_name",
  "match": {
    "audience": "audience",
    "claims": {
      "foo": "string"
    },
    "condition": "condition",
    "subject_prefix": "subject_prefix"
  },
  "name": "prod-deploy-pipeline",
  "oauth_scope": "oauth_scope",
  "target": {
    "service_account_id": "svac_01SDCCSbTxrXDpWc1phhtcfK",
    "type": "service_account",
    "service_account_name": "service_account_name"
  },
  "token_lifetime_seconds": 0,
  "type": "federation_rule",
  "updated_at": "2024-10-30T23:58:27.427722Z",
  "updated_by_actor_id": "updated_by_actor_id",
  "workspace_id": "workspace_id",
  "workspace_ids": [
    "string"
  ]
}