import "github.com/aws/aws-lambda-go/events"
alb.go apigw.go appsync.go attributevalue.go autoscaling.go cloudwatch_events.go cloudwatch_logs.go code_commit.go codepipeline_job.go cognito.go config.go connect.go dynamodb.go epoch_time.go firehose.go iot_button.go kinesis.go lex.go s3.go ses.go sns.go sqs.go
const ( KinesisFirehoseTransformedStateOk = "Ok" KinesisFirehoseTransformedStateDropped = "Dropped" KinesisFirehoseTransformedStateProcessingFailed = "ProcessingFailed" )
Constants used for describing the transformation result
type ALBTargetGroupRequest struct { HTTPMethod string `json:"httpMethod"` Path string `json:"path"` QueryStringParameters map[string]string `json:"queryStringParameters,omitempty"` MultiValueQueryStringParameters map[string][]string `json:"multiValueQueryStringParameters,omitempty"` Headers map[string]string `json:"headers,omitempty"` MultiValueHeaders map[string][]string `json:"multiValueHeaders,omitempty"` RequestContext ALBTargetGroupRequestContext `json:"requestContext"` IsBase64Encoded bool `json:"isBase64Encoded"` Body string `json:"body"` }
ALBTargetGroupRequest contains data originating from the ALB Lambda target group integration
type ALBTargetGroupRequestContext struct { ELB ELBContext `json:"elb"` }
ALBTargetGroupRequestContext contains the information to identify the load balancer invoking the lambda
type ALBTargetGroupResponse struct { StatusCode int `json:"statusCode"` StatusDescription string `json:"statusDescription"` Headers map[string]string `json:"headers"` MultiValueHeaders map[string][]string `json:"multiValueHeaders"` Body string `json:"body"` IsBase64Encoded bool `json:"isBase64Encoded"` }
ALBTargetGroupResponse configures the response to be returned by the ALB Lambda target group for the request
type APIGatewayCustomAuthorizerContext struct { PrincipalID *string `json:"principalId"` StringKey *string `json:"stringKey,omitempty"` NumKey *int `json:"numKey,omitempty"` BoolKey *bool `json:"boolKey,omitempty"` }
APIGatewayCustomAuthorizerContext represents the expected format of an API Gateway custom authorizer response. Deprecated. Code should be updated to use the Authorizer map from APIGatewayRequestIdentity. Ex: Authorizer["principalId"]
type APIGatewayCustomAuthorizerPolicy struct { Version string Statement []IAMPolicyStatement }
APIGatewayCustomAuthorizerPolicy represents an IAM policy
type APIGatewayCustomAuthorizerRequest struct { Type string `json:"type"` AuthorizationToken string `json:"authorizationToken"` MethodArn string `json:"methodArn"` }
APIGatewayCustomAuthorizerRequest contains data coming in to a custom API Gateway authorizer function.
type APIGatewayCustomAuthorizerRequestTypeRequest struct { Type string `json:"type"` MethodArn string `json:"methodArn"` Resource string `json:"resource"` Path string `json:"path"` HTTPMethod string `json:"httpMethod"` Headers map[string]string `json:"headers"` MultiValueHeaders map[string][]string `json:"multiValueHeaders"` QueryStringParameters map[string]string `json:"queryStringParameters"` MultiValueQueryStringParameters map[string][]string `json:"multiValueQueryStringParameters"` PathParameters map[string]string `json:"pathParameters"` StageVariables map[string]string `json:"stageVariables"` RequestContext APIGatewayCustomAuthorizerRequestTypeRequestContext `json:"requestContext"` }
APIGatewayCustomAuthorizerRequestTypeRequest contains data coming in to a custom API Gateway authorizer function.
type APIGatewayCustomAuthorizerRequestTypeRequestContext struct { Path string `json:"path"` AccountID string `json:"accountId"` ResourceID string `json:"resourceId"` Stage string `json:"stage"` RequestID string `json:"requestId"` Identity APIGatewayCustomAuthorizerRequestTypeRequestIdentity `json:"identity"` ResourcePath string `json:"resourcePath"` HTTPMethod string `json:"httpMethod"` APIID string `json:"apiId"` }
APIGatewayCustomAuthorizerRequestTypeRequestContext represents the expected format of an API Gateway custom authorizer response.
type APIGatewayCustomAuthorizerRequestTypeRequestIdentity struct { APIKey string `json:"apiKey"` SourceIP string `json:"sourceIp"` }
APIGatewayCustomAuthorizerRequestTypeRequestIdentity contains identity information for the request caller.
type APIGatewayCustomAuthorizerResponse struct { PrincipalID string `json:"principalId"` PolicyDocument APIGatewayCustomAuthorizerPolicy `json:"policyDocument"` Context map[string]interface{} `json:"context,omitempty"` UsageIdentifierKey string `json:"usageIdentifierKey,omitempty"` }
APIGatewayCustomAuthorizerResponse represents the expected format of an API Gateway authorization response.
type APIGatewayProxyRequest struct { Resource string `json:"resource"` // The resource path defined in API Gateway Path string `json:"path"` // The url path for the caller HTTPMethod string `json:"httpMethod"` Headers map[string]string `json:"headers"` MultiValueHeaders map[string][]string `json:"multiValueHeaders"` QueryStringParameters map[string]string `json:"queryStringParameters"` MultiValueQueryStringParameters map[string][]string `json:"multiValueQueryStringParameters"` PathParameters map[string]string `json:"pathParameters"` StageVariables map[string]string `json:"stageVariables"` RequestContext APIGatewayProxyRequestContext `json:"requestContext"` Body string `json:"body"` IsBase64Encoded bool `json:"isBase64Encoded,omitempty"` }
APIGatewayProxyRequest contains data coming from the API Gateway proxy
type APIGatewayProxyRequestContext struct { AccountID string `json:"accountId"` ResourceID string `json:"resourceId"` Stage string `json:"stage"` RequestID string `json:"requestId"` Identity APIGatewayRequestIdentity `json:"identity"` ResourcePath string `json:"resourcePath"` Authorizer map[string]interface{} `json:"authorizer"` HTTPMethod string `json:"httpMethod"` APIID string `json:"apiId"` // The API Gateway rest API Id }
APIGatewayProxyRequestContext contains the information to identify the AWS account and resources invoking the Lambda function. It also includes Cognito identity information for the caller.
type APIGatewayProxyResponse struct { StatusCode int `json:"statusCode"` Headers map[string]string `json:"headers"` MultiValueHeaders map[string][]string `json:"multiValueHeaders"` Body string `json:"body"` IsBase64Encoded bool `json:"isBase64Encoded,omitempty"` }
APIGatewayProxyResponse configures the response to be returned by API Gateway for the request
type APIGatewayRequestIdentity struct { CognitoIdentityPoolID string `json:"cognitoIdentityPoolId"` AccountID string `json:"accountId"` CognitoIdentityID string `json:"cognitoIdentityId"` Caller string `json:"caller"` APIKey string `json:"apiKey"` AccessKey string `json:"accessKey"` SourceIP string `json:"sourceIp"` CognitoAuthenticationType string `json:"cognitoAuthenticationType"` CognitoAuthenticationProvider string `json:"cognitoAuthenticationProvider"` UserArn string `json:"userArn"` UserAgent string `json:"userAgent"` User string `json:"user"` }
APIGatewayRequestIdentity contains identity information for the request caller.
type APIGatewayWebsocketProxyRequest struct { Resource string `json:"resource"` // The resource path defined in API Gateway Path string `json:"path"` // The url path for the caller HTTPMethod string `json:"httpMethod"` Headers map[string]string `json:"headers"` MultiValueHeaders map[string][]string `json:"multiValueHeaders"` QueryStringParameters map[string]string `json:"queryStringParameters"` MultiValueQueryStringParameters map[string][]string `json:"multiValueQueryStringParameters"` PathParameters map[string]string `json:"pathParameters"` StageVariables map[string]string `json:"stageVariables"` RequestContext APIGatewayWebsocketProxyRequestContext `json:"requestContext"` Body string `json:"body"` IsBase64Encoded bool `json:"isBase64Encoded,omitempty"` }
APIGatewayWebsocketProxyRequest contains data coming from the API Gateway proxy
type APIGatewayWebsocketProxyRequestContext struct { AccountID string `json:"accountId"` ResourceID string `json:"resourceId"` Stage string `json:"stage"` RequestID string `json:"requestId"` Identity APIGatewayRequestIdentity `json:"identity"` ResourcePath string `json:"resourcePath"` Authorizer interface{} `json:"authorizer"` HTTPMethod string `json:"httpMethod"` APIID string `json:"apiId"` // The API Gateway rest API Id ConnectedAt int64 `json:"connectedAt"` ConnectionID string `json:"connectionId"` DomainName string `json:"domainName"` Error string `json:"error"` EventType string `json:"eventType"` ExtendedRequestID string `json:"extendedRequestId"` IntegrationLatency string `json:"integrationLatency"` MessageDirection string `json:"messageDirection"` MessageID interface{} `json:"messageId"` RequestTime string `json:"requestTime"` RequestTimeEpoch int64 `json:"requestTimeEpoch"` RouteKey string `json:"routeKey"` Status string `json:"status"` }
APIGatewayWebsocketProxyRequestContext contains the information to identify the AWS account and resources invoking the Lambda function. It also includes Cognito identity information for the caller.
AppSyncOperation specifies the operation type supported by Lambda operations
const ( // OperationInvoke lets AWS AppSync know to call your Lambda function for every GraphQL field resolver OperationInvoke AppSyncOperation = "Invoke" // OperationBatchInvoke instructs AWS AppSync to batch requests for the current GraphQL field OperationBatchInvoke AppSyncOperation = "BatchInvoke" )
type AppSyncResolverTemplate struct { Version string `json:"version"` Operation AppSyncOperation `json:"operation"` Payload json.RawMessage `json:"payload"` }
AppSyncResolverTemplate represents the requests from AppSync to Lambda
type Attachment struct { Title string `json:"title,omitempty"` SubTitle string `json:"subTitle,omitempty"` ImageURL string `json:"imageUrl,omitempty"` AttachmentLinkURL string `json:"attachmentLinkUrl,omitempty"` Buttons []map[string]string `json:"buttons,omitempty"` }
type AutoScalingEvent struct { Version string `json:"version"` // The version of event data ID string `json:"id"` // The unique ID of the event DetailType string `json:"detail-type"` //Details about event type Source string `json:"source"` //Source of the event AccountID string `json:"account"` //AccountId Time time.Time `json:"time"` //Event timestamp Region string `json:"region"` //Region of event Resources []string `json:"resources"` //Information about resources impacted by event Detail map[string]interface{} `json:"detail"` }
AutoScalingEvent struct is used to parse the json for auto scaling event types //
type ClaimsOverrideDetails struct { GroupOverrideDetails GroupConfiguration `json:"groupOverrideDetails"` ClaimsToAddOrOverride map[string]string `json:"claimsToAddOrOverride"` ClaimsToSuppress []string `json:"claimsToSuppress"` }
ClaimsOverrideDetails allows lambda to add, supress or override claims in the token
type CloudWatchEvent struct { Version string `json:"version"` ID string `json:"id"` DetailType string `json:"detail-type"` Source string `json:"source"` AccountID string `json:"account"` Time time.Time `json:"time"` Region string `json:"region"` Resources []string `json:"resources"` Detail json.RawMessage `json:"detail"` }
CloudWatchEvent is the outer structure of an event sent via CloudWatch Events. For examples of events that come via CloudWatch Events, see https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html
type CloudwatchLogsData struct { Owner string `json:"owner"` LogGroup string `json:"logGroup"` LogStream string `json:"logStream"` SubscriptionFilters []string `json:"subscriptionFilters"` MessageType string `json:"messageType"` LogEvents []CloudwatchLogsLogEvent `json:"logEvents"` }
CloudwatchLogsData is an unmarshal'd, ungzip'd, cloudwatch logs event
type CloudwatchLogsEvent struct { AWSLogs CloudwatchLogsRawData `json:"awslogs"` }
CloudwatchLogsEvent represents raw data from a cloudwatch logs event
type CloudwatchLogsLogEvent struct { ID string `json:"id"` Timestamp int64 `json:"timestamp"` Message string `json:"message"` }
LogEvent represents a log entry from cloudwatch logs
CloudwatchLogsRawData contains gzipped base64 json representing the bulk of a cloudwatch logs event
func (c CloudwatchLogsRawData) Parse() (d CloudwatchLogsData, err error)
Parse returns a struct representing a usable CloudwatchLogs event
type CodeCommitCodeCommit struct { References []CodeCommitReference `json:"references"` }
CodeCommitCodeCommit represents a CodeCommit object in a record
func (c CodeCommitCodeCommit) String() string
String returns a string representation of this object. Useful for testing and debugging.
type CodeCommitEvent struct { Records []CodeCommitRecord `json:"Records"` }
CodeCommitEvent represents a CodeCommit event
func (e CodeCommitEvent) String() string
String returns a string representation of this object. Useful for testing and debugging.
func (t *CodeCommitEventTime) MarshalJSON() ([]byte, error)
func (t *CodeCommitEventTime) UnmarshalJSON(data []byte) error
type CodeCommitRecord struct { EventID string `json:"eventId"` EventVersion string `json:"eventVersion"` EventTime CodeCommitEventTime `json:"eventTime"` EventTriggerName string `json:"eventTriggerName"` EventPartNumber uint64 `json:"eventPartNumber"` CodeCommit CodeCommitCodeCommit `json:"codecommit"` EventName string `json:"eventName"` EventTriggerConfigId string `json:"eventTriggerConfigId"` EventSourceARN string `json:"eventSourceARN"` UserIdentityARN string `json:"userIdentityARN"` EventSource string `json:"eventSource"` AWSRegion string `json:"awsRegion"` EventTotalParts uint64 `json:"eventTotalParts"` CustomData string `json:"customData,omitempty"` }
represents a CodeCommit record
func (r CodeCommitRecord) String() string
String returns a string representation of this object. Useful for testing and debugging.
type CodeCommitReference struct { Commit string `json:"commit"` Ref string `json:"ref"` Created bool `json:"created,omitempty"` }
CodeCommitReference represents a Reference object in a CodeCommit object
func (r CodeCommitReference) String() string
String returns a string representation of this object. Useful for testing and debugging.
type CodePipelineActionConfiguration struct { Configuration CodePipelineConfiguration `json:"configuration"` }
CodePipelineActionConfiguration represents an Action Configuration
type CodePipelineArtifactCredentials struct { SecretAccessKey string `json:"secretAccessKey"` SessionToken string `json:"sessionToken"` AccessKeyID string `json:"accessKeyId"` }
CodePipelineArtifactCredentials represents CodePipeline artifact credentials
type CodePipelineConfiguration struct { FunctionName string `json:"FunctionName"` UserParameters string `json:"UserParameters"` }
CodePipelineConfiguration represents a configuration for an Action Configuration
type CodePipelineData struct { ActionConfiguration CodePipelineActionConfiguration `json:"actionConfiguration"` InputArtifacts []CodePipelineInputArtifact `json:"inputArtifacts"` OutPutArtifacts []CodePipelineOutputArtifact `json:"outputArtifacts"` ArtifactCredentials CodePipelineArtifactCredentials `json:"artifactCredentials"` ContinuationToken string `json:"continuationToken"` }
CodePipelineData represents a job from an AWS CodePipeline event
type CodePipelineEvent struct { CodePipelineJob CodePipelineJob `json:"CodePipeline.job"` }
CodePipelineEvent contains data from an event sent from AWS Codepipeline
type CodePipelineInputArtifact struct { Location CodePipelineInputLocation `json:"location"` Revision *string `json:"revision"` Name string `json:"name"` }
CodePipelineInputArtifact represents an input artifact
type CodePipelineInputLocation struct { S3Location CodePipelineS3Location `json:"s3Location"` LocationType string `json:"type"` }
CodePipelineInputLocation represents a input location
type CodePipelineJob struct { ID string `json:"id"` AccountID string `json:"accountId"` Data CodePipelineData `json:"data"` }
CodePipelineJob represents a job from an AWS CodePipeline event
type CodePipelineOutputArtifact struct { Location CodePipelineInputLocation `json:"location"` Revision *string `json:"revision"` Name string `json:"name"` }
CodePipelineOutputArtifact represents an output artifact
type CodePipelineOutputLocation struct { S3Location CodePipelineS3Location `json:"s3Location"` LocationType string `json:"type"` }
CodePipelineOutputLocation represents a output location
type CodePipelineS3Location struct { BucketName string `json:"bucketName"` ObjectKey string `json:"objectKey"` }
CodePipelineS3Location represents an s3 input location
type CognitoDatasetRecord struct { NewValue string `json:"newValue"` OldValue string `json:"oldValue"` Op string `json:"op"` }
CognitoDatasetRecord represents a record from an AWS Cognito Sync event
type CognitoEvent struct { DatasetName string `json:"datasetName"` DatasetRecords map[string]CognitoDatasetRecord `json:"datasetRecords"` EventType string `json:"eventType"` IdentityID string `json:"identityId"` IdentityPoolID string `json:"identityPoolId"` Region string `json:"region"` Version int `json:"version"` }
CognitoEvent contains data from an event sent from AWS Cognito Sync
type CognitoEventUserPoolsCallerContext struct { AWSSDKVersion string `json:"awsSdkVersion"` ClientID string `json:"clientId"` }
CognitoEventUserPoolsCallerContext contains information about the caller
type CognitoEventUserPoolsHeader struct { Version string `json:"version"` TriggerSource string `json:"triggerSource"` Region string `json:"region"` UserPoolID string `json:"userPoolId"` CallerContext CognitoEventUserPoolsCallerContext `json:"callerContext"` UserName string `json:"userName"` }
CognitoEventUserPoolsHeader contains common data from events sent by AWS Cognito User Pools
type CognitoEventUserPoolsPostConfirmation struct { CognitoEventUserPoolsHeader Request CognitoEventUserPoolsPostConfirmationRequest `json:"request"` Response CognitoEventUserPoolsPostConfirmationResponse `json:"response"` }
CognitoEventUserPoolsPostConfirmation is sent by AWS Cognito User Pools after a user is confirmed, allowing the Lambda to send custom messages or add custom logic.
type CognitoEventUserPoolsPostConfirmationRequest struct { UserAttributes map[string]string `json:"userAttributes"` }
CognitoEventUserPoolsPostConfirmationRequest contains the request portion of a PostConfirmation event
type CognitoEventUserPoolsPostConfirmationResponse struct { }
CognitoEventUserPoolsPostConfirmationResponse contains the response portion of a PostConfirmation event
type CognitoEventUserPoolsPreSignup struct { CognitoEventUserPoolsHeader Request CognitoEventUserPoolsPreSignupRequest `json:"request"` Response CognitoEventUserPoolsPreSignupResponse `json:"response"` }
CognitoEventUserPoolsPreSignup is sent by AWS Cognito User Pools when a user attempts to register (sign up), allowing a Lambda to perform custom validation to accept or deny the registration request
type CognitoEventUserPoolsPreSignupRequest struct { UserAttributes map[string]string `json:"userAttributes"` ValidationData map[string]string `json:"validationData"` }
CognitoEventUserPoolsPreSignupRequest contains the request portion of a PreSignup event
type CognitoEventUserPoolsPreSignupResponse struct { AutoConfirmUser bool `json:"autoConfirmUser"` AutoVerifyEmail bool `json:"autoVerifyEmail"` AutoVerifyPhone bool `json:"autoVerifyPhone"` }
CognitoEventUserPoolsPreSignupResponse contains the response portion of a PreSignup event
type CognitoEventUserPoolsPreTokenGen struct { CognitoEventUserPoolsHeader Request CognitoEventUserPoolsPreTokenGenRequest `json:"request"` Response CognitoEventUserPoolsPreTokenGenResponse `json:"response"` }
CognitoEventUserPoolsPreTokenGen is sent by AWS Cognito User Pools when a user attempts to retrieve credentials, allowing a Lambda to perform insert, supress or override claims
type CognitoEventUserPoolsPreTokenGenRequest struct { UserAttributes map[string]string `json:"userAttributes"` GroupConfiguration GroupConfiguration `json:"groupConfiguration"` }
CognitoEventUserPoolsPreTokenGenRequest contains request portion of PreTokenGen event
type CognitoEventUserPoolsPreTokenGenResponse struct { ClaimsOverrideDetails ClaimsOverrideDetails `json:"claimsOverrideDetails"` }
CognitoEventUserPoolsPreTokenGenResponse containst the response portion of a PreTokenGen event
type ConfigEvent struct { AccountID string `json:"accountId"` // The ID of the AWS account that owns the rule ConfigRuleArn string `json:"configRuleArn"` // The ARN that AWS Config assigned to the rule ConfigRuleID string `json:"configRuleId"` ConfigRuleName string `json:"configRuleName"` // The name that you assigned to the rule that caused AWS Config to publish the event EventLeftScope bool `json:"eventLeftScope"` // A boolean value that indicates whether the AWS resource to be evaluated has been removed from the rule's scope ExecutionRoleArn string `json:"executionRoleArn"` InvokingEvent string `json:"invokingEvent"` // If the event is published in response to a resource configuration change, this value contains a JSON configuration item ResultToken string `json:"resultToken"` // A token that the function must pass to AWS Config with the PutEvaluations call RuleParameters string `json:"ruleParameters"` // Key/value pairs that the function processes as part of its evaluation logic Version string `json:"version"` }
ConfigEvent contains data from an event sent from AWS Config
type ConnectContactData struct { // The custom attributes from Connect that the Lambda function was invoked with. Attributes map[string]string `json:"Attributes"` Channel string `json:"Channel"` ContactID string `json:"ContactId"` CustomerEndpoint ConnectEndpoint `json:"CustomerEndpoint"` InitialContactID string `json:"InitialContactId"` // Either: INBOUND/OUTBOUND/TRANSFER/CALLBACK InitiationMethod string `json:"InitiationMethod"` PreviousContactID string `json:"PreviousContactId"` Queue ConnectQueue `json:"Queue"` SystemEndpoint ConnectEndpoint `json:"SystemEndpoint"` InstanceARN string `json:"InstanceARN"` }
ConnectContactData holds all of the contact information for the user that invoked the Connect event.
type ConnectDetails struct { ContactData ConnectContactData `json:"ContactData"` // The parameters that have been set in the Connect instance at the time of the Lambda invocation. Parameters map[string]string `json:"Parameters"` }
ConnectDetails holds the details of a Connect event
ConnectEndpoint represents routing information.
type ConnectEvent struct { Details ConnectDetails `json:"Details"` Name string `json:"Name"` // The name of the event. }
ConnectEvent contains the data structure for a Connect event.
ConnectQueue represents a queue object.
ConnectResponse is the structure that Connect expects to get back from Lambda. These return values can be used in Connect to perform further routing decisions.
type DynamoDBAttributeValue struct {
// contains filtered or unexported fields
}
DynamoDBAttributeValue provides convenient access for a value stored in DynamoDB. For more information, please see http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_AttributeValue.html
func NewBinaryAttribute(value []byte) DynamoDBAttributeValue
NewBinaryAttribute creates an DynamoDBAttributeValue containing a Binary
func NewBinarySetAttribute(value [][]byte) DynamoDBAttributeValue
NewBinarySetAttribute creates an DynamoDBAttributeValue containing a BinarySet
func NewBooleanAttribute(value bool) DynamoDBAttributeValue
NewBooleanAttribute creates an DynamoDBAttributeValue containing a Boolean
func NewListAttribute(value []DynamoDBAttributeValue) DynamoDBAttributeValue
NewListAttribute creates an DynamoDBAttributeValue containing a List
func NewMapAttribute(value map[string]DynamoDBAttributeValue) DynamoDBAttributeValue
NewMapAttribute creates an DynamoDBAttributeValue containing a Map
func NewNullAttribute() DynamoDBAttributeValue
NewNullAttribute creates an DynamoDBAttributeValue containing a Null
func NewNumberAttribute(value string) DynamoDBAttributeValue
NewNumberAttribute creates an DynamoDBAttributeValue containing a Number
func NewNumberSetAttribute(value []string) DynamoDBAttributeValue
NewNumberSetAttribute creates an DynamoDBAttributeValue containing a NumberSet
func NewStringAttribute(value string) DynamoDBAttributeValue
NewStringAttribute creates an DynamoDBAttributeValue containing a String
func NewStringSetAttribute(value []string) DynamoDBAttributeValue
NewStringSetAttribute creates an DynamoDBAttributeValue containing a StringSet
func (av DynamoDBAttributeValue) Binary() []byte
Binary provides access to an attribute of type Binary. Method panics if the attribute is not of type Binary.
func (av DynamoDBAttributeValue) BinarySet() [][]byte
BinarySet provides access to an attribute of type Binary Set. Method panics if the attribute is not of type BinarySet.
func (av DynamoDBAttributeValue) Boolean() bool
Boolean provides access to an attribute of type Boolean. Method panics if the attribute is not of type Boolean.
func (av DynamoDBAttributeValue) DataType() DynamoDBDataType
DataType provides access to the DynamoDB type of the attribute
func (av DynamoDBAttributeValue) Float() (float64, error)
Float provides access to an attribute of type Number. DynamoDB sends the values as strings. For convenience this method provides conversion to float64. The returned value is the nearest floating point number rounded using IEEE754 unbiased rounding. If the number is more than 1/2 ULP away from the largest floating point number of the given size, the value returned is ±Inf, err.Err = ErrRange. Method panics if the attribute is not of type Number.
func (av DynamoDBAttributeValue) Integer() (int64, error)
Integer provides access to an attribute of type Number. DynamoDB sends the values as strings. For convenience this method provides conversion to int. If the value cannot be represented by a signed integer, err.Err = ErrRange and the returned value is the maximum magnitude integer of an int64 of the appropriate sign. Method panics if the attribute is not of type Number.
func (av DynamoDBAttributeValue) IsNull() bool
IsNull returns true if the attribute is of type Null.
func (av DynamoDBAttributeValue) List() []DynamoDBAttributeValue
List provides access to an attribute of type List. Each element of the list is an DynamoDBAttributeValue itself. Method panics if the attribute is not of type List.
func (av DynamoDBAttributeValue) Map() map[string]DynamoDBAttributeValue
Map provides access to an attribute of type Map. They Keys are strings and the values are DynamoDBAttributeValue instances. Method panics if the attribute is not of type Map.
func (av DynamoDBAttributeValue) MarshalJSON() ([]byte, error)
MarshalJSON implements custom marshaling to be used by the standard json/encoding package
func (av DynamoDBAttributeValue) Number() string
Number provides access to an attribute of type Number. DynamoDB sends the values as strings. For convenience please see also the methods Integer() and Float(). Method panics if the attribute is not of type Number.
func (av DynamoDBAttributeValue) NumberSet() []string
NumberSet provides access to an attribute of type Number Set. DynamoDB sends the numbers as strings. Method panics if the attribute is not of type Number.
func (av DynamoDBAttributeValue) String() string
String provides access to an attribute of type String. Method panics if the attribute is not of type String.
func (av DynamoDBAttributeValue) StringSet() []string
StringSet provides access to an attribute of type String Set. Method panics if the attribute is not of type String Set.
func (av *DynamoDBAttributeValue) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals a JSON description of this DynamoDBAttributeValue
DynamoDBDataType specifies the type supported natively by DynamoDB for an attribute
const ( DataTypeBinary DynamoDBDataType = iota DataTypeBoolean DataTypeBinarySet DataTypeList DataTypeMap DataTypeNumber DataTypeNumberSet DataTypeNull DataTypeString DataTypeStringSet )
type DynamoDBEvent struct { Records []DynamoDBEventRecord `json:"Records"` }
The DynamoDBEvent stream event handled to Lambda http://docs.aws.amazon.com/lambda/latest/dg/eventsources.html#eventsources-ddb-update
type DynamoDBEventRecord struct { // The region in which the GetRecords request was received. AWSRegion string `json:"awsRegion"` // The main body of the stream record, containing all of the DynamoDB-specific // fields. Change DynamoDBStreamRecord `json:"dynamodb"` // A globally unique identifier for the event that was recorded in this stream // record. EventID string `json:"eventID"` // The type of data modification that was performed on the DynamoDB table: // // * INSERT - a new item was added to the table. // // * MODIFY - one or more of an existing item's attributes were modified. // // * REMOVE - the item was deleted from the table EventName string `json:"eventName"` // The AWS service from which the stream record originated. For DynamoDB Streams, // this is aws:dynamodb. EventSource string `json:"eventSource"` // The version number of the stream record format. This number is updated whenever // the structure of Record is modified. // // Client applications must not assume that eventVersion will remain at a particular // value, as this number is subject to change at any time. In general, eventVersion // will only increase as the low-level DynamoDB Streams API evolves. EventVersion string `json:"eventVersion"` // The event source ARN of DynamoDB EventSourceArn string `json:"eventSourceARN"` // Items that are deleted by the Time to Live process after expiration have // the following fields: // // * Records[].userIdentity.type // // "Service" // // * Records[].userIdentity.principalId // // "dynamodb.amazonaws.com" UserIdentity *DynamoDBUserIdentity `json:"userIdentity,omitempty"` }
DynamoDbEventRecord stores information about each record of a DynamoDb stream event
const ( DynamoDBKeyTypeHash DynamoDBKeyType = "HASH" DynamoDBKeyTypeRange DynamoDBKeyType = "RANGE" )
const ( DynamoDBOperationTypeInsert DynamoDBOperationType = "INSERT" DynamoDBOperationTypeModify DynamoDBOperationType = "MODIFY" DynamoDBOperationTypeRemove DynamoDBOperationType = "REMOVE" )
const ( DynamoDBShardIteratorTypeTrimHorizon DynamoDBSharedIteratorType = "TRIM_HORIZON" DynamoDBShardIteratorTypeLatest DynamoDBSharedIteratorType = "LATEST" DynamoDBShardIteratorTypeAtSequenceNumber DynamoDBSharedIteratorType = "AT_SEQUENCE_NUMBER" DynamoDBShardIteratorTypeAfterSequenceNumber DynamoDBSharedIteratorType = "AFTER_SEQUENCE_NUMBER" )
type DynamoDBStreamRecord struct { // The approximate date and time when the stream record was created, in UNIX // epoch time (http://www.epochconverter.com/) format. ApproximateCreationDateTime SecondsEpochTime `json:"ApproximateCreationDateTime,omitempty"` // The primary key attribute(s) for the DynamoDB item that was modified. Keys map[string]DynamoDBAttributeValue `json:"Keys,omitempty"` // The item in the DynamoDB table as it appeared after it was modified. NewImage map[string]DynamoDBAttributeValue `json:"NewImage,omitempty"` // The item in the DynamoDB table as it appeared before it was modified. OldImage map[string]DynamoDBAttributeValue `json:"OldImage,omitempty"` // The sequence number of the stream record. SequenceNumber string `json:"SequenceNumber"` // The size of the stream record, in bytes. SizeBytes int64 `json:"SizeBytes"` // The type of data from the modified DynamoDB item that was captured in this // stream record. StreamViewType string `json:"StreamViewType"` }
A description of a single data modification that was performed on an item in a DynamoDB table.
const ( DynamoDBStreamStatusEnabling DynamoDBStreamStatus = "ENABLING" DynamoDBStreamStatusEnabled DynamoDBStreamStatus = "ENABLED" DynamoDBStreamStatusDisabling DynamoDBStreamStatus = "DISABLING" DynamoDBStreamStatusDisabled DynamoDBStreamStatus = "DISABLED" )
const ( DynamoDBStreamViewTypeNewImage DynamoDBStreamViewType = "NEW_IMAGE" // the entire item, as it appeared after it was modified. DynamoDBStreamViewTypeOldImage DynamoDBStreamViewType = "OLD_IMAGE" // the entire item, as it appeared before it was modified. DynamoDBStreamViewTypeNewAndOldImages DynamoDBStreamViewType = "NEW_AND_OLD_IMAGES" // both the new and the old item images of the item. DynamoDBStreamViewTypeKeysOnly DynamoDBStreamViewType = "KEYS_ONLY" // only the key attributes of the modified item. )
type DynamoDBUserIdentity struct { Type string `json:"type"` PrincipalID string `json:"principalId"` }
ELBContext contains the information to identify the ARN invoking the lambda
type GroupConfiguration struct { GroupsToOverride []string `json:"groupsToOverride"` IAMRolesToOverride []string `json:"iamRolesToOverride"` PreferredRole *string `json:"preferredRole"` }
GroupConfiguration allows lambda to override groups, roles and set a perferred role
type IncompatibleDynamoDBTypeError struct { Requested DynamoDBDataType Actual DynamoDBDataType }
IncompatibleDynamoDBTypeError is the error passed in a panic when calling an accessor for an incompatible type
func (e IncompatibleDynamoDBTypeError) Error() string
type IoTButtonEvent struct { SerialNumber string `json:"serialNumber"` ClickType string `json:"clickType"` BatteryVoltage string `json:"batteryVoltage"` }
type KinesisEvent struct { Records []KinesisEventRecord `json:"Records"` }
type KinesisEventRecord struct { AwsRegion string `json:"awsRegion"` EventID string `json:"eventID"` EventName string `json:"eventName"` EventSource string `json:"eventSource"` EventSourceArn string `json:"eventSourceARN"` EventVersion string `json:"eventVersion"` InvokeIdentityArn string `json:"invokeIdentityArn"` Kinesis KinesisRecord `json:"kinesis"` }
type KinesisFirehoseEvent struct { InvocationID string `json:"invocationId"` DeliveryStreamArn string `json:"deliveryStreamArn"` Region string `json:"region"` Records []KinesisFirehoseEventRecord `json:"records"` }
KinesisFirehoseEvent represents the input event from Amazon Kinesis Firehose. It is used as the input parameter.
type KinesisFirehoseEventRecord struct { RecordID string `json:"recordId"` ApproximateArrivalTimestamp MilliSecondsEpochTime `json:"approximateArrivalTimestamp"` Data []byte `json:"data"` }
type KinesisFirehoseResponse struct { Records []KinesisFirehoseResponseRecord `json:"records"` }
type KinesisFirehoseResponseRecord struct { RecordID string `json:"recordId"` Result string `json:"result"` // The status of the transformation. May be TransformedStateOk, TransformedStateDropped or TransformedStateProcessingFailed Data []byte `json:"data"` }
type KinesisRecord struct { ApproximateArrivalTimestamp SecondsEpochTime `json:"approximateArrivalTimestamp"` Data []byte `json:"data"` EncryptionType string `json:"encryptionType,omitempty"` PartitionKey string `json:"partitionKey"` SequenceNumber string `json:"sequenceNumber"` KinesisSchemaVersion string `json:"kinesisSchemaVersion"` }
type LexBot struct { Name string `json:"name,omitempty"` Alias string `json:"alias,omitempty"` Version string `json:"version,omitempty"` }
type LexCurrentIntent struct { Name string `json:"name,omitempty"` Slots Slots `json:"slots,omitempty"` SlotDetails map[string]SlotDetail `json:"slotDetails,omitempty"` ConfirmationStatus string `json:"confirmationStatus,omitempty"` }
type LexDialogAction struct { Type string `json:"type,omitempty"` FulfillmentState string `json:"fulfillmentState,omitempty"` Message map[string]string `json:"message,omitempty"` IntentName string `json:"intentName,omitempty"` Slots Slots `json:"slots,omitempty"` SlotToElicit string `json:"slotToElicit,omitempty"` ResponseCard *LexResponseCard `json:"responseCard,omitempty"` }
type LexEvent struct { MessageVersion string `json:"messageVersion,omitempty"` InvocationSource string `json:"invocationSource,omitempty"` UserID string `json:"userId,omitempty"` InputTranscript string `json:"inputTranscript,omitempty"` SessionAttributes map[string]string `json:"sessionAttributes,omitempty"` RequestAttributes map[string]string `json:"requestAttributes,omitempty"` Bot *LexBot `json:"bot,omitempty"` OutputDialogMode string `json:"outputDialogMode,omitempty"` CurrentIntent *LexCurrentIntent `json:"currentIntent,omitempty"` DialogAction *LexDialogAction `json:"dialogAction,omitempty"` }
type LexResponseCard struct { Version int64 `json:"version,omitempty"` ContentType string `json:"contentType,omitempty"` GenericAttachments []Attachment `json:"genericAttachments,omitempty"` }
MilliSecondsEpochTime serializes a time.Time in JSON as a UNIX epoch time in milliseconds.
func (e MilliSecondsEpochTime) MarshalJSON() ([]byte, error)
func (e *MilliSecondsEpochTime) UnmarshalJSON(b []byte) error
type S3Bucket struct { Name string `json:"name"` OwnerIdentity S3UserIdentity `json:"ownerIdentity"` Arn string `json:"arn"` }
type S3Entity struct { SchemaVersion string `json:"s3SchemaVersion"` ConfigurationID string `json:"configurationId"` Bucket S3Bucket `json:"bucket"` Object S3Object `json:"object"` }
type S3Event struct { Records []S3EventRecord `json:"Records"` }
type S3EventRecord struct { EventVersion string `json:"eventVersion"` EventSource string `json:"eventSource"` AWSRegion string `json:"awsRegion"` EventTime time.Time `json:"eventTime"` EventName string `json:"eventName"` PrincipalID S3UserIdentity `json:"userIdentity"` RequestParameters S3RequestParameters `json:"requestParameters"` ResponseElements map[string]string `json:"responseElements"` S3 S3Entity `json:"s3"` }
type S3Object struct { Key string `json:"key"` Size int64 `json:"size"` URLDecodedKey string `json:"urlDecodedKey"` VersionID string `json:"versionId"` ETag string `json:"eTag"` Sequencer string `json:"sequencer"` }
type S3TestEvent struct { Service string `json:"Service"` Bucket string `json:"Bucket"` Event string `json:"Event"` Time time.Time `json:"Time"` RequestID string `json:"RequestId"` HostID string `json:"HostId"` }
type SNSEntity struct { Signature string `json:"Signature"` MessageID string `json:"MessageId"` Type string `json:"Type"` TopicArn string `json:"TopicArn"` MessageAttributes map[string]interface{} `json:"MessageAttributes"` SignatureVersion string `json:"SignatureVersion"` Timestamp time.Time `json:"Timestamp"` SigningCertURL string `json:"SigningCertUrl"` Message string `json:"Message"` UnsubscribeURL string `json:"UnsubscribeUrl"` Subject string `json:"Subject"` }
type SNSEvent struct { Records []SNSEventRecord `json:"Records"` }
type SNSEventRecord struct { EventVersion string `json:"EventVersion"` EventSubscriptionArn string `json:"EventSubscriptionArn"` EventSource string `json:"EventSource"` SNS SNSEntity `json:"Sns"` }
type SQSEvent struct { Records []SQSMessage `json:"Records"` }
type SQSMessage struct { MessageId string `json:"messageId"` ReceiptHandle string `json:"receiptHandle"` Body string `json:"body"` Md5OfBody string `json:"md5OfBody"` Md5OfMessageAttributes string `json:"md5OfMessageAttributes"` Attributes map[string]string `json:"attributes"` MessageAttributes map[string]SQSMessageAttribute `json:"messageAttributes"` EventSourceARN string `json:"eventSourceARN"` EventSource string `json:"eventSource"` AWSRegion string `json:"awsRegion"` }
type SQSMessageAttribute struct { StringValue *string `json:"stringValue,omitempty"` BinaryValue []byte `json:"binaryValue,omitempty"` StringListValues []string `json:"stringListValues"` BinaryListValues [][]byte `json:"binaryListValues"` DataType string `json:"dataType"` }
SecondsEpochTime serializes a time.Time in JSON as a UNIX epoch time in seconds
func (e SecondsEpochTime) MarshalJSON() ([]byte, error)
func (e *SecondsEpochTime) UnmarshalJSON(b []byte) error
type SimpleEmailCommonHeaders struct { From []string `json:"from"` To []string `json:"to"` ReturnPath string `json:"returnPath"` MessageID string `json:"messageId"` Date string `json:"date"` Subject string `json:"subject"` }
type SimpleEmailDisposition struct { Disposition SimpleEmailDispositionValue `json:"disposition"` }
SimpleEmailDisposition disposition return for SES to control rule functions
SimpleEmailDispositionValue enumeration representing the dispostition value for SES
const ( // SimpleEmailContinue represents the CONTINUE disposition which tells the SES Rule Set to continue to the next rule SimpleEmailContinue SimpleEmailDispositionValue = "CONTINUE" // SimpleEmailStopRule represents the STOP_RULE disposition which tells the SES Rule Set to stop processing this rule and continue to the next SimpleEmailStopRule SimpleEmailDispositionValue = "STOP_RULE" // SimpleEmailStopRuleSet represents the STOP_RULE_SET disposition which tells the SES Rule SEt to stop processing all rules SimpleEmailStopRuleSet SimpleEmailDispositionValue = "STOP_RULE_SET" )
type SimpleEmailEvent struct { Records []SimpleEmailRecord `json:"Records"` }
SimpleEmailEvent is the outer structure of an event sent via SES.
type SimpleEmailMessage struct { CommonHeaders SimpleEmailCommonHeaders `json:"commonHeaders"` Source string `json:"source"` Timestamp time.Time `json:"timestamp"` Destination []string `json:"destination"` Headers []SimpleEmailHeader `json:"headers"` HeadersTruncated bool `json:"headersTruncated"` MessageID string `json:"messageId"` }
type SimpleEmailReceipt struct { Recipients []string `json:"recipients"` Timestamp time.Time `json:"timestamp"` SpamVerdict SimpleEmailVerdict `json:"spamVerdict"` DKIMVerdict SimpleEmailVerdict `json:"dkimVerdict"` DMARCVerdict SimpleEmailVerdict `json:"dmarcVerdict"` DMARCPolicy SimpleEmailVerdict `json:"dmarcPolicy"` SPFVerdict SimpleEmailVerdict `json:"spfVerdict"` VirusVerdict SimpleEmailVerdict `json:"virusVerdict"` Action SimpleEmailReceiptAction `json:"action"` ProcessingTimeMillis int64 `json:"processingTimeMillis"` }
type SimpleEmailReceiptAction struct { Type string `json:"type"` InvocationType string `json:"invocationType"` FunctionArn string `json:"functionArn"` }
type SimpleEmailRecord struct { EventVersion string `json:"eventVersion"` EventSource string `json:"eventSource"` SES SimpleEmailService `json:"ses"` }
type SimpleEmailService struct { Mail SimpleEmailMessage `json:"mail"` Receipt SimpleEmailReceipt `json:"receipt"` }
type SlotDetail struct { Resolutions []map[string]string `json:"resolutions,omitempty"` OriginalValue string `json:"originalValue,omitempty"` }
UnsupportedDynamoDBTypeError is the error returned when trying to unmarshal a DynamoDB Attribute type not recognized by this library
func (e UnsupportedDynamoDBTypeError) Error() string
Path | Synopsis |
---|---|
test |
Package events imports 8 packages (graph) and is imported by 111 packages. Updated 2019-02-20. Refresh now. Tools for package owners.