AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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 <utility>
20
21namespace Aws
22{
23namespace Synthetics
24{
25namespace Model
26{
27
31 {
32 public:
33 AWS_SYNTHETICS_API CreateCanaryRequest() = default;
34
35 // Service request name is the Operation name which will send this request out,
36 // each operation should has unique request name, so that we can get operation's name from this request.
37 // Note: this is not true for response, multiple operations may have the same response name,
38 // so we can not get operation's name from response.
39 inline virtual const char* GetServiceRequestName() const override { return "CreateCanary"; }
40
41 AWS_SYNTHETICS_API Aws::String SerializePayload() const override;
42
43
45
54 inline const Aws::String& GetName() const { return m_name; }
55 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
56 template<typename NameT = Aws::String>
57 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
58 template<typename NameT = Aws::String>
59 CreateCanaryRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
61
63
68 inline const CanaryCodeInput& GetCode() const { return m_code; }
69 inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
70 template<typename CodeT = CanaryCodeInput>
71 void SetCode(CodeT&& value) { m_codeHasBeenSet = true; m_code = std::forward<CodeT>(value); }
72 template<typename CodeT = CanaryCodeInput>
73 CreateCanaryRequest& WithCode(CodeT&& value) { SetCode(std::forward<CodeT>(value)); return *this;}
75
77
82 inline const Aws::String& GetArtifactS3Location() const { return m_artifactS3Location; }
83 inline bool ArtifactS3LocationHasBeenSet() const { return m_artifactS3LocationHasBeenSet; }
84 template<typename ArtifactS3LocationT = Aws::String>
85 void SetArtifactS3Location(ArtifactS3LocationT&& value) { m_artifactS3LocationHasBeenSet = true; m_artifactS3Location = std::forward<ArtifactS3LocationT>(value); }
86 template<typename ArtifactS3LocationT = Aws::String>
87 CreateCanaryRequest& WithArtifactS3Location(ArtifactS3LocationT&& value) { SetArtifactS3Location(std::forward<ArtifactS3LocationT>(value)); return *this;}
89
91
103 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
104 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
105 template<typename ExecutionRoleArnT = Aws::String>
106 void SetExecutionRoleArn(ExecutionRoleArnT&& value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn = std::forward<ExecutionRoleArnT>(value); }
107 template<typename ExecutionRoleArnT = Aws::String>
108 CreateCanaryRequest& WithExecutionRoleArn(ExecutionRoleArnT&& value) { SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value)); return *this;}
110
112
116 inline const CanaryScheduleInput& GetSchedule() const { return m_schedule; }
117 inline bool ScheduleHasBeenSet() const { return m_scheduleHasBeenSet; }
118 template<typename ScheduleT = CanaryScheduleInput>
119 void SetSchedule(ScheduleT&& value) { m_scheduleHasBeenSet = true; m_schedule = std::forward<ScheduleT>(value); }
120 template<typename ScheduleT = CanaryScheduleInput>
121 CreateCanaryRequest& WithSchedule(ScheduleT&& value) { SetSchedule(std::forward<ScheduleT>(value)); return *this;}
123
125
132 inline const CanaryRunConfigInput& GetRunConfig() const { return m_runConfig; }
133 inline bool RunConfigHasBeenSet() const { return m_runConfigHasBeenSet; }
134 template<typename RunConfigT = CanaryRunConfigInput>
135 void SetRunConfig(RunConfigT&& value) { m_runConfigHasBeenSet = true; m_runConfig = std::forward<RunConfigT>(value); }
136 template<typename RunConfigT = CanaryRunConfigInput>
137 CreateCanaryRequest& WithRunConfig(RunConfigT&& value) { SetRunConfig(std::forward<RunConfigT>(value)); return *this;}
139
141
148 inline int GetSuccessRetentionPeriodInDays() const { return m_successRetentionPeriodInDays; }
149 inline bool SuccessRetentionPeriodInDaysHasBeenSet() const { return m_successRetentionPeriodInDaysHasBeenSet; }
150 inline void SetSuccessRetentionPeriodInDays(int value) { m_successRetentionPeriodInDaysHasBeenSet = true; m_successRetentionPeriodInDays = value; }
153
155
162 inline int GetFailureRetentionPeriodInDays() const { return m_failureRetentionPeriodInDays; }
163 inline bool FailureRetentionPeriodInDaysHasBeenSet() const { return m_failureRetentionPeriodInDaysHasBeenSet; }
164 inline void SetFailureRetentionPeriodInDays(int value) { m_failureRetentionPeriodInDaysHasBeenSet = true; m_failureRetentionPeriodInDays = value; }
167
169
175 inline const Aws::String& GetRuntimeVersion() const { return m_runtimeVersion; }
176 inline bool RuntimeVersionHasBeenSet() const { return m_runtimeVersionHasBeenSet; }
177 template<typename RuntimeVersionT = Aws::String>
178 void SetRuntimeVersion(RuntimeVersionT&& value) { m_runtimeVersionHasBeenSet = true; m_runtimeVersion = std::forward<RuntimeVersionT>(value); }
179 template<typename RuntimeVersionT = Aws::String>
180 CreateCanaryRequest& WithRuntimeVersion(RuntimeVersionT&& value) { SetRuntimeVersion(std::forward<RuntimeVersionT>(value)); return *this;}
182
184
191 inline const VpcConfigInput& GetVpcConfig() const { return m_vpcConfig; }
192 inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; }
193 template<typename VpcConfigT = VpcConfigInput>
194 void SetVpcConfig(VpcConfigT&& value) { m_vpcConfigHasBeenSet = true; m_vpcConfig = std::forward<VpcConfigT>(value); }
195 template<typename VpcConfigT = VpcConfigInput>
196 CreateCanaryRequest& WithVpcConfig(VpcConfigT&& value) { SetVpcConfig(std::forward<VpcConfigT>(value)); return *this;}
198
200
207 inline const Aws::Vector<ResourceToTag>& GetResourcesToReplicateTags() const { return m_resourcesToReplicateTags; }
208 inline bool ResourcesToReplicateTagsHasBeenSet() const { return m_resourcesToReplicateTagsHasBeenSet; }
209 template<typename ResourcesToReplicateTagsT = Aws::Vector<ResourceToTag>>
210 void SetResourcesToReplicateTags(ResourcesToReplicateTagsT&& value) { m_resourcesToReplicateTagsHasBeenSet = true; m_resourcesToReplicateTags = std::forward<ResourcesToReplicateTagsT>(value); }
211 template<typename ResourcesToReplicateTagsT = Aws::Vector<ResourceToTag>>
212 CreateCanaryRequest& WithResourcesToReplicateTags(ResourcesToReplicateTagsT&& value) { SetResourcesToReplicateTags(std::forward<ResourcesToReplicateTagsT>(value)); return *this;}
213 inline CreateCanaryRequest& AddResourcesToReplicateTags(ResourceToTag value) { m_resourcesToReplicateTagsHasBeenSet = true; m_resourcesToReplicateTags.push_back(value); return *this; }
215
217
228 inline ProvisionedResourceCleanupSetting GetProvisionedResourceCleanup() const { return m_provisionedResourceCleanup; }
229 inline bool ProvisionedResourceCleanupHasBeenSet() const { return m_provisionedResourceCleanupHasBeenSet; }
230 inline void SetProvisionedResourceCleanup(ProvisionedResourceCleanupSetting value) { m_provisionedResourceCleanupHasBeenSet = true; m_provisionedResourceCleanup = value; }
233
235
244 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
245 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
246 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
247 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
248 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
249 CreateCanaryRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
250 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
251 CreateCanaryRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
252 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
253 }
255
257
262 inline const ArtifactConfigInput& GetArtifactConfig() const { return m_artifactConfig; }
263 inline bool ArtifactConfigHasBeenSet() const { return m_artifactConfigHasBeenSet; }
264 template<typename ArtifactConfigT = ArtifactConfigInput>
265 void SetArtifactConfig(ArtifactConfigT&& value) { m_artifactConfigHasBeenSet = true; m_artifactConfig = std::forward<ArtifactConfigT>(value); }
266 template<typename ArtifactConfigT = ArtifactConfigInput>
267 CreateCanaryRequest& WithArtifactConfig(ArtifactConfigT&& value) { SetArtifactConfig(std::forward<ArtifactConfigT>(value)); return *this;}
269 private:
270
271 Aws::String m_name;
272 bool m_nameHasBeenSet = false;
273
274 CanaryCodeInput m_code;
275 bool m_codeHasBeenSet = false;
276
277 Aws::String m_artifactS3Location;
278 bool m_artifactS3LocationHasBeenSet = false;
279
280 Aws::String m_executionRoleArn;
281 bool m_executionRoleArnHasBeenSet = false;
282
283 CanaryScheduleInput m_schedule;
284 bool m_scheduleHasBeenSet = false;
285
286 CanaryRunConfigInput m_runConfig;
287 bool m_runConfigHasBeenSet = false;
288
289 int m_successRetentionPeriodInDays{0};
290 bool m_successRetentionPeriodInDaysHasBeenSet = false;
291
292 int m_failureRetentionPeriodInDays{0};
293 bool m_failureRetentionPeriodInDaysHasBeenSet = false;
294
295 Aws::String m_runtimeVersion;
296 bool m_runtimeVersionHasBeenSet = false;
297
298 VpcConfigInput m_vpcConfig;
299 bool m_vpcConfigHasBeenSet = false;
300
301 Aws::Vector<ResourceToTag> m_resourcesToReplicateTags;
302 bool m_resourcesToReplicateTagsHasBeenSet = false;
303
305 bool m_provisionedResourceCleanupHasBeenSet = false;
306
308 bool m_tagsHasBeenSet = false;
309
310 ArtifactConfigInput m_artifactConfig;
311 bool m_artifactConfigHasBeenSet = false;
312 };
313
314} // namespace Model
315} // namespace Synthetics
316} // namespace Aws
const ArtifactConfigInput & GetArtifactConfig() const
const CanaryScheduleInput & GetSchedule() const
void SetArtifactS3Location(ArtifactS3LocationT &&value)
CreateCanaryRequest & WithName(NameT &&value)
CreateCanaryRequest & AddTags(TagsKeyT &&key, TagsValueT &&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)
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