Class: AWSCDK::ECS::CfnCapacityProviderProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::ECS::CfnCapacityProviderProps
- Defined in:
- ecs/cfn_capacity_provider_props.rb
Overview
Properties for defining a CfnCapacityProvider.
Instance Attribute Summary collapse
-
#auto_scaling_group_provider ⇒ AWSCDK::IResolvable, ...
readonly
The Auto Scaling group settings for the capacity provider.
-
#cluster_name ⇒ String?
readonly
The cluster that this capacity provider is associated with.
-
#managed_instances_provider ⇒ AWSCDK::IResolvable, ...
readonly
The configuration for the Amazon ECS Managed Instances provider.
-
#name ⇒ String?
readonly
The name of the capacity provider.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
The metadata that you apply to the capacity provider to help you categorize and organize it.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(auto_scaling_group_provider: nil, cluster_name: nil, managed_instances_provider: nil, name: nil, tags: nil) ⇒ CfnCapacityProviderProps
constructor
A new instance of CfnCapacityProviderProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(auto_scaling_group_provider: nil, cluster_name: nil, managed_instances_provider: nil, name: nil, tags: nil) ⇒ CfnCapacityProviderProps
Returns a new instance of CfnCapacityProviderProps.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'ecs/cfn_capacity_provider_props.rb', line 14 def initialize(auto_scaling_group_provider: nil, cluster_name: nil, managed_instances_provider: nil, name: nil, tags: nil) @auto_scaling_group_provider = auto_scaling_group_provider.is_a?(Hash) ? ::AWSCDK::ECS::CfnCapacityProvider::AutoScalingGroupProviderProperty.new(**auto_scaling_group_provider.transform_keys(&:to_sym)) : auto_scaling_group_provider Jsii::Type.check_type(@auto_scaling_group_provider, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuQ2FwYWNpdHlQcm92aWRlci5BdXRvU2NhbGluZ0dyb3VwUHJvdmlkZXJQcm9wZXJ0eSJ9XX19")), "autoScalingGroupProvider") unless @auto_scaling_group_provider.nil? @cluster_name = cluster_name Jsii::Type.check_type(@cluster_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterName") unless @cluster_name.nil? @managed_instances_provider = managed_instances_provider.is_a?(Hash) ? ::AWSCDK::ECS::CfnCapacityProvider::ManagedInstancesProviderProperty.new(**managed_instances_provider.transform_keys(&:to_sym)) : managed_instances_provider Jsii::Type.check_type(@managed_instances_provider, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuQ2ZuQ2FwYWNpdHlQcm92aWRlci5NYW5hZ2VkSW5zdGFuY2VzUHJvdmlkZXJQcm9wZXJ0eSJ9XX19")), "managedInstancesProvider") unless @managed_instances_provider.nil? @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.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
#auto_scaling_group_provider ⇒ AWSCDK::IResolvable, ... (readonly)
The Auto Scaling group settings for the capacity provider.
31 32 33 |
# File 'ecs/cfn_capacity_provider_props.rb', line 31 def auto_scaling_group_provider @auto_scaling_group_provider end |
#cluster_name ⇒ String? (readonly)
The cluster that this capacity provider is associated with.
Managed instances capacity providers are cluster-scoped, meaning they can only be used within their associated cluster.
This is required for Managed instances.
40 41 42 |
# File 'ecs/cfn_capacity_provider_props.rb', line 40 def cluster_name @cluster_name end |
#managed_instances_provider ⇒ AWSCDK::IResolvable, ... (readonly)
The configuration for the Amazon ECS Managed Instances provider.
This includes the infrastructure role, the launch template configuration, and tag propagation settings.
47 48 49 |
# File 'ecs/cfn_capacity_provider_props.rb', line 47 def managed_instances_provider @managed_instances_provider end |
#name ⇒ String? (readonly)
The name of the capacity provider.
If a name is specified, it cannot start with aws , ecs , or fargate . If no name is specified, a default name in the CFNStackName-CFNResourceName-RandomString format is used.
54 55 56 |
# File 'ecs/cfn_capacity_provider_props.rb', line 54 def name @name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
The metadata that you apply to the capacity provider to help you categorize and organize it.
Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
- Maximum number of tags per resource - 50
- For each resource, each tag key must be unique, and each tag key can have only one value.
- Maximum key length - 128 Unicode characters in UTF-8
- Maximum value length - 256 Unicode characters in UTF-8
- If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : /
69 70 71 |
# File 'ecs/cfn_capacity_provider_props.rb', line 69 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
71 72 73 74 75 76 77 78 79 |
# File 'ecs/cfn_capacity_provider_props.rb', line 71 def self.jsii_properties { :auto_scaling_group_provider => "autoScalingGroupProvider", :cluster_name => "clusterName", :managed_instances_provider => "managedInstancesProvider", :name => "name", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 |
# File 'ecs/cfn_capacity_provider_props.rb', line 81 def to_jsii result = {} result.merge!({ "autoScalingGroupProvider" => @auto_scaling_group_provider, "clusterName" => @cluster_name, "managedInstancesProvider" => @managed_instances_provider, "name" => @name, "tags" => @tags, }) result.compact end |