Class SpendLimitSetParams
-
- All Implemented Interfaces:
-
com.anthropic.core.Params
public final class SpendLimitSetParams implements Params
Set a spend limit.
Upsert keyed on (scope, period): setting a limit that already exists overwrites it in place. A Claude Enterprise organization sets
userlimits. Its seat-tier, group, and organization-level defaults are configured in claude.ai. A Claude Console organization setsorganizationandworkspacelimits, which are monthly and always carry an amount. Setting those limits is in an early access preview. To request access, contact your Anthropic account team.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classSpendLimitSetParams.BuilderA builder for SpendLimitSetParams.
public final classSpendLimitSetParams.Bodypublic final classSpendLimitSetParams.ScopeWhat the limit applies to. Claude Enterprise organizations set
userlimits. Claude Console organizations setorganizationandworkspacelimits. Any other combination returns 400. Settingorganizationandworkspacelimits through the API is in an early access preview. To request access, contact your Anthropic account team.
-
Method Summary
Modifier and Type Method Description final Optional<List<AnthropicBeta>>betas()Optional header to specify the beta version(s) you want to use. final Optional<String>amount()Limit amount as a non-negative integer decimal string in the minor unit of the organization's billing currency (cents for USD): "50000" is $500.00. final SpendLimitSetParams.Scopescope()What the limit applies to. final Optional<BetaSpendLimitPeriod>period()final JsonField<String>_amount()Returns the raw JSON value of amount. final JsonField<SpendLimitSetParams.Scope>_scope()Returns the raw JSON value of scope. final JsonField<BetaSpendLimitPeriod>_period()Returns the raw JSON value of period. 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 SpendLimitSetParams.BuildertoBuilder()final SpendLimitSetParams.Body_body()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 SpendLimitSetParams.Builderbuilder()Returns a mutable builder for constructing an instance of SpendLimitSetParams. -
-
Method Detail
-
betas
final Optional<List<AnthropicBeta>> betas()
Optional header to specify the beta version(s) you want to use.
-
amount
final Optional<String> amount()
Limit amount as a non-negative integer decimal string in the minor unit of the organization's billing currency (cents for USD): "50000" is $500.00.
nullsets an explicit no-limit override for this scope andperiodonly — each period resolves independently, so caps for other periods still apply.
-
scope
final SpendLimitSetParams.Scope scope()
What the limit applies to. Claude Enterprise organizations set
userlimits. Claude Console organizations setorganizationandworkspacelimits. Any other combination returns 400. Settingorganizationandworkspacelimits through the API is in an early access preview. To request access, contact your Anthropic account team.
-
period
final Optional<BetaSpendLimitPeriod> period()
-
_amount
final JsonField<String> _amount()
Returns the raw JSON value of amount.
Unlike amount, this method doesn't throw if the JSON field has an unexpected type.
-
_scope
final JsonField<SpendLimitSetParams.Scope> _scope()
Returns the raw JSON value of scope.
Unlike scope, this method doesn't throw if the JSON field has an unexpected type.
-
_period
final JsonField<BetaSpendLimitPeriod> _period()
Returns the raw JSON value of period.
Unlike period, 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 SpendLimitSetParams.Builder toBuilder()
-
_body
final SpendLimitSetParams.Body _body()
-
_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.
-
builder
final static SpendLimitSetParams.Builder builder()
Returns a mutable builder for constructing an instance of SpendLimitSetParams.
The following fields are required:
.amount() .scope()
-
-
-
-