Class RuleCreateParams.Builder
-
- All Implemented Interfaces:
public final class RuleCreateParams.BuilderA builder for RuleCreateParams.
-
-
Method Summary
-
-
Method Detail
-
betas
final RuleCreateParams.Builder betas(List<AnthropicBeta> betas)
Optional header to specify the beta version(s) you want to use.
-
betas
final RuleCreateParams.Builder betas(Optional<List<AnthropicBeta>> betas)
Alias for calling Builder.betas with
betas.orElse(null).
-
body
final RuleCreateParams.Builder body(RuleCreateParams.Body body)
Sets the entire request body.
This is generally only useful if you are already constructing the body separately. Otherwise, it's more convenient to use the top-level setters instead:
-
additionalHeaders
final RuleCreateParams.Builder additionalHeaders(Headers additionalHeaders)
-
additionalHeaders
final RuleCreateParams.Builder additionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
additionalQueryParams
final RuleCreateParams.Builder additionalQueryParams(QueryParams additionalQueryParams)
-
additionalQueryParams
final RuleCreateParams.Builder additionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
addBeta
final RuleCreateParams.Builder addBeta(AnthropicBeta beta)
Adds a single AnthropicBeta to betas.
-
addBeta
final RuleCreateParams.Builder addBeta(String value)
Sets addBeta to an arbitrary String.
You should usually call addBeta with a well-typed AnthropicBeta constant instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
issuerId
final RuleCreateParams.Builder issuerId(String issuerId)
Tagged ID of the federation issuer.
-
issuerId
final RuleCreateParams.Builder issuerId(JsonField<String> issuerId)
Sets Builder.issuerId to an arbitrary JSON value.
You should usually call Builder.issuerId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
match
final RuleCreateParams.Builder match(BetaFederationRuleMatch match)
Conditions the verified JWT must satisfy for this rule to apply. At least one of
subject_prefix(other than a wildcard-only value like*),claims, orconditionis required;audiencealone is not sufficient.
-
match
final RuleCreateParams.Builder match(JsonField<BetaFederationRuleMatch> match)
Sets Builder.match to an arbitrary JSON value.
You should usually call Builder.match with a well-typed BetaFederationRuleMatch value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
name
final RuleCreateParams.Builder name(String name)
Slug identifier (lowercase, digits, hyphens). Unique within the organization; a duplicate name returns 409.
-
name
final RuleCreateParams.Builder name(JsonField<String> name)
Sets Builder.name to an arbitrary JSON value.
You should usually call Builder.name with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
oauthScope
final RuleCreateParams.Builder oauthScope(String oauthScope)
Space-separated OAuth scopes. OAuth callers may only set
workspace:developerorworkspace:inference; other scopes (such asorg:admin) require a Console session.
-
oauthScope
final RuleCreateParams.Builder oauthScope(JsonField<String> oauthScope)
Sets Builder.oauthScope to an arbitrary JSON value.
You should usually call Builder.oauthScope with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
target
final RuleCreateParams.Builder target(BetaServiceAccountTarget target)
Identity that tokens minted via this rule act as. Currently always a
service_accounttarget.
-
target
final RuleCreateParams.Builder target(JsonField<BetaServiceAccountTarget> target)
Sets Builder.target to an arbitrary JSON value.
You should usually call Builder.target with a well-typed BetaServiceAccountTarget value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
appliesToAllWorkspaces
final RuleCreateParams.Builder appliesToAllWorkspaces(Boolean appliesToAllWorkspaces)
When true, enable this rule for every workspace in the org (including workspaces created later).
-
appliesToAllWorkspaces
final RuleCreateParams.Builder appliesToAllWorkspaces(JsonField<Boolean> appliesToAllWorkspaces)
Sets Builder.appliesToAllWorkspaces to an arbitrary JSON value.
You should usually call Builder.appliesToAllWorkspaces with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
attributes
final RuleCreateParams.Builder attributes(RuleCreateParams.Attributes attributes)
CEL expressions
{name: expr}extracting named values from claims. Not yet supported; any non-empty value is rejected with 400.
-
attributes
final RuleCreateParams.Builder attributes(Optional<RuleCreateParams.Attributes> attributes)
Alias for calling Builder.attributes with
attributes.orElse(null).
-
attributes
final RuleCreateParams.Builder attributes(JsonField<RuleCreateParams.Attributes> attributes)
Sets Builder.attributes to an arbitrary JSON value.
You should usually call Builder.attributes with a well-typed Attributes value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
description
final RuleCreateParams.Builder description(String description)
Optional free-text description.
-
description
final RuleCreateParams.Builder description(Optional<String> description)
Alias for calling Builder.description with
description.orElse(null).
-
description
final RuleCreateParams.Builder description(JsonField<String> description)
Sets Builder.description to an arbitrary JSON value.
You should usually call Builder.description with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
tokenLifetimeSeconds
final RuleCreateParams.Builder tokenLifetimeSeconds(Long tokenLifetimeSeconds)
Lifetime in seconds for access tokens minted via this rule (60-86400). Defaults to 3600 (1h). Minted tokens are capped at
max(60, min(this value, 2 × remaining assertion validity))seconds.
-
tokenLifetimeSeconds
final RuleCreateParams.Builder tokenLifetimeSeconds(JsonField<Long> tokenLifetimeSeconds)
Sets Builder.tokenLifetimeSeconds to an arbitrary JSON value.
You should usually call Builder.tokenLifetimeSeconds with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
workspaceId
final RuleCreateParams.Builder workspaceId(String workspaceId)
Tagged ID of the workspace to enable this rule for. Required unless
applies_to_all_workspacesis true. Additional workspaces can be added via the/federation_rules/{federation_rule_id}/workspacessub-resource.
-
workspaceId
final RuleCreateParams.Builder workspaceId(Optional<String> workspaceId)
Alias for calling Builder.workspaceId with
workspaceId.orElse(null).
-
workspaceId
final RuleCreateParams.Builder workspaceId(JsonField<String> workspaceId)
Sets Builder.workspaceId to an arbitrary JSON value.
You should usually call Builder.workspaceId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalBodyProperties
final RuleCreateParams.Builder additionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
putAdditionalBodyProperty
final RuleCreateParams.Builder putAdditionalBodyProperty(String key, JsonValue value)
-
putAllAdditionalBodyProperties
final RuleCreateParams.Builder putAllAdditionalBodyProperties(Map<String, JsonValue> additionalBodyProperties)
-
removeAdditionalBodyProperty
final RuleCreateParams.Builder removeAdditionalBodyProperty(String key)
-
removeAllAdditionalBodyProperties
final RuleCreateParams.Builder removeAllAdditionalBodyProperties(Set<String> keys)
-
putAdditionalHeader
final RuleCreateParams.Builder putAdditionalHeader(String name, String value)
-
putAdditionalHeaders
final RuleCreateParams.Builder putAdditionalHeaders(String name, Iterable<String> values)
-
putAllAdditionalHeaders
final RuleCreateParams.Builder putAllAdditionalHeaders(Headers additionalHeaders)
-
putAllAdditionalHeaders
final RuleCreateParams.Builder putAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
replaceAdditionalHeaders
final RuleCreateParams.Builder replaceAdditionalHeaders(String name, String value)
-
replaceAdditionalHeaders
final RuleCreateParams.Builder replaceAdditionalHeaders(String name, Iterable<String> values)
-
replaceAllAdditionalHeaders
final RuleCreateParams.Builder replaceAllAdditionalHeaders(Headers additionalHeaders)
-
replaceAllAdditionalHeaders
final RuleCreateParams.Builder replaceAllAdditionalHeaders(Map<String, Iterable<String>> additionalHeaders)
-
removeAdditionalHeaders
final RuleCreateParams.Builder removeAdditionalHeaders(String name)
-
removeAllAdditionalHeaders
final RuleCreateParams.Builder removeAllAdditionalHeaders(Set<String> names)
-
putAdditionalQueryParam
final RuleCreateParams.Builder putAdditionalQueryParam(String key, String value)
-
putAdditionalQueryParams
final RuleCreateParams.Builder putAdditionalQueryParams(String key, Iterable<String> values)
-
putAllAdditionalQueryParams
final RuleCreateParams.Builder putAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
putAllAdditionalQueryParams
final RuleCreateParams.Builder putAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
replaceAdditionalQueryParams
final RuleCreateParams.Builder replaceAdditionalQueryParams(String key, String value)
-
replaceAdditionalQueryParams
final RuleCreateParams.Builder replaceAdditionalQueryParams(String key, Iterable<String> values)
-
replaceAllAdditionalQueryParams
final RuleCreateParams.Builder replaceAllAdditionalQueryParams(QueryParams additionalQueryParams)
-
replaceAllAdditionalQueryParams
final RuleCreateParams.Builder replaceAllAdditionalQueryParams(Map<String, Iterable<String>> additionalQueryParams)
-
removeAdditionalQueryParams
final RuleCreateParams.Builder removeAdditionalQueryParams(String key)
-
removeAllAdditionalQueryParams
final RuleCreateParams.Builder removeAllAdditionalQueryParams(Set<String> keys)
-
build
final RuleCreateParams build()
Returns an immutable instance of RuleCreateParams.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.issuerId() .match() .name() .oauthScope() .target()
-
-
-
-