Class: AWSCDK::Braket::CfnSpendingLimitProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Braket::CfnSpendingLimitProps
- Defined in:
- braket/cfn_spending_limit_props.rb
Overview
Properties for defining a CfnSpendingLimit.
Instance Attribute Summary collapse
-
#device_arn ⇒ String
readonly
The Amazon Resource Name (ARN) of the quantum device to apply the spending limit to.
-
#spending_limit ⇒ String
readonly
The maximum amount that can be spent on the specified device, in USD.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The tags to apply to the spending limit.
-
#time_period ⇒ AWSCDK::IResolvable, ...
readonly
Defines a time range for spending limits, specifying when the limit is active.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(device_arn:, spending_limit:, tags: nil, time_period: nil) ⇒ CfnSpendingLimitProps
constructor
A new instance of CfnSpendingLimitProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(device_arn:, spending_limit:, tags: nil, time_period: nil) ⇒ CfnSpendingLimitProps
Returns a new instance of CfnSpendingLimitProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'braket/cfn_spending_limit_props.rb', line 13 def initialize(device_arn:, spending_limit:, tags: nil, time_period: nil) @device_arn = device_arn Jsii::Type.check_type(@device_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deviceArn") @spending_limit = spending_limit Jsii::Type.check_type(@spending_limit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "spendingLimit") @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @time_period = time_period.is_a?(Hash) ? ::AWSCDK::Braket::CfnSpendingLimit::TimePeriodProperty.new(**time_period.transform_keys(&:to_sym)) : time_period Jsii::Type.check_type(@time_period, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19icmFrZXQuQ2ZuU3BlbmRpbmdMaW1pdC5UaW1lUGVyaW9kUHJvcGVydHkifV19fQ==")), "timePeriod") unless @time_period.nil? end |
Instance Attribute Details
#device_arn ⇒ String (readonly)
The Amazon Resource Name (ARN) of the quantum device to apply the spending limit to.
28 29 30 |
# File 'braket/cfn_spending_limit_props.rb', line 28 def device_arn @device_arn end |
#spending_limit ⇒ String (readonly)
The maximum amount that can be spent on the specified device, in USD.
33 34 35 |
# File 'braket/cfn_spending_limit_props.rb', line 33 def spending_limit @spending_limit end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The tags to apply to the spending limit.
38 39 40 |
# File 'braket/cfn_spending_limit_props.rb', line 38 def @tags end |
#time_period ⇒ AWSCDK::IResolvable, ... (readonly)
Defines a time range for spending limits, specifying when the limit is active.
43 44 45 |
# File 'braket/cfn_spending_limit_props.rb', line 43 def time_period @time_period end |
Class Method Details
.jsii_properties ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'braket/cfn_spending_limit_props.rb', line 45 def self.jsii_properties { :device_arn => "deviceArn", :spending_limit => "spendingLimit", :tags => "tags", :time_period => "timePeriod", } end |
Instance Method Details
#to_jsii ⇒ Object
54 55 56 57 58 59 60 61 62 63 |
# File 'braket/cfn_spending_limit_props.rb', line 54 def to_jsii result = {} result.merge!({ "deviceArn" => @device_arn, "spendingLimit" => @spending_limit, "tags" => @tags, "timePeriod" => @time_period, }) result.compact end |