Class: AWSCDK::Scheduler::CfnSchedule::ECSParametersProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
scheduler/cfn_schedule.rb

Overview

The templated target type for the Amazon ECS RunTask API operation.

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

Returns a new instance of ECSParametersProperty.

Parameters:



815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
# File 'scheduler/cfn_schedule.rb', line 815

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_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("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLkNmblNjaGVkdWxlLkNhcGFjaXR5UHJvdmlkZXJTdHJhdGVneUl0ZW1Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "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::Scheduler::CfnSchedule::NetworkConfigurationProperty.new(**network_configuration.transform_keys(&:to_sym)) : network_configuration
  Jsii::Type.check_type(@network_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zY2hlZHVsZXIuQ2ZuU2NoZWR1bGUuTmV0d29ya0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "networkConfiguration") unless @network_configuration.nil?
  @placement_constraints = placement_constraints
  Jsii::Type.check_type(@placement_constraints, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLkNmblNjaGVkdWxlLlBsYWNlbWVudENvbnN0cmFpbnRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "placementConstraints") unless @placement_constraints.nil?
  @placement_strategy = placement_strategy
  Jsii::Type.check_type(@placement_strategy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc2NoZWR1bGVyLkNmblNjaGVkdWxlLlBsYWNlbWVudFN0cmF0ZWd5UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "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
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "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.



855
856
857
# File 'scheduler/cfn_schedule.rb', line 855

def capacity_provider_strategy
  @capacity_provider_strategy
end

#enable_ecs_managed_tagsBoolean, ... (readonly)

Specifies whether to enable Amazon ECS managed tags for the task.

For more information, see Tagging Your Amazon ECS Resources in the Amazon ECS Developer Guide .



862
863
864
# File 'scheduler/cfn_schedule.rb', line 862

def enable_ecs_managed_tags
  @enable_ecs_managed_tags
end

#enable_execute_commandBoolean, ... (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.



869
870
871
# File 'scheduler/cfn_schedule.rb', line 869

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.



876
877
878
# File 'scheduler/cfn_schedule.rb', line 876

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 Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS in the Amazon ECS Developer Guide .



883
884
885
# File 'scheduler/cfn_schedule.rb', line 883

def launch_type
  @launch_type
end

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

This structure specifies the network configuration for an ECS task.



888
889
890
# File 'scheduler/cfn_schedule.rb', line 888

def network_configuration
  @network_configuration
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).



895
896
897
# File 'scheduler/cfn_schedule.rb', line 895

def placement_constraints
  @placement_constraints
end

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

The task placement strategy for a task or service.



900
901
902
# File 'scheduler/cfn_schedule.rb', line 900

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 .



907
908
909
# File 'scheduler/cfn_schedule.rb', line 907

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 Amazon ECS TagResource API action.



914
915
916
# File 'scheduler/cfn_schedule.rb', line 914

def propagate_tags
  @propagate_tags
end

#reference_idString? (readonly)

The reference ID to use for the task.



919
920
921
# File 'scheduler/cfn_schedule.rb', line 919

def reference_id
  @reference_id
end

#tagsObject? (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. For more information, see RunTask in the Amazon ECS API Reference .



926
927
928
# File 'scheduler/cfn_schedule.rb', line 926

def tags
  @tags
end

#task_countNumeric? (readonly)

The number of tasks to create based on TaskDefinition .

The default is 1 .



933
934
935
# File 'scheduler/cfn_schedule.rb', line 933

def task_count
  @task_count
end

#task_definition_arnString (readonly)

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



850
851
852
# File 'scheduler/cfn_schedule.rb', line 850

def task_definition_arn
  @task_definition_arn
end

Class Method Details

.jsii_propertiesObject



935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
# File 'scheduler/cfn_schedule.rb', line 935

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

Instance Method Details

#to_jsiiObject



954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
# File 'scheduler/cfn_schedule.rb', line 954

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