1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package ses 4 5import ( 6 "context" 7 awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" 8 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" 9 "github.com/aws/smithy-go/middleware" 10 smithyhttp "github.com/aws/smithy-go/transport/http" 11) 12 13// Creates a new custom verification email template. For more information about 14// custom verification email templates, see Using Custom Verification Email 15// Templates 16// (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html) 17// in the Amazon SES Developer Guide. You can execute this operation no more than 18// once per second. 19func (c *Client) CreateCustomVerificationEmailTemplate(ctx context.Context, params *CreateCustomVerificationEmailTemplateInput, optFns ...func(*Options)) (*CreateCustomVerificationEmailTemplateOutput, error) { 20 if params == nil { 21 params = &CreateCustomVerificationEmailTemplateInput{} 22 } 23 24 result, metadata, err := c.invokeOperation(ctx, "CreateCustomVerificationEmailTemplate", params, optFns, addOperationCreateCustomVerificationEmailTemplateMiddlewares) 25 if err != nil { 26 return nil, err 27 } 28 29 out := result.(*CreateCustomVerificationEmailTemplateOutput) 30 out.ResultMetadata = metadata 31 return out, nil 32} 33 34// Represents a request to create a custom verification email template. 35type CreateCustomVerificationEmailTemplateInput struct { 36 37 // The URL that the recipient of the verification email is sent to if his or her 38 // address is not successfully verified. 39 // 40 // This member is required. 41 FailureRedirectionURL *string 42 43 // The email address that the custom verification email is sent from. 44 // 45 // This member is required. 46 FromEmailAddress *string 47 48 // The URL that the recipient of the verification email is sent to if his or her 49 // address is successfully verified. 50 // 51 // This member is required. 52 SuccessRedirectionURL *string 53 54 // The content of the custom verification email. The total size of the email must 55 // be less than 10 MB. The message body may contain HTML, with some limitations. 56 // For more information, see Custom Verification Email Frequently Asked Questions 57 // (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/custom-verification-emails.html#custom-verification-emails-faq) 58 // in the Amazon SES Developer Guide. 59 // 60 // This member is required. 61 TemplateContent *string 62 63 // The name of the custom verification email template. 64 // 65 // This member is required. 66 TemplateName *string 67 68 // The subject line of the custom verification email. 69 // 70 // This member is required. 71 TemplateSubject *string 72} 73 74type CreateCustomVerificationEmailTemplateOutput struct { 75 // Metadata pertaining to the operation's result. 76 ResultMetadata middleware.Metadata 77} 78 79func addOperationCreateCustomVerificationEmailTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { 80 err = stack.Serialize.Add(&awsAwsquery_serializeOpCreateCustomVerificationEmailTemplate{}, middleware.After) 81 if err != nil { 82 return err 83 } 84 err = stack.Deserialize.Add(&awsAwsquery_deserializeOpCreateCustomVerificationEmailTemplate{}, middleware.After) 85 if err != nil { 86 return err 87 } 88 if err = addSetLoggerMiddleware(stack, options); err != nil { 89 return err 90 } 91 if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { 92 return err 93 } 94 if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { 95 return err 96 } 97 if err = addResolveEndpointMiddleware(stack, options); err != nil { 98 return err 99 } 100 if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { 101 return err 102 } 103 if err = addRetryMiddlewares(stack, options); err != nil { 104 return err 105 } 106 if err = addHTTPSignerV4Middleware(stack, options); err != nil { 107 return err 108 } 109 if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { 110 return err 111 } 112 if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { 113 return err 114 } 115 if err = addClientUserAgent(stack); err != nil { 116 return err 117 } 118 if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { 119 return err 120 } 121 if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { 122 return err 123 } 124 if err = addOpCreateCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil { 125 return err 126 } 127 if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCustomVerificationEmailTemplate(options.Region), middleware.Before); err != nil { 128 return err 129 } 130 if err = addRequestIDRetrieverMiddleware(stack); err != nil { 131 return err 132 } 133 if err = addResponseErrorMiddleware(stack); err != nil { 134 return err 135 } 136 if err = addRequestResponseLogging(stack, options); err != nil { 137 return err 138 } 139 return nil 140} 141 142func newServiceMetadataMiddleware_opCreateCustomVerificationEmailTemplate(region string) *awsmiddleware.RegisterServiceMetadata { 143 return &awsmiddleware.RegisterServiceMetadata{ 144 Region: region, 145 ServiceID: ServiceID, 146 SigningName: "ses", 147 OperationName: "CreateCustomVerificationEmailTemplate", 148 } 149} 150