/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Scheduler { namespace Model { /** *

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

See Also:

AWS * API Reference

*/ class EcsParameters { public: AWS_SCHEDULER_API EcsParameters(); AWS_SCHEDULER_API EcsParameters(Aws::Utils::Json::JsonView jsonValue); AWS_SCHEDULER_API EcsParameters& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SCHEDULER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The capacity provider strategy to use for the task.

*/ inline const Aws::Vector& GetCapacityProviderStrategy() const{ return m_capacityProviderStrategy; } /** *

The capacity provider strategy to use for the task.

*/ inline bool CapacityProviderStrategyHasBeenSet() const { return m_capacityProviderStrategyHasBeenSet; } /** *

The capacity provider strategy to use for the task.

*/ inline void SetCapacityProviderStrategy(const Aws::Vector& value) { m_capacityProviderStrategyHasBeenSet = true; m_capacityProviderStrategy = value; } /** *

The capacity provider strategy to use for the task.

*/ inline void SetCapacityProviderStrategy(Aws::Vector&& value) { m_capacityProviderStrategyHasBeenSet = true; m_capacityProviderStrategy = std::move(value); } /** *

The capacity provider strategy to use for the task.

*/ inline EcsParameters& WithCapacityProviderStrategy(const Aws::Vector& value) { SetCapacityProviderStrategy(value); return *this;} /** *

The capacity provider strategy to use for the task.

*/ inline EcsParameters& WithCapacityProviderStrategy(Aws::Vector&& value) { SetCapacityProviderStrategy(std::move(value)); return *this;} /** *

The capacity provider strategy to use for the task.

*/ inline EcsParameters& AddCapacityProviderStrategy(const CapacityProviderStrategyItem& value) { m_capacityProviderStrategyHasBeenSet = true; m_capacityProviderStrategy.push_back(value); return *this; } /** *

The capacity provider strategy to use for the task.

*/ inline EcsParameters& AddCapacityProviderStrategy(CapacityProviderStrategyItem&& value) { m_capacityProviderStrategyHasBeenSet = true; m_capacityProviderStrategy.push_back(std::move(value)); return *this; } /** *

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.

*/ inline bool GetEnableECSManagedTags() const{ return m_enableECSManagedTags; } /** *

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.

*/ inline bool EnableECSManagedTagsHasBeenSet() const { return m_enableECSManagedTagsHasBeenSet; } /** *

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.

*/ inline void SetEnableECSManagedTags(bool value) { m_enableECSManagedTagsHasBeenSet = true; m_enableECSManagedTags = value; } /** *

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.

*/ inline EcsParameters& WithEnableECSManagedTags(bool value) { SetEnableECSManagedTags(value); return *this;} /** *

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.

*/ inline bool GetEnableExecuteCommand() const{ return m_enableExecuteCommand; } /** *

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.

*/ inline bool EnableExecuteCommandHasBeenSet() const { return m_enableExecuteCommandHasBeenSet; } /** *

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.

*/ inline void SetEnableExecuteCommand(bool value) { m_enableExecuteCommandHasBeenSet = true; m_enableExecuteCommand = value; } /** *

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.

*/ inline EcsParameters& WithEnableExecuteCommand(bool value) { SetEnableExecuteCommand(value); return *this;} /** *

Specifies an ECS task group for the task. The maximum length is 255 * characters.

*/ inline const Aws::String& GetGroup() const{ return m_group; } /** *

Specifies an ECS task group for the task. The maximum length is 255 * characters.

*/ inline bool GroupHasBeenSet() const { return m_groupHasBeenSet; } /** *

Specifies an ECS task group for the task. The maximum length is 255 * characters.

*/ inline void SetGroup(const Aws::String& value) { m_groupHasBeenSet = true; m_group = value; } /** *

Specifies an ECS task group for the task. The maximum length is 255 * characters.

*/ inline void SetGroup(Aws::String&& value) { m_groupHasBeenSet = true; m_group = std::move(value); } /** *

Specifies an ECS task group for the task. The maximum length is 255 * characters.

*/ inline void SetGroup(const char* value) { m_groupHasBeenSet = true; m_group.assign(value); } /** *

Specifies an ECS task group for the task. The maximum length is 255 * characters.

*/ inline EcsParameters& WithGroup(const Aws::String& value) { SetGroup(value); return *this;} /** *

Specifies an ECS task group for the task. The maximum length is 255 * characters.

*/ inline EcsParameters& WithGroup(Aws::String&& value) { SetGroup(std::move(value)); return *this;} /** *

Specifies an ECS task group for the task. The maximum length is 255 * characters.

*/ inline EcsParameters& WithGroup(const char* value) { SetGroup(value); return *this;} /** *

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.

*/ inline const LaunchType& GetLaunchType() const{ return m_launchType; } /** *

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.

*/ inline bool LaunchTypeHasBeenSet() const { return m_launchTypeHasBeenSet; } /** *

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.

*/ inline void SetLaunchType(const LaunchType& value) { m_launchTypeHasBeenSet = true; m_launchType = value; } /** *

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.

*/ inline void SetLaunchType(LaunchType&& value) { m_launchTypeHasBeenSet = true; m_launchType = std::move(value); } /** *

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.

*/ inline EcsParameters& WithLaunchType(const LaunchType& value) { SetLaunchType(value); return *this;} /** *

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.

*/ inline EcsParameters& WithLaunchType(LaunchType&& value) { SetLaunchType(std::move(value)); return *this;} /** *

This structure specifies the network configuration for an ECS task.

*/ inline const NetworkConfiguration& GetNetworkConfiguration() const{ return m_networkConfiguration; } /** *

This structure specifies the network configuration for an ECS task.

*/ inline bool NetworkConfigurationHasBeenSet() const { return m_networkConfigurationHasBeenSet; } /** *

This structure specifies the network configuration for an ECS task.

*/ inline void SetNetworkConfiguration(const NetworkConfiguration& value) { m_networkConfigurationHasBeenSet = true; m_networkConfiguration = value; } /** *

This structure specifies the network configuration for an ECS task.

*/ inline void SetNetworkConfiguration(NetworkConfiguration&& value) { m_networkConfigurationHasBeenSet = true; m_networkConfiguration = std::move(value); } /** *

This structure specifies the network configuration for an ECS task.

*/ inline EcsParameters& WithNetworkConfiguration(const NetworkConfiguration& value) { SetNetworkConfiguration(value); return *this;} /** *

This structure specifies the network configuration for an ECS task.

*/ inline EcsParameters& WithNetworkConfiguration(NetworkConfiguration&& value) { SetNetworkConfiguration(std::move(value)); return *this;} /** *

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).

*/ inline const Aws::Vector& GetPlacementConstraints() const{ return m_placementConstraints; } /** *

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).

*/ inline bool PlacementConstraintsHasBeenSet() const { return m_placementConstraintsHasBeenSet; } /** *

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).

*/ inline void SetPlacementConstraints(const Aws::Vector& value) { m_placementConstraintsHasBeenSet = true; m_placementConstraints = value; } /** *

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).

*/ inline void SetPlacementConstraints(Aws::Vector&& value) { m_placementConstraintsHasBeenSet = true; m_placementConstraints = std::move(value); } /** *

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).

*/ inline EcsParameters& WithPlacementConstraints(const Aws::Vector& value) { SetPlacementConstraints(value); return *this;} /** *

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).

*/ inline EcsParameters& WithPlacementConstraints(Aws::Vector&& value) { SetPlacementConstraints(std::move(value)); return *this;} /** *

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).

*/ inline EcsParameters& AddPlacementConstraints(const PlacementConstraint& value) { m_placementConstraintsHasBeenSet = true; m_placementConstraints.push_back(value); return *this; } /** *

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).

*/ inline EcsParameters& AddPlacementConstraints(PlacementConstraint&& value) { m_placementConstraintsHasBeenSet = true; m_placementConstraints.push_back(std::move(value)); return *this; } /** *

The task placement strategy for a task or service.

*/ inline const Aws::Vector& GetPlacementStrategy() const{ return m_placementStrategy; } /** *

The task placement strategy for a task or service.

*/ inline bool PlacementStrategyHasBeenSet() const { return m_placementStrategyHasBeenSet; } /** *

The task placement strategy for a task or service.

*/ inline void SetPlacementStrategy(const Aws::Vector& value) { m_placementStrategyHasBeenSet = true; m_placementStrategy = value; } /** *

The task placement strategy for a task or service.

*/ inline void SetPlacementStrategy(Aws::Vector&& value) { m_placementStrategyHasBeenSet = true; m_placementStrategy = std::move(value); } /** *

The task placement strategy for a task or service.

*/ inline EcsParameters& WithPlacementStrategy(const Aws::Vector& value) { SetPlacementStrategy(value); return *this;} /** *

The task placement strategy for a task or service.

*/ inline EcsParameters& WithPlacementStrategy(Aws::Vector&& value) { SetPlacementStrategy(std::move(value)); return *this;} /** *

The task placement strategy for a task or service.

*/ inline EcsParameters& AddPlacementStrategy(const PlacementStrategy& value) { m_placementStrategyHasBeenSet = true; m_placementStrategy.push_back(value); return *this; } /** *

The task placement strategy for a task or service.

*/ inline EcsParameters& AddPlacementStrategy(PlacementStrategy&& value) { m_placementStrategyHasBeenSet = true; m_placementStrategy.push_back(std::move(value)); return *this; } /** *

Specifies the platform version for the task. Specify only the numeric portion * of the platform version, such as 1.1.0.

*/ inline const Aws::String& GetPlatformVersion() const{ return m_platformVersion; } /** *

Specifies the platform version for the task. Specify only the numeric portion * of the platform version, such as 1.1.0.

*/ inline bool PlatformVersionHasBeenSet() const { return m_platformVersionHasBeenSet; } /** *

Specifies the platform version for the task. Specify only the numeric portion * of the platform version, such as 1.1.0.

*/ inline void SetPlatformVersion(const Aws::String& value) { m_platformVersionHasBeenSet = true; m_platformVersion = value; } /** *

Specifies the platform version for the task. Specify only the numeric portion * of the platform version, such as 1.1.0.

*/ inline void SetPlatformVersion(Aws::String&& value) { m_platformVersionHasBeenSet = true; m_platformVersion = std::move(value); } /** *

Specifies the platform version for the task. Specify only the numeric portion * of the platform version, such as 1.1.0.

*/ inline void SetPlatformVersion(const char* value) { m_platformVersionHasBeenSet = true; m_platformVersion.assign(value); } /** *

Specifies the platform version for the task. Specify only the numeric portion * of the platform version, such as 1.1.0.

*/ inline EcsParameters& WithPlatformVersion(const Aws::String& value) { SetPlatformVersion(value); return *this;} /** *

Specifies the platform version for the task. Specify only the numeric portion * of the platform version, such as 1.1.0.

*/ inline EcsParameters& WithPlatformVersion(Aws::String&& value) { SetPlatformVersion(std::move(value)); return *this;} /** *

Specifies the platform version for the task. Specify only the numeric portion * of the platform version, such as 1.1.0.

*/ inline EcsParameters& WithPlatformVersion(const char* value) { SetPlatformVersion(value); return *this;} /** *

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

*/ inline const PropagateTags& GetPropagateTags() const{ return m_propagateTags; } /** *

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

*/ inline bool PropagateTagsHasBeenSet() const { return m_propagateTagsHasBeenSet; } /** *

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

*/ inline void SetPropagateTags(const PropagateTags& value) { m_propagateTagsHasBeenSet = true; m_propagateTags = value; } /** *

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

*/ inline void SetPropagateTags(PropagateTags&& value) { m_propagateTagsHasBeenSet = true; m_propagateTags = std::move(value); } /** *

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

*/ inline EcsParameters& WithPropagateTags(const PropagateTags& value) { SetPropagateTags(value); return *this;} /** *

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

*/ inline EcsParameters& WithPropagateTags(PropagateTags&& value) { SetPropagateTags(std::move(value)); return *this;} /** *

The reference ID to use for the task.

*/ inline const Aws::String& GetReferenceId() const{ return m_referenceId; } /** *

The reference ID to use for the task.

*/ inline bool ReferenceIdHasBeenSet() const { return m_referenceIdHasBeenSet; } /** *

The reference ID to use for the task.

*/ inline void SetReferenceId(const Aws::String& value) { m_referenceIdHasBeenSet = true; m_referenceId = value; } /** *

The reference ID to use for the task.

*/ inline void SetReferenceId(Aws::String&& value) { m_referenceIdHasBeenSet = true; m_referenceId = std::move(value); } /** *

The reference ID to use for the task.

*/ inline void SetReferenceId(const char* value) { m_referenceIdHasBeenSet = true; m_referenceId.assign(value); } /** *

The reference ID to use for the task.

*/ inline EcsParameters& WithReferenceId(const Aws::String& value) { SetReferenceId(value); return *this;} /** *

The reference ID to use for the task.

*/ inline EcsParameters& WithReferenceId(Aws::String&& value) { SetReferenceId(std::move(value)); return *this;} /** *

The reference ID to use for the task.

*/ inline EcsParameters& WithReferenceId(const char* value) { SetReferenceId(value); return *this;} /** *

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.

*/ inline const Aws::Vector>& GetTags() const{ return m_tags; } /** *

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.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

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.

*/ inline void SetTags(const Aws::Vector>& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

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.

*/ inline void SetTags(Aws::Vector>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

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.

*/ inline EcsParameters& WithTags(const Aws::Vector>& value) { SetTags(value); return *this;} /** *

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.

*/ inline EcsParameters& WithTags(Aws::Vector>&& value) { SetTags(std::move(value)); return *this;} /** *

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.

*/ inline EcsParameters& AddTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

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.

*/ inline EcsParameters& AddTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The number of tasks to create based on TaskDefinition. The * default is 1.

*/ inline int GetTaskCount() const{ return m_taskCount; } /** *

The number of tasks to create based on TaskDefinition. The * default is 1.

*/ inline bool TaskCountHasBeenSet() const { return m_taskCountHasBeenSet; } /** *

The number of tasks to create based on TaskDefinition. The * default is 1.

*/ inline void SetTaskCount(int value) { m_taskCountHasBeenSet = true; m_taskCount = value; } /** *

The number of tasks to create based on TaskDefinition. The * default is 1.

*/ inline EcsParameters& WithTaskCount(int value) { SetTaskCount(value); return *this;} /** *

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

*/ inline const Aws::String& GetTaskDefinitionArn() const{ return m_taskDefinitionArn; } /** *

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

*/ inline bool TaskDefinitionArnHasBeenSet() const { return m_taskDefinitionArnHasBeenSet; } /** *

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

*/ inline void SetTaskDefinitionArn(const Aws::String& value) { m_taskDefinitionArnHasBeenSet = true; m_taskDefinitionArn = value; } /** *

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

*/ inline void SetTaskDefinitionArn(Aws::String&& value) { m_taskDefinitionArnHasBeenSet = true; m_taskDefinitionArn = std::move(value); } /** *

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

*/ inline void SetTaskDefinitionArn(const char* value) { m_taskDefinitionArnHasBeenSet = true; m_taskDefinitionArn.assign(value); } /** *

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

*/ inline EcsParameters& WithTaskDefinitionArn(const Aws::String& value) { SetTaskDefinitionArn(value); return *this;} /** *

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

*/ inline EcsParameters& WithTaskDefinitionArn(Aws::String&& value) { SetTaskDefinitionArn(std::move(value)); return *this;} /** *

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

*/ inline EcsParameters& WithTaskDefinitionArn(const char* value) { SetTaskDefinitionArn(value); return *this;} private: Aws::Vector m_capacityProviderStrategy; bool m_capacityProviderStrategyHasBeenSet = false; bool m_enableECSManagedTags; bool m_enableECSManagedTagsHasBeenSet = false; bool m_enableExecuteCommand; bool m_enableExecuteCommandHasBeenSet = false; Aws::String m_group; bool m_groupHasBeenSet = false; LaunchType m_launchType; bool m_launchTypeHasBeenSet = false; NetworkConfiguration m_networkConfiguration; bool m_networkConfigurationHasBeenSet = false; Aws::Vector m_placementConstraints; bool m_placementConstraintsHasBeenSet = false; Aws::Vector m_placementStrategy; bool m_placementStrategyHasBeenSet = false; Aws::String m_platformVersion; bool m_platformVersionHasBeenSet = false; PropagateTags m_propagateTags; bool m_propagateTagsHasBeenSet = false; Aws::String m_referenceId; bool m_referenceIdHasBeenSet = false; Aws::Vector> m_tags; bool m_tagsHasBeenSet = false; int m_taskCount; bool m_taskCountHasBeenSet = false; Aws::String m_taskDefinitionArn; bool m_taskDefinitionArnHasBeenSet = false; }; } // namespace Model } // namespace Scheduler } // namespace Aws