/* * Copyright 2010-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the lambda-2015-03-31.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.Lambda.Model { /// /// Container for the parameters to the CreateEventSourceMapping operation. /// Creates a mapping between an event source and an AWS Lambda function. Lambda reads /// items from the event source and triggers the function. /// /// /// /// For details about each event source type, see the following topics. /// /// /// /// The following error handling options are only available for stream sources (DynamoDB /// and Kinesis): /// /// /// public partial class CreateEventSourceMappingRequest : AmazonLambdaRequest { private int? _batchSize; private bool? _bisectBatchOnFunctionError; private DestinationConfig _destinationConfig; private bool? _enabled; private string _eventSourceArn; private string _functionName; private int? _maximumBatchingWindowInSeconds; private int? _maximumRecordAgeInSeconds; private int? _maximumRetryAttempts; private int? _parallelizationFactor; private EventSourcePosition _startingPosition; private DateTime? _startingPositionTimestamp; /// /// Gets and sets the property BatchSize. /// /// The maximum number of items to retrieve in a single batch. /// /// /// [AWSProperty(Min=1, Max=10000)] public int BatchSize { get { return this._batchSize.GetValueOrDefault(); } set { this._batchSize = value; } } // Check to see if BatchSize property is set internal bool IsSetBatchSize() { return this._batchSize.HasValue; } /// /// Gets and sets the property BisectBatchOnFunctionError. /// /// (Streams) If the function returns an error, split the batch in two and retry. /// /// public bool BisectBatchOnFunctionError { get { return this._bisectBatchOnFunctionError.GetValueOrDefault(); } set { this._bisectBatchOnFunctionError = value; } } // Check to see if BisectBatchOnFunctionError property is set internal bool IsSetBisectBatchOnFunctionError() { return this._bisectBatchOnFunctionError.HasValue; } /// /// Gets and sets the property DestinationConfig. /// /// (Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded records. /// /// public DestinationConfig DestinationConfig { get { return this._destinationConfig; } set { this._destinationConfig = value; } } // Check to see if DestinationConfig property is set internal bool IsSetDestinationConfig() { return this._destinationConfig != null; } /// /// Gets and sets the property Enabled. /// /// Disables the event source mapping to pause polling and invocation. /// /// public bool Enabled { get { return this._enabled.GetValueOrDefault(); } set { this._enabled = value; } } // Check to see if Enabled property is set internal bool IsSetEnabled() { return this._enabled.HasValue; } /// /// Gets and sets the property EventSourceArn. /// /// The Amazon Resource Name (ARN) of the event source. /// /// /// [AWSProperty(Required=true)] public string EventSourceArn { get { return this._eventSourceArn; } set { this._eventSourceArn = value; } } // Check to see if EventSourceArn property is set internal bool IsSetEventSourceArn() { return this._eventSourceArn != null; } /// /// Gets and sets the property FunctionName. /// /// The name of the Lambda function. /// ///

Name formats /// ///

/// /// The length constraint applies only to the full ARN. If you specify only the function /// name, it's limited to 64 characters in length. /// ///
[AWSProperty(Required=true, Min=1, Max=140)] public string FunctionName { get { return this._functionName; } set { this._functionName = value; } } // Check to see if FunctionName property is set internal bool IsSetFunctionName() { return this._functionName != null; } /// /// Gets and sets the property MaximumBatchingWindowInSeconds. /// /// The maximum amount of time to gather records before invoking the function, in seconds. /// /// [AWSProperty(Min=0, Max=300)] public int MaximumBatchingWindowInSeconds { get { return this._maximumBatchingWindowInSeconds.GetValueOrDefault(); } set { this._maximumBatchingWindowInSeconds = value; } } // Check to see if MaximumBatchingWindowInSeconds property is set internal bool IsSetMaximumBatchingWindowInSeconds() { return this._maximumBatchingWindowInSeconds.HasValue; } /// /// Gets and sets the property MaximumRecordAgeInSeconds. /// /// (Streams) The maximum age of a record that Lambda sends to a function for processing. /// /// [AWSProperty(Min=60, Max=604800)] public int MaximumRecordAgeInSeconds { get { return this._maximumRecordAgeInSeconds.GetValueOrDefault(); } set { this._maximumRecordAgeInSeconds = value; } } // Check to see if MaximumRecordAgeInSeconds property is set internal bool IsSetMaximumRecordAgeInSeconds() { return this._maximumRecordAgeInSeconds.HasValue; } /// /// Gets and sets the property MaximumRetryAttempts. /// /// (Streams) The maximum number of times to retry when the function returns an error. /// /// [AWSProperty(Min=0, Max=10000)] public int MaximumRetryAttempts { get { return this._maximumRetryAttempts.GetValueOrDefault(); } set { this._maximumRetryAttempts = value; } } // Check to see if MaximumRetryAttempts property is set internal bool IsSetMaximumRetryAttempts() { return this._maximumRetryAttempts.HasValue; } /// /// Gets and sets the property ParallelizationFactor. /// /// (Streams) The number of batches to process from each shard concurrently. /// /// [AWSProperty(Min=1, Max=10)] public int ParallelizationFactor { get { return this._parallelizationFactor.GetValueOrDefault(); } set { this._parallelizationFactor = value; } } // Check to see if ParallelizationFactor property is set internal bool IsSetParallelizationFactor() { return this._parallelizationFactor.HasValue; } /// /// Gets and sets the property StartingPosition. /// /// The position in a stream from which to start reading. Required for Amazon Kinesis /// and Amazon DynamoDB Streams sources. AT_TIMESTAMP is only supported for /// Amazon Kinesis streams. /// /// public EventSourcePosition StartingPosition { get { return this._startingPosition; } set { this._startingPosition = value; } } // Check to see if StartingPosition property is set internal bool IsSetStartingPosition() { return this._startingPosition != null; } /// /// Gets and sets the property StartingPositionTimestamp. /// /// With StartingPosition set to AT_TIMESTAMP, the time from /// which to start reading. /// /// public DateTime StartingPositionTimestamp { get { return this._startingPositionTimestamp.GetValueOrDefault(); } set { this._startingPositionTimestamp = value; } } // Check to see if StartingPositionTimestamp property is set internal bool IsSetStartingPositionTimestamp() { return this._startingPositionTimestamp.HasValue; } } }