Class: AWSCDK::Events::CfnRule::ECSParametersProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Events::CfnRule::ECSParametersProperty
- Defined in:
- events/cfn_rule.rb
Overview
The custom parameters to be used when the target is an Amazon ECS task.
Instance Attribute Summary collapse
-
#capacity_provider_strategy ⇒ AWSCDK::IResolvable, ...
readonly
The capacity provider strategy to use for the task.
-
#enable_ecs_managed_tags ⇒ Boolean, ...
readonly
Specifies whether to enable Amazon ECS managed tags for the task.
-
#enable_execute_command ⇒ Boolean, ...
readonly
Whether or not to enable the execute command functionality for the containers in this task.
-
#group ⇒ String?
readonly
Specifies an ECS task group for the task.
-
#launch_type ⇒ String?
readonly
Specifies the launch type on which your task is running.
-
#network_configuration ⇒ AWSCDK::IResolvable, ...
readonly
Use this structure if the Amazon ECS task uses the
awsvpcnetwork mode. -
#placement_constraints ⇒ AWSCDK::IResolvable, ...
readonly
An array of placement constraint objects to use for the task.
-
#placement_strategies ⇒ AWSCDK::IResolvable, ...
readonly
The placement strategy objects to use for the task.
-
#platform_version ⇒ String?
readonly
Specifies the platform version for the task.
-
#propagate_tags ⇒ String?
readonly
Specifies whether to propagate the tags from the task definition to the task.
-
#reference_id ⇒ String?
readonly
The reference ID to use for the task.
-
#tag_list ⇒ AWSCDK::IResolvable, ...
readonly
The metadata that you apply to the task to help you categorize and organize them.
-
#task_count ⇒ Numeric?
readonly
The number of tasks to create based on
TaskDefinition. -
#task_definition_arn ⇒ String
readonly
The ARN of the task definition to use if the event target is an Amazon ECS task.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(task_definition_arn:, capacity_provider_strategy: nil, enable_ecs_managed_tags: nil, enable_execute_command: nil, group: nil, launch_type: nil, network_configuration: nil, placement_constraints: nil, placement_strategies: nil, platform_version: nil, propagate_tags: nil, reference_id: nil, tag_list: nil, task_count: nil) ⇒ ECSParametersProperty
constructor
A new instance of ECSParametersProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(task_definition_arn:, capacity_provider_strategy: nil, enable_ecs_managed_tags: nil, enable_execute_command: nil, group: nil, launch_type: nil, network_configuration: nil, placement_constraints: nil, placement_strategies: nil, platform_version: nil, propagate_tags: nil, reference_id: nil, tag_list: nil, task_count: nil) ⇒ ECSParametersProperty
Returns a new instance of ECSParametersProperty.
1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 |
# File 'events/cfn_rule.rb', line 1000 def initialize(task_definition_arn:, capacity_provider_strategy: nil, enable_ecs_managed_tags: nil, enable_execute_command: nil, group: nil, launch_type: nil, network_configuration: nil, placement_constraints: nil, placement_strategies: nil, platform_version: nil, propagate_tags: nil, reference_id: nil, tag_list: nil, task_count: nil) @task_definition_arn = task_definition_arn Jsii::Type.check_type(@task_definition_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "taskDefinitionArn") @capacity_provider_strategy = capacity_provider_strategy Jsii::Type.check_type(@capacity_provider_strategy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLkNmblJ1bGUuQ2FwYWNpdHlQcm92aWRlclN0cmF0ZWd5SXRlbVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "capacityProviderStrategy") unless @capacity_provider_strategy.nil? @enable_ecs_managed_tags = Jsii::Type.check_type(@enable_ecs_managed_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableEcsManagedTags") unless @enable_ecs_managed_tags.nil? @enable_execute_command = enable_execute_command Jsii::Type.check_type(@enable_execute_command, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableExecuteCommand") unless @enable_execute_command.nil? @group = group Jsii::Type.check_type(@group, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "group") unless @group.nil? @launch_type = launch_type Jsii::Type.check_type(@launch_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "launchType") unless @launch_type.nil? @network_configuration = network_configuration.is_a?(Hash) ? ::AWSCDK::Events::CfnRule::NetworkConfigurationProperty.new(**network_configuration.transform_keys(&:to_sym)) : network_configuration Jsii::Type.check_type(@network_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ldmVudHMuQ2ZuUnVsZS5OZXR3b3JrQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "networkConfiguration") unless @network_configuration.nil? @placement_constraints = placement_constraints Jsii::Type.check_type(@placement_constraints, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLkNmblJ1bGUuUGxhY2VtZW50Q29uc3RyYWludFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "placementConstraints") unless @placement_constraints.nil? @placement_strategies = placement_strategies Jsii::Type.check_type(@placement_strategies, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZXZlbnRzLkNmblJ1bGUuUGxhY2VtZW50U3RyYXRlZ3lQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "placementStrategies") unless @placement_strategies.nil? @platform_version = platform_version Jsii::Type.check_type(@platform_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "platformVersion") unless @platform_version.nil? @propagate_tags = Jsii::Type.check_type(@propagate_tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propagateTags") unless @propagate_tags.nil? @reference_id = reference_id Jsii::Type.check_type(@reference_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "referenceId") unless @reference_id.nil? @tag_list = tag_list Jsii::Type.check_type(@tag_list, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5DZm5UYWcifV19fSwia2luZCI6ImFycmF5In19XX19")), "tagList") unless @tag_list.nil? @task_count = task_count Jsii::Type.check_type(@task_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "taskCount") unless @task_count.nil? end |
Instance Attribute Details
#capacity_provider_strategy ⇒ AWSCDK::IResolvable, ... (readonly)
The capacity provider strategy to use for the task.
If a capacity_provider_strategy is specified, the launch_type parameter must be omitted. If no capacity_provider_strategy or launchType is specified, the default_capacity_provider_strategy for the cluster is used.
1042 1043 1044 |
# File 'events/cfn_rule.rb', line 1042 def capacity_provider_strategy @capacity_provider_strategy end |
#enable_ecs_managed_tags ⇒ Boolean, ... (readonly)
Specifies whether to enable Amazon ECS managed tags for the task.
For more information, see Tagging Your Amazon ECS Resources in the Amazon Elastic Container Service Developer Guide.
1049 1050 1051 |
# File 'events/cfn_rule.rb', line 1049 def @enable_ecs_managed_tags end |
#enable_execute_command ⇒ Boolean, ... (readonly)
Whether or not to enable the execute command functionality for the containers in this task.
If true, this enables execute command functionality on all containers in the task.
1056 1057 1058 |
# File 'events/cfn_rule.rb', line 1056 def enable_execute_command @enable_execute_command end |
#group ⇒ String? (readonly)
Specifies an ECS task group for the task.
The maximum length is 255 characters.
1063 1064 1065 |
# File 'events/cfn_rule.rb', line 1063 def group @group end |
#launch_type ⇒ String? (readonly)
Specifies the launch type on which your task is running.
The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The FARGATE value is supported only in the Regions where AWS Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS in the Amazon Elastic Container Service Developer Guide .
1070 1071 1072 |
# File 'events/cfn_rule.rb', line 1070 def launch_type @launch_type end |
#network_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
Use this structure if the Amazon ECS task uses the awsvpc network mode.
This structure specifies the VPC subnets and security groups associated with the task, and whether a public IP address is to be used. This structure is required if LaunchType is FARGATE because the awsvpc mode is required for Fargate tasks.
If you specify NetworkConfiguration when the target ECS task does not use the awsvpc network mode, the task fails.
1079 1080 1081 |
# File 'events/cfn_rule.rb', line 1079 def network_configuration @network_configuration end |
#placement_constraints ⇒ AWSCDK::IResolvable, ... (readonly)
An array of placement constraint objects to use for the task.
You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).
1086 1087 1088 |
# File 'events/cfn_rule.rb', line 1086 def placement_constraints @placement_constraints end |
#placement_strategies ⇒ AWSCDK::IResolvable, ... (readonly)
The placement strategy objects to use for the task.
You can specify a maximum of five strategy rules per task.
1093 1094 1095 |
# File 'events/cfn_rule.rb', line 1093 def placement_strategies @placement_strategies end |
#platform_version ⇒ String? (readonly)
Specifies the platform version for the task.
Specify only the numeric portion of the platform version, such as 1.1.0 .
This structure is used only if LaunchType is FARGATE . For more information about valid platform versions, see AWS Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide .
1102 1103 1104 |
# File 'events/cfn_rule.rb', line 1102 def platform_version @platform_version end |
#propagate_tags ⇒ String? (readonly)
Specifies whether to propagate the tags from the task definition to the task.
If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the TagResource API action.
1109 1110 1111 |
# File 'events/cfn_rule.rb', line 1109 def @propagate_tags end |
#reference_id ⇒ String? (readonly)
The reference ID to use for the task.
1114 1115 1116 |
# File 'events/cfn_rule.rb', line 1114 def reference_id @reference_id end |
#tag_list ⇒ AWSCDK::IResolvable, ... (readonly)
The metadata that you apply to the task to help you categorize and organize them.
Each tag consists of a key and an optional value, both of which you define. To learn more, see RunTask in the Amazon ECS API Reference.
1121 1122 1123 |
# File 'events/cfn_rule.rb', line 1121 def tag_list @tag_list end |
#task_count ⇒ Numeric? (readonly)
The number of tasks to create based on TaskDefinition .
The default is 1.
1128 1129 1130 |
# File 'events/cfn_rule.rb', line 1128 def task_count @task_count end |
#task_definition_arn ⇒ String (readonly)
The ARN of the task definition to use if the event target is an Amazon ECS task.
1035 1036 1037 |
# File 'events/cfn_rule.rb', line 1035 def task_definition_arn @task_definition_arn end |
Class Method Details
.jsii_properties ⇒ Object
1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 |
# File 'events/cfn_rule.rb', line 1130 def self.jsii_properties { :task_definition_arn => "taskDefinitionArn", :capacity_provider_strategy => "capacityProviderStrategy", :enable_ecs_managed_tags => "enableEcsManagedTags", :enable_execute_command => "enableExecuteCommand", :group => "group", :launch_type => "launchType", :network_configuration => "networkConfiguration", :placement_constraints => "placementConstraints", :placement_strategies => "placementStrategies", :platform_version => "platformVersion", :propagate_tags => "propagateTags", :reference_id => "referenceId", :tag_list => "tagList", :task_count => "taskCount", } end |
Instance Method Details
#to_jsii ⇒ Object
1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 |
# File 'events/cfn_rule.rb', line 1149 def to_jsii result = {} result.merge!({ "taskDefinitionArn" => @task_definition_arn, "capacityProviderStrategy" => @capacity_provider_strategy, "enableEcsManagedTags" => @enable_ecs_managed_tags, "enableExecuteCommand" => @enable_execute_command, "group" => @group, "launchType" => @launch_type, "networkConfiguration" => @network_configuration, "placementConstraints" => @placement_constraints, "placementStrategies" => @placement_strategies, "platformVersion" => @platform_version, "propagateTags" => @propagate_tags, "referenceId" => @reference_id, "tagList" => @tag_list, "taskCount" => @task_count, }) result.compact end |