blib/lib/Paws/Lambda/CreateFunction.pm

filter: Statementstmt 100% 31 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 33 / 33 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/Kinesis/ListStreams.pm ↑ Summary blib/lib/Paws/Lambda/FunctionCode.pm »
1  
2 package Paws::Lambda::CreateFunction;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has Code => (is => 'ro', isa => 'Paws::Lambda::FunctionCode', required => 1);
5 1 has CodeSigningConfigArn => (is => 'ro', isa => 'Str');
6 1 has DeadLetterConfig => (is => 'ro', isa => 'Paws::Lambda::DeadLetterConfig');
7 1 has Description => (is => 'ro', isa => 'Str');
8 1 has Environment => (is => 'ro', isa => 'Paws::Lambda::Environment');
9 1 has FileSystemConfigs => (is => 'ro', isa => 'ArrayRef[Paws::Lambda::FileSystemConfig]');
10 1 has FunctionName => (is => 'ro', isa => 'Str', required => 1);
11 1 has Handler => (is => 'ro', isa => 'Str');
12 1 has ImageConfig => (is => 'ro', isa => 'Paws::Lambda::ImageConfig');
13 1 has KMSKeyArn => (is => 'ro', isa => 'Str');
14 1 has Layers => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
15 1 has MemorySize => (is => 'ro', isa => 'Int');
16 1 has PackageType => (is => 'ro', isa => 'Str');
17 1 has Publish => (is => 'ro', isa => 'Bool');
18 1 has Role => (is => 'ro', isa => 'Str', required => 1);
19 1 has Runtime => (is => 'ro', isa => 'Str');
20 1 has Tags => (is => 'ro', isa => 'Paws::Lambda::Tags');
21 1 has Timeout => (is => 'ro', isa => 'Int');
22 1 has TracingConfig => (is => 'ro', isa => 'Paws::Lambda::TracingConfig');
23 1 has VpcConfig => (is => 'ro', isa => 'Paws::Lambda::VpcConfig');
24  
25 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
26  
27 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateFunction');
28 1 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/2015-03-31/functions');
29 1 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
30 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Lambda::FunctionConfiguration');
31 1 1;
32  
33 ### main pod documentation begin ###
34  
35 =head1 NAME
36  
37 Paws::Lambda::CreateFunction - Arguments for method CreateFunction on L<Paws::Lambda>
38  
39 =head1 DESCRIPTION
40  
41 This class represents the parameters used for calling the method CreateFunction on the
42 L<AWS Lambda|Paws::Lambda> service. Use the attributes of this class
43 as arguments to method CreateFunction.
44  
45 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateFunction.
46  
47 =head1 SYNOPSIS
48  
49 my $lambda = Paws->service('Lambda');
50 # To create a function
51 # The following example creates a function with a deployment package in Amazon
52 # S3 and enables X-Ray tracing and environment variable encryption.
53 my $FunctionConfiguration = $lambda->CreateFunction(
54 'Code' => {
55 'S3Bucket' => 'my-bucket-1xpuxmplzrlbh',
56 'S3Key' => 'function.zip'
57 },
58 'Description' => 'Process image objects from Amazon S3.',
59 'Environment' => {
60 'Variables' => {
61 'BUCKET' => 'my-bucket-1xpuxmplzrlbh',
62 'PREFIX' => 'inbound'
63 }
64 },
65 'FunctionName' => 'my-function',
66 'Handler' => 'index.handler',
67 'KMSKeyArn' =>
68 'arn:aws:kms:us-west-2:123456789012:key/b0844d6c-xmpl-4463-97a4-d49f50839966',
69 'MemorySize' => 256,
70 'Publish' => 1,
71 'Role' => 'arn:aws:iam::123456789012:role/lambda-role',
72 'Runtime' => 'nodejs12.x',
73 'Tags' => {
74 'DEPARTMENT' => 'Assets'
75 },
76 'Timeout' => 15,
77 'TracingConfig' => {
78 'Mode' => 'Active'
79 }
80 );
81  
82 # Results:
83 my $CodeSha256 = $FunctionConfiguration->CodeSha256;
84 my $CodeSize = $FunctionConfiguration->CodeSize;
85 my $Description = $FunctionConfiguration->Description;
86 my $Environment = $FunctionConfiguration->Environment;
87 my $FunctionArn = $FunctionConfiguration->FunctionArn;
88 my $FunctionName = $FunctionConfiguration->FunctionName;
89 my $Handler = $FunctionConfiguration->Handler;
90 my $KMSKeyArn = $FunctionConfiguration->KMSKeyArn;
91 my $LastModified = $FunctionConfiguration->LastModified;
92 my $LastUpdateStatus = $FunctionConfiguration->LastUpdateStatus;
93 my $MemorySize = $FunctionConfiguration->MemorySize;
94 my $RevisionId = $FunctionConfiguration->RevisionId;
95 my $Role = $FunctionConfiguration->Role;
96 my $Runtime = $FunctionConfiguration->Runtime;
97 my $State = $FunctionConfiguration->State;
98 my $Timeout = $FunctionConfiguration->Timeout;
99 my $TracingConfig = $FunctionConfiguration->TracingConfig;
100 my $Version = $FunctionConfiguration->Version;
101  
102 # Returns a L<Paws::Lambda::FunctionConfiguration> object.
103  
104 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
105 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/lambda/CreateFunction>
106  
107 =head1 ATTRIBUTES
108  
109  
110 =head2 B<REQUIRED> Code => L<Paws::Lambda::FunctionCode>
111  
112 The code for the function.
113  
114  
115  
116 =head2 CodeSigningConfigArn => Str
117  
118 To enable code signing for this function, specify the ARN of a
119 code-signing configuration. A code-signing configuration includes a set
120 of signing profiles, which define the trusted publishers for this
121 function.
122  
123  
124  
125 =head2 DeadLetterConfig => L<Paws::Lambda::DeadLetterConfig>
126  
127 A dead letter queue configuration that specifies the queue or topic
128 where Lambda sends asynchronous events when they fail processing. For
129 more information, see Dead Letter Queues
130 (https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq).
131  
132  
133  
134 =head2 Description => Str
135  
136 A description of the function.
137  
138  
139  
140 =head2 Environment => L<Paws::Lambda::Environment>
141  
142 Environment variables that are accessible from function code during
143 execution.
144  
145  
146  
147 =head2 FileSystemConfigs => ArrayRef[L<Paws::Lambda::FileSystemConfig>]
148  
149 Connection settings for an Amazon EFS file system.
150  
151  
152  
153 =head2 B<REQUIRED> FunctionName => Str
154  
155 The name of the Lambda function.
156  
157 B<Name formats>
158  
159 =over
160  
161 =item *
162  
163 B<Function name> - C<my-function>.
164  
165 =item *
166  
167 B<Function ARN> -
168 C<arn:aws:lambda:us-west-2:123456789012:function:my-function>.
169  
170 =item *
171  
172 B<Partial ARN> - C<123456789012:function:my-function>.
173  
174 =back
175  
176 The length constraint applies only to the full ARN. If you specify only
177 the function name, it is limited to 64 characters in length.
178  
179  
180  
181 =head2 Handler => Str
182  
183 The name of the method within your code that Lambda calls to execute
184 your function. The format includes the file name. It can also include
185 namespaces and other qualifiers, depending on the runtime. For more
186 information, see Programming Model
187 (https://docs.aws.amazon.com/lambda/latest/dg/programming-model-v2.html).
188  
189  
190  
191 =head2 ImageConfig => L<Paws::Lambda::ImageConfig>
192  
193 Container image configuration values
194 (https://docs.aws.amazon.com/lambda/latest/dg/configuration-images.html#configuration-images-settings)
195 that override the values in the container image Dockerfile.
196  
197  
198  
199 =head2 KMSKeyArn => Str
200  
201 The ARN of the Amazon Web Services Key Management Service (KMS) key
202 that's used to encrypt your function's environment variables. If it's
203 not provided, Lambda uses a default service key.
204  
205  
206  
207 =head2 Layers => ArrayRef[Str|Undef]
208  
209 A list of function layers
210 (https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)
211 to add to the function's execution environment. Specify each layer by
212 its ARN, including the version.
213  
214  
215  
216 =head2 MemorySize => Int
217  
218 The amount of memory available to the function
219 (https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html)
220 at runtime. Increasing the function memory also increases its CPU
221 allocation. The default value is 128 MB. The value can be any multiple
222 of 1 MB.
223  
224  
225  
226 =head2 PackageType => Str
227  
228 The type of deployment package. Set to C<Image> for container image and
229 set C<Zip> for ZIP archive.
230  
231 Valid values are: C<"Zip">, C<"Image">
232  
233 =head2 Publish => Bool
234  
235 Set to true to publish the first version of the function during
236 creation.
237  
238  
239  
240 =head2 B<REQUIRED> Role => Str
241  
242 The Amazon Resource Name (ARN) of the function's execution role.
243  
244  
245  
246 =head2 Runtime => Str
247  
248 The identifier of the function's runtime
249 (https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
250  
251 Valid values are: C<"nodejs">, C<"nodejs4.3">, C<"nodejs6.10">, C<"nodejs8.10">, C<"nodejs10.x">, C<"nodejs12.x">, C<"nodejs14.x">, C<"java8">, C<"java8.al2">, C<"java11">, C<"python2.7">, C<"python3.6">, C<"python3.7">, C<"python3.8">, C<"dotnetcore1.0">, C<"dotnetcore2.0">, C<"dotnetcore2.1">, C<"dotnetcore3.1">, C<"nodejs4.3-edge">, C<"go1.x">, C<"ruby2.5">, C<"ruby2.7">, C<"provided">, C<"provided.al2">
252  
253 =head2 Tags => L<Paws::Lambda::Tags>
254  
255 A list of tags
256 (https://docs.aws.amazon.com/lambda/latest/dg/tagging.html) to apply to
257 the function.
258  
259  
260  
261 =head2 Timeout => Int
262  
263 The amount of time that Lambda allows a function to run before stopping
264 it. The default is 3 seconds. The maximum allowed value is 900 seconds.
265 For additional information, see Lambda execution environment
266 (https://docs.aws.amazon.com/lambda/latest/dg/runtimes-context.html).
267  
268  
269  
270 =head2 TracingConfig => L<Paws::Lambda::TracingConfig>
271  
272 Set C<Mode> to C<Active> to sample and trace a subset of incoming
273 requests with X-Ray
274 (https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html).
275  
276  
277  
278 =head2 VpcConfig => L<Paws::Lambda::VpcConfig>
279  
280 For network connectivity to Amazon Web Services resources in a VPC,
281 specify a list of security groups and subnets in the VPC. When you
282 connect a function to a VPC, it can only access resources and the
283 internet through that VPC. For more information, see VPC Settings
284 (https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html).
285  
286  
287  
288  
289 =head1 SEE ALSO
290  
291 This class forms part of L<Paws>, documenting arguments for method CreateFunction in L<Paws::Lambda>
292  
293 =head1 BUGS and CONTRIBUTIONS
294  
295 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
296  
297 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
298  
299 =cut
300  
« blib/lib/Paws/Kinesis/ListStreams.pm ↑ Summary blib/lib/Paws/Lambda/FunctionCode.pm »