Class: AWSCDK::ApplicationAutoScaling::BaseScalableAttributeProps
- Inherits:
-
EnableScalingProps
- Object
- EnableScalingProps
- AWSCDK::ApplicationAutoScaling::BaseScalableAttributeProps
- Defined in:
- application_auto_scaling/base_scalable_attribute_props.rb
Overview
Properties for a ScalableTableAttribute.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#dimension ⇒ String
readonly
Scalable dimension of the attribute.
-
#max_capacity ⇒ Numeric
readonly
Maximum capacity to scale to.
-
#min_capacity ⇒ Numeric?
readonly
Minimum capacity to scale to.
-
#resource_id ⇒ String
readonly
Resource ID of the attribute.
-
#role ⇒ AWSCDK::IAM::IRole
readonly
Role to use for scaling.
-
#service_namespace ⇒ AWSCDK::ApplicationAutoScaling::ServiceNamespace
readonly
Service namespace of the scalable attribute.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_capacity:, min_capacity: nil, dimension:, resource_id:, role:, service_namespace:) ⇒ BaseScalableAttributeProps
constructor
A new instance of BaseScalableAttributeProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_capacity:, min_capacity: nil, dimension:, resource_id:, role:, service_namespace:) ⇒ BaseScalableAttributeProps
Returns a new instance of BaseScalableAttributeProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'application_auto_scaling/base_scalable_attribute_props.rb', line 13 def initialize(max_capacity:, min_capacity: nil, dimension:, resource_id:, role:, service_namespace:) @max_capacity = max_capacity Jsii::Type.check_type(@max_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxCapacity") @min_capacity = min_capacity Jsii::Type.check_type(@min_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "minCapacity") unless @min_capacity.nil? @dimension = dimension Jsii::Type.check_type(@dimension, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dimension") @resource_id = resource_id Jsii::Type.check_type(@resource_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceId") @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") @service_namespace = service_namespace Jsii::Type.check_type(@service_namespace, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbGljYXRpb25hdXRvc2NhbGluZy5TZXJ2aWNlTmFtZXNwYWNlIn0=")), "serviceNamespace") end |
Instance Attribute Details
#dimension ⇒ String (readonly)
Scalable dimension of the attribute.
40 41 42 |
# File 'application_auto_scaling/base_scalable_attribute_props.rb', line 40 def dimension @dimension end |
#max_capacity ⇒ Numeric (readonly)
Maximum capacity to scale to.
31 32 33 |
# File 'application_auto_scaling/base_scalable_attribute_props.rb', line 31 def max_capacity @max_capacity end |
#min_capacity ⇒ Numeric? (readonly)
Note:
Default: 1
Minimum capacity to scale to.
36 37 38 |
# File 'application_auto_scaling/base_scalable_attribute_props.rb', line 36 def min_capacity @min_capacity end |
#resource_id ⇒ String (readonly)
Resource ID of the attribute.
44 45 46 |
# File 'application_auto_scaling/base_scalable_attribute_props.rb', line 44 def resource_id @resource_id end |
#role ⇒ AWSCDK::IAM::IRole (readonly)
Role to use for scaling.
48 49 50 |
# File 'application_auto_scaling/base_scalable_attribute_props.rb', line 48 def role @role end |
#service_namespace ⇒ AWSCDK::ApplicationAutoScaling::ServiceNamespace (readonly)
Service namespace of the scalable attribute.
52 53 54 |
# File 'application_auto_scaling/base_scalable_attribute_props.rb', line 52 def service_namespace @service_namespace end |
Class Method Details
.jsii_properties ⇒ Object
54 55 56 57 58 59 60 61 62 63 |
# File 'application_auto_scaling/base_scalable_attribute_props.rb', line 54 def self.jsii_properties { :max_capacity => "maxCapacity", :min_capacity => "minCapacity", :dimension => "dimension", :resource_id => "resourceId", :role => "role", :service_namespace => "serviceNamespace", } end |
Instance Method Details
#to_jsii ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'application_auto_scaling/base_scalable_attribute_props.rb', line 65 def to_jsii result = {} result.merge!(super) result.merge!({ "maxCapacity" => @max_capacity, "minCapacity" => @min_capacity, "dimension" => @dimension, "resourceId" => @resource_id, "role" => @role, "serviceNamespace" => @service_namespace, }) result.compact end |