Claude Platform Docs

페더레이션 규칙 워크스페이스 제거

client.Organization.Federation.Rules.Workspaces.Remove(ctx, workspaceID, body) (*OrganizationFederationRuleWorkspaceRemoveResponse, error)
DELETE/v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}

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

워크스페이스에 대해 페더레이션 규칙을 비활성화합니다.

멱등성을 가지며, 활성화가 이미 제거된 경우에도 성공합니다. OAuth 호출자는 oauth_scope가 workspace:developer 또는 workspace:inference인 규칙만 관리할 수 있으며, 다른 범위에는 Console 세션이 필요합니다.

Parameters
workspaceID string⁠Path parameter

ID of the workspace to disable for.

body OrganizationFederationRuleWorkspaceRemoveParams
FederationRuleID string⁠Path parameter

ID of the federation rule.

Returns
type OrganizationFederationRuleWorkspaceRemoveResponse struct { Type: "federation_rule_workspace_deleted"; FederationRuleID; WorkspaceID }
Type FederationRuleWorkspaceDeleted
defaultfederation_rule_workspace_deleted
FederationRuleID string

Tagged ID of the federation rule.

WorkspaceID string

Tagged ID of the workspace named in the delete request. Removal is idempotent.

페더레이션 규칙 워크스페이스 제거
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	workspace, err := client.Organization.Federation.Rules.Workspaces.Remove(
		context.TODO(),
		"workspace_id",
		anthropic.OrganizationFederationRuleWorkspaceRemoveParams{
			FederationRuleID: "federation_rule_id",
		},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", workspace.FederationRuleID)
}
Returns Examples
Response 200
{
  "federation_rule_id": "federation_rule_id",
  "type": "federation_rule_workspace_deleted",
  "workspace_id": "workspace_id"
}