Claude Platform Docs

Compliance-Einstellungen aktualisieren

BetaComplianceSettings Beta.Organization.ComplianceSettings.Update(parameters, cancellationToken = default)
POST/v1/organizations/compliance_settings

Aktualisiere die Compliance-Einstellungen deiner Organisation.

Wenn state auf enabled gesetzt wird, wird die Compliance API eingeschaltet und die Erfassung von Aktivitätsereignissen der Organisation beginnt. Wird es auf disabled gesetzt, wird beides ausgeschaltet. state gibt an, ob die Compliance API aktiviert ist.

Eine Anfrage, die state auf seinen aktuellen Wert setzt, ist erfolgreich und lässt die Ressource unverändert. Eine disabled-Anfrage bleibt wirksam bis zu einer späteren enabled-Anfrage oder der nächsten Bereitstellungsaktion der Organisation, die Access Transparency aktiviert: Das Aktivieren von Access Transparency aktiviert auch die Compliance API, die deren Aktivitätsereignisse bereitstellt, sodass eine solche Bereitstellung (einschließlich erneuter Durchläufe) die Compliance API auch nach einer disabled-Anfrage wieder aktiviert. Automatisierte Bereitstellung deaktiviert Compliance-Einstellungen niemals.

Parameters
ComplianceSettingUpdateParams parameters

Desired state. Accepts the string shorthand "enabled" or "disabled" in place of the object form; the response always returns the canonical object form.

Returns
class BetaComplianceSettings { Type = "compliance_settings"; State; }
JsonElement Type = "compliance_settings"
required BetaComplianceSettingsState State

Whether the Compliance API is enabled for this organization.

One of the following:
class BetaComplianceSettingsStateEnabled { Type = "enabled"; }
JsonElement Type = "enabled"
class BetaComplianceSettingsStateDisabled { Type = "disabled"; }
JsonElement Type = "disabled"
Compliance-Einstellungen aktualisieren
ComplianceSettingUpdateParams parameters = new()
{
    State = new BetaComplianceSettingsStateEnabledParam()
};

var betaComplianceSettings = await client.Beta.Organization.ComplianceSettings.Update(parameters);

Console.WriteLine(betaComplianceSettings);
Returns Examples
Response 200
{
  "state": {
    "type": "enabled"
  },
  "type": "compliance_settings"
}