/** * 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 namespace Aws { namespace Lambda { namespace Model { /** */ class AWS_LAMBDA_API CreateEventSourceMappingRequest : public LambdaRequest { public: CreateEventSourceMappingRequest(); // 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 "CreateEventSourceMapping"; } Aws::String SerializePayload() const override; /** *

The Amazon Resource Name (ARN) of the event source.

  • * Amazon Kinesis - The ARN of the data stream or a stream consumer.

    *
  • Amazon DynamoDB Streams - The ARN of the stream.

  • *
  • Amazon Simple Queue Service - The ARN of the queue.

  • *
  • Amazon Managed Streaming for Apache Kafka - The ARN of the * cluster.

*/ inline const Aws::String& GetEventSourceArn() const{ return m_eventSourceArn; } /** *

The Amazon Resource Name (ARN) of the event source.

  • * Amazon Kinesis - The ARN of the data stream or a stream consumer.

    *
  • Amazon DynamoDB Streams - The ARN of the stream.

  • *
  • Amazon Simple Queue Service - The ARN of the queue.

  • *
  • Amazon Managed Streaming for Apache Kafka - The ARN of the * cluster.

*/ inline bool EventSourceArnHasBeenSet() const { return m_eventSourceArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the event source.

  • * Amazon Kinesis - The ARN of the data stream or a stream consumer.

    *
  • Amazon DynamoDB Streams - The ARN of the stream.

  • *
  • Amazon Simple Queue Service - The ARN of the queue.

  • *
  • Amazon Managed Streaming for Apache Kafka - The ARN of the * cluster.

*/ inline void SetEventSourceArn(const Aws::String& value) { m_eventSourceArnHasBeenSet = true; m_eventSourceArn = value; } /** *

The Amazon Resource Name (ARN) of the event source.

  • * Amazon Kinesis - The ARN of the data stream or a stream consumer.

    *
  • Amazon DynamoDB Streams - The ARN of the stream.

  • *
  • Amazon Simple Queue Service - The ARN of the queue.

  • *
  • Amazon Managed Streaming for Apache Kafka - The ARN of the * cluster.

*/ inline void SetEventSourceArn(Aws::String&& value) { m_eventSourceArnHasBeenSet = true; m_eventSourceArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the event source.

  • * Amazon Kinesis - The ARN of the data stream or a stream consumer.

    *
  • Amazon DynamoDB Streams - The ARN of the stream.

  • *
  • Amazon Simple Queue Service - The ARN of the queue.

  • *
  • Amazon Managed Streaming for Apache Kafka - The ARN of the * cluster.

*/ inline void SetEventSourceArn(const char* value) { m_eventSourceArnHasBeenSet = true; m_eventSourceArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the event source.

  • * Amazon Kinesis - The ARN of the data stream or a stream consumer.

    *
  • Amazon DynamoDB Streams - The ARN of the stream.

  • *
  • Amazon Simple Queue Service - The ARN of the queue.

  • *
  • Amazon Managed Streaming for Apache Kafka - The ARN of the * cluster.

*/ inline CreateEventSourceMappingRequest& WithEventSourceArn(const Aws::String& value) { SetEventSourceArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the event source.

  • * Amazon Kinesis - The ARN of the data stream or a stream consumer.

    *
  • Amazon DynamoDB Streams - The ARN of the stream.

  • *
  • Amazon Simple Queue Service - The ARN of the queue.

  • *
  • Amazon Managed Streaming for Apache Kafka - The ARN of the * cluster.

*/ inline CreateEventSourceMappingRequest& WithEventSourceArn(Aws::String&& value) { SetEventSourceArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the event source.

  • * Amazon Kinesis - The ARN of the data stream or a stream consumer.

    *
  • Amazon DynamoDB Streams - The ARN of the stream.

  • *
  • Amazon Simple Queue Service - The ARN of the queue.

  • *
  • Amazon Managed Streaming for Apache Kafka - The ARN of the * cluster.

*/ inline CreateEventSourceMappingRequest& WithEventSourceArn(const char* value) { SetEventSourceArn(value); return *this;} /** *

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.

*/ inline const Aws::String& GetFunctionName() const{ return m_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.

*/ inline bool FunctionNameHasBeenSet() const { return m_functionNameHasBeenSet; } /** *

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.

*/ inline void SetFunctionName(const Aws::String& value) { m_functionNameHasBeenSet = true; m_functionName = value; } /** *

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.

*/ inline void SetFunctionName(Aws::String&& value) { m_functionNameHasBeenSet = true; m_functionName = std::move(value); } /** *

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.

*/ inline void SetFunctionName(const char* value) { m_functionNameHasBeenSet = true; m_functionName.assign(value); } /** *

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.

*/ inline CreateEventSourceMappingRequest& WithFunctionName(const Aws::String& value) { SetFunctionName(value); return *this;} /** *

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.

*/ inline CreateEventSourceMappingRequest& WithFunctionName(Aws::String&& value) { SetFunctionName(std::move(value)); return *this;} /** *

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.

*/ inline CreateEventSourceMappingRequest& WithFunctionName(const char* value) { SetFunctionName(value); return *this;} /** *

If true, the event source mapping is active. Set to false to pause polling * and invocation.

*/ inline bool GetEnabled() const{ return m_enabled; } /** *

If true, the event source mapping is active. Set to false to pause polling * and invocation.

*/ inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } /** *

If true, the event source mapping is active. Set to false to pause polling * and invocation.

*/ inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } /** *

If true, the event source mapping is active. Set to false to pause polling * and invocation.

*/ inline CreateEventSourceMappingRequest& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

The maximum number of items to retrieve in a single batch.

  • * Amazon Kinesis - Default 100. Max 10,000.

  • Amazon * DynamoDB Streams - Default 100. Max 1,000.

  • Amazon * Simple Queue Service - Default 10. Max 10.

  • Amazon * Managed Streaming for Apache Kafka - Default 100. Max 10,000.

  • *
*/ inline int GetBatchSize() const{ return m_batchSize; } /** *

The maximum number of items to retrieve in a single batch.

  • * Amazon Kinesis - Default 100. Max 10,000.

  • Amazon * DynamoDB Streams - Default 100. Max 1,000.

  • Amazon * Simple Queue Service - Default 10. Max 10.

  • Amazon * Managed Streaming for Apache Kafka - Default 100. Max 10,000.

  • *
*/ inline bool BatchSizeHasBeenSet() const { return m_batchSizeHasBeenSet; } /** *

The maximum number of items to retrieve in a single batch.

  • * Amazon Kinesis - Default 100. Max 10,000.

  • Amazon * DynamoDB Streams - Default 100. Max 1,000.

  • Amazon * Simple Queue Service - Default 10. Max 10.

  • Amazon * Managed Streaming for Apache Kafka - Default 100. Max 10,000.

  • *
*/ inline void SetBatchSize(int value) { m_batchSizeHasBeenSet = true; m_batchSize = value; } /** *

The maximum number of items to retrieve in a single batch.

  • * Amazon Kinesis - Default 100. Max 10,000.

  • Amazon * DynamoDB Streams - Default 100. Max 1,000.

  • Amazon * Simple Queue Service - Default 10. Max 10.

  • Amazon * Managed Streaming for Apache Kafka - Default 100. Max 10,000.

  • *
*/ inline CreateEventSourceMappingRequest& WithBatchSize(int value) { SetBatchSize(value); return *this;} /** *

(Streams) The maximum amount of time to gather records before invoking the * function, in seconds.

*/ inline int GetMaximumBatchingWindowInSeconds() const{ return m_maximumBatchingWindowInSeconds; } /** *

(Streams) The maximum amount of time to gather records before invoking the * function, in seconds.

*/ inline bool MaximumBatchingWindowInSecondsHasBeenSet() const { return m_maximumBatchingWindowInSecondsHasBeenSet; } /** *

(Streams) The maximum amount of time to gather records before invoking the * function, in seconds.

*/ inline void SetMaximumBatchingWindowInSeconds(int value) { m_maximumBatchingWindowInSecondsHasBeenSet = true; m_maximumBatchingWindowInSeconds = value; } /** *

(Streams) The maximum amount of time to gather records before invoking the * function, in seconds.

*/ inline CreateEventSourceMappingRequest& WithMaximumBatchingWindowInSeconds(int value) { SetMaximumBatchingWindowInSeconds(value); return *this;} /** *

(Streams) The number of batches to process from each shard concurrently.

*/ inline int GetParallelizationFactor() const{ return m_parallelizationFactor; } /** *

(Streams) The number of batches to process from each shard concurrently.

*/ inline bool ParallelizationFactorHasBeenSet() const { return m_parallelizationFactorHasBeenSet; } /** *

(Streams) The number of batches to process from each shard concurrently.

*/ inline void SetParallelizationFactor(int value) { m_parallelizationFactorHasBeenSet = true; m_parallelizationFactor = value; } /** *

(Streams) The number of batches to process from each shard concurrently.

*/ inline CreateEventSourceMappingRequest& WithParallelizationFactor(int value) { SetParallelizationFactor(value); return *this;} /** *

The position in a stream from which to start reading. Required for Amazon * Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. * AT_TIMESTAMP is only supported for Amazon Kinesis streams.

*/ inline const EventSourcePosition& GetStartingPosition() const{ return m_startingPosition; } /** *

The position in a stream from which to start reading. Required for Amazon * Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. * AT_TIMESTAMP is only supported for Amazon Kinesis streams.

*/ inline bool StartingPositionHasBeenSet() const { return m_startingPositionHasBeenSet; } /** *

The position in a stream from which to start reading. Required for Amazon * Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. * AT_TIMESTAMP is only supported for Amazon Kinesis streams.

*/ inline void SetStartingPosition(const EventSourcePosition& value) { m_startingPositionHasBeenSet = true; m_startingPosition = value; } /** *

The position in a stream from which to start reading. Required for Amazon * Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. * AT_TIMESTAMP is only supported for Amazon Kinesis streams.

*/ inline void SetStartingPosition(EventSourcePosition&& value) { m_startingPositionHasBeenSet = true; m_startingPosition = std::move(value); } /** *

The position in a stream from which to start reading. Required for Amazon * Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. * AT_TIMESTAMP is only supported for Amazon Kinesis streams.

*/ inline CreateEventSourceMappingRequest& WithStartingPosition(const EventSourcePosition& value) { SetStartingPosition(value); return *this;} /** *

The position in a stream from which to start reading. Required for Amazon * Kinesis, Amazon DynamoDB, and Amazon MSK Streams sources. * AT_TIMESTAMP is only supported for Amazon Kinesis streams.

*/ inline CreateEventSourceMappingRequest& WithStartingPosition(EventSourcePosition&& value) { SetStartingPosition(std::move(value)); return *this;} /** *

With StartingPosition set to AT_TIMESTAMP, the time * from which to start reading.

*/ inline const Aws::Utils::DateTime& GetStartingPositionTimestamp() const{ return m_startingPositionTimestamp; } /** *

With StartingPosition set to AT_TIMESTAMP, the time * from which to start reading.

*/ inline bool StartingPositionTimestampHasBeenSet() const { return m_startingPositionTimestampHasBeenSet; } /** *

With StartingPosition set to AT_TIMESTAMP, the time * from which to start reading.

*/ inline void SetStartingPositionTimestamp(const Aws::Utils::DateTime& value) { m_startingPositionTimestampHasBeenSet = true; m_startingPositionTimestamp = value; } /** *

With StartingPosition set to AT_TIMESTAMP, the time * from which to start reading.

*/ inline void SetStartingPositionTimestamp(Aws::Utils::DateTime&& value) { m_startingPositionTimestampHasBeenSet = true; m_startingPositionTimestamp = std::move(value); } /** *

With StartingPosition set to AT_TIMESTAMP, the time * from which to start reading.

*/ inline CreateEventSourceMappingRequest& WithStartingPositionTimestamp(const Aws::Utils::DateTime& value) { SetStartingPositionTimestamp(value); return *this;} /** *

With StartingPosition set to AT_TIMESTAMP, the time * from which to start reading.

*/ inline CreateEventSourceMappingRequest& WithStartingPositionTimestamp(Aws::Utils::DateTime&& value) { SetStartingPositionTimestamp(std::move(value)); return *this;} /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline const DestinationConfig& GetDestinationConfig() const{ return m_destinationConfig; } /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline bool DestinationConfigHasBeenSet() const { return m_destinationConfigHasBeenSet; } /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline void SetDestinationConfig(const DestinationConfig& value) { m_destinationConfigHasBeenSet = true; m_destinationConfig = value; } /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline void SetDestinationConfig(DestinationConfig&& value) { m_destinationConfigHasBeenSet = true; m_destinationConfig = std::move(value); } /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline CreateEventSourceMappingRequest& WithDestinationConfig(const DestinationConfig& value) { SetDestinationConfig(value); return *this;} /** *

(Streams) An Amazon SQS queue or Amazon SNS topic destination for discarded * records.

*/ inline CreateEventSourceMappingRequest& WithDestinationConfig(DestinationConfig&& value) { SetDestinationConfig(std::move(value)); return *this;} /** *

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

*/ inline int GetMaximumRecordAgeInSeconds() const{ return m_maximumRecordAgeInSeconds; } /** *

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

*/ inline bool MaximumRecordAgeInSecondsHasBeenSet() const { return m_maximumRecordAgeInSecondsHasBeenSet; } /** *

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

*/ inline void SetMaximumRecordAgeInSeconds(int value) { m_maximumRecordAgeInSecondsHasBeenSet = true; m_maximumRecordAgeInSeconds = value; } /** *

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

*/ inline CreateEventSourceMappingRequest& WithMaximumRecordAgeInSeconds(int value) { SetMaximumRecordAgeInSeconds(value); return *this;} /** *

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

*/ inline bool GetBisectBatchOnFunctionError() const{ return m_bisectBatchOnFunctionError; } /** *

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

*/ inline bool BisectBatchOnFunctionErrorHasBeenSet() const { return m_bisectBatchOnFunctionErrorHasBeenSet; } /** *

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

*/ inline void SetBisectBatchOnFunctionError(bool value) { m_bisectBatchOnFunctionErrorHasBeenSet = true; m_bisectBatchOnFunctionError = value; } /** *

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

*/ inline CreateEventSourceMappingRequest& WithBisectBatchOnFunctionError(bool value) { SetBisectBatchOnFunctionError(value); return *this;} /** *

(Streams) Discard records after the specified number of retries. The default * value is infinite (-1). When set to infinite (-1), failed records will be * retried until the record expires.

*/ inline int GetMaximumRetryAttempts() const{ return m_maximumRetryAttempts; } /** *

(Streams) Discard records after the specified number of retries. The default * value is infinite (-1). When set to infinite (-1), failed records will be * retried until the record expires.

*/ inline bool MaximumRetryAttemptsHasBeenSet() const { return m_maximumRetryAttemptsHasBeenSet; } /** *

(Streams) Discard records after the specified number of retries. The default * value is infinite (-1). When set to infinite (-1), failed records will be * retried until the record expires.

*/ inline void SetMaximumRetryAttempts(int value) { m_maximumRetryAttemptsHasBeenSet = true; m_maximumRetryAttempts = value; } /** *

(Streams) Discard records after the specified number of retries. The default * value is infinite (-1). When set to infinite (-1), failed records will be * retried until the record expires.

*/ inline CreateEventSourceMappingRequest& WithMaximumRetryAttempts(int value) { SetMaximumRetryAttempts(value); return *this;} /** *

(MSK) The name of the Kafka topic.

*/ inline const Aws::Vector& GetTopics() const{ return m_topics; } /** *

(MSK) The name of the Kafka topic.

*/ inline bool TopicsHasBeenSet() const { return m_topicsHasBeenSet; } /** *

(MSK) The name of the Kafka topic.

*/ inline void SetTopics(const Aws::Vector& value) { m_topicsHasBeenSet = true; m_topics = value; } /** *

(MSK) The name of the Kafka topic.

*/ inline void SetTopics(Aws::Vector&& value) { m_topicsHasBeenSet = true; m_topics = std::move(value); } /** *

(MSK) The name of the Kafka topic.

*/ inline CreateEventSourceMappingRequest& WithTopics(const Aws::Vector& value) { SetTopics(value); return *this;} /** *

(MSK) The name of the Kafka topic.

*/ inline CreateEventSourceMappingRequest& WithTopics(Aws::Vector&& value) { SetTopics(std::move(value)); return *this;} /** *

(MSK) The name of the Kafka topic.

*/ inline CreateEventSourceMappingRequest& AddTopics(const Aws::String& value) { m_topicsHasBeenSet = true; m_topics.push_back(value); return *this; } /** *

(MSK) The name of the Kafka topic.

*/ inline CreateEventSourceMappingRequest& AddTopics(Aws::String&& value) { m_topicsHasBeenSet = true; m_topics.push_back(std::move(value)); return *this; } /** *

(MSK) The name of the Kafka topic.

*/ inline CreateEventSourceMappingRequest& AddTopics(const char* value) { m_topicsHasBeenSet = true; m_topics.push_back(value); return *this; } private: Aws::String m_eventSourceArn; bool m_eventSourceArnHasBeenSet; Aws::String m_functionName; bool m_functionNameHasBeenSet; bool m_enabled; bool m_enabledHasBeenSet; int m_batchSize; bool m_batchSizeHasBeenSet; int m_maximumBatchingWindowInSeconds; bool m_maximumBatchingWindowInSecondsHasBeenSet; int m_parallelizationFactor; bool m_parallelizationFactorHasBeenSet; EventSourcePosition m_startingPosition; bool m_startingPositionHasBeenSet; Aws::Utils::DateTime m_startingPositionTimestamp; bool m_startingPositionTimestampHasBeenSet; DestinationConfig m_destinationConfig; bool m_destinationConfigHasBeenSet; int m_maximumRecordAgeInSeconds; bool m_maximumRecordAgeInSecondsHasBeenSet; bool m_bisectBatchOnFunctionError; bool m_bisectBatchOnFunctionErrorHasBeenSet; int m_maximumRetryAttempts; bool m_maximumRetryAttemptsHasBeenSet; Aws::Vector m_topics; bool m_topicsHasBeenSet; }; } // namespace Model } // namespace Lambda } // namespace Aws