AWS SDK for C++

AWS SDK for C++ Version 1.11.854

Loading...
Searching...
No Matches
CreateCanaryRequest.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/synthetics/SyntheticsRequest.h>
11#include <aws/synthetics/Synthetics_EXPORTS.h>
12#include <aws/synthetics/model/AddReplicaLocationInput.h>
13#include <aws/synthetics/model/ArtifactConfigInput.h>
14#include <aws/synthetics/model/BrowserConfig.h>
15#include <aws/synthetics/model/CanaryCodeInput.h>
16#include <aws/synthetics/model/CanaryRunConfigInput.h>
17#include <aws/synthetics/model/CanaryScheduleInput.h>
18#include <aws/synthetics/model/ProvisionedResourceCleanupSetting.h>
19#include <aws/synthetics/model/ResourceToTag.h>
20#include <aws/synthetics/model/VpcConfigInput.h>
21
22#include <utility>
23
24namespace Aws {
25namespace Synthetics {
26namespace Model {
27
31 public:
32 AWS_SYNTHETICS_API CreateCanaryRequest() = default;
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "CreateCanary"; }
39
40 AWS_SYNTHETICS_API Aws::String SerializePayload() const override;
41
43
52 inline const Aws::String& GetName() const { return m_name; }
53 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
54 template <typename NameT = Aws::String>
55 void SetName(NameT&& value) {
56 m_nameHasBeenSet = true;
57 m_name = std::forward<NameT>(value);
58 }
59 template <typename NameT = Aws::String>
60 CreateCanaryRequest& WithName(NameT&& value) {
61 SetName(std::forward<NameT>(value));
62 return *this;
63 }
65
67
72 inline const CanaryCodeInput& GetCode() const { return m_code; }
73 inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
74 template <typename CodeT = CanaryCodeInput>
75 void SetCode(CodeT&& value) {
76 m_codeHasBeenSet = true;
77 m_code = std::forward<CodeT>(value);
78 }
79 template <typename CodeT = CanaryCodeInput>
80 CreateCanaryRequest& WithCode(CodeT&& value) {
81 SetCode(std::forward<CodeT>(value));
82 return *this;
83 }
85
87
92 inline const Aws::String& GetArtifactS3Location() const { return m_artifactS3Location; }
93 inline bool ArtifactS3LocationHasBeenSet() const { return m_artifactS3LocationHasBeenSet; }
94 template <typename ArtifactS3LocationT = Aws::String>
95 void SetArtifactS3Location(ArtifactS3LocationT&& value) {
96 m_artifactS3LocationHasBeenSet = true;
97 m_artifactS3Location = std::forward<ArtifactS3LocationT>(value);
98 }
99 template <typename ArtifactS3LocationT = Aws::String>
100 CreateCanaryRequest& WithArtifactS3Location(ArtifactS3LocationT&& value) {
101 SetArtifactS3Location(std::forward<ArtifactS3LocationT>(value));
102 return *this;
103 }
105
107
119 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
120 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
121 template <typename ExecutionRoleArnT = Aws::String>
122 void SetExecutionRoleArn(ExecutionRoleArnT&& value) {
123 m_executionRoleArnHasBeenSet = true;
124 m_executionRoleArn = std::forward<ExecutionRoleArnT>(value);
125 }
126 template <typename ExecutionRoleArnT = Aws::String>
127 CreateCanaryRequest& WithExecutionRoleArn(ExecutionRoleArnT&& value) {
128 SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value));
129 return *this;
130 }
132
134
138 inline const CanaryScheduleInput& GetSchedule() const { return m_schedule; }
139 inline bool ScheduleHasBeenSet() const { return m_scheduleHasBeenSet; }
140 template <typename ScheduleT = CanaryScheduleInput>
141 void SetSchedule(ScheduleT&& value) {
142 m_scheduleHasBeenSet = true;
143 m_schedule = std::forward<ScheduleT>(value);
144 }
145 template <typename ScheduleT = CanaryScheduleInput>
146 CreateCanaryRequest& WithSchedule(ScheduleT&& value) {
147 SetSchedule(std::forward<ScheduleT>(value));
148 return *this;
149 }
151
153
160 inline const CanaryRunConfigInput& GetRunConfig() const { return m_runConfig; }
161 inline bool RunConfigHasBeenSet() const { return m_runConfigHasBeenSet; }
162 template <typename RunConfigT = CanaryRunConfigInput>
163 void SetRunConfig(RunConfigT&& value) {
164 m_runConfigHasBeenSet = true;
165 m_runConfig = std::forward<RunConfigT>(value);
166 }
167 template <typename RunConfigT = CanaryRunConfigInput>
168 CreateCanaryRequest& WithRunConfig(RunConfigT&& value) {
169 SetRunConfig(std::forward<RunConfigT>(value));
170 return *this;
171 }
173
175
182 inline int GetSuccessRetentionPeriodInDays() const { return m_successRetentionPeriodInDays; }
183 inline bool SuccessRetentionPeriodInDaysHasBeenSet() const { return m_successRetentionPeriodInDaysHasBeenSet; }
184 inline void SetSuccessRetentionPeriodInDays(int value) {
185 m_successRetentionPeriodInDaysHasBeenSet = true;
186 m_successRetentionPeriodInDays = value;
187 }
190 return *this;
191 }
193
195
202 inline int GetFailureRetentionPeriodInDays() const { return m_failureRetentionPeriodInDays; }
203 inline bool FailureRetentionPeriodInDaysHasBeenSet() const { return m_failureRetentionPeriodInDaysHasBeenSet; }
204 inline void SetFailureRetentionPeriodInDays(int value) {
205 m_failureRetentionPeriodInDaysHasBeenSet = true;
206 m_failureRetentionPeriodInDays = value;
207 }
210 return *this;
211 }
213
215
221 inline const Aws::String& GetRuntimeVersion() const { return m_runtimeVersion; }
222 inline bool RuntimeVersionHasBeenSet() const { return m_runtimeVersionHasBeenSet; }
223 template <typename RuntimeVersionT = Aws::String>
224 void SetRuntimeVersion(RuntimeVersionT&& value) {
225 m_runtimeVersionHasBeenSet = true;
226 m_runtimeVersion = std::forward<RuntimeVersionT>(value);
227 }
228 template <typename RuntimeVersionT = Aws::String>
229 CreateCanaryRequest& WithRuntimeVersion(RuntimeVersionT&& value) {
230 SetRuntimeVersion(std::forward<RuntimeVersionT>(value));
231 return *this;
232 }
234
236
243 inline const VpcConfigInput& GetVpcConfig() const { return m_vpcConfig; }
244 inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; }
245 template <typename VpcConfigT = VpcConfigInput>
246 void SetVpcConfig(VpcConfigT&& value) {
247 m_vpcConfigHasBeenSet = true;
248 m_vpcConfig = std::forward<VpcConfigT>(value);
249 }
250 template <typename VpcConfigT = VpcConfigInput>
251 CreateCanaryRequest& WithVpcConfig(VpcConfigT&& value) {
252 SetVpcConfig(std::forward<VpcConfigT>(value));
253 return *this;
254 }
256
258
265 inline const Aws::Vector<ResourceToTag>& GetResourcesToReplicateTags() const { return m_resourcesToReplicateTags; }
266 inline bool ResourcesToReplicateTagsHasBeenSet() const { return m_resourcesToReplicateTagsHasBeenSet; }
267 template <typename ResourcesToReplicateTagsT = Aws::Vector<ResourceToTag>>
268 void SetResourcesToReplicateTags(ResourcesToReplicateTagsT&& value) {
269 m_resourcesToReplicateTagsHasBeenSet = true;
270 m_resourcesToReplicateTags = std::forward<ResourcesToReplicateTagsT>(value);
271 }
272 template <typename ResourcesToReplicateTagsT = Aws::Vector<ResourceToTag>>
273 CreateCanaryRequest& WithResourcesToReplicateTags(ResourcesToReplicateTagsT&& value) {
274 SetResourcesToReplicateTags(std::forward<ResourcesToReplicateTagsT>(value));
275 return *this;
276 }
278 m_resourcesToReplicateTagsHasBeenSet = true;
279 m_resourcesToReplicateTags.push_back(value);
280 return *this;
281 }
283
285
296 inline ProvisionedResourceCleanupSetting GetProvisionedResourceCleanup() const { return m_provisionedResourceCleanup; }
297 inline bool ProvisionedResourceCleanupHasBeenSet() const { return m_provisionedResourceCleanupHasBeenSet; }
299 m_provisionedResourceCleanupHasBeenSet = true;
300 m_provisionedResourceCleanup = value;
301 }
304 return *this;
305 }
307
309
318 inline const Aws::Vector<BrowserConfig>& GetBrowserConfigs() const { return m_browserConfigs; }
319 inline bool BrowserConfigsHasBeenSet() const { return m_browserConfigsHasBeenSet; }
320 template <typename BrowserConfigsT = Aws::Vector<BrowserConfig>>
321 void SetBrowserConfigs(BrowserConfigsT&& value) {
322 m_browserConfigsHasBeenSet = true;
323 m_browserConfigs = std::forward<BrowserConfigsT>(value);
324 }
325 template <typename BrowserConfigsT = Aws::Vector<BrowserConfig>>
326 CreateCanaryRequest& WithBrowserConfigs(BrowserConfigsT&& value) {
327 SetBrowserConfigs(std::forward<BrowserConfigsT>(value));
328 return *this;
329 }
330 template <typename BrowserConfigsT = BrowserConfig>
331 CreateCanaryRequest& AddBrowserConfigs(BrowserConfigsT&& value) {
332 m_browserConfigsHasBeenSet = true;
333 m_browserConfigs.emplace_back(std::forward<BrowserConfigsT>(value));
334 return *this;
335 }
337
339
344 inline const Aws::Vector<AddReplicaLocationInput>& GetAddReplicaLocations() const { return m_addReplicaLocations; }
345 inline bool AddReplicaLocationsHasBeenSet() const { return m_addReplicaLocationsHasBeenSet; }
346 template <typename AddReplicaLocationsT = Aws::Vector<AddReplicaLocationInput>>
347 void SetAddReplicaLocations(AddReplicaLocationsT&& value) {
348 m_addReplicaLocationsHasBeenSet = true;
349 m_addReplicaLocations = std::forward<AddReplicaLocationsT>(value);
350 }
351 template <typename AddReplicaLocationsT = Aws::Vector<AddReplicaLocationInput>>
352 CreateCanaryRequest& WithAddReplicaLocations(AddReplicaLocationsT&& value) {
353 SetAddReplicaLocations(std::forward<AddReplicaLocationsT>(value));
354 return *this;
355 }
356 template <typename AddReplicaLocationsT = AddReplicaLocationInput>
357 CreateCanaryRequest& AddAddReplicaLocations(AddReplicaLocationsT&& value) {
358 m_addReplicaLocationsHasBeenSet = true;
359 m_addReplicaLocations.emplace_back(std::forward<AddReplicaLocationsT>(value));
360 return *this;
361 }
363
365
374 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
375 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
376 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
377 void SetTags(TagsT&& value) {
378 m_tagsHasBeenSet = true;
379 m_tags = std::forward<TagsT>(value);
380 }
381 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
383 SetTags(std::forward<TagsT>(value));
384 return *this;
385 }
386 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
387 CreateCanaryRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
388 m_tagsHasBeenSet = true;
389 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
390 return *this;
391 }
393
395
400 inline const ArtifactConfigInput& GetArtifactConfig() const { return m_artifactConfig; }
401 inline bool ArtifactConfigHasBeenSet() const { return m_artifactConfigHasBeenSet; }
402 template <typename ArtifactConfigT = ArtifactConfigInput>
403 void SetArtifactConfig(ArtifactConfigT&& value) {
404 m_artifactConfigHasBeenSet = true;
405 m_artifactConfig = std::forward<ArtifactConfigT>(value);
406 }
407 template <typename ArtifactConfigT = ArtifactConfigInput>
408 CreateCanaryRequest& WithArtifactConfig(ArtifactConfigT&& value) {
409 SetArtifactConfig(std::forward<ArtifactConfigT>(value));
410 return *this;
411 }
413
415
421 inline const Aws::String& GetKmsKeyArn() const { return m_kmsKeyArn; }
422 inline bool KmsKeyArnHasBeenSet() const { return m_kmsKeyArnHasBeenSet; }
423 template <typename KmsKeyArnT = Aws::String>
424 void SetKmsKeyArn(KmsKeyArnT&& value) {
425 m_kmsKeyArnHasBeenSet = true;
426 m_kmsKeyArn = std::forward<KmsKeyArnT>(value);
427 }
428 template <typename KmsKeyArnT = Aws::String>
429 CreateCanaryRequest& WithKmsKeyArn(KmsKeyArnT&& value) {
430 SetKmsKeyArn(std::forward<KmsKeyArnT>(value));
431 return *this;
432 }
434 private:
435 Aws::String m_name;
436
437 CanaryCodeInput m_code;
438
439 Aws::String m_artifactS3Location;
440
441 Aws::String m_executionRoleArn;
442
443 CanaryScheduleInput m_schedule;
444
445 CanaryRunConfigInput m_runConfig;
446
447 int m_successRetentionPeriodInDays{0};
448
449 int m_failureRetentionPeriodInDays{0};
450
451 Aws::String m_runtimeVersion;
452
453 VpcConfigInput m_vpcConfig;
454
455 Aws::Vector<ResourceToTag> m_resourcesToReplicateTags;
456
458
459 Aws::Vector<BrowserConfig> m_browserConfigs;
460
461 Aws::Vector<AddReplicaLocationInput> m_addReplicaLocations;
462
464
465 ArtifactConfigInput m_artifactConfig;
466
467 Aws::String m_kmsKeyArn;
468 bool m_nameHasBeenSet = false;
469 bool m_codeHasBeenSet = false;
470 bool m_artifactS3LocationHasBeenSet = false;
471 bool m_executionRoleArnHasBeenSet = false;
472 bool m_scheduleHasBeenSet = false;
473 bool m_runConfigHasBeenSet = false;
474 bool m_successRetentionPeriodInDaysHasBeenSet = false;
475 bool m_failureRetentionPeriodInDaysHasBeenSet = false;
476 bool m_runtimeVersionHasBeenSet = false;
477 bool m_vpcConfigHasBeenSet = false;
478 bool m_resourcesToReplicateTagsHasBeenSet = false;
479 bool m_provisionedResourceCleanupHasBeenSet = false;
480 bool m_browserConfigsHasBeenSet = false;
481 bool m_addReplicaLocationsHasBeenSet = false;
482 bool m_tagsHasBeenSet = false;
483 bool m_artifactConfigHasBeenSet = false;
484 bool m_kmsKeyArnHasBeenSet = false;
485};
486
487} // namespace Model
488} // namespace Synthetics
489} // namespace Aws
const ArtifactConfigInput & GetArtifactConfig() const
const CanaryScheduleInput & GetSchedule() const
void SetArtifactS3Location(ArtifactS3LocationT &&value)
CreateCanaryRequest & AddAddReplicaLocations(AddReplicaLocationsT &&value)
CreateCanaryRequest & WithName(NameT &&value)
CreateCanaryRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
const Aws::Vector< BrowserConfig > & GetBrowserConfigs() const
CreateCanaryRequest & AddBrowserConfigs(BrowserConfigsT &&value)
CreateCanaryRequest & WithKmsKeyArn(KmsKeyArnT &&value)
void SetAddReplicaLocations(AddReplicaLocationsT &&value)
CreateCanaryRequest & WithAddReplicaLocations(AddReplicaLocationsT &&value)
CreateCanaryRequest & WithBrowserConfigs(BrowserConfigsT &&value)
const Aws::Vector< AddReplicaLocationInput > & GetAddReplicaLocations() const
CreateCanaryRequest & WithSchedule(ScheduleT &&value)
CreateCanaryRequest & WithVpcConfig(VpcConfigT &&value)
CreateCanaryRequest & AddResourcesToReplicateTags(ResourceToTag value)
const Aws::String & GetArtifactS3Location() const
CreateCanaryRequest & WithProvisionedResourceCleanup(ProvisionedResourceCleanupSetting value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateCanaryRequest & WithExecutionRoleArn(ExecutionRoleArnT &&value)
CreateCanaryRequest & WithTags(TagsT &&value)
void SetExecutionRoleArn(ExecutionRoleArnT &&value)
CreateCanaryRequest & WithResourcesToReplicateTags(ResourcesToReplicateTagsT &&value)
void SetProvisionedResourceCleanup(ProvisionedResourceCleanupSetting value)
CreateCanaryRequest & WithFailureRetentionPeriodInDays(int value)
AWS_SYNTHETICS_API CreateCanaryRequest()=default
const Aws::Vector< ResourceToTag > & GetResourcesToReplicateTags() const
CreateCanaryRequest & WithCode(CodeT &&value)
CreateCanaryRequest & WithRuntimeVersion(RuntimeVersionT &&value)
void SetBrowserConfigs(BrowserConfigsT &&value)
CreateCanaryRequest & WithArtifactConfig(ArtifactConfigT &&value)
AWS_SYNTHETICS_API Aws::String SerializePayload() const override
const CanaryRunConfigInput & GetRunConfig() const
void SetResourcesToReplicateTags(ResourcesToReplicateTagsT &&value)
virtual const char * GetServiceRequestName() const override
void SetArtifactConfig(ArtifactConfigT &&value)
CreateCanaryRequest & WithArtifactS3Location(ArtifactS3LocationT &&value)
void SetRuntimeVersion(RuntimeVersionT &&value)
CreateCanaryRequest & WithSuccessRetentionPeriodInDays(int value)
CreateCanaryRequest & WithRunConfig(RunConfigT &&value)
ProvisionedResourceCleanupSetting GetProvisionedResourceCleanup() const
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