Workspace aus Federation-Regel entfernen
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
Returns
Workspace aus Federation-Regel entfernen
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.Beta.Organization.Federation.Rules.Workspaces.Remove(
context.TODO(),
"workspace_id",
anthropic.BetaOrganizationFederationRuleWorkspaceRemoveParams{
FederationRuleID: "federation_rule_id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", workspace.FederationRuleID)
}Response 200
{
"federation_rule_id": "federation_rule_id",
"type": "federation_rule_workspace_deleted",
"workspace_id": "workspace_id"
}Returns Examples
Response 200
{
"federation_rule_id": "federation_rule_id",
"type": "federation_rule_workspace_deleted",
"workspace_id": "workspace_id"
}