Class: AWSCDK::ApplicationAutoScaling::ScalableTargetProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ApplicationAutoScaling::ScalableTargetProps
- Defined in:
- application_auto_scaling/scalable_target_props.rb
Overview
Properties for a scalable target.
Instance Attribute Summary collapse
-
#max_capacity ⇒ Numeric
readonly
The maximum value that Application Auto Scaling can use to scale a target during a scaling activity.
-
#min_capacity ⇒ Numeric
readonly
The minimum value that Application Auto Scaling can use to scale a target during a scaling activity.
-
#resource_id ⇒ String
readonly
The resource identifier to associate with this scalable target.
-
#role ⇒ AWSCDK::IAM::IRole?
readonly
Role that allows Application Auto Scaling to modify your scalable target.
-
#scalable_dimension ⇒ String
readonly
The scalable dimension that's associated with the scalable target.
-
#service_namespace ⇒ AWSCDK::ApplicationAutoScaling::ServiceNamespace
readonly
The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_capacity:, min_capacity:, resource_id:, scalable_dimension:, service_namespace:, role: nil) ⇒ ScalableTargetProps
constructor
A new instance of ScalableTargetProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_capacity:, min_capacity:, resource_id:, scalable_dimension:, service_namespace:, role: nil) ⇒ ScalableTargetProps
Returns a new instance of ScalableTargetProps.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'application_auto_scaling/scalable_target_props.rb', line 13 def initialize(max_capacity:, min_capacity:, resource_id:, scalable_dimension:, service_namespace:, role: nil) @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") @resource_id = resource_id Jsii::Type.check_type(@resource_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceId") @scalable_dimension = scalable_dimension Jsii::Type.check_type(@scalable_dimension, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "scalableDimension") @service_namespace = service_namespace Jsii::Type.check_type(@service_namespace, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwbGljYXRpb25hdXRvc2NhbGluZy5TZXJ2aWNlTmFtZXNwYWNlIn0=")), "serviceNamespace") @role = role Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil? end |
Instance Attribute Details
#max_capacity ⇒ Numeric (readonly)
The maximum value that Application Auto Scaling can use to scale a target during a scaling activity.
31 32 33 |
# File 'application_auto_scaling/scalable_target_props.rb', line 31 def max_capacity @max_capacity end |
#min_capacity ⇒ Numeric (readonly)
The minimum value that Application Auto Scaling can use to scale a target during a scaling activity.
35 36 37 |
# File 'application_auto_scaling/scalable_target_props.rb', line 35 def min_capacity @min_capacity end |
#resource_id ⇒ String (readonly)
The resource identifier to associate with this scalable target.
This string consists of the resource type and unique identifier.
Example value: service/ecsStack-MyECSCluster-AB12CDE3F4GH/ecsStack-MyECSService-AB12CDE3F4GH
44 45 46 |
# File 'application_auto_scaling/scalable_target_props.rb', line 44 def resource_id @resource_id end |
#role ⇒ AWSCDK::IAM::IRole? (readonly)
Default: A role is automatically created
Role that allows Application Auto Scaling to modify your scalable target.
66 67 68 |
# File 'application_auto_scaling/scalable_target_props.rb', line 66 def role @role end |
#scalable_dimension ⇒ String (readonly)
The scalable dimension that's associated with the scalable target.
Specify the service namespace, resource type, and scaling property.
Example value: ecs:service:DesiredCount
53 54 55 |
# File 'application_auto_scaling/scalable_target_props.rb', line 53 def scalable_dimension @scalable_dimension end |
#service_namespace ⇒ AWSCDK::ApplicationAutoScaling::ServiceNamespace (readonly)
The namespace of the AWS service that provides the resource or custom-resource for a resource provided by your own application or service.
For valid AWS service namespace values, see the RegisterScalableTarget action in the Application Auto Scaling API Reference.
61 62 63 |
# File 'application_auto_scaling/scalable_target_props.rb', line 61 def service_namespace @service_namespace end |
Class Method Details
.jsii_properties ⇒ Object
68 69 70 71 72 73 74 75 76 77 |
# File 'application_auto_scaling/scalable_target_props.rb', line 68 def self.jsii_properties { :max_capacity => "maxCapacity", :min_capacity => "minCapacity", :resource_id => "resourceId", :scalable_dimension => "scalableDimension", :service_namespace => "serviceNamespace", :role => "role", } end |
Instance Method Details
#to_jsii ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'application_auto_scaling/scalable_target_props.rb', line 79 def to_jsii result = {} result.merge!({ "maxCapacity" => @max_capacity, "minCapacity" => @min_capacity, "resourceId" => @resource_id, "scalableDimension" => @scalable_dimension, "serviceNamespace" => @service_namespace, "role" => @role, }) result.compact end |