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.

UpdateFunctionCodeInput

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

type UpdateFunctionCodeInput struct { DryRun *bool `type:"boolean"` FunctionName *string `location:"uri" locationName:"FunctionName" min:"1" type:"string" required:"true"` Publish *bool `type:"boolean"` RevisionId *string `type:"string"` S3Bucket *string `min:"3" type:"string"` S3Key *string `min:"1" type:"string"` S3ObjectVersion *string `min:"1" type:"string"` ZipFile []byte `type:"blob" sensitive:"true"` }

DryRun

Type: *bool

Set to true to validate the request parameters and access permissions without modifying the function code.

FunctionName

Type: *string

The name of the Lambda function.

Name formats

  • Function name - my-function.

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

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

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

Publish

Type: *bool

Set to true to publish a new version of the function after updating the code. This has the same effect as calling PublishVersion separately.

RevisionId

Type: *string

Only update the function if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.

S3Bucket

Type: *string

An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.

S3Key

Type: *string

The Amazon S3 key of the deployment package.

S3ObjectVersion

Type: *string

For versioned objects, the version of the deployment package object to use.

ZipFile

Type: []byte

The base64-encoded contents of the deployment package. AWS SDK and AWS CLI clients handle the encoding for you.

ZipFile is automatically base64 encoded/decoded by the SDK.

Method

GoString

func (s UpdateFunctionCodeInput) GoString() string

GoString returns the string representation

SetDryRun

func (s *UpdateFunctionCodeInput) SetDryRun(v bool) *UpdateFunctionCodeInput

SetDryRun sets the DryRun field's value.

SetFunctionName

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

SetFunctionName sets the FunctionName field's value.

SetPublish

func (s *UpdateFunctionCodeInput) SetPublish(v bool) *UpdateFunctionCodeInput

SetPublish sets the Publish field's value.

SetRevisionId

func (s *UpdateFunctionCodeInput) SetRevisionId(v string) *UpdateFunctionCodeInput

SetRevisionId sets the RevisionId field's value.

SetS3Bucket

func (s *UpdateFunctionCodeInput) SetS3Bucket(v string) *UpdateFunctionCodeInput

SetS3Bucket sets the S3Bucket field's value.

SetS3Key

func (s *UpdateFunctionCodeInput) SetS3Key(v string) *UpdateFunctionCodeInput

SetS3Key sets the S3Key field's value.

SetS3ObjectVersion

func (s *UpdateFunctionCodeInput) SetS3ObjectVersion(v string) *UpdateFunctionCodeInput

SetS3ObjectVersion sets the S3ObjectVersion field's value.

SetZipFile

func (s *UpdateFunctionCodeInput) SetZipFile(v []byte) *UpdateFunctionCodeInput

SetZipFile sets the ZipFile field's value.

String

func (s UpdateFunctionCodeInput) String() string

String returns the string representation

Validate

func (s *UpdateFunctionCodeInput) Validate() error

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

On this page: