AWS SDK for C++

AWS SDK for C++ Version 1.11.851

Loading...
Searching...
No Matches
PutLogAlarmRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/monitoring/CloudWatchRequest.h>
10#include <aws/monitoring/CloudWatch_EXPORTS.h>
11#include <aws/monitoring/model/ComparisonOperator.h>
12#include <aws/monitoring/model/ScheduledQueryConfiguration.h>
13#include <aws/monitoring/model/Tag.h>
14
15#include <utility>
16
17namespace Aws {
18namespace CloudWatch {
19namespace Model {
20
24 public:
25 AWS_CLOUDWATCH_API PutLogAlarmRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "PutLogAlarm"; }
32
33 AWS_CLOUDWATCH_API Aws::String SerializePayload() const override;
34
36
38
42 inline const Aws::String& GetAlarmName() const { return m_alarmName; }
43 inline bool AlarmNameHasBeenSet() const { return m_alarmNameHasBeenSet; }
44 template <typename AlarmNameT = Aws::String>
45 void SetAlarmName(AlarmNameT&& value) {
46 m_alarmNameHasBeenSet = true;
47 m_alarmName = std::forward<AlarmNameT>(value);
48 }
49 template <typename AlarmNameT = Aws::String>
50 PutLogAlarmRequest& WithAlarmName(AlarmNameT&& value) {
51 SetAlarmName(std::forward<AlarmNameT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::String& GetAlarmDescription() const { return m_alarmDescription; }
61 inline bool AlarmDescriptionHasBeenSet() const { return m_alarmDescriptionHasBeenSet; }
62 template <typename AlarmDescriptionT = Aws::String>
63 void SetAlarmDescription(AlarmDescriptionT&& value) {
64 m_alarmDescriptionHasBeenSet = true;
65 m_alarmDescription = std::forward<AlarmDescriptionT>(value);
66 }
67 template <typename AlarmDescriptionT = Aws::String>
68 PutLogAlarmRequest& WithAlarmDescription(AlarmDescriptionT&& value) {
69 SetAlarmDescription(std::forward<AlarmDescriptionT>(value));
70 return *this;
71 }
73
75
80 inline const ScheduledQueryConfiguration& GetScheduledQueryConfiguration() const { return m_scheduledQueryConfiguration; }
81 inline bool ScheduledQueryConfigurationHasBeenSet() const { return m_scheduledQueryConfigurationHasBeenSet; }
82 template <typename ScheduledQueryConfigurationT = ScheduledQueryConfiguration>
83 void SetScheduledQueryConfiguration(ScheduledQueryConfigurationT&& value) {
84 m_scheduledQueryConfigurationHasBeenSet = true;
85 m_scheduledQueryConfiguration = std::forward<ScheduledQueryConfigurationT>(value);
86 }
87 template <typename ScheduledQueryConfigurationT = ScheduledQueryConfiguration>
88 PutLogAlarmRequest& WithScheduledQueryConfiguration(ScheduledQueryConfigurationT&& value) {
89 SetScheduledQueryConfiguration(std::forward<ScheduledQueryConfigurationT>(value));
90 return *this;
91 }
93
95
100 inline int GetActionLogLineCount() const { return m_actionLogLineCount; }
101 inline bool ActionLogLineCountHasBeenSet() const { return m_actionLogLineCountHasBeenSet; }
102 inline void SetActionLogLineCount(int value) {
103 m_actionLogLineCountHasBeenSet = true;
104 m_actionLogLineCount = value;
105 }
108 return *this;
109 }
111
113
118 inline const Aws::String& GetActionLogLineRoleArn() const { return m_actionLogLineRoleArn; }
119 inline bool ActionLogLineRoleArnHasBeenSet() const { return m_actionLogLineRoleArnHasBeenSet; }
120 template <typename ActionLogLineRoleArnT = Aws::String>
121 void SetActionLogLineRoleArn(ActionLogLineRoleArnT&& value) {
122 m_actionLogLineRoleArnHasBeenSet = true;
123 m_actionLogLineRoleArn = std::forward<ActionLogLineRoleArnT>(value);
124 }
125 template <typename ActionLogLineRoleArnT = Aws::String>
126 PutLogAlarmRequest& WithActionLogLineRoleArn(ActionLogLineRoleArnT&& value) {
127 SetActionLogLineRoleArn(std::forward<ActionLogLineRoleArnT>(value));
128 return *this;
129 }
131
133
137 inline bool GetActionsEnabled() const { return m_actionsEnabled; }
138 inline bool ActionsEnabledHasBeenSet() const { return m_actionsEnabledHasBeenSet; }
139 inline void SetActionsEnabled(bool value) {
140 m_actionsEnabledHasBeenSet = true;
141 m_actionsEnabled = value;
142 }
144 SetActionsEnabled(value);
145 return *this;
146 }
148
150
164 inline const Aws::Vector<Aws::String>& GetOKActions() const { return m_oKActions; }
165 inline bool OKActionsHasBeenSet() const { return m_oKActionsHasBeenSet; }
166 template <typename OKActionsT = Aws::Vector<Aws::String>>
167 void SetOKActions(OKActionsT&& value) {
168 m_oKActionsHasBeenSet = true;
169 m_oKActions = std::forward<OKActionsT>(value);
170 }
171 template <typename OKActionsT = Aws::Vector<Aws::String>>
172 PutLogAlarmRequest& WithOKActions(OKActionsT&& value) {
173 SetOKActions(std::forward<OKActionsT>(value));
174 return *this;
175 }
176 template <typename OKActionsT = Aws::String>
177 PutLogAlarmRequest& AddOKActions(OKActionsT&& value) {
178 m_oKActionsHasBeenSet = true;
179 m_oKActions.emplace_back(std::forward<OKActionsT>(value));
180 return *this;
181 }
183
185
201 inline const Aws::Vector<Aws::String>& GetAlarmActions() const { return m_alarmActions; }
202 inline bool AlarmActionsHasBeenSet() const { return m_alarmActionsHasBeenSet; }
203 template <typename AlarmActionsT = Aws::Vector<Aws::String>>
204 void SetAlarmActions(AlarmActionsT&& value) {
205 m_alarmActionsHasBeenSet = true;
206 m_alarmActions = std::forward<AlarmActionsT>(value);
207 }
208 template <typename AlarmActionsT = Aws::Vector<Aws::String>>
209 PutLogAlarmRequest& WithAlarmActions(AlarmActionsT&& value) {
210 SetAlarmActions(std::forward<AlarmActionsT>(value));
211 return *this;
212 }
213 template <typename AlarmActionsT = Aws::String>
214 PutLogAlarmRequest& AddAlarmActions(AlarmActionsT&& value) {
215 m_alarmActionsHasBeenSet = true;
216 m_alarmActions.emplace_back(std::forward<AlarmActionsT>(value));
217 return *this;
218 }
220
222
237 inline const Aws::Vector<Aws::String>& GetInsufficientDataActions() const { return m_insufficientDataActions; }
238 inline bool InsufficientDataActionsHasBeenSet() const { return m_insufficientDataActionsHasBeenSet; }
239 template <typename InsufficientDataActionsT = Aws::Vector<Aws::String>>
240 void SetInsufficientDataActions(InsufficientDataActionsT&& value) {
241 m_insufficientDataActionsHasBeenSet = true;
242 m_insufficientDataActions = std::forward<InsufficientDataActionsT>(value);
243 }
244 template <typename InsufficientDataActionsT = Aws::Vector<Aws::String>>
245 PutLogAlarmRequest& WithInsufficientDataActions(InsufficientDataActionsT&& value) {
246 SetInsufficientDataActions(std::forward<InsufficientDataActionsT>(value));
247 return *this;
248 }
249 template <typename InsufficientDataActionsT = Aws::String>
250 PutLogAlarmRequest& AddInsufficientDataActions(InsufficientDataActionsT&& value) {
251 m_insufficientDataActionsHasBeenSet = true;
252 m_insufficientDataActions.emplace_back(std::forward<InsufficientDataActionsT>(value));
253 return *this;
254 }
256
258
262 inline int GetQueryResultsToEvaluate() const { return m_queryResultsToEvaluate; }
263 inline bool QueryResultsToEvaluateHasBeenSet() const { return m_queryResultsToEvaluateHasBeenSet; }
264 inline void SetQueryResultsToEvaluate(int value) {
265 m_queryResultsToEvaluateHasBeenSet = true;
266 m_queryResultsToEvaluate = value;
267 }
270 return *this;
271 }
273
275
282 inline int GetQueryResultsToAlarm() const { return m_queryResultsToAlarm; }
283 inline bool QueryResultsToAlarmHasBeenSet() const { return m_queryResultsToAlarmHasBeenSet; }
284 inline void SetQueryResultsToAlarm(int value) {
285 m_queryResultsToAlarmHasBeenSet = true;
286 m_queryResultsToAlarm = value;
287 }
290 return *this;
291 }
293
295
298 inline double GetThreshold() const { return m_threshold; }
299 inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; }
300 inline void SetThreshold(double value) {
301 m_thresholdHasBeenSet = true;
302 m_threshold = value;
303 }
304 inline PutLogAlarmRequest& WithThreshold(double value) {
305 SetThreshold(value);
306 return *this;
307 }
309
311
318 inline ComparisonOperator GetComparisonOperator() const { return m_comparisonOperator; }
319 inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; }
321 m_comparisonOperatorHasBeenSet = true;
322 m_comparisonOperator = value;
323 }
326 return *this;
327 }
329
331
337 inline const Aws::String& GetTreatMissingData() const { return m_treatMissingData; }
338 inline bool TreatMissingDataHasBeenSet() const { return m_treatMissingDataHasBeenSet; }
339 template <typename TreatMissingDataT = Aws::String>
340 void SetTreatMissingData(TreatMissingDataT&& value) {
341 m_treatMissingDataHasBeenSet = true;
342 m_treatMissingData = std::forward<TreatMissingDataT>(value);
343 }
344 template <typename TreatMissingDataT = Aws::String>
345 PutLogAlarmRequest& WithTreatMissingData(TreatMissingDataT&& value) {
346 SetTreatMissingData(std::forward<TreatMissingDataT>(value));
347 return *this;
348 }
350
352
356 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
357 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
358 template <typename TagsT = Aws::Vector<Tag>>
359 void SetTags(TagsT&& value) {
360 m_tagsHasBeenSet = true;
361 m_tags = std::forward<TagsT>(value);
362 }
363 template <typename TagsT = Aws::Vector<Tag>>
364 PutLogAlarmRequest& WithTags(TagsT&& value) {
365 SetTags(std::forward<TagsT>(value));
366 return *this;
367 }
368 template <typename TagsT = Tag>
369 PutLogAlarmRequest& AddTags(TagsT&& value) {
370 m_tagsHasBeenSet = true;
371 m_tags.emplace_back(std::forward<TagsT>(value));
372 return *this;
373 }
375 private:
376 Aws::String m_alarmName;
377
378 Aws::String m_alarmDescription;
379
380 ScheduledQueryConfiguration m_scheduledQueryConfiguration;
381
382 int m_actionLogLineCount{0};
383
384 Aws::String m_actionLogLineRoleArn;
385
386 bool m_actionsEnabled{false};
387
388 Aws::Vector<Aws::String> m_oKActions;
389
390 Aws::Vector<Aws::String> m_alarmActions;
391
392 Aws::Vector<Aws::String> m_insufficientDataActions;
393
394 int m_queryResultsToEvaluate{0};
395
396 int m_queryResultsToAlarm{0};
397
398 double m_threshold{0.0};
399
401
402 Aws::String m_treatMissingData;
403
404 Aws::Vector<Tag> m_tags;
405 bool m_alarmNameHasBeenSet = false;
406 bool m_alarmDescriptionHasBeenSet = false;
407 bool m_scheduledQueryConfigurationHasBeenSet = false;
408 bool m_actionLogLineCountHasBeenSet = false;
409 bool m_actionLogLineRoleArnHasBeenSet = false;
410 bool m_actionsEnabledHasBeenSet = false;
411 bool m_oKActionsHasBeenSet = false;
412 bool m_alarmActionsHasBeenSet = false;
413 bool m_insufficientDataActionsHasBeenSet = false;
414 bool m_queryResultsToEvaluateHasBeenSet = false;
415 bool m_queryResultsToAlarmHasBeenSet = false;
416 bool m_thresholdHasBeenSet = false;
417 bool m_comparisonOperatorHasBeenSet = false;
418 bool m_treatMissingDataHasBeenSet = false;
419 bool m_tagsHasBeenSet = false;
420};
421
422} // namespace Model
423} // namespace CloudWatch
424} // namespace Aws
PutLogAlarmRequest & WithThreshold(double value)
AWS_CLOUDWATCH_API Aws::String SerializePayload() const override
void SetTreatMissingData(TreatMissingDataT &&value)
const Aws::String & GetTreatMissingData() const
PutLogAlarmRequest & WithActionLogLineCount(int value)
PutLogAlarmRequest & WithTreatMissingData(TreatMissingDataT &&value)
PutLogAlarmRequest & WithOKActions(OKActionsT &&value)
const Aws::Vector< Aws::String > & GetInsufficientDataActions() const
PutLogAlarmRequest & WithAlarmDescription(AlarmDescriptionT &&value)
PutLogAlarmRequest & AddTags(TagsT &&value)
PutLogAlarmRequest & AddOKActions(OKActionsT &&value)
PutLogAlarmRequest & WithActionsEnabled(bool value)
const ScheduledQueryConfiguration & GetScheduledQueryConfiguration() const
virtual const char * GetServiceRequestName() const override
void SetInsufficientDataActions(InsufficientDataActionsT &&value)
const Aws::Vector< Aws::String > & GetAlarmActions() const
PutLogAlarmRequest & WithAlarmName(AlarmNameT &&value)
const Aws::Vector< Aws::String > & GetOKActions() const
PutLogAlarmRequest & WithQueryResultsToEvaluate(int value)
PutLogAlarmRequest & AddInsufficientDataActions(InsufficientDataActionsT &&value)
const Aws::String & GetActionLogLineRoleArn() const
PutLogAlarmRequest & WithAlarmActions(AlarmActionsT &&value)
PutLogAlarmRequest & WithComparisonOperator(ComparisonOperator value)
AWS_CLOUDWATCH_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
const Aws::Vector< Tag > & GetTags() const
AWS_CLOUDWATCH_API PutLogAlarmRequest()=default
PutLogAlarmRequest & WithActionLogLineRoleArn(ActionLogLineRoleArnT &&value)
PutLogAlarmRequest & WithScheduledQueryConfiguration(ScheduledQueryConfigurationT &&value)
void SetActionLogLineRoleArn(ActionLogLineRoleArnT &&value)
PutLogAlarmRequest & WithInsufficientDataActions(InsufficientDataActionsT &&value)
PutLogAlarmRequest & AddAlarmActions(AlarmActionsT &&value)
void SetComparisonOperator(ComparisonOperator value)
PutLogAlarmRequest & WithTags(TagsT &&value)
void SetAlarmDescription(AlarmDescriptionT &&value)
const Aws::String & GetAlarmDescription() const
PutLogAlarmRequest & WithQueryResultsToAlarm(int value)
void SetScheduledQueryConfiguration(ScheduledQueryConfigurationT &&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