AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
CreateAssociationRequest.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/AssociationComplianceSeverity.h>
14#include <aws/ssm/model/AssociationSyncCompliance.h>
15#include <aws/ssm/model/InstanceAssociationOutputLocation.h>
16#include <aws/ssm/model/Tag.h>
17#include <aws/ssm/model/Target.h>
18#include <aws/ssm/model/TargetLocation.h>
19
20#include <utility>
21
22namespace Aws {
23namespace SSM {
24namespace Model {
25
29 public:
30 AWS_SSM_API CreateAssociationRequest() = default;
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 "CreateAssociation"; }
37
38 AWS_SSM_API Aws::String SerializePayload() const override;
39
41
43
58 inline const Aws::String& GetName() const { return m_name; }
59 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
60 template <typename NameT = Aws::String>
61 void SetName(NameT&& value) {
62 m_nameHasBeenSet = true;
63 m_name = std::forward<NameT>(value);
64 }
65 template <typename NameT = Aws::String>
67 SetName(std::forward<NameT>(value));
68 return *this;
69 }
71
73
84 inline const Aws::String& GetDocumentVersion() const { return m_documentVersion; }
85 inline bool DocumentVersionHasBeenSet() const { return m_documentVersionHasBeenSet; }
86 template <typename DocumentVersionT = Aws::String>
87 void SetDocumentVersion(DocumentVersionT&& value) {
88 m_documentVersionHasBeenSet = true;
89 m_documentVersion = std::forward<DocumentVersionT>(value);
90 }
91 template <typename DocumentVersionT = Aws::String>
92 CreateAssociationRequest& WithDocumentVersion(DocumentVersionT&& value) {
93 SetDocumentVersion(std::forward<DocumentVersionT>(value));
94 return *this;
95 }
97
99
111 inline const Aws::String& GetInstanceId() const { return m_instanceId; }
112 inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; }
113 template <typename InstanceIdT = Aws::String>
114 void SetInstanceId(InstanceIdT&& value) {
115 m_instanceIdHasBeenSet = true;
116 m_instanceId = std::forward<InstanceIdT>(value);
117 }
118 template <typename InstanceIdT = Aws::String>
120 SetInstanceId(std::forward<InstanceIdT>(value));
121 return *this;
122 }
124
126
129 inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetParameters() const { return m_parameters; }
130 inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; }
131 template <typename ParametersT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
132 void SetParameters(ParametersT&& value) {
133 m_parametersHasBeenSet = true;
134 m_parameters = std::forward<ParametersT>(value);
135 }
136 template <typename ParametersT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
138 SetParameters(std::forward<ParametersT>(value));
139 return *this;
140 }
141 template <typename ParametersKeyT = Aws::String, typename ParametersValueT = Aws::Vector<Aws::String>>
142 CreateAssociationRequest& AddParameters(ParametersKeyT&& key, ParametersValueT&& value) {
143 m_parametersHasBeenSet = true;
144 m_parameters.emplace(std::forward<ParametersKeyT>(key), std::forward<ParametersValueT>(value));
145 return *this;
146 }
148
150
161 inline const Aws::Vector<Target>& GetTargets() const { return m_targets; }
162 inline bool TargetsHasBeenSet() const { return m_targetsHasBeenSet; }
163 template <typename TargetsT = Aws::Vector<Target>>
164 void SetTargets(TargetsT&& value) {
165 m_targetsHasBeenSet = true;
166 m_targets = std::forward<TargetsT>(value);
167 }
168 template <typename TargetsT = Aws::Vector<Target>>
170 SetTargets(std::forward<TargetsT>(value));
171 return *this;
172 }
173 template <typename TargetsT = Target>
175 m_targetsHasBeenSet = true;
176 m_targets.emplace_back(std::forward<TargetsT>(value));
177 return *this;
178 }
180
182
185 inline const Aws::String& GetScheduleExpression() const { return m_scheduleExpression; }
186 inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; }
187 template <typename ScheduleExpressionT = Aws::String>
188 void SetScheduleExpression(ScheduleExpressionT&& value) {
189 m_scheduleExpressionHasBeenSet = true;
190 m_scheduleExpression = std::forward<ScheduleExpressionT>(value);
191 }
192 template <typename ScheduleExpressionT = Aws::String>
193 CreateAssociationRequest& WithScheduleExpression(ScheduleExpressionT&& value) {
194 SetScheduleExpression(std::forward<ScheduleExpressionT>(value));
195 return *this;
196 }
198
200
204 inline const InstanceAssociationOutputLocation& GetOutputLocation() const { return m_outputLocation; }
205 inline bool OutputLocationHasBeenSet() const { return m_outputLocationHasBeenSet; }
206 template <typename OutputLocationT = InstanceAssociationOutputLocation>
207 void SetOutputLocation(OutputLocationT&& value) {
208 m_outputLocationHasBeenSet = true;
209 m_outputLocation = std::forward<OutputLocationT>(value);
210 }
211 template <typename OutputLocationT = InstanceAssociationOutputLocation>
213 SetOutputLocation(std::forward<OutputLocationT>(value));
214 return *this;
215 }
217
219
222 inline const Aws::String& GetAssociationName() const { return m_associationName; }
223 inline bool AssociationNameHasBeenSet() const { return m_associationNameHasBeenSet; }
224 template <typename AssociationNameT = Aws::String>
225 void SetAssociationName(AssociationNameT&& value) {
226 m_associationNameHasBeenSet = true;
227 m_associationName = std::forward<AssociationNameT>(value);
228 }
229 template <typename AssociationNameT = Aws::String>
231 SetAssociationName(std::forward<AssociationNameT>(value));
232 return *this;
233 }
235
237
243 inline const Aws::String& GetAutomationTargetParameterName() const { return m_automationTargetParameterName; }
244 inline bool AutomationTargetParameterNameHasBeenSet() const { return m_automationTargetParameterNameHasBeenSet; }
245 template <typename AutomationTargetParameterNameT = Aws::String>
246 void SetAutomationTargetParameterName(AutomationTargetParameterNameT&& value) {
247 m_automationTargetParameterNameHasBeenSet = true;
248 m_automationTargetParameterName = std::forward<AutomationTargetParameterNameT>(value);
249 }
250 template <typename AutomationTargetParameterNameT = Aws::String>
251 CreateAssociationRequest& WithAutomationTargetParameterName(AutomationTargetParameterNameT&& value) {
252 SetAutomationTargetParameterName(std::forward<AutomationTargetParameterNameT>(value));
253 return *this;
254 }
256
258
273 inline const Aws::String& GetMaxErrors() const { return m_maxErrors; }
274 inline bool MaxErrorsHasBeenSet() const { return m_maxErrorsHasBeenSet; }
275 template <typename MaxErrorsT = Aws::String>
276 void SetMaxErrors(MaxErrorsT&& value) {
277 m_maxErrorsHasBeenSet = true;
278 m_maxErrors = std::forward<MaxErrorsT>(value);
279 }
280 template <typename MaxErrorsT = Aws::String>
282 SetMaxErrors(std::forward<MaxErrorsT>(value));
283 return *this;
284 }
286
288
298 inline const Aws::String& GetMaxConcurrency() const { return m_maxConcurrency; }
299 inline bool MaxConcurrencyHasBeenSet() const { return m_maxConcurrencyHasBeenSet; }
300 template <typename MaxConcurrencyT = Aws::String>
301 void SetMaxConcurrency(MaxConcurrencyT&& value) {
302 m_maxConcurrencyHasBeenSet = true;
303 m_maxConcurrency = std::forward<MaxConcurrencyT>(value);
304 }
305 template <typename MaxConcurrencyT = Aws::String>
307 SetMaxConcurrency(std::forward<MaxConcurrencyT>(value));
308 return *this;
309 }
311
313
316 inline AssociationComplianceSeverity GetComplianceSeverity() const { return m_complianceSeverity; }
317 inline bool ComplianceSeverityHasBeenSet() const { return m_complianceSeverityHasBeenSet; }
319 m_complianceSeverityHasBeenSet = true;
320 m_complianceSeverity = value;
321 }
324 return *this;
325 }
327
329
342 inline AssociationSyncCompliance GetSyncCompliance() const { return m_syncCompliance; }
343 inline bool SyncComplianceHasBeenSet() const { return m_syncComplianceHasBeenSet; }
345 m_syncComplianceHasBeenSet = true;
346 m_syncCompliance = value;
347 }
349 SetSyncCompliance(value);
350 return *this;
351 }
353
355
368 inline bool GetApplyOnlyAtCronInterval() const { return m_applyOnlyAtCronInterval; }
369 inline bool ApplyOnlyAtCronIntervalHasBeenSet() const { return m_applyOnlyAtCronIntervalHasBeenSet; }
370 inline void SetApplyOnlyAtCronInterval(bool value) {
371 m_applyOnlyAtCronIntervalHasBeenSet = true;
372 m_applyOnlyAtCronInterval = value;
373 }
376 return *this;
377 }
379
381
389 inline const Aws::Vector<Aws::String>& GetCalendarNames() const { return m_calendarNames; }
390 inline bool CalendarNamesHasBeenSet() const { return m_calendarNamesHasBeenSet; }
391 template <typename CalendarNamesT = Aws::Vector<Aws::String>>
392 void SetCalendarNames(CalendarNamesT&& value) {
393 m_calendarNamesHasBeenSet = true;
394 m_calendarNames = std::forward<CalendarNamesT>(value);
395 }
396 template <typename CalendarNamesT = Aws::Vector<Aws::String>>
398 SetCalendarNames(std::forward<CalendarNamesT>(value));
399 return *this;
400 }
401 template <typename CalendarNamesT = Aws::String>
403 m_calendarNamesHasBeenSet = true;
404 m_calendarNames.emplace_back(std::forward<CalendarNamesT>(value));
405 return *this;
406 }
408
410
417 inline const Aws::Vector<TargetLocation>& GetTargetLocations() const { return m_targetLocations; }
418 inline bool TargetLocationsHasBeenSet() const { return m_targetLocationsHasBeenSet; }
419 template <typename TargetLocationsT = Aws::Vector<TargetLocation>>
420 void SetTargetLocations(TargetLocationsT&& value) {
421 m_targetLocationsHasBeenSet = true;
422 m_targetLocations = std::forward<TargetLocationsT>(value);
423 }
424 template <typename TargetLocationsT = Aws::Vector<TargetLocation>>
426 SetTargetLocations(std::forward<TargetLocationsT>(value));
427 return *this;
428 }
429 template <typename TargetLocationsT = TargetLocation>
430 CreateAssociationRequest& AddTargetLocations(TargetLocationsT&& value) {
431 m_targetLocationsHasBeenSet = true;
432 m_targetLocations.emplace_back(std::forward<TargetLocationsT>(value));
433 return *this;
434 }
436
438
450 inline int GetScheduleOffset() const { return m_scheduleOffset; }
451 inline bool ScheduleOffsetHasBeenSet() const { return m_scheduleOffsetHasBeenSet; }
452 inline void SetScheduleOffset(int value) {
453 m_scheduleOffsetHasBeenSet = true;
454 m_scheduleOffset = value;
455 }
457 SetScheduleOffset(value);
458 return *this;
459 }
461
463
478 inline int GetDuration() const { return m_duration; }
479 inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
480 inline void SetDuration(int value) {
481 m_durationHasBeenSet = true;
482 m_duration = value;
483 }
485 SetDuration(value);
486 return *this;
487 }
489
491
495 inline const Aws::Vector<Aws::Map<Aws::String, Aws::Vector<Aws::String>>>& GetTargetMaps() const { return m_targetMaps; }
496 inline bool TargetMapsHasBeenSet() const { return m_targetMapsHasBeenSet; }
497 template <typename TargetMapsT = Aws::Vector<Aws::Map<Aws::String, Aws::Vector<Aws::String>>>>
498 void SetTargetMaps(TargetMapsT&& value) {
499 m_targetMapsHasBeenSet = true;
500 m_targetMaps = std::forward<TargetMapsT>(value);
501 }
502 template <typename TargetMapsT = Aws::Vector<Aws::Map<Aws::String, Aws::Vector<Aws::String>>>>
504 SetTargetMaps(std::forward<TargetMapsT>(value));
505 return *this;
506 }
507 template <typename TargetMapsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
509 m_targetMapsHasBeenSet = true;
510 m_targetMaps.emplace_back(std::forward<TargetMapsT>(value));
511 return *this;
512 }
514
516
523 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
524 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
525 template <typename TagsT = Aws::Vector<Tag>>
526 void SetTags(TagsT&& value) {
527 m_tagsHasBeenSet = true;
528 m_tags = std::forward<TagsT>(value);
529 }
530 template <typename TagsT = Aws::Vector<Tag>>
532 SetTags(std::forward<TagsT>(value));
533 return *this;
534 }
535 template <typename TagsT = Tag>
537 m_tagsHasBeenSet = true;
538 m_tags.emplace_back(std::forward<TagsT>(value));
539 return *this;
540 }
542
544
545 inline const AlarmConfiguration& GetAlarmConfiguration() const { return m_alarmConfiguration; }
546 inline bool AlarmConfigurationHasBeenSet() const { return m_alarmConfigurationHasBeenSet; }
547 template <typename AlarmConfigurationT = AlarmConfiguration>
548 void SetAlarmConfiguration(AlarmConfigurationT&& value) {
549 m_alarmConfigurationHasBeenSet = true;
550 m_alarmConfiguration = std::forward<AlarmConfigurationT>(value);
551 }
552 template <typename AlarmConfigurationT = AlarmConfiguration>
553 CreateAssociationRequest& WithAlarmConfiguration(AlarmConfigurationT&& value) {
554 SetAlarmConfiguration(std::forward<AlarmConfigurationT>(value));
555 return *this;
556 }
558 private:
559 Aws::String m_name;
560
561 Aws::String m_documentVersion;
562
563 Aws::String m_instanceId;
564
566
567 Aws::Vector<Target> m_targets;
568
569 Aws::String m_scheduleExpression;
570
571 InstanceAssociationOutputLocation m_outputLocation;
572
573 Aws::String m_associationName;
574
575 Aws::String m_automationTargetParameterName;
576
577 Aws::String m_maxErrors;
578
579 Aws::String m_maxConcurrency;
580
582
584
585 bool m_applyOnlyAtCronInterval{false};
586
587 Aws::Vector<Aws::String> m_calendarNames;
588
589 Aws::Vector<TargetLocation> m_targetLocations;
590
591 int m_scheduleOffset{0};
592
593 int m_duration{0};
594
596
597 Aws::Vector<Tag> m_tags;
598
599 AlarmConfiguration m_alarmConfiguration;
600 bool m_nameHasBeenSet = false;
601 bool m_documentVersionHasBeenSet = false;
602 bool m_instanceIdHasBeenSet = false;
603 bool m_parametersHasBeenSet = false;
604 bool m_targetsHasBeenSet = false;
605 bool m_scheduleExpressionHasBeenSet = false;
606 bool m_outputLocationHasBeenSet = false;
607 bool m_associationNameHasBeenSet = false;
608 bool m_automationTargetParameterNameHasBeenSet = false;
609 bool m_maxErrorsHasBeenSet = false;
610 bool m_maxConcurrencyHasBeenSet = false;
611 bool m_complianceSeverityHasBeenSet = false;
612 bool m_syncComplianceHasBeenSet = false;
613 bool m_applyOnlyAtCronIntervalHasBeenSet = false;
614 bool m_calendarNamesHasBeenSet = false;
615 bool m_targetLocationsHasBeenSet = false;
616 bool m_scheduleOffsetHasBeenSet = false;
617 bool m_durationHasBeenSet = false;
618 bool m_targetMapsHasBeenSet = false;
619 bool m_tagsHasBeenSet = false;
620 bool m_alarmConfigurationHasBeenSet = false;
621};
622
623} // namespace Model
624} // namespace SSM
625} // namespace Aws
CreateAssociationRequest & WithMaxErrors(MaxErrorsT &&value)
const InstanceAssociationOutputLocation & GetOutputLocation() const
CreateAssociationRequest & WithAssociationName(AssociationNameT &&value)
const Aws::Vector< TargetLocation > & GetTargetLocations() const
CreateAssociationRequest & WithDocumentVersion(DocumentVersionT &&value)
const Aws::Vector< Target > & GetTargets() const
AWS_SSM_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::Vector< Aws::String > & GetCalendarNames() const
CreateAssociationRequest & WithComplianceSeverity(AssociationComplianceSeverity value)
CreateAssociationRequest & WithParameters(ParametersT &&value)
CreateAssociationRequest & AddTargetMaps(TargetMapsT &&value)
const Aws::String & GetAutomationTargetParameterName() const
CreateAssociationRequest & WithDuration(int value)
void SetSyncCompliance(AssociationSyncCompliance value)
CreateAssociationRequest & WithOutputLocation(OutputLocationT &&value)
void SetScheduleExpression(ScheduleExpressionT &&value)
const AlarmConfiguration & GetAlarmConfiguration() const
CreateAssociationRequest & WithInstanceId(InstanceIdT &&value)
CreateAssociationRequest & WithApplyOnlyAtCronInterval(bool value)
CreateAssociationRequest & WithScheduleExpression(ScheduleExpressionT &&value)
CreateAssociationRequest & WithMaxConcurrency(MaxConcurrencyT &&value)
CreateAssociationRequest & WithTargets(TargetsT &&value)
const Aws::Map< Aws::String, Aws::Vector< Aws::String > > & GetParameters() const
void SetAutomationTargetParameterName(AutomationTargetParameterNameT &&value)
CreateAssociationRequest & WithTargetMaps(TargetMapsT &&value)
CreateAssociationRequest & AddTargetLocations(TargetLocationsT &&value)
CreateAssociationRequest & WithName(NameT &&value)
CreateAssociationRequest & WithAutomationTargetParameterName(AutomationTargetParameterNameT &&value)
CreateAssociationRequest & AddCalendarNames(CalendarNamesT &&value)
CreateAssociationRequest & WithScheduleOffset(int value)
CreateAssociationRequest & WithAlarmConfiguration(AlarmConfigurationT &&value)
CreateAssociationRequest & WithTags(TagsT &&value)
void SetComplianceSeverity(AssociationComplianceSeverity value)
CreateAssociationRequest & AddTags(TagsT &&value)
AssociationComplianceSeverity GetComplianceSeverity() const
AWS_SSM_API CreateAssociationRequest()=default
CreateAssociationRequest & WithCalendarNames(CalendarNamesT &&value)
CreateAssociationRequest & WithTargetLocations(TargetLocationsT &&value)
void SetAlarmConfiguration(AlarmConfigurationT &&value)
const Aws::Vector< Aws::Map< Aws::String, Aws::Vector< Aws::String > > > & GetTargetMaps() const
void SetDocumentVersion(DocumentVersionT &&value)
virtual const char * GetServiceRequestName() const override
CreateAssociationRequest & WithSyncCompliance(AssociationSyncCompliance value)
AssociationSyncCompliance GetSyncCompliance() const
CreateAssociationRequest & AddParameters(ParametersKeyT &&key, ParametersValueT &&value)
AWS_SSM_API Aws::String SerializePayload() const override
CreateAssociationRequest & AddTargets(TargetsT &&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