Class: AWSCDK::Pipes::CfnPipe::PipeTargetECSTaskParametersProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
pipes/cfn_pipe.rb

Overview

The parameters for using an Amazon ECS task as a target.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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, overrides: nil, placement_constraints: nil, placement_strategy: nil, platform_version: nil, propagate_tags: nil, reference_id: nil, tags: nil, task_count: nil) ⇒ PipeTargetECSTaskParametersProperty

Returns a new instance of PipeTargetECSTaskParametersProperty.

Parameters:



3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
# File 'pipes/cfn_pipe.rb', line 3130

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, overrides: nil, placement_constraints: nil, placement_strategy: nil, platform_version: nil, propagate_tags: nil, reference_id: nil, tags: 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("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlwZXMuQ2ZuUGlwZS5DYXBhY2l0eVByb3ZpZGVyU3RyYXRlZ3lJdGVtUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "capacityProviderStrategy") unless @capacity_provider_strategy.nil?
  @enable_ecs_managed_tags = 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::Pipes::CfnPipe::NetworkConfigurationProperty.new(**network_configuration.transform_keys(&:to_sym)) : network_configuration
  Jsii::Type.check_type(@network_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waXBlcy5DZm5QaXBlLk5ldHdvcmtDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "networkConfiguration") unless @network_configuration.nil?
  @overrides = overrides.is_a?(Hash) ? ::AWSCDK::Pipes::CfnPipe::ECSTaskOverrideProperty.new(**overrides.transform_keys(&:to_sym)) : overrides
  Jsii::Type.check_type(@overrides, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19waXBlcy5DZm5QaXBlLkVjc1Rhc2tPdmVycmlkZVByb3BlcnR5In1dfX0=")), "overrides") unless @overrides.nil?
  @placement_constraints = placement_constraints
  Jsii::Type.check_type(@placement_constraints, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlwZXMuQ2ZuUGlwZS5QbGFjZW1lbnRDb25zdHJhaW50UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "placementConstraints") unless @placement_constraints.nil?
  @placement_strategy = placement_strategy
  Jsii::Type.check_type(@placement_strategy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcGlwZXMuQ2ZuUGlwZS5QbGFjZW1lbnRTdHJhdGVneVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "placementStrategy") unless @placement_strategy.nil?
  @platform_version = platform_version
  Jsii::Type.check_type(@platform_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "platformVersion") unless @platform_version.nil?
  @propagate_tags = 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?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.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_strategyAWSCDK::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.



3174
3175
3176
# File 'pipes/cfn_pipe.rb', line 3174

def capacity_provider_strategy
  @capacity_provider_strategy
end

#enable_ecs_managed_tagsBoolean, ... (readonly)

Note:

Default: - false

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.



3182
3183
3184
# File 'pipes/cfn_pipe.rb', line 3182

def enable_ecs_managed_tags
  @enable_ecs_managed_tags
end

#enable_execute_commandBoolean, ... (readonly)

Note:

Default: - false

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.



3190
3191
3192
# File 'pipes/cfn_pipe.rb', line 3190

def enable_execute_command
  @enable_execute_command
end

#groupString? (readonly)

Specifies an Amazon ECS task group for the task.

The maximum length is 255 characters.



3197
3198
3199
# File 'pipes/cfn_pipe.rb', line 3197

def group
  @group
end

#launch_typeString? (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 .



3204
3205
3206
# File 'pipes/cfn_pipe.rb', line 3204

def launch_type
  @launch_type
end

#network_configurationAWSCDK::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.



3213
3214
3215
# File 'pipes/cfn_pipe.rb', line 3213

def network_configuration
  @network_configuration
end

#overridesAWSCDK::IResolvable, ... (readonly)

The overrides that are associated with a task.



3218
3219
3220
# File 'pipes/cfn_pipe.rb', line 3218

def overrides
  @overrides
end

#placement_constraintsAWSCDK::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).



3225
3226
3227
# File 'pipes/cfn_pipe.rb', line 3225

def placement_constraints
  @placement_constraints
end

#placement_strategyAWSCDK::IResolvable, ... (readonly)

The placement strategy objects to use for the task.

You can specify a maximum of five strategy rules per task.



3232
3233
3234
# File 'pipes/cfn_pipe.rb', line 3232

def placement_strategy
  @placement_strategy
end

#platform_versionString? (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 .



3241
3242
3243
# File 'pipes/cfn_pipe.rb', line 3241

def platform_version
  @platform_version
end

#propagate_tagsString? (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.



3248
3249
3250
# File 'pipes/cfn_pipe.rb', line 3248

def propagate_tags
  @propagate_tags
end

#reference_idString? (readonly)

The reference ID to use for the task.



3253
3254
3255
# File 'pipes/cfn_pipe.rb', line 3253

def reference_id
  @reference_id
end

#tagsArray<AWSCDK::CfnTag>? (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.



3260
3261
3262
# File 'pipes/cfn_pipe.rb', line 3260

def tags
  @tags
end

#task_countNumeric? (readonly)

The number of tasks to create based on TaskDefinition .

The default is 1.



3267
3268
3269
# File 'pipes/cfn_pipe.rb', line 3267

def task_count
  @task_count
end

#task_definition_arnString (readonly)

The ARN of the task definition to use if the event target is an Amazon ECS task.



3167
3168
3169
# File 'pipes/cfn_pipe.rb', line 3167

def task_definition_arn
  @task_definition_arn
end

Class Method Details

.jsii_propertiesObject



3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
# File 'pipes/cfn_pipe.rb', line 3269

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",
    :overrides => "overrides",
    :placement_constraints => "placementConstraints",
    :placement_strategy => "placementStrategy",
    :platform_version => "platformVersion",
    :propagate_tags => "propagateTags",
    :reference_id => "referenceId",
    :tags => "tags",
    :task_count => "taskCount",
  }
end

Instance Method Details

#to_jsiiObject



3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
# File 'pipes/cfn_pipe.rb', line 3289

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,
    "overrides" => @overrides,
    "placementConstraints" => @placement_constraints,
    "placementStrategy" => @placement_strategy,
    "platformVersion" => @platform_version,
    "propagateTags" => @propagate_tags,
    "referenceId" => @reference_id,
    "tags" => @tags,
    "taskCount" => @task_count,
  })
  result.compact
end