AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
StartTaskRequest.h
1
6#pragma once
7#include <aws/ecs/ECS_EXPORTS.h>
8#include <aws/ecs/ECSRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ecs/model/NetworkConfiguration.h>
12#include <aws/ecs/model/TaskOverride.h>
13#include <aws/ecs/model/PropagateTags.h>
14#include <aws/ecs/model/Tag.h>
15#include <aws/ecs/model/TaskVolumeConfiguration.h>
16#include <utility>
17
18namespace Aws
19{
20namespace ECS
21{
22namespace Model
23{
24
28 {
29 public:
30 AWS_ECS_API StartTaskRequest();
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "StartTask"; }
37
38 AWS_ECS_API Aws::String SerializePayload() const override;
39
41
42
44
49 inline const Aws::String& GetCluster() const{ return m_cluster; }
50 inline bool ClusterHasBeenSet() const { return m_clusterHasBeenSet; }
51 inline void SetCluster(const Aws::String& value) { m_clusterHasBeenSet = true; m_cluster = value; }
52 inline void SetCluster(Aws::String&& value) { m_clusterHasBeenSet = true; m_cluster = std::move(value); }
53 inline void SetCluster(const char* value) { m_clusterHasBeenSet = true; m_cluster.assign(value); }
54 inline StartTaskRequest& WithCluster(const Aws::String& value) { SetCluster(value); return *this;}
55 inline StartTaskRequest& WithCluster(Aws::String&& value) { SetCluster(std::move(value)); return *this;}
56 inline StartTaskRequest& WithCluster(const char* value) { SetCluster(value); return *this;}
58
60
65 inline const Aws::Vector<Aws::String>& GetContainerInstances() const{ return m_containerInstances; }
66 inline bool ContainerInstancesHasBeenSet() const { return m_containerInstancesHasBeenSet; }
67 inline void SetContainerInstances(const Aws::Vector<Aws::String>& value) { m_containerInstancesHasBeenSet = true; m_containerInstances = value; }
68 inline void SetContainerInstances(Aws::Vector<Aws::String>&& value) { m_containerInstancesHasBeenSet = true; m_containerInstances = std::move(value); }
71 inline StartTaskRequest& AddContainerInstances(const Aws::String& value) { m_containerInstancesHasBeenSet = true; m_containerInstances.push_back(value); return *this; }
72 inline StartTaskRequest& AddContainerInstances(Aws::String&& value) { m_containerInstancesHasBeenSet = true; m_containerInstances.push_back(std::move(value)); return *this; }
73 inline StartTaskRequest& AddContainerInstances(const char* value) { m_containerInstancesHasBeenSet = true; m_containerInstances.push_back(value); return *this; }
75
77
84 inline bool GetEnableECSManagedTags() const{ return m_enableECSManagedTags; }
85 inline bool EnableECSManagedTagsHasBeenSet() const { return m_enableECSManagedTagsHasBeenSet; }
86 inline void SetEnableECSManagedTags(bool value) { m_enableECSManagedTagsHasBeenSet = true; m_enableECSManagedTags = value; }
87 inline StartTaskRequest& WithEnableECSManagedTags(bool value) { SetEnableECSManagedTags(value); return *this;}
89
91
96 inline bool GetEnableExecuteCommand() const{ return m_enableExecuteCommand; }
97 inline bool EnableExecuteCommandHasBeenSet() const { return m_enableExecuteCommandHasBeenSet; }
98 inline void SetEnableExecuteCommand(bool value) { m_enableExecuteCommandHasBeenSet = true; m_enableExecuteCommand = value; }
99 inline StartTaskRequest& WithEnableExecuteCommand(bool value) { SetEnableExecuteCommand(value); return *this;}
101
103
107 inline const Aws::String& GetGroup() const{ return m_group; }
108 inline bool GroupHasBeenSet() const { return m_groupHasBeenSet; }
109 inline void SetGroup(const Aws::String& value) { m_groupHasBeenSet = true; m_group = value; }
110 inline void SetGroup(Aws::String&& value) { m_groupHasBeenSet = true; m_group = std::move(value); }
111 inline void SetGroup(const char* value) { m_groupHasBeenSet = true; m_group.assign(value); }
112 inline StartTaskRequest& WithGroup(const Aws::String& value) { SetGroup(value); return *this;}
113 inline StartTaskRequest& WithGroup(Aws::String&& value) { SetGroup(std::move(value)); return *this;}
114 inline StartTaskRequest& WithGroup(const char* value) { SetGroup(value); return *this;}
116
118
123 inline const NetworkConfiguration& GetNetworkConfiguration() const{ return m_networkConfiguration; }
124 inline bool NetworkConfigurationHasBeenSet() const { return m_networkConfigurationHasBeenSet; }
125 inline void SetNetworkConfiguration(const NetworkConfiguration& value) { m_networkConfigurationHasBeenSet = true; m_networkConfiguration = value; }
126 inline void SetNetworkConfiguration(NetworkConfiguration&& value) { m_networkConfigurationHasBeenSet = true; m_networkConfiguration = std::move(value); }
130
132
143 inline const TaskOverride& GetOverrides() const{ return m_overrides; }
144 inline bool OverridesHasBeenSet() const { return m_overridesHasBeenSet; }
145 inline void SetOverrides(const TaskOverride& value) { m_overridesHasBeenSet = true; m_overrides = value; }
146 inline void SetOverrides(TaskOverride&& value) { m_overridesHasBeenSet = true; m_overrides = std::move(value); }
147 inline StartTaskRequest& WithOverrides(const TaskOverride& value) { SetOverrides(value); return *this;}
148 inline StartTaskRequest& WithOverrides(TaskOverride&& value) { SetOverrides(std::move(value)); return *this;}
150
152
156 inline const PropagateTags& GetPropagateTags() const{ return m_propagateTags; }
157 inline bool PropagateTagsHasBeenSet() const { return m_propagateTagsHasBeenSet; }
158 inline void SetPropagateTags(const PropagateTags& value) { m_propagateTagsHasBeenSet = true; m_propagateTags = value; }
159 inline void SetPropagateTags(PropagateTags&& value) { m_propagateTagsHasBeenSet = true; m_propagateTags = std::move(value); }
160 inline StartTaskRequest& WithPropagateTags(const PropagateTags& value) { SetPropagateTags(value); return *this;}
161 inline StartTaskRequest& WithPropagateTags(PropagateTags&& value) { SetPropagateTags(std::move(value)); return *this;}
163
165
169 inline const Aws::String& GetReferenceId() const{ return m_referenceId; }
170 inline bool ReferenceIdHasBeenSet() const { return m_referenceIdHasBeenSet; }
171 inline void SetReferenceId(const Aws::String& value) { m_referenceIdHasBeenSet = true; m_referenceId = value; }
172 inline void SetReferenceId(Aws::String&& value) { m_referenceIdHasBeenSet = true; m_referenceId = std::move(value); }
173 inline void SetReferenceId(const char* value) { m_referenceIdHasBeenSet = true; m_referenceId.assign(value); }
174 inline StartTaskRequest& WithReferenceId(const Aws::String& value) { SetReferenceId(value); return *this;}
175 inline StartTaskRequest& WithReferenceId(Aws::String&& value) { SetReferenceId(std::move(value)); return *this;}
176 inline StartTaskRequest& WithReferenceId(const char* value) { SetReferenceId(value); return *this;}
178
180
193 inline const Aws::String& GetStartedBy() const{ return m_startedBy; }
194 inline bool StartedByHasBeenSet() const { return m_startedByHasBeenSet; }
195 inline void SetStartedBy(const Aws::String& value) { m_startedByHasBeenSet = true; m_startedBy = value; }
196 inline void SetStartedBy(Aws::String&& value) { m_startedByHasBeenSet = true; m_startedBy = std::move(value); }
197 inline void SetStartedBy(const char* value) { m_startedByHasBeenSet = true; m_startedBy.assign(value); }
198 inline StartTaskRequest& WithStartedBy(const Aws::String& value) { SetStartedBy(value); return *this;}
199 inline StartTaskRequest& WithStartedBy(Aws::String&& value) { SetStartedBy(std::move(value)); return *this;}
200 inline StartTaskRequest& WithStartedBy(const char* value) { SetStartedBy(value); return *this;}
202
204
222 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
223 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
224 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
225 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
226 inline StartTaskRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
227 inline StartTaskRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
228 inline StartTaskRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
229 inline StartTaskRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
231
233
239 inline const Aws::String& GetTaskDefinition() const{ return m_taskDefinition; }
240 inline bool TaskDefinitionHasBeenSet() const { return m_taskDefinitionHasBeenSet; }
241 inline void SetTaskDefinition(const Aws::String& value) { m_taskDefinitionHasBeenSet = true; m_taskDefinition = value; }
242 inline void SetTaskDefinition(Aws::String&& value) { m_taskDefinitionHasBeenSet = true; m_taskDefinition = std::move(value); }
243 inline void SetTaskDefinition(const char* value) { m_taskDefinitionHasBeenSet = true; m_taskDefinition.assign(value); }
244 inline StartTaskRequest& WithTaskDefinition(const Aws::String& value) { SetTaskDefinition(value); return *this;}
245 inline StartTaskRequest& WithTaskDefinition(Aws::String&& value) { SetTaskDefinition(std::move(value)); return *this;}
246 inline StartTaskRequest& WithTaskDefinition(const char* value) { SetTaskDefinition(value); return *this;}
248
250
257 inline const Aws::Vector<TaskVolumeConfiguration>& GetVolumeConfigurations() const{ return m_volumeConfigurations; }
258 inline bool VolumeConfigurationsHasBeenSet() const { return m_volumeConfigurationsHasBeenSet; }
259 inline void SetVolumeConfigurations(const Aws::Vector<TaskVolumeConfiguration>& value) { m_volumeConfigurationsHasBeenSet = true; m_volumeConfigurations = value; }
260 inline void SetVolumeConfigurations(Aws::Vector<TaskVolumeConfiguration>&& value) { m_volumeConfigurationsHasBeenSet = true; m_volumeConfigurations = std::move(value); }
263 inline StartTaskRequest& AddVolumeConfigurations(const TaskVolumeConfiguration& value) { m_volumeConfigurationsHasBeenSet = true; m_volumeConfigurations.push_back(value); return *this; }
264 inline StartTaskRequest& AddVolumeConfigurations(TaskVolumeConfiguration&& value) { m_volumeConfigurationsHasBeenSet = true; m_volumeConfigurations.push_back(std::move(value)); return *this; }
266 private:
267
268 Aws::String m_cluster;
269 bool m_clusterHasBeenSet = false;
270
271 Aws::Vector<Aws::String> m_containerInstances;
272 bool m_containerInstancesHasBeenSet = false;
273
274 bool m_enableECSManagedTags;
275 bool m_enableECSManagedTagsHasBeenSet = false;
276
277 bool m_enableExecuteCommand;
278 bool m_enableExecuteCommandHasBeenSet = false;
279
280 Aws::String m_group;
281 bool m_groupHasBeenSet = false;
282
283 NetworkConfiguration m_networkConfiguration;
284 bool m_networkConfigurationHasBeenSet = false;
285
286 TaskOverride m_overrides;
287 bool m_overridesHasBeenSet = false;
288
289 PropagateTags m_propagateTags;
290 bool m_propagateTagsHasBeenSet = false;
291
292 Aws::String m_referenceId;
293 bool m_referenceIdHasBeenSet = false;
294
295 Aws::String m_startedBy;
296 bool m_startedByHasBeenSet = false;
297
298 Aws::Vector<Tag> m_tags;
299 bool m_tagsHasBeenSet = false;
300
301 Aws::String m_taskDefinition;
302 bool m_taskDefinitionHasBeenSet = false;
303
304 Aws::Vector<TaskVolumeConfiguration> m_volumeConfigurations;
305 bool m_volumeConfigurationsHasBeenSet = false;
306 };
307
308} // namespace Model
309} // namespace ECS
310} // namespace Aws
StartTaskRequest & AddContainerInstances(const char *value)
void SetCluster(Aws::String &&value)
void SetTags(const Aws::Vector< Tag > &value)
StartTaskRequest & WithOverrides(const TaskOverride &value)
StartTaskRequest & WithTags(const Aws::Vector< Tag > &value)
void SetTags(Aws::Vector< Tag > &&value)
void SetStartedBy(Aws::String &&value)
StartTaskRequest & WithTaskDefinition(const Aws::String &value)
void SetTaskDefinition(Aws::String &&value)
void SetGroup(const Aws::String &value)
StartTaskRequest & WithEnableECSManagedTags(bool value)
StartTaskRequest & WithNetworkConfiguration(const NetworkConfiguration &value)
StartTaskRequest & WithCluster(const Aws::String &value)
void SetVolumeConfigurations(Aws::Vector< TaskVolumeConfiguration > &&value)
StartTaskRequest & WithGroup(const Aws::String &value)
AWS_ECS_API Aws::String SerializePayload() const override
const Aws::String & GetCluster() const
StartTaskRequest & AddVolumeConfigurations(const TaskVolumeConfiguration &value)
StartTaskRequest & WithOverrides(TaskOverride &&value)
const NetworkConfiguration & GetNetworkConfiguration() const
void SetGroup(Aws::String &&value)
StartTaskRequest & AddTags(const Tag &value)
StartTaskRequest & WithPropagateTags(PropagateTags &&value)
StartTaskRequest & WithContainerInstances(Aws::Vector< Aws::String > &&value)
void SetCluster(const char *value)
StartTaskRequest & WithPropagateTags(const PropagateTags &value)
void SetReferenceId(const Aws::String &value)
const Aws::Vector< Aws::String > & GetContainerInstances() const
StartTaskRequest & WithVolumeConfigurations(Aws::Vector< TaskVolumeConfiguration > &&value)
const Aws::Vector< TaskVolumeConfiguration > & GetVolumeConfigurations() const
StartTaskRequest & WithGroup(const char *value)
StartTaskRequest & WithReferenceId(const char *value)
void SetOverrides(TaskOverride &&value)
StartTaskRequest & AddContainerInstances(Aws::String &&value)
StartTaskRequest & WithContainerInstances(const Aws::Vector< Aws::String > &value)
void SetTaskDefinition(const char *value)
StartTaskRequest & WithEnableExecuteCommand(bool value)
void SetReferenceId(const char *value)
void SetPropagateTags(const PropagateTags &value)
StartTaskRequest & WithReferenceId(const Aws::String &value)
StartTaskRequest & WithNetworkConfiguration(NetworkConfiguration &&value)
const Aws::String & GetReferenceId() const
AWS_ECS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const TaskOverride & GetOverrides() const
StartTaskRequest & WithTaskDefinition(Aws::String &&value)
StartTaskRequest & WithGroup(Aws::String &&value)
void SetCluster(const Aws::String &value)
StartTaskRequest & AddContainerInstances(const Aws::String &value)
StartTaskRequest & WithReferenceId(Aws::String &&value)
StartTaskRequest & WithTaskDefinition(const char *value)
StartTaskRequest & AddTags(Tag &&value)
void SetReferenceId(Aws::String &&value)
StartTaskRequest & WithStartedBy(const char *value)
void SetStartedBy(const char *value)
virtual const char * GetServiceRequestName() const override
void SetTaskDefinition(const Aws::String &value)
void SetOverrides(const TaskOverride &value)
StartTaskRequest & WithVolumeConfigurations(const Aws::Vector< TaskVolumeConfiguration > &value)
StartTaskRequest & AddVolumeConfigurations(TaskVolumeConfiguration &&value)
const Aws::String & GetTaskDefinition() const
StartTaskRequest & WithStartedBy(Aws::String &&value)
const Aws::Vector< Tag > & GetTags() const
StartTaskRequest & WithStartedBy(const Aws::String &value)
StartTaskRequest & WithCluster(Aws::String &&value)
void SetStartedBy(const Aws::String &value)
StartTaskRequest & WithTags(Aws::Vector< Tag > &&value)
const PropagateTags & GetPropagateTags() const
void SetVolumeConfigurations(const Aws::Vector< TaskVolumeConfiguration > &value)
void SetPropagateTags(PropagateTags &&value)
void SetContainerInstances(const Aws::Vector< Aws::String > &value)
const Aws::String & GetGroup() const
void SetNetworkConfiguration(NetworkConfiguration &&value)
void SetContainerInstances(Aws::Vector< Aws::String > &&value)
const Aws::String & GetStartedBy() const
StartTaskRequest & WithCluster(const char *value)
void SetNetworkConfiguration(const NetworkConfiguration &value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector