| 1 | |||
| 2 | package Paws::Lambda::Invoke; | ||
| 3 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | has ClientContext => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'X-Amz-Client-Context'); | |
| 5 | 1 | has FunctionName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'FunctionName', required => 1); | |
| 6 | 1 | has InvocationType => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'X-Amz-Invocation-Type'); | |
| 7 | 1 | has LogType => (is => 'ro', isa => 'Str', traits => ['ParamInHeader'], header_name => 'X-Amz-Log-Type'); | |
| 8 | 1 | has Payload => (is => 'ro', isa => 'Str'); | |
| 9 | 1 | has Qualifier => (is => 'ro', isa => 'Str', traits => ['ParamInQuery'], query_name => 'Qualifier'); | |
| 10 | |||
| 11 | 1 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 1 | class_has _stream_param => (is => 'ro', default => 'Payload'); | |
| 13 | 1 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'Invoke'); | |
| 14 | 1 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/2015-03-31/functions/{FunctionName}/invocations'); | |
| 15 | 1 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | |
| 16 | 1 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Lambda::InvocationResponse'); | |
| 17 | 1 | 1; | |
| 18 | |||
| 19 | ### main pod documentation begin ### | ||
| 20 | |||
| 21 | =head1 NAME | ||
| 22 | |||
| 23 | Paws::Lambda::Invoke - Arguments for method Invoke on L<Paws::Lambda> | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | This class represents the parameters used for calling the method Invoke on the | ||
| 28 | L<AWS Lambda|Paws::Lambda> service. Use the attributes of this class | ||
| 29 | as arguments to method Invoke. | ||
| 30 | |||
| 31 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to Invoke. | ||
| 32 | |||
| 33 | =head1 SYNOPSIS | ||
| 34 | |||
| 35 | my $lambda = Paws->service('Lambda'); | ||
| 36 | # To invoke a Lambda function | ||
| 37 | # The following example invokes version 1 of a function named my-function with | ||
| 38 | # an empty event payload. | ||
| 39 | my $InvocationResponse = $lambda->Invoke( | ||
| 40 | 'FunctionName' => 'my-function', | ||
| 41 | 'Payload' => '{}', | ||
| 42 | 'Qualifier' => 1 | ||
| 43 | ); | ||
| 44 | |||
| 45 | # Results: | ||
| 46 | my $Payload = $InvocationResponse->Payload; | ||
| 47 | my $StatusCode = $InvocationResponse->StatusCode; | ||
| 48 | |||
| 49 | # Returns a L<Paws::Lambda::InvocationResponse> object. | ||
| 50 | # To invoke a Lambda function asynchronously | ||
| 51 | # The following example invokes version 1 of a function named my-function | ||
| 52 | # asynchronously. | ||
| 53 | my $InvocationResponse = $lambda->Invoke( | ||
| 54 | 'FunctionName' => 'my-function', | ||
| 55 | 'InvocationType' => 'Event', | ||
| 56 | 'Payload' => '{}', | ||
| 57 | 'Qualifier' => 1 | ||
| 58 | ); | ||
| 59 | |||
| 60 | # Results: | ||
| 61 | my $Payload = $InvocationResponse->Payload; | ||
| 62 | my $StatusCode = $InvocationResponse->StatusCode; | ||
| 63 | |||
| 64 | # Returns a L<Paws::Lambda::InvocationResponse> object. | ||
| 65 | |||
| 66 | 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. | ||
| 67 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/lambda/Invoke> | ||
| 68 | |||
| 69 | =head1 ATTRIBUTES | ||
| 70 | |||
| 71 | |||
| 72 | =head2 ClientContext => Str | ||
| 73 | |||
| 74 | Up to 3583 bytes of base64-encoded data about the invoking client to | ||
| 75 | pass to the function in the context object. | ||
| 76 | |||
| 77 | |||
| 78 | |||
| 79 | =head2 B<REQUIRED> FunctionName => Str | ||
| 80 | |||
| 81 | The name of the Lambda function, version, or alias. | ||
| 82 | |||
| 83 | B<Name formats> | ||
| 84 | |||
| 85 | =over | ||
| 86 | |||
| 87 | =item * | ||
| 88 | |||
| 89 | B<Function name> - C<my-function> (name-only), C<my-function:v1> (with | ||
| 90 | alias). | ||
| 91 | |||
| 92 | =item * | ||
| 93 | |||
| 94 | B<Function ARN> - | ||
| 95 | C<arn:aws:lambda:us-west-2:123456789012:function:my-function>. | ||
| 96 | |||
| 97 | =item * | ||
| 98 | |||
| 99 | B<Partial ARN> - C<123456789012:function:my-function>. | ||
| 100 | |||
| 101 | =back | ||
| 102 | |||
| 103 | You can append a version number or alias to any of the formats. The | ||
| 104 | length constraint applies only to the full ARN. If you specify only the | ||
| 105 | function name, it is limited to 64 characters in length. | ||
| 106 | |||
| 107 | |||
| 108 | |||
| 109 | =head2 InvocationType => Str | ||
| 110 | |||
| 111 | Choose from the following options. | ||
| 112 | |||
| 113 | =over | ||
| 114 | |||
| 115 | =item * | ||
| 116 | |||
| 117 | C<RequestResponse> (default) - Invoke the function synchronously. Keep | ||
| 118 | the connection open until the function returns a response or times out. | ||
| 119 | The API response includes the function response and additional data. | ||
| 120 | |||
| 121 | =item * | ||
| 122 | |||
| 123 | C<Event> - Invoke the function asynchronously. Send events that fail | ||
| 124 | multiple times to the function's dead-letter queue (if it's | ||
| 125 | configured). The API response only includes a status code. | ||
| 126 | |||
| 127 | =item * | ||
| 128 | |||
| 129 | C<DryRun> - Validate parameter values and verify that the user or role | ||
| 130 | has permission to invoke the function. | ||
| 131 | |||
| 132 | =back | ||
| 133 | |||
| 134 | |||
| 135 | Valid values are: C<"Event">, C<"RequestResponse">, C<"DryRun"> | ||
| 136 | |||
| 137 | =head2 LogType => Str | ||
| 138 | |||
| 139 | Set to C<Tail> to include the execution log in the response. | ||
| 140 | |||
| 141 | Valid values are: C<"None">, C<"Tail"> | ||
| 142 | |||
| 143 | =head2 Payload => Str | ||
| 144 | |||
| 145 | The JSON that you want to provide to your Lambda function as input. | ||
| 146 | |||
| 147 | |||
| 148 | |||
| 149 | =head2 Qualifier => Str | ||
| 150 | |||
| 151 | Specify a version or alias to invoke a published version of the | ||
| 152 | function. | ||
| 153 | |||
| 154 | |||
| 155 | |||
| 156 | |||
| 157 | =head1 SEE ALSO | ||
| 158 | |||
| 159 | This class forms part of L<Paws>, documenting arguments for method Invoke in L<Paws::Lambda> | ||
| 160 | |||
| 161 | =head1 BUGS and CONTRIBUTIONS | ||
| 162 | |||
| 163 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 164 | |||
| 165 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 166 | |||
| 167 | =cut | ||
| 168 | |||