AWS SDK for C++

AWS SDK for C++ Version 1.11.695

Loading...
Searching...
No Matches
CreateFunctionRequest.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/lambda/LambdaRequest.h>
11#include <aws/lambda/Lambda_EXPORTS.h>
12#include <aws/lambda/model/Architecture.h>
13#include <aws/lambda/model/DeadLetterConfig.h>
14#include <aws/lambda/model/Environment.h>
15#include <aws/lambda/model/EphemeralStorage.h>
16#include <aws/lambda/model/FileSystemConfig.h>
17#include <aws/lambda/model/FunctionCode.h>
18#include <aws/lambda/model/ImageConfig.h>
19#include <aws/lambda/model/LoggingConfig.h>
20#include <aws/lambda/model/PackageType.h>
21#include <aws/lambda/model/Runtime.h>
22#include <aws/lambda/model/SnapStart.h>
23#include <aws/lambda/model/TenancyConfig.h>
24#include <aws/lambda/model/TracingConfig.h>
25#include <aws/lambda/model/VpcConfig.h>
26
27#include <utility>
28
29namespace Aws {
30namespace Lambda {
31namespace Model {
32
36 public:
37 AWS_LAMBDA_API CreateFunctionRequest() = default;
38
39 // Service request name is the Operation name which will send this request out,
40 // each operation should has unique request name, so that we can get operation's name from this request.
41 // Note: this is not true for response, multiple operations may have the same response name,
42 // so we can not get operation's name from response.
43 inline virtual const char* GetServiceRequestName() const override { return "CreateFunction"; }
44
45 AWS_LAMBDA_API Aws::String SerializePayload() const override;
46
48
58 inline const Aws::String& GetFunctionName() const { return m_functionName; }
59 inline bool FunctionNameHasBeenSet() const { return m_functionNameHasBeenSet; }
60 template <typename FunctionNameT = Aws::String>
61 void SetFunctionName(FunctionNameT&& value) {
62 m_functionNameHasBeenSet = true;
63 m_functionName = std::forward<FunctionNameT>(value);
64 }
65 template <typename FunctionNameT = Aws::String>
66 CreateFunctionRequest& WithFunctionName(FunctionNameT&& value) {
67 SetFunctionName(std::forward<FunctionNameT>(value));
68 return *this;
69 }
71
73
87 inline Runtime GetRuntime() const { return m_runtime; }
88 inline bool RuntimeHasBeenSet() const { return m_runtimeHasBeenSet; }
89 inline void SetRuntime(Runtime value) {
90 m_runtimeHasBeenSet = true;
91 m_runtime = value;
92 }
94 SetRuntime(value);
95 return *this;
96 }
98
100
103 inline const Aws::String& GetRole() const { return m_role; }
104 inline bool RoleHasBeenSet() const { return m_roleHasBeenSet; }
105 template <typename RoleT = Aws::String>
106 void SetRole(RoleT&& value) {
107 m_roleHasBeenSet = true;
108 m_role = std::forward<RoleT>(value);
109 }
110 template <typename RoleT = Aws::String>
112 SetRole(std::forward<RoleT>(value));
113 return *this;
114 }
116
118
126 inline const Aws::String& GetHandler() const { return m_handler; }
127 inline bool HandlerHasBeenSet() const { return m_handlerHasBeenSet; }
128 template <typename HandlerT = Aws::String>
129 void SetHandler(HandlerT&& value) {
130 m_handlerHasBeenSet = true;
131 m_handler = std::forward<HandlerT>(value);
132 }
133 template <typename HandlerT = Aws::String>
135 SetHandler(std::forward<HandlerT>(value));
136 return *this;
137 }
139
141
144 inline const FunctionCode& GetCode() const { return m_code; }
145 inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
146 template <typename CodeT = FunctionCode>
147 void SetCode(CodeT&& value) {
148 m_codeHasBeenSet = true;
149 m_code = std::forward<CodeT>(value);
150 }
151 template <typename CodeT = FunctionCode>
153 SetCode(std::forward<CodeT>(value));
154 return *this;
155 }
157
159
162 inline const Aws::String& GetDescription() const { return m_description; }
163 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
164 template <typename DescriptionT = Aws::String>
165 void SetDescription(DescriptionT&& value) {
166 m_descriptionHasBeenSet = true;
167 m_description = std::forward<DescriptionT>(value);
168 }
169 template <typename DescriptionT = Aws::String>
170 CreateFunctionRequest& WithDescription(DescriptionT&& value) {
171 SetDescription(std::forward<DescriptionT>(value));
172 return *this;
173 }
175
177
184 inline int GetTimeout() const { return m_timeout; }
185 inline bool TimeoutHasBeenSet() const { return m_timeoutHasBeenSet; }
186 inline void SetTimeout(int value) {
187 m_timeoutHasBeenSet = true;
188 m_timeout = value;
189 }
191 SetTimeout(value);
192 return *this;
193 }
195
197
204 inline int GetMemorySize() const { return m_memorySize; }
205 inline bool MemorySizeHasBeenSet() const { return m_memorySizeHasBeenSet; }
206 inline void SetMemorySize(int value) {
207 m_memorySizeHasBeenSet = true;
208 m_memorySize = value;
209 }
211 SetMemorySize(value);
212 return *this;
213 }
215
217
220 inline bool GetPublish() const { return m_publish; }
221 inline bool PublishHasBeenSet() const { return m_publishHasBeenSet; }
222 inline void SetPublish(bool value) {
223 m_publishHasBeenSet = true;
224 m_publish = value;
225 }
226 inline CreateFunctionRequest& WithPublish(bool value) {
227 SetPublish(value);
228 return *this;
229 }
231
233
241 inline const VpcConfig& GetVpcConfig() const { return m_vpcConfig; }
242 inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; }
243 template <typename VpcConfigT = VpcConfig>
244 void SetVpcConfig(VpcConfigT&& value) {
245 m_vpcConfigHasBeenSet = true;
246 m_vpcConfig = std::forward<VpcConfigT>(value);
247 }
248 template <typename VpcConfigT = VpcConfig>
250 SetVpcConfig(std::forward<VpcConfigT>(value));
251 return *this;
252 }
254
256
260 inline PackageType GetPackageType() const { return m_packageType; }
261 inline bool PackageTypeHasBeenSet() const { return m_packageTypeHasBeenSet; }
262 inline void SetPackageType(PackageType value) {
263 m_packageTypeHasBeenSet = true;
264 m_packageType = value;
265 }
267 SetPackageType(value);
268 return *this;
269 }
271
273
280 inline const DeadLetterConfig& GetDeadLetterConfig() const { return m_deadLetterConfig; }
281 inline bool DeadLetterConfigHasBeenSet() const { return m_deadLetterConfigHasBeenSet; }
282 template <typename DeadLetterConfigT = DeadLetterConfig>
283 void SetDeadLetterConfig(DeadLetterConfigT&& value) {
284 m_deadLetterConfigHasBeenSet = true;
285 m_deadLetterConfig = std::forward<DeadLetterConfigT>(value);
286 }
287 template <typename DeadLetterConfigT = DeadLetterConfig>
288 CreateFunctionRequest& WithDeadLetterConfig(DeadLetterConfigT&& value) {
289 SetDeadLetterConfig(std::forward<DeadLetterConfigT>(value));
290 return *this;
291 }
293
295
299 inline const Environment& GetEnvironment() const { return m_environment; }
300 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
301 template <typename EnvironmentT = Environment>
302 void SetEnvironment(EnvironmentT&& value) {
303 m_environmentHasBeenSet = true;
304 m_environment = std::forward<EnvironmentT>(value);
305 }
306 template <typename EnvironmentT = Environment>
307 CreateFunctionRequest& WithEnvironment(EnvironmentT&& value) {
308 SetEnvironment(std::forward<EnvironmentT>(value));
309 return *this;
310 }
312
314
337 inline const Aws::String& GetKMSKeyArn() const { return m_kMSKeyArn; }
338 inline bool KMSKeyArnHasBeenSet() const { return m_kMSKeyArnHasBeenSet; }
339 template <typename KMSKeyArnT = Aws::String>
340 void SetKMSKeyArn(KMSKeyArnT&& value) {
341 m_kMSKeyArnHasBeenSet = true;
342 m_kMSKeyArn = std::forward<KMSKeyArnT>(value);
343 }
344 template <typename KMSKeyArnT = Aws::String>
346 SetKMSKeyArn(std::forward<KMSKeyArnT>(value));
347 return *this;
348 }
350
352
357 inline const TracingConfig& GetTracingConfig() const { return m_tracingConfig; }
358 inline bool TracingConfigHasBeenSet() const { return m_tracingConfigHasBeenSet; }
359 template <typename TracingConfigT = TracingConfig>
360 void SetTracingConfig(TracingConfigT&& value) {
361 m_tracingConfigHasBeenSet = true;
362 m_tracingConfig = std::forward<TracingConfigT>(value);
363 }
364 template <typename TracingConfigT = TracingConfig>
365 CreateFunctionRequest& WithTracingConfig(TracingConfigT&& value) {
366 SetTracingConfig(std::forward<TracingConfigT>(value));
367 return *this;
368 }
370
372
377 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
378 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
379 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
380 void SetTags(TagsT&& value) {
381 m_tagsHasBeenSet = true;
382 m_tags = std::forward<TagsT>(value);
383 }
384 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
386 SetTags(std::forward<TagsT>(value));
387 return *this;
388 }
389 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
390 CreateFunctionRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
391 m_tagsHasBeenSet = true;
392 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
393 return *this;
394 }
396
398
404 inline const Aws::Vector<Aws::String>& GetLayers() const { return m_layers; }
405 inline bool LayersHasBeenSet() const { return m_layersHasBeenSet; }
406 template <typename LayersT = Aws::Vector<Aws::String>>
407 void SetLayers(LayersT&& value) {
408 m_layersHasBeenSet = true;
409 m_layers = std::forward<LayersT>(value);
410 }
411 template <typename LayersT = Aws::Vector<Aws::String>>
413 SetLayers(std::forward<LayersT>(value));
414 return *this;
415 }
416 template <typename LayersT = Aws::String>
418 m_layersHasBeenSet = true;
419 m_layers.emplace_back(std::forward<LayersT>(value));
420 return *this;
421 }
423
425
428 inline const Aws::Vector<FileSystemConfig>& GetFileSystemConfigs() const { return m_fileSystemConfigs; }
429 inline bool FileSystemConfigsHasBeenSet() const { return m_fileSystemConfigsHasBeenSet; }
430 template <typename FileSystemConfigsT = Aws::Vector<FileSystemConfig>>
431 void SetFileSystemConfigs(FileSystemConfigsT&& value) {
432 m_fileSystemConfigsHasBeenSet = true;
433 m_fileSystemConfigs = std::forward<FileSystemConfigsT>(value);
434 }
435 template <typename FileSystemConfigsT = Aws::Vector<FileSystemConfig>>
436 CreateFunctionRequest& WithFileSystemConfigs(FileSystemConfigsT&& value) {
437 SetFileSystemConfigs(std::forward<FileSystemConfigsT>(value));
438 return *this;
439 }
440 template <typename FileSystemConfigsT = FileSystemConfig>
441 CreateFunctionRequest& AddFileSystemConfigs(FileSystemConfigsT&& value) {
442 m_fileSystemConfigsHasBeenSet = true;
443 m_fileSystemConfigs.emplace_back(std::forward<FileSystemConfigsT>(value));
444 return *this;
445 }
447
449
454 inline const ImageConfig& GetImageConfig() const { return m_imageConfig; }
455 inline bool ImageConfigHasBeenSet() const { return m_imageConfigHasBeenSet; }
456 template <typename ImageConfigT = ImageConfig>
457 void SetImageConfig(ImageConfigT&& value) {
458 m_imageConfigHasBeenSet = true;
459 m_imageConfig = std::forward<ImageConfigT>(value);
460 }
461 template <typename ImageConfigT = ImageConfig>
462 CreateFunctionRequest& WithImageConfig(ImageConfigT&& value) {
463 SetImageConfig(std::forward<ImageConfigT>(value));
464 return *this;
465 }
467
469
474 inline const Aws::String& GetCodeSigningConfigArn() const { return m_codeSigningConfigArn; }
475 inline bool CodeSigningConfigArnHasBeenSet() const { return m_codeSigningConfigArnHasBeenSet; }
476 template <typename CodeSigningConfigArnT = Aws::String>
477 void SetCodeSigningConfigArn(CodeSigningConfigArnT&& value) {
478 m_codeSigningConfigArnHasBeenSet = true;
479 m_codeSigningConfigArn = std::forward<CodeSigningConfigArnT>(value);
480 }
481 template <typename CodeSigningConfigArnT = Aws::String>
482 CreateFunctionRequest& WithCodeSigningConfigArn(CodeSigningConfigArnT&& value) {
483 SetCodeSigningConfigArn(std::forward<CodeSigningConfigArnT>(value));
484 return *this;
485 }
487
489
494 inline const Aws::Vector<Architecture>& GetArchitectures() const { return m_architectures; }
495 inline bool ArchitecturesHasBeenSet() const { return m_architecturesHasBeenSet; }
496 template <typename ArchitecturesT = Aws::Vector<Architecture>>
497 void SetArchitectures(ArchitecturesT&& value) {
498 m_architecturesHasBeenSet = true;
499 m_architectures = std::forward<ArchitecturesT>(value);
500 }
501 template <typename ArchitecturesT = Aws::Vector<Architecture>>
502 CreateFunctionRequest& WithArchitectures(ArchitecturesT&& value) {
503 SetArchitectures(std::forward<ArchitecturesT>(value));
504 return *this;
505 }
507 m_architecturesHasBeenSet = true;
508 m_architectures.push_back(value);
509 return *this;
510 }
512
514
521 inline const EphemeralStorage& GetEphemeralStorage() const { return m_ephemeralStorage; }
522 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
523 template <typename EphemeralStorageT = EphemeralStorage>
524 void SetEphemeralStorage(EphemeralStorageT&& value) {
525 m_ephemeralStorageHasBeenSet = true;
526 m_ephemeralStorage = std::forward<EphemeralStorageT>(value);
527 }
528 template <typename EphemeralStorageT = EphemeralStorage>
529 CreateFunctionRequest& WithEphemeralStorage(EphemeralStorageT&& value) {
530 SetEphemeralStorage(std::forward<EphemeralStorageT>(value));
531 return *this;
532 }
534
536
541 inline const SnapStart& GetSnapStart() const { return m_snapStart; }
542 inline bool SnapStartHasBeenSet() const { return m_snapStartHasBeenSet; }
543 template <typename SnapStartT = SnapStart>
544 void SetSnapStart(SnapStartT&& value) {
545 m_snapStartHasBeenSet = true;
546 m_snapStart = std::forward<SnapStartT>(value);
547 }
548 template <typename SnapStartT = SnapStart>
550 SetSnapStart(std::forward<SnapStartT>(value));
551 return *this;
552 }
554
556
559 inline const LoggingConfig& GetLoggingConfig() const { return m_loggingConfig; }
560 inline bool LoggingConfigHasBeenSet() const { return m_loggingConfigHasBeenSet; }
561 template <typename LoggingConfigT = LoggingConfig>
562 void SetLoggingConfig(LoggingConfigT&& value) {
563 m_loggingConfigHasBeenSet = true;
564 m_loggingConfig = std::forward<LoggingConfigT>(value);
565 }
566 template <typename LoggingConfigT = LoggingConfig>
567 CreateFunctionRequest& WithLoggingConfig(LoggingConfigT&& value) {
568 SetLoggingConfig(std::forward<LoggingConfigT>(value));
569 return *this;
570 }
572
574
579 inline const TenancyConfig& GetTenancyConfig() const { return m_tenancyConfig; }
580 inline bool TenancyConfigHasBeenSet() const { return m_tenancyConfigHasBeenSet; }
581 template <typename TenancyConfigT = TenancyConfig>
582 void SetTenancyConfig(TenancyConfigT&& value) {
583 m_tenancyConfigHasBeenSet = true;
584 m_tenancyConfig = std::forward<TenancyConfigT>(value);
585 }
586 template <typename TenancyConfigT = TenancyConfig>
587 CreateFunctionRequest& WithTenancyConfig(TenancyConfigT&& value) {
588 SetTenancyConfig(std::forward<TenancyConfigT>(value));
589 return *this;
590 }
592 private:
593 Aws::String m_functionName;
594 bool m_functionNameHasBeenSet = false;
595
596 Runtime m_runtime{Runtime::NOT_SET};
597 bool m_runtimeHasBeenSet = false;
598
599 Aws::String m_role;
600 bool m_roleHasBeenSet = false;
601
602 Aws::String m_handler;
603 bool m_handlerHasBeenSet = false;
604
605 FunctionCode m_code;
606 bool m_codeHasBeenSet = false;
607
608 Aws::String m_description;
609 bool m_descriptionHasBeenSet = false;
610
611 int m_timeout{0};
612 bool m_timeoutHasBeenSet = false;
613
614 int m_memorySize{0};
615 bool m_memorySizeHasBeenSet = false;
616
617 bool m_publish{false};
618 bool m_publishHasBeenSet = false;
619
620 VpcConfig m_vpcConfig;
621 bool m_vpcConfigHasBeenSet = false;
622
623 PackageType m_packageType{PackageType::NOT_SET};
624 bool m_packageTypeHasBeenSet = false;
625
626 DeadLetterConfig m_deadLetterConfig;
627 bool m_deadLetterConfigHasBeenSet = false;
628
629 Environment m_environment;
630 bool m_environmentHasBeenSet = false;
631
632 Aws::String m_kMSKeyArn;
633 bool m_kMSKeyArnHasBeenSet = false;
634
635 TracingConfig m_tracingConfig;
636 bool m_tracingConfigHasBeenSet = false;
637
639 bool m_tagsHasBeenSet = false;
640
642 bool m_layersHasBeenSet = false;
643
644 Aws::Vector<FileSystemConfig> m_fileSystemConfigs;
645 bool m_fileSystemConfigsHasBeenSet = false;
646
647 ImageConfig m_imageConfig;
648 bool m_imageConfigHasBeenSet = false;
649
650 Aws::String m_codeSigningConfigArn;
651 bool m_codeSigningConfigArnHasBeenSet = false;
652
653 Aws::Vector<Architecture> m_architectures;
654 bool m_architecturesHasBeenSet = false;
655
656 EphemeralStorage m_ephemeralStorage;
657 bool m_ephemeralStorageHasBeenSet = false;
658
659 SnapStart m_snapStart;
660 bool m_snapStartHasBeenSet = false;
661
662 LoggingConfig m_loggingConfig;
663 bool m_loggingConfigHasBeenSet = false;
664
665 TenancyConfig m_tenancyConfig;
666 bool m_tenancyConfigHasBeenSet = false;
667};
668
669} // namespace Model
670} // namespace Lambda
671} // namespace Aws
CreateFunctionRequest & WithArchitectures(ArchitecturesT &&value)
CreateFunctionRequest & AddLayers(LayersT &&value)
CreateFunctionRequest & WithTenancyConfig(TenancyConfigT &&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