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.

InvokeInput

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

type InvokeInput struct { ClientContext *string `location:"header" locationName:"X-Amz-Client-Context" type:"string"` FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` InvocationType *string `location:"header" locationName:"X-Amz-Invocation-Type" type:"string" enum:"InvocationType"` LogType *string `location:"header" locationName:"X-Amz-Log-Type" type:"string" enum:"LogType"` Payload []byte `type:"blob" sensitive:"true"` Qualifier *string `location:"querystring" locationName:"Qualifier" min:"1" type:"string"` }

ClientContext

Type: *string

Up to 3583 bytes of base64-encoded data about the invoking client to pass to the function in the context object.

FunctionName

Type: *string

The name of the Lambda function, version, or alias.

Name formats

  • Function name - my-function (name-only), my-function:v1 (with alias).

  • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function.

  • Partial ARN - 123456789012:function:my-function.

You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

FunctionName is a required field

InvocationType

Type: *string

Choose from the following options.

  • RequestResponse (default) - Invoke the function synchronously. Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.

  • Event - Invoke the function asynchronously. Send events that fail multiple times to the function's dead-letter queue (if it's configured). The API response only includes a status code.

  • DryRun - Validate parameter values and verify that the user or role has permission to invoke the function.

LogType

Type: *string

Set to Tail to include the execution log in the response.

Payload

Type: []byte

The JSON that you want to provide to your Lambda function as input.

Qualifier

Type: *string

Specify a version or alias to invoke a published version of the function.

Method

GoString

func (s InvokeInput) GoString() string

GoString returns the string representation

SetClientContext

func (s *InvokeInput) SetClientContext(v string) *InvokeInput

SetClientContext sets the ClientContext field's value.

SetFunctionName

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

SetFunctionName sets the FunctionName field's value.

SetInvocationType

func (s *InvokeInput) SetInvocationType(v string) *InvokeInput

SetInvocationType sets the InvocationType field's value.

SetLogType

func (s *InvokeInput) SetLogType(v string) *InvokeInput

SetLogType sets the LogType field's value.

SetPayload

func (s *InvokeInput) SetPayload(v []byte) *InvokeInput

SetPayload sets the Payload field's value.

SetQualifier

func (s *InvokeInput) SetQualifier(v string) *InvokeInput

SetQualifier sets the Qualifier field's value.

String

func (s InvokeInput) String() string

String returns the string representation

Validate

func (s *InvokeInput) Validate() error

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

On this page: