/*
* Copyright 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 System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.Lambda.Model
{
///
/// Container for the parameters to the UpdateEventSourceMapping operation.
/// Updates an event source mapping. You can change the function that Lambda invokes,
/// or pause invocation and resume later from the same location.
///
///
///
/// For details about how to configure different event sources, see the following topics.
///
///
///
///
/// The following error handling options are available only for stream sources (DynamoDB
/// and Kinesis):
///
/// -
///
///
BisectBatchOnFunctionError
– If the function returns an error, split
/// the batch in two and retry.
///
/// -
///
///
DestinationConfig
– Send discarded records to an Amazon SQS queue or
/// Amazon SNS topic.
///
/// -
///
///
MaximumRecordAgeInSeconds
– Discard records older than the specified
/// age. The default value is infinite (-1). When set to infinite (-1), failed records
/// are retried until the record expires
///
/// -
///
///
MaximumRetryAttempts
– Discard records after the specified number of
/// retries. The default value is infinite (-1). When set to infinite (-1), failed records
/// are retried until the record expires.
///
/// -
///
///
ParallelizationFactor
– Process multiple batches from each shard concurrently.
///
///
///
/// For information about which configuration parameters apply to each event source, see
/// the following topics.
///
///
///
public partial class UpdateEventSourceMappingRequest : AmazonLambdaRequest
{
private int? _batchSize;
private bool? _bisectBatchOnFunctionError;
private DestinationConfig _destinationConfig;
private DocumentDBEventSourceConfig _documentDBEventSourceConfig;
private bool? _enabled;
private FilterCriteria _filterCriteria;
private string _functionName;
private List _functionResponseTypes = new List();
private int? _maximumBatchingWindowInSeconds;
private int? _maximumRecordAgeInSeconds;
private int? _maximumRetryAttempts;
private int? _parallelizationFactor;
private ScalingConfig _scalingConfig;
private List _sourceAccessConfigurations = new List();
private int? _tumblingWindowInSeconds;
private string _uuid;
///
/// Gets and sets the property BatchSize.
///
/// The maximum number of records in each batch that Lambda pulls from your stream or
/// queue and sends to your function. Lambda passes all of the records in the batch to
/// the function in a single call, up to the payload limit for synchronous invocation
/// (6 MB).
///
/// -
///
/// Amazon Kinesis – Default 100. Max 10,000.
///
///
-
///
/// Amazon DynamoDB Streams – Default 100. Max 10,000.
///
///
-
///
/// Amazon Simple Queue Service – Default 10. For standard queues the max is 10,000.
/// For FIFO queues the max is 10.
///
///
-
///
/// Amazon Managed Streaming for Apache Kafka – Default 100. Max 10,000.
///
///
-
///
/// Self-managed Apache Kafka – Default 100. Max 10,000.
///
///
-
///
/// Amazon MQ (ActiveMQ and RabbitMQ) – Default 100. Max 10,000.
///
///
-
///
/// DocumentDB – Default 100. Max 10,000.
///
///
///
[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.
///
/// (Kinesis and DynamoDB Streams only) 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.
///
/// (Kinesis and DynamoDB Streams only) A standard Amazon SQS queue or standard 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 DocumentDBEventSourceConfig.
///
/// Specific configuration settings for a DocumentDB event source.
///
///
public DocumentDBEventSourceConfig DocumentDBEventSourceConfig
{
get { return this._documentDBEventSourceConfig; }
set { this._documentDBEventSourceConfig = value; }
}
// Check to see if DocumentDBEventSourceConfig property is set
internal bool IsSetDocumentDBEventSourceConfig()
{
return this._documentDBEventSourceConfig != null;
}
///
/// Gets and sets the property Enabled.
///
/// When true, the event source mapping is active. When false, Lambda pauses polling and
/// invocation.
///
///
///
/// Default: True
///
///
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 FilterCriteria.
///
/// An object that defines the filter criteria that determine whether Lambda should process
/// an event. For more information, see Lambda
/// event filtering.
///
///
public FilterCriteria FilterCriteria
{
get { return this._filterCriteria; }
set { this._filterCriteria = value; }
}
// Check to see if FilterCriteria property is set
internal bool IsSetFilterCriteria()
{
return this._filterCriteria != null;
}
///
/// Gets and sets the property FunctionName.
///
/// The name of the Lambda function.
///
/// Name formats
///
///
-
///
/// Function name –
MyFunction
.
///
/// -
///
/// Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:MyFunction
.
///
/// -
///
/// Version or Alias ARN –
arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD
.
///
/// -
///
/// Partial ARN –
123456789012:function:MyFunction
.
///
///
///
/// 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(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 FunctionResponseTypes.
///
/// (Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type enums
/// applied to the event source mapping.
///
///
[AWSProperty(Min=0, Max=1)]
public List FunctionResponseTypes
{
get { return this._functionResponseTypes; }
set { this._functionResponseTypes = value; }
}
// Check to see if FunctionResponseTypes property is set
internal bool IsSetFunctionResponseTypes()
{
return this._functionResponseTypes != null && this._functionResponseTypes.Count > 0;
}
///
/// Gets and sets the property MaximumBatchingWindowInSeconds.
///
/// The maximum amount of time, in seconds, that Lambda spends gathering records before
/// invoking the function. You can configure MaximumBatchingWindowInSeconds
/// to any value from 0 seconds to 300 seconds in increments of seconds.
///
///
///
/// For streams and Amazon SQS event sources, the default batching window is 0 seconds.
/// For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources,
/// the default batching window is 500 ms. Note that because you can only change MaximumBatchingWindowInSeconds
/// in increments of seconds, you cannot revert back to the 500 ms default batching window
/// after you have changed it. To restore the default batching window, you must create
/// a new event source mapping.
///
///
///
/// Related setting: For streams and Amazon SQS event sources, when you set BatchSize
/// to a value greater than 10, you must set MaximumBatchingWindowInSeconds
/// to at least 1.
///
///
[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.
///
/// (Kinesis and DynamoDB Streams only) Discard records older than the specified age.
/// The default value is infinite (-1).
///
///
[AWSProperty(Min=-1, 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.
///
/// (Kinesis and DynamoDB Streams only) Discard records after the specified number of
/// retries. The default value is infinite (-1). When set to infinite (-1), failed records
/// are retried until the record expires.
///
///
[AWSProperty(Min=-1, 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.
///
/// (Kinesis and DynamoDB Streams only) 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 ScalingConfig.
///
/// (Amazon SQS only) The scaling configuration for the event source. For more information,
/// see Configuring
/// maximum concurrency for Amazon SQS event sources.
///
///
public ScalingConfig ScalingConfig
{
get { return this._scalingConfig; }
set { this._scalingConfig = value; }
}
// Check to see if ScalingConfig property is set
internal bool IsSetScalingConfig()
{
return this._scalingConfig != null;
}
///
/// Gets and sets the property SourceAccessConfigurations.
///
/// An array of authentication protocols or VPC components required to secure your event
/// source.
///
///
[AWSProperty(Min=0, Max=22)]
public List SourceAccessConfigurations
{
get { return this._sourceAccessConfigurations; }
set { this._sourceAccessConfigurations = value; }
}
// Check to see if SourceAccessConfigurations property is set
internal bool IsSetSourceAccessConfigurations()
{
return this._sourceAccessConfigurations != null && this._sourceAccessConfigurations.Count > 0;
}
///
/// Gets and sets the property TumblingWindowInSeconds.
///
/// (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window
/// for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no
/// tumbling window.
///
///
[AWSProperty(Min=0, Max=900)]
public int TumblingWindowInSeconds
{
get { return this._tumblingWindowInSeconds.GetValueOrDefault(); }
set { this._tumblingWindowInSeconds = value; }
}
// Check to see if TumblingWindowInSeconds property is set
internal bool IsSetTumblingWindowInSeconds()
{
return this._tumblingWindowInSeconds.HasValue;
}
///
/// Gets and sets the property UUID.
///
/// The identifier of the event source mapping.
///
///
[AWSProperty(Required=true)]
public string UUID
{
get { return this._uuid; }
set { this._uuid = value; }
}
// Check to see if UUID property is set
internal bool IsSetUUID()
{
return this._uuid != null;
}
}
}