« blib/lib/Paws/Lambda/CreateCodeSigningConfigResponse.pm
↑ Summary
blib/lib/Paws/Lambda/DeadLetterConfig.pm »
| 1 | |||
| 2 | package Paws::Lambda::CreateEventSourceMapping; | ||
| 3 | use Moose; | ||
| 4 | has BatchSize => (is => 'ro', isa => 'Int'); | ||
| 5 | has BisectBatchOnFunctionError => (is => 'ro', isa => 'Bool'); | ||
| 6 | has DestinationConfig => (is => 'ro', isa => 'Paws::Lambda::DestinationConfig'); | ||
| 7 | has Enabled => (is => 'ro', isa => 'Bool'); | ||
| 8 | has EventSourceArn => (is => 'ro', isa => 'Str'); | ||
| 9 | has FunctionName => (is => 'ro', isa => 'Str', required => 1); | ||
| 10 | has FunctionResponseTypes => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 11 | has MaximumBatchingWindowInSeconds => (is => 'ro', isa => 'Int'); | ||
| 12 | has MaximumRecordAgeInSeconds => (is => 'ro', isa => 'Int'); | ||
| 13 | has MaximumRetryAttempts => (is => 'ro', isa => 'Int'); | ||
| 14 | has ParallelizationFactor => (is => 'ro', isa => 'Int'); | ||
| 15 | has Queues => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 16 | has SelfManagedEventSource => (is => 'ro', isa => 'Paws::Lambda::SelfManagedEventSource'); | ||
| 17 | has SourceAccessConfigurations => (is => 'ro', isa => 'ArrayRef[Paws::Lambda::SourceAccessConfiguration]'); | ||
| 18 | has StartingPosition => (is => 'ro', isa => 'Str'); | ||
| 19 | has StartingPositionTimestamp => (is => 'ro', isa => 'Str'); | ||
| 20 | has Topics => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 21 | has TumblingWindowInSeconds => (is => 'ro', isa => 'Int'); | ||
| 22 | |||
| 23 | use MooseX::ClassAttribute; | ||
| 24 | |||
| 25 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateEventSourceMapping'); | ||
| 26 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/2015-03-31/event-source-mappings/'); | ||
| 27 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 28 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Lambda::EventSourceMappingConfiguration'); | ||
| 29 | 1; | ||
| 30 | |||
| 31 | ### main pod documentation begin ### | ||
| 32 | |||
| 33 | =head1 NAME | ||
| 34 | |||
| 35 | Paws::Lambda::CreateEventSourceMapping - Arguments for method CreateEventSourceMapping on L<Paws::Lambda> | ||
| 36 | |||
| 37 | =head1 DESCRIPTION | ||
| 38 | |||
| 39 | This class represents the parameters used for calling the method CreateEventSourceMapping on the | ||
| 40 | L<AWS Lambda|Paws::Lambda> service. Use the attributes of this class | ||
| 41 | as arguments to method CreateEventSourceMapping. | ||
| 42 | |||
| 43 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateEventSourceMapping. | ||
| 44 | |||
| 45 | =head1 SYNOPSIS | ||
| 46 | |||
| 47 | my $lambda = Paws->service('Lambda'); | ||
| 48 | # To create a mapping between an event source and an AWS Lambda function | ||
| 49 | # The following example creates a mapping between an SQS queue and the | ||
| 50 | # my-function Lambda function. | ||
| 51 | my $EventSourceMappingConfiguration = $lambda->CreateEventSourceMapping( | ||
| 52 | 'BatchSize' => 5, | ||
| 53 | 'EventSourceArn' => 'arn:aws:sqs:us-west-2:123456789012:my-queue', | ||
| 54 | 'FunctionName' => 'my-function' | ||
| 55 | ); | ||
| 56 | |||
| 57 | # Results: | ||
| 58 | my $BatchSize = $EventSourceMappingConfiguration->BatchSize; | ||
| 59 | my $EventSourceArn = $EventSourceMappingConfiguration->EventSourceArn; | ||
| 60 | my $FunctionArn = $EventSourceMappingConfiguration->FunctionArn; | ||
| 61 | my $LastModified = $EventSourceMappingConfiguration->LastModified; | ||
| 62 | my $State = $EventSourceMappingConfiguration->State; | ||
| 63 | my $StateTransitionReason = | ||
| 64 | $EventSourceMappingConfiguration->StateTransitionReason; | ||
| 65 | my $UUID = $EventSourceMappingConfiguration->UUID; | ||
| 66 | |||
| 67 | # Returns a L<Paws::Lambda::EventSourceMappingConfiguration> object. | ||
| 68 | |||
| 69 | 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. | ||
| 70 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/lambda/CreateEventSourceMapping> | ||
| 71 | |||
| 72 | =head1 ATTRIBUTES | ||
| 73 | |||
| 74 | |||
| 75 | =head2 BatchSize => Int | ||
| 76 | |||
| 77 | The maximum number of items to retrieve in a single batch. | ||
| 78 | |||
| 79 | =over | ||
| 80 | |||
| 81 | =item * | ||
| 82 | |||
| 83 | B<Amazon Kinesis> - Default 100. Max 10,000. | ||
| 84 | |||
| 85 | =item * | ||
| 86 | |||
| 87 | B<Amazon DynamoDB Streams> - Default 100. Max 1,000. | ||
| 88 | |||
| 89 | =item * | ||
| 90 | |||
| 91 | B<Amazon Simple Queue Service> - Default 10. For standard queues the | ||
| 92 | max is 10,000. For FIFO queues the max is 10. | ||
| 93 | |||
| 94 | =item * | ||
| 95 | |||
| 96 | B<Amazon Managed Streaming for Apache Kafka> - Default 100. Max 10,000. | ||
| 97 | |||
| 98 | =item * | ||
| 99 | |||
| 100 | B<Self-Managed Apache Kafka> - Default 100. Max 10,000. | ||
| 101 | |||
| 102 | =back | ||
| 103 | |||
| 104 | |||
| 105 | |||
| 106 | |||
| 107 | =head2 BisectBatchOnFunctionError => Bool | ||
| 108 | |||
| 109 | (Streams only) If the function returns an error, split the batch in two | ||
| 110 | and retry. | ||
| 111 | |||
| 112 | |||
| 113 | |||
| 114 | =head2 DestinationConfig => L<Paws::Lambda::DestinationConfig> | ||
| 115 | |||
| 116 | (Streams only) An Amazon SQS queue or Amazon SNS topic destination for | ||
| 117 | discarded records. | ||
| 118 | |||
| 119 | |||
| 120 | |||
| 121 | =head2 Enabled => Bool | ||
| 122 | |||
| 123 | If true, the event source mapping is active. Set to false to pause | ||
| 124 | polling and invocation. | ||
| 125 | |||
| 126 | |||
| 127 | |||
| 128 | =head2 EventSourceArn => Str | ||
| 129 | |||
| 130 | The Amazon Resource Name (ARN) of the event source. | ||
| 131 | |||
| 132 | =over | ||
| 133 | |||
| 134 | =item * | ||
| 135 | |||
| 136 | B<Amazon Kinesis> - The ARN of the data stream or a stream consumer. | ||
| 137 | |||
| 138 | =item * | ||
| 139 | |||
| 140 | B<Amazon DynamoDB Streams> - The ARN of the stream. | ||
| 141 | |||
| 142 | =item * | ||
| 143 | |||
| 144 | B<Amazon Simple Queue Service> - The ARN of the queue. | ||
| 145 | |||
| 146 | =item * | ||
| 147 | |||
| 148 | B<Amazon Managed Streaming for Apache Kafka> - The ARN of the cluster. | ||
| 149 | |||
| 150 | =back | ||
| 151 | |||
| 152 | |||
| 153 | |||
| 154 | |||
| 155 | =head2 B<REQUIRED> FunctionName => Str | ||
| 156 | |||
| 157 | The name of the Lambda function. | ||
| 158 | |||
| 159 | B<Name formats> | ||
| 160 | |||
| 161 | =over | ||
| 162 | |||
| 163 | =item * | ||
| 164 | |||
| 165 | B<Function name> - C<MyFunction>. | ||
| 166 | |||
| 167 | =item * | ||
| 168 | |||
| 169 | B<Function ARN> - | ||
| 170 | C<arn:aws:lambda:us-west-2:123456789012:function:MyFunction>. | ||
| 171 | |||
| 172 | =item * | ||
| 173 | |||
| 174 | B<Version or Alias ARN> - | ||
| 175 | C<arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD>. | ||
| 176 | |||
| 177 | =item * | ||
| 178 | |||
| 179 | B<Partial ARN> - C<123456789012:function:MyFunction>. | ||
| 180 | |||
| 181 | =back | ||
| 182 | |||
| 183 | The length constraint applies only to the full ARN. If you specify only | ||
| 184 | the function name, it's limited to 64 characters in length. | ||
| 185 | |||
| 186 | |||
| 187 | |||
| 188 | =head2 FunctionResponseTypes => ArrayRef[Str|Undef] | ||
| 189 | |||
| 190 | (Streams only) A list of current response type enums applied to the | ||
| 191 | event source mapping. | ||
| 192 | |||
| 193 | |||
| 194 | |||
| 195 | =head2 MaximumBatchingWindowInSeconds => Int | ||
| 196 | |||
| 197 | (Streams and SQS standard queues) The maximum amount of time to gather | ||
| 198 | records before invoking the function, in seconds. | ||
| 199 | |||
| 200 | |||
| 201 | |||
| 202 | =head2 MaximumRecordAgeInSeconds => Int | ||
| 203 | |||
| 204 | (Streams only) Discard records older than the specified age. The | ||
| 205 | default value is infinite (-1). | ||
| 206 | |||
| 207 | |||
| 208 | |||
| 209 | =head2 MaximumRetryAttempts => Int | ||
| 210 | |||
| 211 | (Streams only) Discard records after the specified number of retries. | ||
| 212 | The default value is infinite (-1). When set to infinite (-1), failed | ||
| 213 | records will be retried until the record expires. | ||
| 214 | |||
| 215 | |||
| 216 | |||
| 217 | =head2 ParallelizationFactor => Int | ||
| 218 | |||
| 219 | (Streams only) The number of batches to process from each shard | ||
| 220 | concurrently. | ||
| 221 | |||
| 222 | |||
| 223 | |||
| 224 | =head2 Queues => ArrayRef[Str|Undef] | ||
| 225 | |||
| 226 | (MQ) The name of the Amazon MQ broker destination queue to consume. | ||
| 227 | |||
| 228 | |||
| 229 | |||
| 230 | =head2 SelfManagedEventSource => L<Paws::Lambda::SelfManagedEventSource> | ||
| 231 | |||
| 232 | The Self-Managed Apache Kafka cluster to send records. | ||
| 233 | |||
| 234 | |||
| 235 | |||
| 236 | =head2 SourceAccessConfigurations => ArrayRef[L<Paws::Lambda::SourceAccessConfiguration>] | ||
| 237 | |||
| 238 | An array of the authentication protocol, or the VPC components to | ||
| 239 | secure your event source. | ||
| 240 | |||
| 241 | |||
| 242 | |||
| 243 | =head2 StartingPosition => Str | ||
| 244 | |||
| 245 | The position in a stream from which to start reading. Required for | ||
| 246 | Amazon Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. | ||
| 247 | C<AT_TIMESTAMP> is only supported for Amazon Kinesis streams. | ||
| 248 | |||
| 249 | Valid values are: C<"TRIM_HORIZON">, C<"LATEST">, C<"AT_TIMESTAMP"> | ||
| 250 | |||
| 251 | =head2 StartingPositionTimestamp => Str | ||
| 252 | |||
| 253 | With C<StartingPosition> set to C<AT_TIMESTAMP>, the time from which to | ||
| 254 | start reading. | ||
| 255 | |||
| 256 | |||
| 257 | |||
| 258 | =head2 Topics => ArrayRef[Str|Undef] | ||
| 259 | |||
| 260 | The name of the Kafka topic. | ||
| 261 | |||
| 262 | |||
| 263 | |||
| 264 | =head2 TumblingWindowInSeconds => Int | ||
| 265 | |||
| 266 | (Streams only) The duration in seconds of a processing window. The | ||
| 267 | range is between 1 second up to 900 seconds. | ||
| 268 | |||
| 269 | |||
| 270 | |||
| 271 | |||
| 272 | =head1 SEE ALSO | ||
| 273 | |||
| 274 | This class forms part of L<Paws>, documenting arguments for method CreateEventSourceMapping in L<Paws::Lambda> | ||
| 275 | |||
| 276 | =head1 BUGS and CONTRIBUTIONS | ||
| 277 | |||
| 278 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 279 | |||
| 280 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 281 | |||
| 282 | =cut | ||
| 283 |