AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
SendCommandRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ssm/SSMRequest.h>
11#include <aws/ssm/SSM_EXPORTS.h>
12#include <aws/ssm/model/AlarmConfiguration.h>
13#include <aws/ssm/model/CloudWatchOutputConfig.h>
14#include <aws/ssm/model/DocumentHashType.h>
15#include <aws/ssm/model/NotificationConfig.h>
16#include <aws/ssm/model/Target.h>
17
18#include <utility>
19
20namespace Aws {
21namespace SSM {
22namespace Model {
23
27 public:
28 AWS_SSM_API SendCommandRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "SendCommand"; }
35
36 AWS_SSM_API Aws::String SerializePayload() const override;
37
39
41
54 inline const Aws::Vector<Aws::String>& GetInstanceIds() const { return m_instanceIds; }
55 inline bool InstanceIdsHasBeenSet() const { return m_instanceIdsHasBeenSet; }
56 template <typename InstanceIdsT = Aws::Vector<Aws::String>>
57 void SetInstanceIds(InstanceIdsT&& value) {
58 m_instanceIdsHasBeenSet = true;
59 m_instanceIds = std::forward<InstanceIdsT>(value);
60 }
61 template <typename InstanceIdsT = Aws::Vector<Aws::String>>
62 SendCommandRequest& WithInstanceIds(InstanceIdsT&& value) {
63 SetInstanceIds(std::forward<InstanceIdsT>(value));
64 return *this;
65 }
66 template <typename InstanceIdsT = Aws::String>
67 SendCommandRequest& AddInstanceIds(InstanceIdsT&& value) {
68 m_instanceIdsHasBeenSet = true;
69 m_instanceIds.emplace_back(std::forward<InstanceIdsT>(value));
70 return *this;
71 }
73
75
88 inline const Aws::Vector<Target>& GetTargets() const { return m_targets; }
89 inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; }
90 template <typename TargetsT = Aws::Vector<Target>>
91 void SetTargets(TargetsT&& value) {
92 m_targetsHasBeenSet = true;
93 m_targets = std::forward<TargetsT>(value);
94 }
95 template <typename TargetsT = Aws::Vector<Target>>
96 SendCommandRequest& WithTargets(TargetsT&& value) {
97 SetTargets(std::forward<TargetsT>(value));
98 return *this;
99 }
100 template <typename TargetsT = Target>
101 SendCommandRequest& AddTargets(TargetsT&& value) {
102 m_targetsHasBeenSet = true;
103 m_targets.emplace_back(std::forward<TargetsT>(value));
104 return *this;
105 }
107
109
120 inline const Aws::String& GetDocumentName() const { return m_documentName; }
121 inline bool DocumentNameHasBeenSet() const { return m_documentNameHasBeenSet; }
122 template <typename DocumentNameT = Aws::String>
123 void SetDocumentName(DocumentNameT&& value) {
124 m_documentNameHasBeenSet = true;
125 m_documentName = std::forward<DocumentNameT>(value);
126 }
127 template <typename DocumentNameT = Aws::String>
128 SendCommandRequest& WithDocumentName(DocumentNameT&& value) {
129 SetDocumentName(std::forward<DocumentNameT>(value));
130 return *this;
131 }
133
135
144 inline const Aws::String& GetDocumentVersion() const { return m_documentVersion; }
145 inline bool DocumentVersionHasBeenSet() const { return m_documentVersionHasBeenSet; }
146 template <typename DocumentVersionT = Aws::String>
147 void SetDocumentVersion(DocumentVersionT&& value) {
148 m_documentVersionHasBeenSet = true;
149 m_documentVersion = std::forward<DocumentVersionT>(value);
150 }
151 template <typename DocumentVersionT = Aws::String>
152 SendCommandRequest& WithDocumentVersion(DocumentVersionT&& value) {
153 SetDocumentVersion(std::forward<DocumentVersionT>(value));
154 return *this;
155 }
157
159
163 inline const Aws::String& GetDocumentHash() const { return m_documentHash; }
164 inline bool DocumentHashHasBeenSet() const { return m_documentHashHasBeenSet; }
165 template <typename DocumentHashT = Aws::String>
166 void SetDocumentHash(DocumentHashT&& value) {
167 m_documentHashHasBeenSet = true;
168 m_documentHash = std::forward<DocumentHashT>(value);
169 }
170 template <typename DocumentHashT = Aws::String>
171 SendCommandRequest& WithDocumentHash(DocumentHashT&& value) {
172 SetDocumentHash(std::forward<DocumentHashT>(value));
173 return *this;
174 }
176
178
181 inline DocumentHashType GetDocumentHashType() const { return m_documentHashType; }
182 inline bool DocumentHashTypeHasBeenSet() const { return m_documentHashTypeHasBeenSet; }
184 m_documentHashTypeHasBeenSet = true;
185 m_documentHashType = value;
186 }
188 SetDocumentHashType(value);
189 return *this;
190 }
192
194
198 inline int GetTimeoutSeconds() const { return m_timeoutSeconds; }
199 inline bool TimeoutSecondsHasBeenSet() const { return m_timeoutSecondsHasBeenSet; }
200 inline void SetTimeoutSeconds(int value) {
201 m_timeoutSecondsHasBeenSet = true;
202 m_timeoutSeconds = value;
203 }
205 SetTimeoutSeconds(value);
206 return *this;
207 }
209
211
215 inline const Aws::String& GetComment() const { return m_comment; }
216 inline bool CommentHasBeenSet() const { return m_commentHasBeenSet; }
217 template <typename CommentT = Aws::String>
218 void SetComment(CommentT&& value) {
219 m_commentHasBeenSet = true;
220 m_comment = std::forward<CommentT>(value);
221 }
222 template <typename CommentT = Aws::String>
223 SendCommandRequest& WithComment(CommentT&& value) {
224 SetComment(std::forward<CommentT>(value));
225 return *this;
226 }
228
230
233 inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetParameters() const { return m_parameters; }
234 inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; }
235 template <typename ParametersT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
236 void SetParameters(ParametersT&& value) {
237 m_parametersHasBeenSet = true;
238 m_parameters = std::forward<ParametersT>(value);
239 }
240 template <typename ParametersT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
241 SendCommandRequest& WithParameters(ParametersT&& value) {
242 SetParameters(std::forward<ParametersT>(value));
243 return *this;
244 }
245 template <typename ParametersKeyT = Aws::String, typename ParametersValueT = Aws::Vector<Aws::String>>
246 SendCommandRequest& AddParameters(ParametersKeyT&& key, ParametersValueT&& value) {
247 m_parametersHasBeenSet = true;
248 m_parameters.emplace(std::forward<ParametersKeyT>(key), std::forward<ParametersValueT>(value));
249 return *this;
250 }
252
254
259 inline const Aws::String& GetOutputS3Region() const { return m_outputS3Region; }
260 inline bool OutputS3RegionHasBeenSet() const { return m_outputS3RegionHasBeenSet; }
261 template <typename OutputS3RegionT = Aws::String>
262 void SetOutputS3Region(OutputS3RegionT&& value) {
263 m_outputS3RegionHasBeenSet = true;
264 m_outputS3Region = std::forward<OutputS3RegionT>(value);
265 }
266 template <typename OutputS3RegionT = Aws::String>
267 SendCommandRequest& WithOutputS3Region(OutputS3RegionT&& value) {
268 SetOutputS3Region(std::forward<OutputS3RegionT>(value));
269 return *this;
270 }
272
274
278 inline const Aws::String& GetOutputS3BucketName() const { return m_outputS3BucketName; }
279 inline bool OutputS3BucketNameHasBeenSet() const { return m_outputS3BucketNameHasBeenSet; }
280 template <typename OutputS3BucketNameT = Aws::String>
281 void SetOutputS3BucketName(OutputS3BucketNameT&& value) {
282 m_outputS3BucketNameHasBeenSet = true;
283 m_outputS3BucketName = std::forward<OutputS3BucketNameT>(value);
284 }
285 template <typename OutputS3BucketNameT = Aws::String>
286 SendCommandRequest& WithOutputS3BucketName(OutputS3BucketNameT&& value) {
287 SetOutputS3BucketName(std::forward<OutputS3BucketNameT>(value));
288 return *this;
289 }
291
293
297 inline const Aws::String& GetOutputS3KeyPrefix() const { return m_outputS3KeyPrefix; }
298 inline bool OutputS3KeyPrefixHasBeenSet() const { return m_outputS3KeyPrefixHasBeenSet; }
299 template <typename OutputS3KeyPrefixT = Aws::String>
300 void SetOutputS3KeyPrefix(OutputS3KeyPrefixT&& value) {
301 m_outputS3KeyPrefixHasBeenSet = true;
302 m_outputS3KeyPrefix = std::forward<OutputS3KeyPrefixT>(value);
303 }
304 template <typename OutputS3KeyPrefixT = Aws::String>
305 SendCommandRequest& WithOutputS3KeyPrefix(OutputS3KeyPrefixT&& value) {
306 SetOutputS3KeyPrefix(std::forward<OutputS3KeyPrefixT>(value));
307 return *this;
308 }
310
312
321 inline const Aws::String& GetMaxConcurrency() const { return m_maxConcurrency; }
322 inline bool MaxConcurrencyHasBeenSet() const { return m_maxConcurrencyHasBeenSet; }
323 template <typename MaxConcurrencyT = Aws::String>
324 void SetMaxConcurrency(MaxConcurrencyT&& value) {
325 m_maxConcurrencyHasBeenSet = true;
326 m_maxConcurrency = std::forward<MaxConcurrencyT>(value);
327 }
328 template <typename MaxConcurrencyT = Aws::String>
329 SendCommandRequest& WithMaxConcurrency(MaxConcurrencyT&& value) {
330 SetMaxConcurrency(std::forward<MaxConcurrencyT>(value));
331 return *this;
332 }
334
336
346 inline const Aws::String& GetMaxErrors() const { return m_maxErrors; }
347 inline bool MaxErrorsHasBeenSet() const { return m_maxErrorsHasBeenSet; }
348 template <typename MaxErrorsT = Aws::String>
349 void SetMaxErrors(MaxErrorsT&& value) {
350 m_maxErrorsHasBeenSet = true;
351 m_maxErrors = std::forward<MaxErrorsT>(value);
352 }
353 template <typename MaxErrorsT = Aws::String>
354 SendCommandRequest& WithMaxErrors(MaxErrorsT&& value) {
355 SetMaxErrors(std::forward<MaxErrorsT>(value));
356 return *this;
357 }
359
361
371 inline const Aws::String& GetServiceRoleArn() const { return m_serviceRoleArn; }
372 inline bool ServiceRoleArnHasBeenSet() const { return m_serviceRoleArnHasBeenSet; }
373 template <typename ServiceRoleArnT = Aws::String>
374 void SetServiceRoleArn(ServiceRoleArnT&& value) {
375 m_serviceRoleArnHasBeenSet = true;
376 m_serviceRoleArn = std::forward<ServiceRoleArnT>(value);
377 }
378 template <typename ServiceRoleArnT = Aws::String>
379 SendCommandRequest& WithServiceRoleArn(ServiceRoleArnT&& value) {
380 SetServiceRoleArn(std::forward<ServiceRoleArnT>(value));
381 return *this;
382 }
384
386
389 inline const NotificationConfig& GetNotificationConfig() const { return m_notificationConfig; }
390 inline bool NotificationConfigHasBeenSet() const { return m_notificationConfigHasBeenSet; }
391 template <typename NotificationConfigT = NotificationConfig>
392 void SetNotificationConfig(NotificationConfigT&& value) {
393 m_notificationConfigHasBeenSet = true;
394 m_notificationConfig = std::forward<NotificationConfigT>(value);
395 }
396 template <typename NotificationConfigT = NotificationConfig>
397 SendCommandRequest& WithNotificationConfig(NotificationConfigT&& value) {
398 SetNotificationConfig(std::forward<NotificationConfigT>(value));
399 return *this;
400 }
402
404
409 inline const CloudWatchOutputConfig& GetCloudWatchOutputConfig() const { return m_cloudWatchOutputConfig; }
410 inline bool CloudWatchOutputConfigHasBeenSet() const { return m_cloudWatchOutputConfigHasBeenSet; }
411 template <typename CloudWatchOutputConfigT = CloudWatchOutputConfig>
412 void SetCloudWatchOutputConfig(CloudWatchOutputConfigT&& value) {
413 m_cloudWatchOutputConfigHasBeenSet = true;
414 m_cloudWatchOutputConfig = std::forward<CloudWatchOutputConfigT>(value);
415 }
416 template <typename CloudWatchOutputConfigT = CloudWatchOutputConfig>
417 SendCommandRequest& WithCloudWatchOutputConfig(CloudWatchOutputConfigT&& value) {
418 SetCloudWatchOutputConfig(std::forward<CloudWatchOutputConfigT>(value));
419 return *this;
420 }
422
424
427 inline const AlarmConfiguration& GetAlarmConfiguration() const { return m_alarmConfiguration; }
428 inline bool AlarmConfigurationHasBeenSet() const { return m_alarmConfigurationHasBeenSet; }
429 template <typename AlarmConfigurationT = AlarmConfiguration>
430 void SetAlarmConfiguration(AlarmConfigurationT&& value) {
431 m_alarmConfigurationHasBeenSet = true;
432 m_alarmConfiguration = std::forward<AlarmConfigurationT>(value);
433 }
434 template <typename AlarmConfigurationT = AlarmConfiguration>
435 SendCommandRequest& WithAlarmConfiguration(AlarmConfigurationT&& value) {
436 SetAlarmConfiguration(std::forward<AlarmConfigurationT>(value));
437 return *this;
438 }
440 private:
441 Aws::Vector<Aws::String> m_instanceIds;
442
443 Aws::Vector<Target> m_targets;
444
445 Aws::String m_documentName;
446
447 Aws::String m_documentVersion;
448
449 Aws::String m_documentHash;
450
452
453 int m_timeoutSeconds{0};
454
455 Aws::String m_comment;
456
458
459 Aws::String m_outputS3Region;
460
461 Aws::String m_outputS3BucketName;
462
463 Aws::String m_outputS3KeyPrefix;
464
465 Aws::String m_maxConcurrency;
466
467 Aws::String m_maxErrors;
468
469 Aws::String m_serviceRoleArn;
470
471 NotificationConfig m_notificationConfig;
472
473 CloudWatchOutputConfig m_cloudWatchOutputConfig;
474
475 AlarmConfiguration m_alarmConfiguration;
476 bool m_instanceIdsHasBeenSet = false;
477 bool m_targetsHasBeenSet = false;
478 bool m_documentNameHasBeenSet = false;
479 bool m_documentVersionHasBeenSet = false;
480 bool m_documentHashHasBeenSet = false;
481 bool m_documentHashTypeHasBeenSet = false;
482 bool m_timeoutSecondsHasBeenSet = false;
483 bool m_commentHasBeenSet = false;
484 bool m_parametersHasBeenSet = false;
485 bool m_outputS3RegionHasBeenSet = false;
486 bool m_outputS3BucketNameHasBeenSet = false;
487 bool m_outputS3KeyPrefixHasBeenSet = false;
488 bool m_maxConcurrencyHasBeenSet = false;
489 bool m_maxErrorsHasBeenSet = false;
490 bool m_serviceRoleArnHasBeenSet = false;
491 bool m_notificationConfigHasBeenSet = false;
492 bool m_cloudWatchOutputConfigHasBeenSet = false;
493 bool m_alarmConfigurationHasBeenSet = false;
494};
495
496} // namespace Model
497} // namespace SSM
498} // namespace Aws
DocumentHashType GetDocumentHashType() const
SendCommandRequest & WithComment(CommentT &&value)
SendCommandRequest & WithDocumentName(DocumentNameT &&value)
void SetParameters(ParametersT &&value)
SendCommandRequest & WithServiceRoleArn(ServiceRoleArnT &&value)
SendCommandRequest & WithOutputS3Region(OutputS3RegionT &&value)
void SetAlarmConfiguration(AlarmConfigurationT &&value)
void SetDocumentHash(DocumentHashT &&value)
const Aws::String & GetServiceRoleArn() const
const Aws::Vector< Target > & GetTargets() const
const Aws::String & GetOutputS3Region() const
const AlarmConfiguration & GetAlarmConfiguration() const
void SetCloudWatchOutputConfig(CloudWatchOutputConfigT &&value)
void SetOutputS3BucketName(OutputS3BucketNameT &&value)
const Aws::String & GetOutputS3KeyPrefix() const
const Aws::String & GetComment() const
void SetDocumentVersion(DocumentVersionT &&value)
const Aws::String & GetMaxErrors() const
void SetOutputS3KeyPrefix(OutputS3KeyPrefixT &&value)
SendCommandRequest & AddTargets(TargetsT &&value)
void SetDocumentName(DocumentNameT &&value)
void SetNotificationConfig(NotificationConfigT &&value)
AWS_SSM_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::Map< Aws::String, Aws::Vector< Aws::String > > & GetParameters() const
void SetOutputS3Region(OutputS3RegionT &&value)
void SetDocumentHashType(DocumentHashType value)
SendCommandRequest & WithTimeoutSeconds(int value)
const NotificationConfig & GetNotificationConfig() const
SendCommandRequest & WithAlarmConfiguration(AlarmConfigurationT &&value)
const Aws::String & GetDocumentName() const
const Aws::String & GetMaxConcurrency() const
AWS_SSM_API Aws::String SerializePayload() const override
SendCommandRequest & WithMaxErrors(MaxErrorsT &&value)
void SetInstanceIds(InstanceIdsT &&value)
const Aws::String & GetDocumentHash() const
void SetMaxConcurrency(MaxConcurrencyT &&value)
SendCommandRequest & WithCloudWatchOutputConfig(CloudWatchOutputConfigT &&value)
const Aws::String & GetDocumentVersion() const
SendCommandRequest & WithDocumentVersion(DocumentVersionT &&value)
SendCommandRequest & WithInstanceIds(InstanceIdsT &&value)
SendCommandRequest & WithParameters(ParametersT &&value)
void SetServiceRoleArn(ServiceRoleArnT &&value)
const Aws::Vector< Aws::String > & GetInstanceIds() const
const CloudWatchOutputConfig & GetCloudWatchOutputConfig() const
SendCommandRequest & WithDocumentHashType(DocumentHashType value)
SendCommandRequest & WithDocumentHash(DocumentHashT &&value)
SendCommandRequest & WithNotificationConfig(NotificationConfigT &&value)
SendCommandRequest & WithOutputS3KeyPrefix(OutputS3KeyPrefixT &&value)
SendCommandRequest & AddInstanceIds(InstanceIdsT &&value)
const Aws::String & GetOutputS3BucketName() const
SendCommandRequest & WithTargets(TargetsT &&value)
SendCommandRequest & WithOutputS3BucketName(OutputS3BucketNameT &&value)
virtual const char * GetServiceRequestName() const override
AWS_SSM_API SendCommandRequest()=default
SendCommandRequest & AddParameters(ParametersKeyT &&key, ParametersValueT &&value)
SendCommandRequest & WithMaxConcurrency(MaxConcurrencyT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector