/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Lambda { namespace Model { /** */ class UpdateEventSourceMappingRequest : public LambdaRequest { public: AWS_LAMBDA_API UpdateEventSourceMappingRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "UpdateEventSourceMapping"; } AWS_LAMBDA_API Aws::String SerializePayload() const override; ///@{ /** *

The identifier of the event source mapping.

*/ inline const Aws::String& GetUUID() const{ return m_uUID; } inline bool UUIDHasBeenSet() const { return m_uUIDHasBeenSet; } inline void SetUUID(const Aws::String& value) { m_uUIDHasBeenSet = true; m_uUID = value; } inline void SetUUID(Aws::String&& value) { m_uUIDHasBeenSet = true; m_uUID = std::move(value); } inline void SetUUID(const char* value) { m_uUIDHasBeenSet = true; m_uUID.assign(value); } inline UpdateEventSourceMappingRequest& WithUUID(const Aws::String& value) { SetUUID(value); return *this;} inline UpdateEventSourceMappingRequest& WithUUID(Aws::String&& value) { SetUUID(std::move(value)); return *this;} inline UpdateEventSourceMappingRequest& WithUUID(const char* value) { SetUUID(value); return *this;} ///@} ///@{ /** *

The name or ARN 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.

*/ inline const Aws::String& GetFunctionName() const{ return m_functionName; } inline bool FunctionNameHasBeenSet() const { return m_functionNameHasBeenSet; } inline void SetFunctionName(const Aws::String& value) { m_functionNameHasBeenSet = true; m_functionName = value; } inline void SetFunctionName(Aws::String&& value) { m_functionNameHasBeenSet = true; m_functionName = std::move(value); } inline void SetFunctionName(const char* value) { m_functionNameHasBeenSet = true; m_functionName.assign(value); } inline UpdateEventSourceMappingRequest& WithFunctionName(const Aws::String& value) { SetFunctionName(value); return *this;} inline UpdateEventSourceMappingRequest& WithFunctionName(Aws::String&& value) { SetFunctionName(std::move(value)); return *this;} inline UpdateEventSourceMappingRequest& WithFunctionName(const char* value) { SetFunctionName(value); return *this;} ///@} ///@{ /** *

When true, the event source mapping is active. When false, Lambda pauses * polling and invocation.

Default: True

*/ inline bool GetEnabled() const{ return m_enabled; } inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } inline UpdateEventSourceMappingRequest& WithEnabled(bool value) { SetEnabled(value); return *this;} ///@} ///@{ /** *

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.

*/ inline int GetBatchSize() const{ return m_batchSize; } inline bool BatchSizeHasBeenSet() const { return m_batchSizeHasBeenSet; } inline void SetBatchSize(int value) { m_batchSizeHasBeenSet = true; m_batchSize = value; } inline UpdateEventSourceMappingRequest& WithBatchSize(int value) { SetBatchSize(value); return *this;} ///@} ///@{ /** *

An object that defines the filter criteria that determine whether Lambda * should process an event. For more information, see Lambda * event filtering.

*/ inline const FilterCriteria& GetFilterCriteria() const{ return m_filterCriteria; } inline bool FilterCriteriaHasBeenSet() const { return m_filterCriteriaHasBeenSet; } inline void SetFilterCriteria(const FilterCriteria& value) { m_filterCriteriaHasBeenSet = true; m_filterCriteria = value; } inline void SetFilterCriteria(FilterCriteria&& value) { m_filterCriteriaHasBeenSet = true; m_filterCriteria = std::move(value); } inline UpdateEventSourceMappingRequest& WithFilterCriteria(const FilterCriteria& value) { SetFilterCriteria(value); return *this;} inline UpdateEventSourceMappingRequest& WithFilterCriteria(FilterCriteria&& value) { SetFilterCriteria(std::move(value)); return *this;} ///@} ///@{ /** *

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 Kinesis, DynamoDB, 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 Kinesis, DynamoDB, and Amazon SQS event * sources, when you set BatchSize to a value greater than 10, you * must set MaximumBatchingWindowInSeconds to at least 1.

*/ inline int GetMaximumBatchingWindowInSeconds() const{ return m_maximumBatchingWindowInSeconds; } inline bool MaximumBatchingWindowInSecondsHasBeenSet() const { return m_maximumBatchingWindowInSecondsHasBeenSet; } inline void SetMaximumBatchingWindowInSeconds(int value) { m_maximumBatchingWindowInSecondsHasBeenSet = true; m_maximumBatchingWindowInSeconds = value; } inline UpdateEventSourceMappingRequest& WithMaximumBatchingWindowInSeconds(int value) { SetMaximumBatchingWindowInSeconds(value); return *this;} ///@} ///@{ /** *

(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only) A * configuration object that specifies the destination of an event after Lambda * processes it.

*/ inline const DestinationConfig& GetDestinationConfig() const{ return m_destinationConfig; } inline bool DestinationConfigHasBeenSet() const { return m_destinationConfigHasBeenSet; } inline void SetDestinationConfig(const DestinationConfig& value) { m_destinationConfigHasBeenSet = true; m_destinationConfig = value; } inline void SetDestinationConfig(DestinationConfig&& value) { m_destinationConfigHasBeenSet = true; m_destinationConfig = std::move(value); } inline UpdateEventSourceMappingRequest& WithDestinationConfig(const DestinationConfig& value) { SetDestinationConfig(value); return *this;} inline UpdateEventSourceMappingRequest& WithDestinationConfig(DestinationConfig&& value) { SetDestinationConfig(std::move(value)); return *this;} ///@} ///@{ /** *

(Kinesis and DynamoDB Streams only) Discard records older than the specified * age. The default value is infinite (-1).

*/ inline int GetMaximumRecordAgeInSeconds() const{ return m_maximumRecordAgeInSeconds; } inline bool MaximumRecordAgeInSecondsHasBeenSet() const { return m_maximumRecordAgeInSecondsHasBeenSet; } inline void SetMaximumRecordAgeInSeconds(int value) { m_maximumRecordAgeInSecondsHasBeenSet = true; m_maximumRecordAgeInSeconds = value; } inline UpdateEventSourceMappingRequest& WithMaximumRecordAgeInSeconds(int value) { SetMaximumRecordAgeInSeconds(value); return *this;} ///@} ///@{ /** *

(Kinesis and DynamoDB Streams only) If the function returns an error, split * the batch in two and retry.

*/ inline bool GetBisectBatchOnFunctionError() const{ return m_bisectBatchOnFunctionError; } inline bool BisectBatchOnFunctionErrorHasBeenSet() const { return m_bisectBatchOnFunctionErrorHasBeenSet; } inline void SetBisectBatchOnFunctionError(bool value) { m_bisectBatchOnFunctionErrorHasBeenSet = true; m_bisectBatchOnFunctionError = value; } inline UpdateEventSourceMappingRequest& WithBisectBatchOnFunctionError(bool value) { SetBisectBatchOnFunctionError(value); return *this;} ///@} ///@{ /** *

(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.

*/ inline int GetMaximumRetryAttempts() const{ return m_maximumRetryAttempts; } inline bool MaximumRetryAttemptsHasBeenSet() const { return m_maximumRetryAttemptsHasBeenSet; } inline void SetMaximumRetryAttempts(int value) { m_maximumRetryAttemptsHasBeenSet = true; m_maximumRetryAttempts = value; } inline UpdateEventSourceMappingRequest& WithMaximumRetryAttempts(int value) { SetMaximumRetryAttempts(value); return *this;} ///@} ///@{ /** *

(Kinesis and DynamoDB Streams only) The number of batches to process from * each shard concurrently.

*/ inline int GetParallelizationFactor() const{ return m_parallelizationFactor; } inline bool ParallelizationFactorHasBeenSet() const { return m_parallelizationFactorHasBeenSet; } inline void SetParallelizationFactor(int value) { m_parallelizationFactorHasBeenSet = true; m_parallelizationFactor = value; } inline UpdateEventSourceMappingRequest& WithParallelizationFactor(int value) { SetParallelizationFactor(value); return *this;} ///@} ///@{ /** *

An array of authentication protocols or VPC components required to secure * your event source.

*/ inline const Aws::Vector& GetSourceAccessConfigurations() const{ return m_sourceAccessConfigurations; } inline bool SourceAccessConfigurationsHasBeenSet() const { return m_sourceAccessConfigurationsHasBeenSet; } inline void SetSourceAccessConfigurations(const Aws::Vector& value) { m_sourceAccessConfigurationsHasBeenSet = true; m_sourceAccessConfigurations = value; } inline void SetSourceAccessConfigurations(Aws::Vector&& value) { m_sourceAccessConfigurationsHasBeenSet = true; m_sourceAccessConfigurations = std::move(value); } inline UpdateEventSourceMappingRequest& WithSourceAccessConfigurations(const Aws::Vector& value) { SetSourceAccessConfigurations(value); return *this;} inline UpdateEventSourceMappingRequest& WithSourceAccessConfigurations(Aws::Vector&& value) { SetSourceAccessConfigurations(std::move(value)); return *this;} inline UpdateEventSourceMappingRequest& AddSourceAccessConfigurations(const SourceAccessConfiguration& value) { m_sourceAccessConfigurationsHasBeenSet = true; m_sourceAccessConfigurations.push_back(value); return *this; } inline UpdateEventSourceMappingRequest& AddSourceAccessConfigurations(SourceAccessConfiguration&& value) { m_sourceAccessConfigurationsHasBeenSet = true; m_sourceAccessConfigurations.push_back(std::move(value)); return *this; } ///@} ///@{ /** *

(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.

*/ inline int GetTumblingWindowInSeconds() const{ return m_tumblingWindowInSeconds; } inline bool TumblingWindowInSecondsHasBeenSet() const { return m_tumblingWindowInSecondsHasBeenSet; } inline void SetTumblingWindowInSeconds(int value) { m_tumblingWindowInSecondsHasBeenSet = true; m_tumblingWindowInSeconds = value; } inline UpdateEventSourceMappingRequest& WithTumblingWindowInSeconds(int value) { SetTumblingWindowInSeconds(value); return *this;} ///@} ///@{ /** *

(Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type * enums applied to the event source mapping.

*/ inline const Aws::Vector& GetFunctionResponseTypes() const{ return m_functionResponseTypes; } inline bool FunctionResponseTypesHasBeenSet() const { return m_functionResponseTypesHasBeenSet; } inline void SetFunctionResponseTypes(const Aws::Vector& value) { m_functionResponseTypesHasBeenSet = true; m_functionResponseTypes = value; } inline void SetFunctionResponseTypes(Aws::Vector&& value) { m_functionResponseTypesHasBeenSet = true; m_functionResponseTypes = std::move(value); } inline UpdateEventSourceMappingRequest& WithFunctionResponseTypes(const Aws::Vector& value) { SetFunctionResponseTypes(value); return *this;} inline UpdateEventSourceMappingRequest& WithFunctionResponseTypes(Aws::Vector&& value) { SetFunctionResponseTypes(std::move(value)); return *this;} inline UpdateEventSourceMappingRequest& AddFunctionResponseTypes(const FunctionResponseType& value) { m_functionResponseTypesHasBeenSet = true; m_functionResponseTypes.push_back(value); return *this; } inline UpdateEventSourceMappingRequest& AddFunctionResponseTypes(FunctionResponseType&& value) { m_functionResponseTypesHasBeenSet = true; m_functionResponseTypes.push_back(std::move(value)); return *this; } ///@} ///@{ /** *

(Amazon SQS only) The scaling configuration for the event source. For more * information, see Configuring * maximum concurrency for Amazon SQS event sources.

*/ inline const ScalingConfig& GetScalingConfig() const{ return m_scalingConfig; } inline bool ScalingConfigHasBeenSet() const { return m_scalingConfigHasBeenSet; } inline void SetScalingConfig(const ScalingConfig& value) { m_scalingConfigHasBeenSet = true; m_scalingConfig = value; } inline void SetScalingConfig(ScalingConfig&& value) { m_scalingConfigHasBeenSet = true; m_scalingConfig = std::move(value); } inline UpdateEventSourceMappingRequest& WithScalingConfig(const ScalingConfig& value) { SetScalingConfig(value); return *this;} inline UpdateEventSourceMappingRequest& WithScalingConfig(ScalingConfig&& value) { SetScalingConfig(std::move(value)); return *this;} ///@} ///@{ /** *

Specific configuration settings for a DocumentDB event source.

*/ inline const DocumentDBEventSourceConfig& GetDocumentDBEventSourceConfig() const{ return m_documentDBEventSourceConfig; } inline bool DocumentDBEventSourceConfigHasBeenSet() const { return m_documentDBEventSourceConfigHasBeenSet; } inline void SetDocumentDBEventSourceConfig(const DocumentDBEventSourceConfig& value) { m_documentDBEventSourceConfigHasBeenSet = true; m_documentDBEventSourceConfig = value; } inline void SetDocumentDBEventSourceConfig(DocumentDBEventSourceConfig&& value) { m_documentDBEventSourceConfigHasBeenSet = true; m_documentDBEventSourceConfig = std::move(value); } inline UpdateEventSourceMappingRequest& WithDocumentDBEventSourceConfig(const DocumentDBEventSourceConfig& value) { SetDocumentDBEventSourceConfig(value); return *this;} inline UpdateEventSourceMappingRequest& WithDocumentDBEventSourceConfig(DocumentDBEventSourceConfig&& value) { SetDocumentDBEventSourceConfig(std::move(value)); return *this;} ///@} ///@{ /** *

The ARN of the Key Management Service (KMS) customer managed key that Lambda * uses to encrypt your function's filter * criteria. By default, Lambda does not encrypt your filter criteria object. * Specify this property to encrypt data using your own customer managed key.

*/ inline const Aws::String& GetKMSKeyArn() const{ return m_kMSKeyArn; } inline bool KMSKeyArnHasBeenSet() const { return m_kMSKeyArnHasBeenSet; } inline void SetKMSKeyArn(const Aws::String& value) { m_kMSKeyArnHasBeenSet = true; m_kMSKeyArn = value; } inline void SetKMSKeyArn(Aws::String&& value) { m_kMSKeyArnHasBeenSet = true; m_kMSKeyArn = std::move(value); } inline void SetKMSKeyArn(const char* value) { m_kMSKeyArnHasBeenSet = true; m_kMSKeyArn.assign(value); } inline UpdateEventSourceMappingRequest& WithKMSKeyArn(const Aws::String& value) { SetKMSKeyArn(value); return *this;} inline UpdateEventSourceMappingRequest& WithKMSKeyArn(Aws::String&& value) { SetKMSKeyArn(std::move(value)); return *this;} inline UpdateEventSourceMappingRequest& WithKMSKeyArn(const char* value) { SetKMSKeyArn(value); return *this;} ///@} private: Aws::String m_uUID; bool m_uUIDHasBeenSet = false; Aws::String m_functionName; bool m_functionNameHasBeenSet = false; bool m_enabled; bool m_enabledHasBeenSet = false; int m_batchSize; bool m_batchSizeHasBeenSet = false; FilterCriteria m_filterCriteria; bool m_filterCriteriaHasBeenSet = false; int m_maximumBatchingWindowInSeconds; bool m_maximumBatchingWindowInSecondsHasBeenSet = false; DestinationConfig m_destinationConfig; bool m_destinationConfigHasBeenSet = false; int m_maximumRecordAgeInSeconds; bool m_maximumRecordAgeInSecondsHasBeenSet = false; bool m_bisectBatchOnFunctionError; bool m_bisectBatchOnFunctionErrorHasBeenSet = false; int m_maximumRetryAttempts; bool m_maximumRetryAttemptsHasBeenSet = false; int m_parallelizationFactor; bool m_parallelizationFactorHasBeenSet = false; Aws::Vector m_sourceAccessConfigurations; bool m_sourceAccessConfigurationsHasBeenSet = false; int m_tumblingWindowInSeconds; bool m_tumblingWindowInSecondsHasBeenSet = false; Aws::Vector m_functionResponseTypes; bool m_functionResponseTypesHasBeenSet = false; ScalingConfig m_scalingConfig; bool m_scalingConfigHasBeenSet = false; DocumentDBEventSourceConfig m_documentDBEventSourceConfig; bool m_documentDBEventSourceConfigHasBeenSet = false; Aws::String m_kMSKeyArn; bool m_kMSKeyArnHasBeenSet = false; }; } // namespace Model } // namespace Lambda } // namespace Aws