Class: AWSCDK::Athena::CfnCapacityReservationProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Athena::CfnCapacityReservationProps
- Defined in:
- athena/cfn_capacity_reservation_props.rb
Overview
Properties for defining a CfnCapacityReservation.
Instance Attribute Summary collapse
-
#capacity_assignment_configuration ⇒ AWSCDK::IResolvable, ...
readonly
Assigns Athena workgroups (and hence their queries) to capacity reservations.
-
#name ⇒ String
readonly
The name of the capacity reservation.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
An array of key-value pairs to apply to the capacity reservation.
-
#target_dpus ⇒ Numeric
readonly
The number of data processing units requested.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, target_dpus:, capacity_assignment_configuration: nil, tags: nil) ⇒ CfnCapacityReservationProps
constructor
A new instance of CfnCapacityReservationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, target_dpus:, capacity_assignment_configuration: nil, tags: nil) ⇒ CfnCapacityReservationProps
Returns a new instance of CfnCapacityReservationProps.
13 14 15 16 17 18 19 20 21 22 |
# File 'athena/cfn_capacity_reservation_props.rb', line 13 def initialize(name:, target_dpus:, capacity_assignment_configuration: nil, tags: nil) @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @target_dpus = target_dpus Jsii::Type.check_type(@target_dpus, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "targetDpus") @capacity_assignment_configuration = capacity_assignment_configuration.is_a?(Hash) ? ::AWSCDK::Athena::CfnCapacityReservation::CapacityAssignmentConfigurationProperty.new(**capacity_assignment_configuration.transform_keys(&:to_sym)) : capacity_assignment_configuration Jsii::Type.check_type(@capacity_assignment_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hdGhlbmEuQ2ZuQ2FwYWNpdHlSZXNlcnZhdGlvbi5DYXBhY2l0eUFzc2lnbm1lbnRDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "capacityAssignmentConfiguration") unless @capacity_assignment_configuration.nil? @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? end |
Instance Attribute Details
#capacity_assignment_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
Assigns Athena workgroups (and hence their queries) to capacity reservations.
A capacity reservation can have only one capacity assignment configuration, but the capacity assignment configuration can be made up of multiple individual assignments. Each assignment specifies how Athena queries can consume capacity from the capacity reservation that their workgroup is mapped to.
40 41 42 |
# File 'athena/cfn_capacity_reservation_props.rb', line 40 def capacity_assignment_configuration @capacity_assignment_configuration end |
#name ⇒ String (readonly)
The name of the capacity reservation.
28 29 30 |
# File 'athena/cfn_capacity_reservation_props.rb', line 28 def name @name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
An array of key-value pairs to apply to the capacity reservation.
For more information, see Tag .
47 48 49 |
# File 'athena/cfn_capacity_reservation_props.rb', line 47 def @tags end |
#target_dpus ⇒ Numeric (readonly)
The number of data processing units requested.
33 34 35 |
# File 'athena/cfn_capacity_reservation_props.rb', line 33 def target_dpus @target_dpus end |
Class Method Details
.jsii_properties ⇒ Object
49 50 51 52 53 54 55 56 |
# File 'athena/cfn_capacity_reservation_props.rb', line 49 def self.jsii_properties { :name => "name", :target_dpus => "targetDpus", :capacity_assignment_configuration => "capacityAssignmentConfiguration", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'athena/cfn_capacity_reservation_props.rb', line 58 def to_jsii result = {} result.merge!({ "name" => @name, "targetDpus" => @target_dpus, "capacityAssignmentConfiguration" => @capacity_assignment_configuration, "tags" => @tags, }) result.compact end |