Class CfnSpendingLimit

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ISpendingLimitRef, IEnvironmentAware, ITaggableV2, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-04-14T18:31:50.194Z") @Stability(Stable) public class CfnSpendingLimit extends CfnResource implements IInspectable, ISpendingLimitRef, ITaggableV2
Creates a spending limit for a specified quantum device.

Spending limits help you control costs by setting maximum amounts that can be spent on quantum computing tasks within a specified time period.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.braket.*;
 CfnSpendingLimit cfnSpendingLimit = CfnSpendingLimit.Builder.create(this, "MyCfnSpendingLimit")
         .deviceArn("deviceArn")
         .spendingLimit("spendingLimit")
         // the properties below are optional
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .timePeriod(TimePeriodProperty.builder()
                 .endAt("endAt")
                 .startAt("startAt")
                 .build())
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnSpendingLimit

      protected CfnSpendingLimit(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnSpendingLimit

      protected CfnSpendingLimit(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnSpendingLimit

      @Stability(Stable) public CfnSpendingLimit(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnSpendingLimitProps props)
      Create a new AWS::Braket::SpendingLimit.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForSpendingLimit

      @Stability(Stable) @NotNull public static String arnForSpendingLimit(@NotNull ISpendingLimitRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnSpendingLimit

      @Stability(Stable) @NotNull public static Boolean isCfnSpendingLimit(@NotNull Object x)
      Checks whether the given object is a CfnSpendingLimit.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCreatedAt

      @Stability(Stable) @NotNull public String getAttrCreatedAt()
      The date and time when the spending limit was created, in ISO 8601 format.
    • getAttrQueuedSpend

      @Stability(Stable) @NotNull public String getAttrQueuedSpend()
      The amount currently queued for spending on the device, in USD.
    • getAttrSpendingLimitArn

      @Stability(Stable) @NotNull public String getAttrSpendingLimitArn()
      The Amazon Resource Name (ARN) that uniquely identifies the spending limit.
    • getAttrTotalSpend

      @Stability(Stable) @NotNull public String getAttrTotalSpend()
      The total amount spent on the device so far during the current time period, in USD.
    • getAttrUpdatedAt

      @Stability(Stable) @NotNull public String getAttrUpdatedAt()
      The date and time when the spending limit was last modified, in ISO 8601 format.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getSpendingLimitRef

      @Stability(Stable) @NotNull public SpendingLimitReference getSpendingLimitRef()
      A reference to a SpendingLimit resource.
      Specified by:
      getSpendingLimitRef in interface ISpendingLimitRef
    • getDeviceArn

      @Stability(Stable) @NotNull public String getDeviceArn()
      The Amazon Resource Name (ARN) of the quantum device to apply the spending limit to.
    • setDeviceArn

      @Stability(Stable) public void setDeviceArn(@NotNull String value)
      The Amazon Resource Name (ARN) of the quantum device to apply the spending limit to.
    • getSpendingLimit

      @Stability(Stable) @NotNull public String getSpendingLimit()
      The maximum amount that can be spent on the specified device, in USD.
    • setSpendingLimit

      @Stability(Stable) public void setSpendingLimit(@NotNull String value)
      The maximum amount that can be spent on the specified device, in USD.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      The tags to apply to the spending limit.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      The tags to apply to the spending limit.
    • getTimePeriod

      @Stability(Stable) @Nullable public Object getTimePeriod()
      Defines a time range for spending limits, specifying when the limit is active.

      Returns union: either IResolvable or CfnSpendingLimit.TimePeriodProperty

    • setTimePeriod

      @Stability(Stable) public void setTimePeriod(@Nullable IResolvable value)
      Defines a time range for spending limits, specifying when the limit is active.
    • setTimePeriod

      @Stability(Stable) public void setTimePeriod(@Nullable CfnSpendingLimit.TimePeriodProperty value)
      Defines a time range for spending limits, specifying when the limit is active.