Claude Platform Docs

ルール

フェデレーションルールを作成
client.Beta.Organization.Federation.Rules.New(ctx, params) (*BetaFederationRule, error)
POST/v1/organizations/federation_rules

org:adminスコープを持つOAuthアクセストークンが必要です。このトークンはant auth login --scope org:adminまたはワークロードアイデンティティフェデレーションルールから取得します。Admin APIキーは受け付けられません。Admin APIでWIFを管理するを参照してください。

フェデレーションルール一覧を取得
client.Beta.Organization.Federation.Rules.List(ctx, params) (*PageCursor[BetaFederationRule], error)
GET/v1/organizations/federation_rules

org:adminスコープを持つOAuthアクセストークンが必要です。このトークンはant auth login --scope org:adminまたはワークロードアイデンティティフェデレーションルールから取得します。Admin APIキーは受け付けられません。Admin APIでWIFを管理するを参照してください。

フェデレーションルールを取得
client.Beta.Organization.Federation.Rules.Get(ctx, federationRuleID, query) (*BetaFederationRule, error)
GET/v1/organizations/federation_rules/{federation_rule_id}

org:adminスコープを持つOAuthアクセストークンが必要です。このトークンはant auth login --scope org:adminまたはワークロードアイデンティティフェデレーションルールから取得します。Admin APIキーは受け付けられません。Admin APIでWIFを管理するを参照してください。

フェデレーションルールを更新
client.Beta.Organization.Federation.Rules.Update(ctx, federationRuleID, params) (*BetaFederationRule, error)
POST/v1/organizations/federation_rules/{federation_rule_id}

org:adminスコープを持つOAuthアクセストークンが必要です。このトークンはant auth login --scope org:adminまたはワークロードアイデンティティフェデレーションルールから取得します。Admin APIキーは受け付けられません。Admin APIでWIFを管理するを参照してください。

フェデレーションルールをアーカイブ
client.Beta.Organization.Federation.Rules.Archive(ctx, federationRuleID, body) (*BetaFederationRule, error)
POST/v1/organizations/federation_rules/{federation_rule_id}/archive

org:adminスコープを持つOAuthアクセストークンが必要です。このトークンはant auth login --scope org:adminまたはワークロードアイデンティティフェデレーションルールから取得します。Admin APIキーは受け付けられません。Admin APIでWIFを管理するを参照してください。

Models
type BetaFederationRule struct { Type: "federation_rule"; ID; AppliesToAllWorkspaces; /* 17 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.

type BetaFederationRuleMatch struct { Audience; Claims; Condition; SubjectPrefix }

Does the incoming JWT qualify?

All populated fields must pass; omitted fields are skipped. At least one of subject_prefix (other than a wildcard-only value like *), claims, or condition is required; audience alone is not sufficient.

Audience string Optional

Exact match against the aud claim (any element if array). When omitted, the JWT's aud must still equal Anthropic's expected audience for the issuer; setting this field overrides that default.

maxLength1024
Claims map[string, string] Optional

Exact-match {claim: value} pairs against top-level claims. Only string-valued claims can be matched; use condition for non-string claims.

Condition string Optional

CEL expression over claims for logic the structural fields can't express. Must evaluate to a boolean and may reference only the claims variable; a constant-true expression (such as true) is rejected with 400.

maxLength4096
SubjectPrefix string Optional

Match the verified JWT sub claim. Exact match unless the value ends with *, in which case it is a prefix match. Example: repo:my-org/my-repo:ref:refs/heads/main.

maxLength1024
type BetaFederationRuleWorkspace struct { Type: "federation_rule_workspace"; CreatedAt; CreatedByActorID; /* 3 more */ }
Type FederationRuleWorkspace
defaultfederation_rule_workspace
CreatedAt Time

When this workspace was enabled for the rule.

formatdate-time
CreatedByActorID string

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

FederationRuleID string

Tagged ID of the federation rule.

WorkspaceID string

Tagged ID of the workspace this rule is enabled for.

WorkspaceName string

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

type BetaServiceAccountTarget struct { Type: "service_account"; ServiceAccountID; ServiceAccountName }

Bind to a fixed service account by ID.

Type ServiceAccount
ServiceAccountID string

Tagged ID of the service account to mint tokens for.

ServiceAccountName string Optional

Service account's display name at read time. Ignored on writes.

フェデレーションルールのワークスペースを追加
client.Beta.Organization.Federation.Rules.Workspaces.Add(ctx, federationRuleID, params) (*BetaFederationRuleWorkspace, error)
POST/v1/organizations/federation_rules/{federation_rule_id}/workspaces

org:adminスコープを持つOAuthアクセストークンが必要です。このトークンはant auth login --scope org:adminまたはワークロードアイデンティティフェデレーションルールから取得します。Admin APIキーは受け付けられません。Admin APIでWIFを管理するを参照してください。

フェデレーションルールのワークスペース一覧を取得
client.Beta.Organization.Federation.Rules.Workspaces.List(ctx, federationRuleID, params) (*PageCursor[BetaFederationRuleWorkspace], error)
GET/v1/organizations/federation_rules/{federation_rule_id}/workspaces

org:adminスコープを持つOAuthアクセストークンが必要です。このトークンはant auth login --scope org:adminまたはワークロードアイデンティティフェデレーションルールから取得します。Admin APIキーは受け付けられません。Admin APIでWIFを管理するを参照してください。

フェデレーションルールのワークスペースを削除
client.Beta.Organization.Federation.Rules.Workspaces.Remove(ctx, workspaceID, params) (*BetaOrganizationFederationRuleWorkspaceRemoveResponse, error)
DELETE/v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}

org:adminスコープを持つOAuthアクセストークンが必要です。このトークンはant auth login --scope org:adminまたはワークロードアイデンティティフェデレーションルールから取得します。Admin APIキーは受け付けられません。Admin APIでWIFを管理するを参照してください。