AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CreateEventSourceMappingInput

import "github.com/aws/aws-sdk-go/service/lambda"

type CreateEventSourceMappingInput struct { BatchSize *int64 `min:"1" type:"integer"` Enabled *bool `type:"boolean"` EventSourceArn *string `type:"string" required:"true"` FunctionName *string `min:"1" type:"string" required:"true"` StartingPosition *string `type:"string" enum:"EventSourcePosition"` StartingPositionTimestamp *time.Time `type:"timestamp"` }

BatchSize

Type: *int64

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.

Enabled

Type: *bool

Disables the event source mapping to pause polling and invocation.

EventSourceArn

Type: *string

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.

EventSourceArn is a required field

FunctionName

Type: *string

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.

FunctionName is a required field

StartingPosition

Type: *string

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.

StartingPositionTimestamp

Type: *time.Time

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

Method

GoString

func (s CreateEventSourceMappingInput) GoString() string

GoString returns the string representation

SetBatchSize

func (s *CreateEventSourceMappingInput) SetBatchSize(v int64) *CreateEventSourceMappingInput

SetBatchSize sets the BatchSize field's value.

SetEnabled

func (s *CreateEventSourceMappingInput) SetEnabled(v bool) *CreateEventSourceMappingInput

SetEnabled sets the Enabled field's value.

SetEventSourceArn

func (s *CreateEventSourceMappingInput) SetEventSourceArn(v string) *CreateEventSourceMappingInput

SetEventSourceArn sets the EventSourceArn field's value.

SetFunctionName

func (s *CreateEventSourceMappingInput) SetFunctionName(v string) *CreateEventSourceMappingInput

SetFunctionName sets the FunctionName field's value.

SetStartingPosition

func (s *CreateEventSourceMappingInput) SetStartingPosition(v string) *CreateEventSourceMappingInput

SetStartingPosition sets the StartingPosition field's value.

SetStartingPositionTimestamp

func (s *CreateEventSourceMappingInput) SetStartingPositionTimestamp(v time.Time) *CreateEventSourceMappingInput

SetStartingPositionTimestamp sets the StartingPositionTimestamp field's value.

String

func (s CreateEventSourceMappingInput) String() string

String returns the string representation

Validate

func (s *CreateEventSourceMappingInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: