Claude Platform Docs

Dapatkan Pengaturan Kepatuhan

client.Beta.Organization.ComplianceSettings.Get(ctx) (*BetaComplianceSettings, error)
GET/v1/organizations/compliance_settings

Ambil Pengaturan Kepatuhan (Compliance Settings) organisasi Anda.

Compliance Settings adalah resource singleton: hanya ada tepat satu per organisasi, yang diakses tanpa pengidentifikasi. Field state mencerminkan apakah Compliance API diaktifkan. Organisasi yang memiliki organisasi induk membaca status yang diwarisi dari konfigurasi induknya.

Returns
type BetaComplianceSettings struct { Type: "compliance_settings"; State }
Type ComplianceSettings
defaultcompliance_settings

Whether the Compliance API is enabled for this organization.

One of the following:
type BetaComplianceSettingsStateEnabled struct { Type: "enabled" }
Type Enabled
defaultenabled
type BetaComplianceSettingsStateDisabled struct { Type: "disabled" }
Type Disabled
defaultdisabled
Dapatkan Pengaturan Kepatuhan
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"),
	)
	betaComplianceSettings, err := client.Beta.Organization.ComplianceSettings.Get(context.TODO())
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", betaComplianceSettings.State)
}
Returns Examples
Response 200
{
  "state": {
    "type": "enabled"
  },
  "type": "compliance_settings"
}