diff --git a/events/cognito.go b/events/cognito.go index 0b350a90..7c9d8694 100644 --- a/events/cognito.go +++ b/events/cognito.go @@ -359,7 +359,10 @@ type CognitoEventUserPoolsCustomMessageRequest struct { UserAttributes map[string]interface{} `json:"userAttributes"` CodeParameter string `json:"codeParameter"` UsernameParameter string `json:"usernameParameter"` - ClientMetadata map[string]string `json:"clientMetadata"` + // LinkParameter is the placeholder for the verification link in email messages. + // It is present when TriggerSource is CustomMessage_VerifyUserAttribute or CustomMessage_AdminCreateUser. + LinkParameter string `json:"linkParameter,omitempty"` + ClientMetadata map[string]string `json:"clientMetadata"` } // CognitoEventUserPoolsCustomMessageResponse contains the response portion of a CustomMessage event diff --git a/events/testdata/cognito-event-userpools-custommessage.json b/events/testdata/cognito-event-userpools-custommessage.json index 9c10d794..8b0c2565 100644 --- a/events/testdata/cognito-event-userpools-custommessage.json +++ b/events/testdata/cognito-event-userpools-custommessage.json @@ -15,6 +15,7 @@ }, "codeParameter": "####", "usernameParameter": "{username}", + "linkParameter": "https://example.com/verify?token=abc123", "clientMetadata": { "exampleMetadataKey": "example metadata value" }