AWS SDK for C++

AWS SDK for C++ Version 1.11.636

Loading...
Searching...
No Matches
CreateCanaryRequest.h
1
6#pragma once
7#include <aws/synthetics/Synthetics_EXPORTS.h>
8#include <aws/synthetics/SyntheticsRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/synthetics/model/CanaryCodeInput.h>
11#include <aws/synthetics/model/CanaryScheduleInput.h>
12#include <aws/synthetics/model/CanaryRunConfigInput.h>
13#include <aws/synthetics/model/VpcConfigInput.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15#include <aws/synthetics/model/ProvisionedResourceCleanupSetting.h>
16#include <aws/core/utils/memory/stl/AWSMap.h>
17#include <aws/synthetics/model/ArtifactConfigInput.h>
18#include <aws/synthetics/model/ResourceToTag.h>
19#include <aws/synthetics/model/BrowserConfig.h>
20#include <utility>
21
22namespace Aws
23{
24namespace Synthetics
25{
26namespace Model
27{
28
32 {
33 public:
34 AWS_SYNTHETICS_API CreateCanaryRequest() = default;
35
36 // Service request name is the Operation name which will send this request out,
37 // each operation should has unique request name, so that we can get operation's name from this request.
38 // Note: this is not true for response, multiple operations may have the same response name,
39 // so we can not get operation's name from response.
40 inline virtual const char* GetServiceRequestName() const override { return "CreateCanary"; }
41
42 AWS_SYNTHETICS_API Aws::String SerializePayload() const override;
43
44
46
55 inline const Aws::String& GetName() const { return m_name; }
56 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
57 template<typename NameT = Aws::String>
58 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
59 template<typename NameT = Aws::String>
60 CreateCanaryRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
62
64
69 inline const CanaryCodeInput& GetCode() const { return m_code; }
70 inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
71 template<typename CodeT = CanaryCodeInput>
72 void SetCode(CodeT&& value) { m_codeHasBeenSet = true; m_code = std::forward<CodeT>(value); }
73 template<typename CodeT = CanaryCodeInput>
74 CreateCanaryRequest& WithCode(CodeT&& value) { SetCode(std::forward<CodeT>(value)); return *this;}
76
78
83 inline const Aws::String& GetArtifactS3Location() const { return m_artifactS3Location; }
84 inline bool ArtifactS3LocationHasBeenSet() const { return m_artifactS3LocationHasBeenSet; }
85 template<typename ArtifactS3LocationT = Aws::String>
86 void SetArtifactS3Location(ArtifactS3LocationT&& value) { m_artifactS3LocationHasBeenSet = true; m_artifactS3Location = std::forward<ArtifactS3LocationT>(value); }
87 template<typename ArtifactS3LocationT = Aws::String>
88 CreateCanaryRequest& WithArtifactS3Location(ArtifactS3LocationT&& value) { SetArtifactS3Location(std::forward<ArtifactS3LocationT>(value)); return *this;}
90
92
104 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
105 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
106 template<typename ExecutionRoleArnT = Aws::String>
107 void SetExecutionRoleArn(ExecutionRoleArnT&& value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn = std::forward<ExecutionRoleArnT>(value); }
108 template<typename ExecutionRoleArnT = Aws::String>
109 CreateCanaryRequest& WithExecutionRoleArn(ExecutionRoleArnT&& value) { SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value)); return *this;}
111
113
117 inline const CanaryScheduleInput& GetSchedule() const { return m_schedule; }
118 inline bool ScheduleHasBeenSet() const { return m_scheduleHasBeenSet; }
119 template<typename ScheduleT = CanaryScheduleInput>
120 void SetSchedule(ScheduleT&& value) { m_scheduleHasBeenSet = true; m_schedule = std::forward<ScheduleT>(value); }
121 template<typename ScheduleT = CanaryScheduleInput>
122 CreateCanaryRequest& WithSchedule(ScheduleT&& value) { SetSchedule(std::forward<ScheduleT>(value)); return *this;}
124
126
133 inline const CanaryRunConfigInput& GetRunConfig() const { return m_runConfig; }
134 inline bool RunConfigHasBeenSet() const { return m_runConfigHasBeenSet; }
135 template<typename RunConfigT = CanaryRunConfigInput>
136 void SetRunConfig(RunConfigT&& value) { m_runConfigHasBeenSet = true; m_runConfig = std::forward<RunConfigT>(value); }
137 template<typename RunConfigT = CanaryRunConfigInput>
138 CreateCanaryRequest& WithRunConfig(RunConfigT&& value) { SetRunConfig(std::forward<RunConfigT>(value)); return *this;}
140
142
149 inline int GetSuccessRetentionPeriodInDays() const { return m_successRetentionPeriodInDays; }
150 inline bool SuccessRetentionPeriodInDaysHasBeenSet() const { return m_successRetentionPeriodInDaysHasBeenSet; }
151 inline void SetSuccessRetentionPeriodInDays(int value) { m_successRetentionPeriodInDaysHasBeenSet = true; m_successRetentionPeriodInDays = value; }
154
156
163 inline int GetFailureRetentionPeriodInDays() const { return m_failureRetentionPeriodInDays; }
164 inline bool FailureRetentionPeriodInDaysHasBeenSet() const { return m_failureRetentionPeriodInDaysHasBeenSet; }
165 inline void SetFailureRetentionPeriodInDays(int value) { m_failureRetentionPeriodInDaysHasBeenSet = true; m_failureRetentionPeriodInDays = value; }
168
170
176 inline const Aws::String& GetRuntimeVersion() const { return m_runtimeVersion; }
177 inline bool RuntimeVersionHasBeenSet() const { return m_runtimeVersionHasBeenSet; }
178 template<typename RuntimeVersionT = Aws::String>
179 void SetRuntimeVersion(RuntimeVersionT&& value) { m_runtimeVersionHasBeenSet = true; m_runtimeVersion = std::forward<RuntimeVersionT>(value); }
180 template<typename RuntimeVersionT = Aws::String>
181 CreateCanaryRequest& WithRuntimeVersion(RuntimeVersionT&& value) { SetRuntimeVersion(std::forward<RuntimeVersionT>(value)); return *this;}
183
185
192 inline const VpcConfigInput& GetVpcConfig() const { return m_vpcConfig; }
193 inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; }
194 template<typename VpcConfigT = VpcConfigInput>
195 void SetVpcConfig(VpcConfigT&& value) { m_vpcConfigHasBeenSet = true; m_vpcConfig = std::forward<VpcConfigT>(value); }
196 template<typename VpcConfigT = VpcConfigInput>
197 CreateCanaryRequest& WithVpcConfig(VpcConfigT&& value) { SetVpcConfig(std::forward<VpcConfigT>(value)); return *this;}
199
201
208 inline const Aws::Vector<ResourceToTag>& GetResourcesToReplicateTags() const { return m_resourcesToReplicateTags; }
209 inline bool ResourcesToReplicateTagsHasBeenSet() const { return m_resourcesToReplicateTagsHasBeenSet; }
210 template<typename ResourcesToReplicateTagsT = Aws::Vector<ResourceToTag>>
211 void SetResourcesToReplicateTags(ResourcesToReplicateTagsT&& value) { m_resourcesToReplicateTagsHasBeenSet = true; m_resourcesToReplicateTags = std::forward<ResourcesToReplicateTagsT>(value); }
212 template<typename ResourcesToReplicateTagsT = Aws::Vector<ResourceToTag>>
213 CreateCanaryRequest& WithResourcesToReplicateTags(ResourcesToReplicateTagsT&& value) { SetResourcesToReplicateTags(std::forward<ResourcesToReplicateTagsT>(value)); return *this;}
214 inline CreateCanaryRequest& AddResourcesToReplicateTags(ResourceToTag value) { m_resourcesToReplicateTagsHasBeenSet = true; m_resourcesToReplicateTags.push_back(value); return *this; }
216
218
229 inline ProvisionedResourceCleanupSetting GetProvisionedResourceCleanup() const { return m_provisionedResourceCleanup; }
230 inline bool ProvisionedResourceCleanupHasBeenSet() const { return m_provisionedResourceCleanupHasBeenSet; }
231 inline void SetProvisionedResourceCleanup(ProvisionedResourceCleanupSetting value) { m_provisionedResourceCleanupHasBeenSet = true; m_provisionedResourceCleanup = value; }
234
236
245 inline const Aws::Vector<BrowserConfig>& GetBrowserConfigs() const { return m_browserConfigs; }
246 inline bool BrowserConfigsHasBeenSet() const { return m_browserConfigsHasBeenSet; }
247 template<typename BrowserConfigsT = Aws::Vector<BrowserConfig>>
248 void SetBrowserConfigs(BrowserConfigsT&& value) { m_browserConfigsHasBeenSet = true; m_browserConfigs = std::forward<BrowserConfigsT>(value); }
249 template<typename BrowserConfigsT = Aws::Vector<BrowserConfig>>
250 CreateCanaryRequest& WithBrowserConfigs(BrowserConfigsT&& value) { SetBrowserConfigs(std::forward<BrowserConfigsT>(value)); return *this;}
251 template<typename BrowserConfigsT = BrowserConfig>
252 CreateCanaryRequest& AddBrowserConfigs(BrowserConfigsT&& value) { m_browserConfigsHasBeenSet = true; m_browserConfigs.emplace_back(std::forward<BrowserConfigsT>(value)); return *this; }
254
256
265 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
266 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
267 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
268 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
269 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
270 CreateCanaryRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
271 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
272 CreateCanaryRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
273 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
274 }
276
278
283 inline const ArtifactConfigInput& GetArtifactConfig() const { return m_artifactConfig; }
284 inline bool ArtifactConfigHasBeenSet() const { return m_artifactConfigHasBeenSet; }
285 template<typename ArtifactConfigT = ArtifactConfigInput>
286 void SetArtifactConfig(ArtifactConfigT&& value) { m_artifactConfigHasBeenSet = true; m_artifactConfig = std::forward<ArtifactConfigT>(value); }
287 template<typename ArtifactConfigT = ArtifactConfigInput>
288 CreateCanaryRequest& WithArtifactConfig(ArtifactConfigT&& value) { SetArtifactConfig(std::forward<ArtifactConfigT>(value)); return *this;}
290 private:
291
292 Aws::String m_name;
293 bool m_nameHasBeenSet = false;
294
295 CanaryCodeInput m_code;
296 bool m_codeHasBeenSet = false;
297
298 Aws::String m_artifactS3Location;
299 bool m_artifactS3LocationHasBeenSet = false;
300
301 Aws::String m_executionRoleArn;
302 bool m_executionRoleArnHasBeenSet = false;
303
304 CanaryScheduleInput m_schedule;
305 bool m_scheduleHasBeenSet = false;
306
307 CanaryRunConfigInput m_runConfig;
308 bool m_runConfigHasBeenSet = false;
309
310 int m_successRetentionPeriodInDays{0};
311 bool m_successRetentionPeriodInDaysHasBeenSet = false;
312
313 int m_failureRetentionPeriodInDays{0};
314 bool m_failureRetentionPeriodInDaysHasBeenSet = false;
315
316 Aws::String m_runtimeVersion;
317 bool m_runtimeVersionHasBeenSet = false;
318
319 VpcConfigInput m_vpcConfig;
320 bool m_vpcConfigHasBeenSet = false;
321
322 Aws::Vector<ResourceToTag> m_resourcesToReplicateTags;
323 bool m_resourcesToReplicateTagsHasBeenSet = false;
324
326 bool m_provisionedResourceCleanupHasBeenSet = false;
327
328 Aws::Vector<BrowserConfig> m_browserConfigs;
329 bool m_browserConfigsHasBeenSet = false;
330
332 bool m_tagsHasBeenSet = false;
333
334 ArtifactConfigInput m_artifactConfig;
335 bool m_artifactConfigHasBeenSet = false;
336 };
337
338} // namespace Model
339} // namespace Synthetics
340} // namespace Aws
const ArtifactConfigInput & GetArtifactConfig() const
const CanaryScheduleInput & GetSchedule() const
void SetArtifactS3Location(ArtifactS3LocationT &&value)
CreateCanaryRequest & WithName(NameT &&value)
CreateCanaryRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
const Aws::Vector< BrowserConfig > & GetBrowserConfigs() const
CreateCanaryRequest & AddBrowserConfigs(BrowserConfigsT &&value)
CreateCanaryRequest & WithBrowserConfigs(BrowserConfigsT &&value)
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