Class RuleUpdateParams
-
- All Implemented Interfaces:
-
com.anthropic.core.Params
public final class RuleUpdateParams implements Params
Requires an OAuth access token with the
org:adminscope, fromant auth login --scope org:adminor a workload identity federation rule; Admin API keys are not accepted. See /docs/en/manage-claude/wif-admin-api.Partially update a federation rule.
issuer_idis immutable.matchandtargetare replaced as whole objects when set. Referenced service accounts and workspaces must exist in your organization; invalid references are rejected with a 400 error. Archived rules cannot be updated; this returns 400. Create a new rule instead. Rules on well-known shared issuers (GitHub Actions, GitLab, Buildkite, Terraform Cloud, Google) must constrain tenant identity via an identity-bearing claim, a tenant-pinning subject prefix (such asrepo:YOUR_ORG/...), or a CEL condition referencing one of those identity claims (e.g.claims.repository_owner). On these issuers the requirement is re-checked on every update; if an existing rule's stored match does not yet constrain tenant identity, any update (even a rename or description change) must also supply a conformingmatchin the same request. OAuth callers may only manage rules whoseoauth_scopeisworkspace:developerorworkspace:inference; other scopes require a Console session.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classRuleUpdateParams.BuilderA builder for RuleUpdateParams.
public final classRuleUpdateParams.BodyPartial update. Set fields are applied; omitted fields are unchanged.
issuer_idis immutable.matchandtargetare replaced as whole objects when set. Explicitnullclearsdescriptionandattributes; other fields can only be replaced, not cleared.
-
Method Summary
Modifier and Type Method Description final Optional<String>federationRuleId()ID of the federation rule to update. final Optional<Boolean>appliesToAllWorkspaces()When true, enables this rule for every workspace in the org (including workspaces created later). final Optional<String>description()Replaces the description. final Optional<FederationRuleMatch>match()Replaces the entire match object. final Optional<String>name()Replaces the slug identifier (lowercase, digits, hyphens). final Optional<String>oauthScope()Replaces the space-separated OAuth scopes granted on minted tokens. final Optional<ServiceAccountTarget>target()Replaces the entire target object. final Optional<Long>tokenLifetimeSeconds()Replaces the lifetime in seconds for access tokens minted via this rule (60-86400). final Optional<String>workspaceId()Replaces the existing single workspace enablement (the previous one is removed). final JsonField<Boolean>_appliesToAllWorkspaces()Returns the raw JSON value of appliesToAllWorkspaces. final JsonField<String>_description()Returns the raw JSON value of description. final JsonField<FederationRuleMatch>_match()Returns the raw JSON value of match. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<String>_oauthScope()Returns the raw JSON value of oauthScope. final JsonField<ServiceAccountTarget>_target()Returns the raw JSON value of target. final JsonField<Long>_tokenLifetimeSeconds()Returns the raw JSON value of tokenLifetimeSeconds. final JsonField<String>_workspaceId()Returns the raw JSON value of workspaceId. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final RuleUpdateParams.BuildertoBuilder()final RuleUpdateParams.Body_body()final String_pathParam(Integer index)Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. SpanData_spanData()The data for the OpenTelemetry span of a call to the method with these parameters. Booleanequals(Object other)IntegerhashCode()StringtoString()final static RuleUpdateParamsnone()final static RuleUpdateParams.Builderbuilder()Returns a mutable builder for constructing an instance of RuleUpdateParams. -
-
Method Detail
-
federationRuleId
final Optional<String> federationRuleId()
ID of the federation rule to update.
-
appliesToAllWorkspaces
final Optional<Boolean> appliesToAllWorkspaces()
When true, enables this rule for every workspace in the org (including workspaces created later). Setting
falseis rejected with 400 if no workspace would remain enabled; a rule with only a legacyworkspace_idbinding continues to mint.
-
description
final Optional<String> description()
Replaces the description. Omit to leave unchanged; send
nullto clear (the field is stored as an empty string).
-
match
final Optional<FederationRuleMatch> match()
Replaces the entire match object. All populated matcher fields must pass.
-
name
final Optional<String> name()
Replaces the slug identifier (lowercase, digits, hyphens). Unique within the organization; a duplicate name returns 409.
-
oauthScope
final Optional<String> oauthScope()
Replaces the space-separated OAuth scopes granted on minted tokens. OAuth callers may only set
workspace:developerorworkspace:inference; other scopes (such asorg:admin) require a Console session.
-
target
final Optional<ServiceAccountTarget> target()
Replaces the entire target object. Currently always a
service_accounttarget.
-
tokenLifetimeSeconds
final Optional<Long> tokenLifetimeSeconds()
Replaces the lifetime in seconds for access tokens minted via this rule (60-86400). Minted tokens are capped at
max(60, min(this value, 2 × remaining assertion validity))seconds.
-
workspaceId
final Optional<String> workspaceId()
Replaces the existing single workspace enablement (the previous one is removed). Rejected with 400 if the rule is enabled for more than one workspace; use the
/federation_rules/{federation_rule_id}/workspacessub-resource instead.
-
_appliesToAllWorkspaces
final JsonField<Boolean> _appliesToAllWorkspaces()
Returns the raw JSON value of appliesToAllWorkspaces.
Unlike appliesToAllWorkspaces, this method doesn't throw if the JSON field has an unexpected type.
-
_description
final JsonField<String> _description()
Returns the raw JSON value of description.
Unlike description, this method doesn't throw if the JSON field has an unexpected type.
-
_match
final JsonField<FederationRuleMatch> _match()
Returns the raw JSON value of match.
Unlike match, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_oauthScope
final JsonField<String> _oauthScope()
Returns the raw JSON value of oauthScope.
Unlike oauthScope, this method doesn't throw if the JSON field has an unexpected type.
-
_target
final JsonField<ServiceAccountTarget> _target()
Returns the raw JSON value of target.
Unlike target, this method doesn't throw if the JSON field has an unexpected type.
-
_tokenLifetimeSeconds
final JsonField<Long> _tokenLifetimeSeconds()
Returns the raw JSON value of tokenLifetimeSeconds.
Unlike tokenLifetimeSeconds, this method doesn't throw if the JSON field has an unexpected type.
-
_workspaceId
final JsonField<String> _workspaceId()
Returns the raw JSON value of workspaceId.
Unlike workspaceId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalBodyProperties
final Map<String, JsonValue> _additionalBodyProperties()
-
_additionalHeaders
final Headers _additionalHeaders()
Additional headers to send with the request.
-
_additionalQueryParams
final QueryParams _additionalQueryParams()
Additional query param to send with the request.
-
toBuilder
final RuleUpdateParams.Builder toBuilder()
-
_body
final RuleUpdateParams.Body _body()
-
_pathParam
final String _pathParam(Integer index)
-
_headers
Headers _headers()
The full set of headers in the parameters, including both fixed and additional headers.
-
_queryParams
QueryParams _queryParams()
The full set of query params in the parameters, including both fixed and additional query params.
-
_spanData
SpanData _spanData()
The data for the OpenTelemetry span of a call to the method with these parameters.
-
none
final static RuleUpdateParams none()
-
builder
final static RuleUpdateParams.Builder builder()
Returns a mutable builder for constructing an instance of RuleUpdateParams.
-
-
-
-