File Coverage

blib/lib/Paws/Lambda/Invoke.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1              
2             package Paws::Lambda::Invoke;
3 1     1   585 use Moose;
  1     1   3  
  1         7  
  1         628  
  1         2  
  1         7  
4             has ClientContext => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'X-Amz-Client-Context' );
5             has FunctionName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'FunctionName' , required => 1);
6             has InvocationType => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'X-Amz-Invocation-Type' );
7             has LogType => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'X-Amz-Log-Type' );
8             has Payload => (is => 'ro', isa => 'Str');
9             has Qualifier => (is => 'ro', isa => 'Str', traits => ['ParamInQuery'], query_name => 'Qualifier' );
10              
11 1     1   6435 use MooseX::ClassAttribute;
  1     1   3  
  1         8  
  1         7934  
  1         4  
  1         11  
12             class_has _stream_param => (is => 'ro', default => 'Payload');
13             class_has _api_call => (isa => 'Str', is => 'ro', default => 'Invoke');
14             class_has _api_uri => (isa => 'Str', is => 'ro', default => '/2015-03-31/functions/{FunctionName}/invocations');
15             class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
16             class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Lambda::InvocationResponse');
17             class_has _result_key => (isa => 'Str', is => 'ro');
18             1;
19              
20             ### main pod documentation begin ###
21              
22             =head1 NAME
23              
24             Paws::Lambda::Invoke - Arguments for method Invoke on Paws::Lambda
25              
26             =head1 DESCRIPTION
27              
28             This class represents the parameters used for calling the method Invoke on the
29             AWS Lambda service. Use the attributes of this class
30             as arguments to method Invoke.
31              
32             You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to Invoke.
33              
34             As an example:
35              
36             $service_obj->Invoke(Att1 => $value1, Att2 => $value2, ...);
37              
38             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.
39              
40             =head1 ATTRIBUTES
41              
42              
43             =head2 ClientContext => Str
44              
45             Using the C<ClientContext> you can pass client-specific information to
46             the Lambda function you are invoking. You can then process the client
47             information in your Lambda function as you choose through the context
48             variable. For an example of a C<ClientContext> JSON, see PutEvents in
49             the I<Amazon Mobile Analytics API Reference and User Guide>.
50              
51             The ClientContext JSON must be base64-encoded.
52              
53              
54              
55             =head2 B<REQUIRED> FunctionName => Str
56              
57             The Lambda function name.
58              
59             You can specify a function name (for example, C<Thumbnail>) or you can
60             specify Amazon Resource Name (ARN) of the function (for example,
61             C<arn:aws:lambda:us-west-2:account-id:function:ThumbNail>). AWS Lambda
62             also allows you to specify a partial ARN (for example,
63             C<account-id:Thumbnail>). Note that the length constraint applies only
64             to the ARN. If you specify only the function name, it is limited to 64
65             characters in length.
66              
67              
68              
69             =head2 InvocationType => Str
70              
71             By default, the C<Invoke> API assumes C<RequestResponse> invocation
72             type. You can optionally request asynchronous execution by specifying
73             C<Event> as the C<InvocationType>. You can also use this parameter to
74             request AWS Lambda to not execute the function but do some
75             verification, such as if the caller is authorized to invoke the
76             function and if the inputs are valid. You request this by specifying
77             C<DryRun> as the C<InvocationType>. This is useful in a cross-account
78             scenario when you want to verify access to a function without running
79             it.
80              
81             Valid values are: C<"Event">, C<"RequestResponse">, C<"DryRun">
82              
83             =head2 LogType => Str
84              
85             You can set this optional parameter to C<Tail> in the request only if
86             you specify the C<InvocationType> parameter with value
87             C<RequestResponse>. In this case, AWS Lambda returns the base64-encoded
88             last 4 KB of log data produced by your Lambda function in the
89             C<x-amz-log-result> header.
90              
91             Valid values are: C<"None">, C<"Tail">
92              
93             =head2 Payload => Str
94              
95             JSON that you want to provide to your Lambda function as input.
96              
97              
98              
99             =head2 Qualifier => Str
100              
101             You can use this optional parameter to specify a Lambda function
102             version or alias name. If you specify a function version, the API uses
103             the qualified function ARN to invoke a specific Lambda function. If you
104             specify an alias name, the API uses the alias ARN to invoke the Lambda
105             function version to which the alias points.
106              
107             If you don't provide this parameter, then the API uses unqualified
108             function ARN which results in invocation of the C<$LATEST> version.
109              
110              
111              
112              
113             =head1 SEE ALSO
114              
115             This class forms part of L<Paws>, documenting arguments for method Invoke in L<Paws::Lambda>
116              
117             =head1 BUGS and CONTRIBUTIONS
118              
119             The source code is located here: https://github.com/pplu/aws-sdk-perl
120              
121             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
122              
123             =cut
124