AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateFunctionRequest.h
1
6#pragma once
7#include <aws/lambda/Lambda_EXPORTS.h>
8#include <aws/lambda/LambdaRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/lambda/model/Runtime.h>
11#include <aws/lambda/model/FunctionCode.h>
12#include <aws/lambda/model/VpcConfig.h>
13#include <aws/lambda/model/PackageType.h>
14#include <aws/lambda/model/DeadLetterConfig.h>
15#include <aws/lambda/model/Environment.h>
16#include <aws/lambda/model/TracingConfig.h>
17#include <aws/core/utils/memory/stl/AWSMap.h>
18#include <aws/core/utils/memory/stl/AWSVector.h>
19#include <aws/lambda/model/ImageConfig.h>
20#include <aws/lambda/model/EphemeralStorage.h>
21#include <aws/lambda/model/SnapStart.h>
22#include <aws/lambda/model/LoggingConfig.h>
23#include <aws/lambda/model/FileSystemConfig.h>
24#include <aws/lambda/model/Architecture.h>
25#include <utility>
26
27namespace Aws
28{
29namespace Lambda
30{
31namespace Model
32{
33
37 {
38 public:
39 AWS_LAMBDA_API CreateFunctionRequest() = default;
40
41 // Service request name is the Operation name which will send this request out,
42 // each operation should has unique request name, so that we can get operation's name from this request.
43 // Note: this is not true for response, multiple operations may have the same response name,
44 // so we can not get operation's name from response.
45 inline virtual const char* GetServiceRequestName() const override { return "CreateFunction"; }
46
47 AWS_LAMBDA_API Aws::String SerializePayload() const override;
48
49
51
61 inline const Aws::String& GetFunctionName() const { return m_functionName; }
62 inline bool FunctionNameHasBeenSet() const { return m_functionNameHasBeenSet; }
63 template<typename FunctionNameT = Aws::String>
64 void SetFunctionName(FunctionNameT&& value) { m_functionNameHasBeenSet = true; m_functionName = std::forward<FunctionNameT>(value); }
65 template<typename FunctionNameT = Aws::String>
66 CreateFunctionRequest& WithFunctionName(FunctionNameT&& value) { SetFunctionName(std::forward<FunctionNameT>(value)); return *this;}
68
70
84 inline Runtime GetRuntime() const { return m_runtime; }
85 inline bool RuntimeHasBeenSet() const { return m_runtimeHasBeenSet; }
86 inline void SetRuntime(Runtime value) { m_runtimeHasBeenSet = true; m_runtime = value; }
87 inline CreateFunctionRequest& WithRuntime(Runtime value) { SetRuntime(value); return *this;}
89
91
94 inline const Aws::String& GetRole() const { return m_role; }
95 inline bool RoleHasBeenSet() const { return m_roleHasBeenSet; }
96 template<typename RoleT = Aws::String>
97 void SetRole(RoleT&& value) { m_roleHasBeenSet = true; m_role = std::forward<RoleT>(value); }
98 template<typename RoleT = Aws::String>
99 CreateFunctionRequest& WithRole(RoleT&& value) { SetRole(std::forward<RoleT>(value)); return *this;}
101
103
111 inline const Aws::String& GetHandler() const { return m_handler; }
112 inline bool HandlerHasBeenSet() const { return m_handlerHasBeenSet; }
113 template<typename HandlerT = Aws::String>
114 void SetHandler(HandlerT&& value) { m_handlerHasBeenSet = true; m_handler = std::forward<HandlerT>(value); }
115 template<typename HandlerT = Aws::String>
116 CreateFunctionRequest& WithHandler(HandlerT&& value) { SetHandler(std::forward<HandlerT>(value)); return *this;}
118
120
123 inline const FunctionCode& GetCode() const { return m_code; }
124 inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
125 template<typename CodeT = FunctionCode>
126 void SetCode(CodeT&& value) { m_codeHasBeenSet = true; m_code = std::forward<CodeT>(value); }
127 template<typename CodeT = FunctionCode>
128 CreateFunctionRequest& WithCode(CodeT&& value) { SetCode(std::forward<CodeT>(value)); return *this;}
130
132
135 inline const Aws::String& GetDescription() const { return m_description; }
136 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
137 template<typename DescriptionT = Aws::String>
138 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
139 template<typename DescriptionT = Aws::String>
140 CreateFunctionRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
142
144
151 inline int GetTimeout() const { return m_timeout; }
152 inline bool TimeoutHasBeenSet() const { return m_timeoutHasBeenSet; }
153 inline void SetTimeout(int value) { m_timeoutHasBeenSet = true; m_timeout = value; }
154 inline CreateFunctionRequest& WithTimeout(int value) { SetTimeout(value); return *this;}
156
158
165 inline int GetMemorySize() const { return m_memorySize; }
166 inline bool MemorySizeHasBeenSet() const { return m_memorySizeHasBeenSet; }
167 inline void SetMemorySize(int value) { m_memorySizeHasBeenSet = true; m_memorySize = value; }
168 inline CreateFunctionRequest& WithMemorySize(int value) { SetMemorySize(value); return *this;}
170
172
175 inline bool GetPublish() const { return m_publish; }
176 inline bool PublishHasBeenSet() const { return m_publishHasBeenSet; }
177 inline void SetPublish(bool value) { m_publishHasBeenSet = true; m_publish = value; }
178 inline CreateFunctionRequest& WithPublish(bool value) { SetPublish(value); return *this;}
180
182
190 inline const VpcConfig& GetVpcConfig() const { return m_vpcConfig; }
191 inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; }
192 template<typename VpcConfigT = VpcConfig>
193 void SetVpcConfig(VpcConfigT&& value) { m_vpcConfigHasBeenSet = true; m_vpcConfig = std::forward<VpcConfigT>(value); }
194 template<typename VpcConfigT = VpcConfig>
195 CreateFunctionRequest& WithVpcConfig(VpcConfigT&& value) { SetVpcConfig(std::forward<VpcConfigT>(value)); return *this;}
197
199
203 inline PackageType GetPackageType() const { return m_packageType; }
204 inline bool PackageTypeHasBeenSet() const { return m_packageTypeHasBeenSet; }
205 inline void SetPackageType(PackageType value) { m_packageTypeHasBeenSet = true; m_packageType = value; }
206 inline CreateFunctionRequest& WithPackageType(PackageType value) { SetPackageType(value); return *this;}
208
210
217 inline const DeadLetterConfig& GetDeadLetterConfig() const { return m_deadLetterConfig; }
218 inline bool DeadLetterConfigHasBeenSet() const { return m_deadLetterConfigHasBeenSet; }
219 template<typename DeadLetterConfigT = DeadLetterConfig>
220 void SetDeadLetterConfig(DeadLetterConfigT&& value) { m_deadLetterConfigHasBeenSet = true; m_deadLetterConfig = std::forward<DeadLetterConfigT>(value); }
221 template<typename DeadLetterConfigT = DeadLetterConfig>
222 CreateFunctionRequest& WithDeadLetterConfig(DeadLetterConfigT&& value) { SetDeadLetterConfig(std::forward<DeadLetterConfigT>(value)); return *this;}
224
226
230 inline const Environment& GetEnvironment() const { return m_environment; }
231 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
232 template<typename EnvironmentT = Environment>
233 void SetEnvironment(EnvironmentT&& value) { m_environmentHasBeenSet = true; m_environment = std::forward<EnvironmentT>(value); }
234 template<typename EnvironmentT = Environment>
235 CreateFunctionRequest& WithEnvironment(EnvironmentT&& value) { SetEnvironment(std::forward<EnvironmentT>(value)); return *this;}
237
239
262 inline const Aws::String& GetKMSKeyArn() const { return m_kMSKeyArn; }
263 inline bool KMSKeyArnHasBeenSet() const { return m_kMSKeyArnHasBeenSet; }
264 template<typename KMSKeyArnT = Aws::String>
265 void SetKMSKeyArn(KMSKeyArnT&& value) { m_kMSKeyArnHasBeenSet = true; m_kMSKeyArn = std::forward<KMSKeyArnT>(value); }
266 template<typename KMSKeyArnT = Aws::String>
267 CreateFunctionRequest& WithKMSKeyArn(KMSKeyArnT&& value) { SetKMSKeyArn(std::forward<KMSKeyArnT>(value)); return *this;}
269
271
276 inline const TracingConfig& GetTracingConfig() const { return m_tracingConfig; }
277 inline bool TracingConfigHasBeenSet() const { return m_tracingConfigHasBeenSet; }
278 template<typename TracingConfigT = TracingConfig>
279 void SetTracingConfig(TracingConfigT&& value) { m_tracingConfigHasBeenSet = true; m_tracingConfig = std::forward<TracingConfigT>(value); }
280 template<typename TracingConfigT = TracingConfig>
281 CreateFunctionRequest& WithTracingConfig(TracingConfigT&& value) { SetTracingConfig(std::forward<TracingConfigT>(value)); return *this;}
283
285
290 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
291 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
292 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
293 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
294 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
295 CreateFunctionRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
296 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
297 CreateFunctionRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
298 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
299 }
301
303
309 inline const Aws::Vector<Aws::String>& GetLayers() const { return m_layers; }
310 inline bool LayersHasBeenSet() const { return m_layersHasBeenSet; }
311 template<typename LayersT = Aws::Vector<Aws::String>>
312 void SetLayers(LayersT&& value) { m_layersHasBeenSet = true; m_layers = std::forward<LayersT>(value); }
313 template<typename LayersT = Aws::Vector<Aws::String>>
314 CreateFunctionRequest& WithLayers(LayersT&& value) { SetLayers(std::forward<LayersT>(value)); return *this;}
315 template<typename LayersT = Aws::String>
316 CreateFunctionRequest& AddLayers(LayersT&& value) { m_layersHasBeenSet = true; m_layers.emplace_back(std::forward<LayersT>(value)); return *this; }
318
320
323 inline const Aws::Vector<FileSystemConfig>& GetFileSystemConfigs() const { return m_fileSystemConfigs; }
324 inline bool FileSystemConfigsHasBeenSet() const { return m_fileSystemConfigsHasBeenSet; }
325 template<typename FileSystemConfigsT = Aws::Vector<FileSystemConfig>>
326 void SetFileSystemConfigs(FileSystemConfigsT&& value) { m_fileSystemConfigsHasBeenSet = true; m_fileSystemConfigs = std::forward<FileSystemConfigsT>(value); }
327 template<typename FileSystemConfigsT = Aws::Vector<FileSystemConfig>>
328 CreateFunctionRequest& WithFileSystemConfigs(FileSystemConfigsT&& value) { SetFileSystemConfigs(std::forward<FileSystemConfigsT>(value)); return *this;}
329 template<typename FileSystemConfigsT = FileSystemConfig>
330 CreateFunctionRequest& AddFileSystemConfigs(FileSystemConfigsT&& value) { m_fileSystemConfigsHasBeenSet = true; m_fileSystemConfigs.emplace_back(std::forward<FileSystemConfigsT>(value)); return *this; }
332
334
339 inline const ImageConfig& GetImageConfig() const { return m_imageConfig; }
340 inline bool ImageConfigHasBeenSet() const { return m_imageConfigHasBeenSet; }
341 template<typename ImageConfigT = ImageConfig>
342 void SetImageConfig(ImageConfigT&& value) { m_imageConfigHasBeenSet = true; m_imageConfig = std::forward<ImageConfigT>(value); }
343 template<typename ImageConfigT = ImageConfig>
344 CreateFunctionRequest& WithImageConfig(ImageConfigT&& value) { SetImageConfig(std::forward<ImageConfigT>(value)); return *this;}
346
348
353 inline const Aws::String& GetCodeSigningConfigArn() const { return m_codeSigningConfigArn; }
354 inline bool CodeSigningConfigArnHasBeenSet() const { return m_codeSigningConfigArnHasBeenSet; }
355 template<typename CodeSigningConfigArnT = Aws::String>
356 void SetCodeSigningConfigArn(CodeSigningConfigArnT&& value) { m_codeSigningConfigArnHasBeenSet = true; m_codeSigningConfigArn = std::forward<CodeSigningConfigArnT>(value); }
357 template<typename CodeSigningConfigArnT = Aws::String>
358 CreateFunctionRequest& WithCodeSigningConfigArn(CodeSigningConfigArnT&& value) { SetCodeSigningConfigArn(std::forward<CodeSigningConfigArnT>(value)); return *this;}
360
362
367 inline const Aws::Vector<Architecture>& GetArchitectures() const { return m_architectures; }
368 inline bool ArchitecturesHasBeenSet() const { return m_architecturesHasBeenSet; }
369 template<typename ArchitecturesT = Aws::Vector<Architecture>>
370 void SetArchitectures(ArchitecturesT&& value) { m_architecturesHasBeenSet = true; m_architectures = std::forward<ArchitecturesT>(value); }
371 template<typename ArchitecturesT = Aws::Vector<Architecture>>
372 CreateFunctionRequest& WithArchitectures(ArchitecturesT&& value) { SetArchitectures(std::forward<ArchitecturesT>(value)); return *this;}
373 inline CreateFunctionRequest& AddArchitectures(Architecture value) { m_architecturesHasBeenSet = true; m_architectures.push_back(value); return *this; }
375
377
384 inline const EphemeralStorage& GetEphemeralStorage() const { return m_ephemeralStorage; }
385 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
386 template<typename EphemeralStorageT = EphemeralStorage>
387 void SetEphemeralStorage(EphemeralStorageT&& value) { m_ephemeralStorageHasBeenSet = true; m_ephemeralStorage = std::forward<EphemeralStorageT>(value); }
388 template<typename EphemeralStorageT = EphemeralStorage>
389 CreateFunctionRequest& WithEphemeralStorage(EphemeralStorageT&& value) { SetEphemeralStorage(std::forward<EphemeralStorageT>(value)); return *this;}
391
393
398 inline const SnapStart& GetSnapStart() const { return m_snapStart; }
399 inline bool SnapStartHasBeenSet() const { return m_snapStartHasBeenSet; }
400 template<typename SnapStartT = SnapStart>
401 void SetSnapStart(SnapStartT&& value) { m_snapStartHasBeenSet = true; m_snapStart = std::forward<SnapStartT>(value); }
402 template<typename SnapStartT = SnapStart>
403 CreateFunctionRequest& WithSnapStart(SnapStartT&& value) { SetSnapStart(std::forward<SnapStartT>(value)); return *this;}
405
407
410 inline const LoggingConfig& GetLoggingConfig() const { return m_loggingConfig; }
411 inline bool LoggingConfigHasBeenSet() const { return m_loggingConfigHasBeenSet; }
412 template<typename LoggingConfigT = LoggingConfig>
413 void SetLoggingConfig(LoggingConfigT&& value) { m_loggingConfigHasBeenSet = true; m_loggingConfig = std::forward<LoggingConfigT>(value); }
414 template<typename LoggingConfigT = LoggingConfig>
415 CreateFunctionRequest& WithLoggingConfig(LoggingConfigT&& value) { SetLoggingConfig(std::forward<LoggingConfigT>(value)); return *this;}
417 private:
418
419 Aws::String m_functionName;
420 bool m_functionNameHasBeenSet = false;
421
422 Runtime m_runtime{Runtime::NOT_SET};
423 bool m_runtimeHasBeenSet = false;
424
425 Aws::String m_role;
426 bool m_roleHasBeenSet = false;
427
428 Aws::String m_handler;
429 bool m_handlerHasBeenSet = false;
430
431 FunctionCode m_code;
432 bool m_codeHasBeenSet = false;
433
434 Aws::String m_description;
435 bool m_descriptionHasBeenSet = false;
436
437 int m_timeout{0};
438 bool m_timeoutHasBeenSet = false;
439
440 int m_memorySize{0};
441 bool m_memorySizeHasBeenSet = false;
442
443 bool m_publish{false};
444 bool m_publishHasBeenSet = false;
445
446 VpcConfig m_vpcConfig;
447 bool m_vpcConfigHasBeenSet = false;
448
449 PackageType m_packageType{PackageType::NOT_SET};
450 bool m_packageTypeHasBeenSet = false;
451
452 DeadLetterConfig m_deadLetterConfig;
453 bool m_deadLetterConfigHasBeenSet = false;
454
455 Environment m_environment;
456 bool m_environmentHasBeenSet = false;
457
458 Aws::String m_kMSKeyArn;
459 bool m_kMSKeyArnHasBeenSet = false;
460
461 TracingConfig m_tracingConfig;
462 bool m_tracingConfigHasBeenSet = false;
463
465 bool m_tagsHasBeenSet = false;
466
468 bool m_layersHasBeenSet = false;
469
470 Aws::Vector<FileSystemConfig> m_fileSystemConfigs;
471 bool m_fileSystemConfigsHasBeenSet = false;
472
473 ImageConfig m_imageConfig;
474 bool m_imageConfigHasBeenSet = false;
475
476 Aws::String m_codeSigningConfigArn;
477 bool m_codeSigningConfigArnHasBeenSet = false;
478
479 Aws::Vector<Architecture> m_architectures;
480 bool m_architecturesHasBeenSet = false;
481
482 EphemeralStorage m_ephemeralStorage;
483 bool m_ephemeralStorageHasBeenSet = false;
484
485 SnapStart m_snapStart;
486 bool m_snapStartHasBeenSet = false;
487
488 LoggingConfig m_loggingConfig;
489 bool m_loggingConfigHasBeenSet = false;
490 };
491
492} // namespace Model
493} // namespace Lambda
494} // namespace Aws
CreateFunctionRequest & WithArchitectures(ArchitecturesT &&value)
CreateFunctionRequest & AddLayers(LayersT &&value)
const Aws::Vector< Architecture > & GetArchitectures() const
CreateFunctionRequest & WithImageConfig(ImageConfigT &&value)
CreateFunctionRequest & WithLoggingConfig(LoggingConfigT &&value)
CreateFunctionRequest & WithRole(RoleT &&value)
CreateFunctionRequest & WithTimeout(int value)
CreateFunctionRequest & WithPublish(bool value)
void SetCodeSigningConfigArn(CodeSigningConfigArnT &&value)
CreateFunctionRequest & WithKMSKeyArn(KMSKeyArnT &&value)
CreateFunctionRequest & WithTags(TagsT &&value)
const Aws::Vector< FileSystemConfig > & GetFileSystemConfigs() const
CreateFunctionRequest & WithMemorySize(int value)
CreateFunctionRequest & WithDeadLetterConfig(DeadLetterConfigT &&value)
const EphemeralStorage & GetEphemeralStorage() const
CreateFunctionRequest & WithFunctionName(FunctionNameT &&value)
AWS_LAMBDA_API Aws::String SerializePayload() const override
CreateFunctionRequest & WithDescription(DescriptionT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateFunctionRequest & AddArchitectures(Architecture value)
const Aws::Vector< Aws::String > & GetLayers() const
const Aws::String & GetCodeSigningConfigArn() const
AWS_LAMBDA_API CreateFunctionRequest()=default
CreateFunctionRequest & WithHandler(HandlerT &&value)
CreateFunctionRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateFunctionRequest & AddFileSystemConfigs(FileSystemConfigsT &&value)
void SetDeadLetterConfig(DeadLetterConfigT &&value)
void SetFileSystemConfigs(FileSystemConfigsT &&value)
CreateFunctionRequest & WithCode(CodeT &&value)
CreateFunctionRequest & WithSnapStart(SnapStartT &&value)
CreateFunctionRequest & WithVpcConfig(VpcConfigT &&value)
CreateFunctionRequest & WithPackageType(PackageType value)
CreateFunctionRequest & WithFileSystemConfigs(FileSystemConfigsT &&value)
CreateFunctionRequest & WithEphemeralStorage(EphemeralStorageT &&value)
virtual const char * GetServiceRequestName() const override
void SetEphemeralStorage(EphemeralStorageT &&value)
CreateFunctionRequest & WithTracingConfig(TracingConfigT &&value)
const DeadLetterConfig & GetDeadLetterConfig() const
CreateFunctionRequest & WithLayers(LayersT &&value)
CreateFunctionRequest & WithEnvironment(EnvironmentT &&value)
CreateFunctionRequest & WithCodeSigningConfigArn(CodeSigningConfigArnT &&value)
CreateFunctionRequest & WithRuntime(Runtime value)
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