Claude Platform Docs

Workspace aus Federation-Regel entfernen

WorkspaceRemoveResponse organization().federation().rules().workspaces().remove(params, requestOptions = RequestOptions.none())
DELETE/v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}

Erfordert ein OAuth-Zugriffstoken mit dem Scope org:admin, über ant auth login --scope org:admin oder eine Workload-Identity-Federation-Regel; Admin-API-Keys werden nicht akzeptiert. Siehe WIF mit der Admin API verwalten.

Deaktiviert eine Federation-Regel für einen Workspace.

Idempotent; ist auch erfolgreich, wenn die Aktivierung bereits entfernt wurde. OAuth-Aufrufer dürfen nur Regeln verwalten, deren oauth_scope workspace:developer oder workspace:inference ist; andere Scopes erfordern eine Console-Sitzung.

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.

Workspace aus Federation-Regel entfernen
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"
}