Claude Platform Docs

フェデレーションルールのワークスペースを削除

WorkspaceRemoveResponse organization().federation().rules().workspaces().remove(params, requestOptions = RequestOptions.none())
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を管理するを参照してください。

ワークスペースに対するフェデレーションルールを無効にします。

べき等です。有効化がすでに削除されている場合でも成功します。OAuth呼び出し元が管理できるのは、 oauth_scopeがworkspace:developerまたはworkspace:inferenceであるルールのみです。 その他のスコープにはConsoleセッションが必要です。

Parameters
WorkspaceRemoveParams params
String federationRuleId⁠Path parameter

ID of the federation rule.

Optional<String> workspaceId⁠Path parameter

ID of the workspace to disable for.

Returns
class WorkspaceRemoveResponse { type = "federation_rule_workspace_deleted"; federationRuleId; workspaceId; }
JsonValue type = "federation_rule_workspace_deleted"
String federationRuleId

Tagged ID of the federation rule.

String workspaceId

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

フェデレーションルールのワークスペースを削除
package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.organization.federation.rules.workspaces.WorkspaceRemoveParams;
import com.anthropic.models.organization.federation.rules.workspaces.WorkspaceRemoveResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

        WorkspaceRemoveParams params = WorkspaceRemoveParams.builder()
            .federationRuleId("federation_rule_id")
            .workspaceId("workspace_id")
            .build();
        WorkspaceRemoveResponse workspace = client.organization().federation().rules().workspaces().remove(params);
    }
}
Returns Examples
Response 200
{
  "federation_rule_id": "federation_rule_id",
  "type": "federation_rule_workspace_deleted",
  "workspace_id": "workspace_id"
}