本文整理汇总了Golang中github.com/somathor/aws-sdk-go/service/ses.New函数的典型用法代码示例。如果您正苦于以下问题:Golang New函数的具体用法?Golang New怎么用?Golang New使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了New函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: ExampleSES_SendRawEmail
func ExampleSES_SendRawEmail() {
svc := ses.New(session.New())
params := &ses.SendRawEmailInput{
RawMessage: &ses.RawMessage{ // Required
Data: []byte("PAYLOAD"), // Required
},
Destinations: []*string{
aws.String("Address"), // Required
// More values...
},
FromArn: aws.String("AmazonResourceName"),
ReturnPathArn: aws.String("AmazonResourceName"),
Source: aws.String("Address"),
SourceArn: aws.String("AmazonResourceName"),
}
resp, err := svc.SendRawEmail(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:28,代码来源:examples_test.go
示例2: ExampleSES_SendBounce
func ExampleSES_SendBounce() {
svc := ses.New(session.New())
params := &ses.SendBounceInput{
BounceSender: aws.String("Address"), // Required
BouncedRecipientInfoList: []*ses.BouncedRecipientInfo{ // Required
{ // Required
Recipient: aws.String("Address"), // Required
BounceType: aws.String("BounceType"),
RecipientArn: aws.String("AmazonResourceName"),
RecipientDsnFields: &ses.RecipientDsnFields{
Action: aws.String("DsnAction"), // Required
Status: aws.String("DsnStatus"), // Required
DiagnosticCode: aws.String("DiagnosticCode"),
ExtensionFields: []*ses.ExtensionField{
{ // Required
Name: aws.String("ExtensionFieldName"), // Required
Value: aws.String("ExtensionFieldValue"), // Required
},
// More values...
},
FinalRecipient: aws.String("Address"),
LastAttemptDate: aws.Time(time.Now()),
RemoteMta: aws.String("RemoteMta"),
},
},
// More values...
},
OriginalMessageId: aws.String("MessageId"), // Required
BounceSenderArn: aws.String("AmazonResourceName"),
Explanation: aws.String("Explanation"),
MessageDsn: &ses.MessageDsn{
ReportingMta: aws.String("ReportingMta"), // Required
ArrivalDate: aws.Time(time.Now()),
ExtensionFields: []*ses.ExtensionField{
{ // Required
Name: aws.String("ExtensionFieldName"), // Required
Value: aws.String("ExtensionFieldValue"), // Required
},
// More values...
},
},
}
resp, err := svc.SendBounce(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:55,代码来源:examples_test.go
示例3: ExampleSES_SendEmail
func ExampleSES_SendEmail() {
svc := ses.New(session.New())
params := &ses.SendEmailInput{
Destination: &ses.Destination{ // Required
BccAddresses: []*string{
aws.String("Address"), // Required
// More values...
},
CcAddresses: []*string{
aws.String("Address"), // Required
// More values...
},
ToAddresses: []*string{
aws.String("Address"), // Required
// More values...
},
},
Message: &ses.Message{ // Required
Body: &ses.Body{ // Required
Html: &ses.Content{
Data: aws.String("MessageData"), // Required
Charset: aws.String("Charset"),
},
Text: &ses.Content{
Data: aws.String("MessageData"), // Required
Charset: aws.String("Charset"),
},
},
Subject: &ses.Content{ // Required
Data: aws.String("MessageData"), // Required
Charset: aws.String("Charset"),
},
},
Source: aws.String("Address"), // Required
ReplyToAddresses: []*string{
aws.String("Address"), // Required
// More values...
},
ReturnPath: aws.String("Address"),
ReturnPathArn: aws.String("AmazonResourceName"),
SourceArn: aws.String("AmazonResourceName"),
}
resp, err := svc.SendEmail(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:55,代码来源:examples_test.go
示例4: ExampleSES_ListVerifiedEmailAddresses
func ExampleSES_ListVerifiedEmailAddresses() {
svc := ses.New(session.New())
var params *ses.ListVerifiedEmailAddressesInput
resp, err := svc.ListVerifiedEmailAddresses(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:16,代码来源:examples_test.go
示例5: ExampleSES_GetSendStatistics
func ExampleSES_GetSendStatistics() {
svc := ses.New(session.New())
var params *ses.GetSendStatisticsInput
resp, err := svc.GetSendStatistics(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:16,代码来源:examples_test.go
示例6: ExampleSES_DescribeActiveReceiptRuleSet
func ExampleSES_DescribeActiveReceiptRuleSet() {
svc := ses.New(session.New())
var params *ses.DescribeActiveReceiptRuleSetInput
resp, err := svc.DescribeActiveReceiptRuleSet(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:16,代码来源:examples_test.go
示例7: ExampleSES_ListReceiptRuleSets
func ExampleSES_ListReceiptRuleSets() {
svc := ses.New(session.New())
params := &ses.ListReceiptRuleSetsInput{
NextToken: aws.String("NextToken"),
}
resp, err := svc.ListReceiptRuleSets(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例8: ExampleSES_ListIdentityPolicies
func ExampleSES_ListIdentityPolicies() {
svc := ses.New(session.New())
params := &ses.ListIdentityPoliciesInput{
Identity: aws.String("Identity"), // Required
}
resp, err := svc.ListIdentityPolicies(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例9: ExampleSES_VerifyEmailIdentity
func ExampleSES_VerifyEmailIdentity() {
svc := ses.New(session.New())
params := &ses.VerifyEmailIdentityInput{
EmailAddress: aws.String("Address"), // Required
}
resp, err := svc.VerifyEmailIdentity(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例10: ExampleSES_DeleteReceiptFilter
func ExampleSES_DeleteReceiptFilter() {
svc := ses.New(session.New())
params := &ses.DeleteReceiptFilterInput{
FilterName: aws.String("ReceiptFilterName"), // Required
}
resp, err := svc.DeleteReceiptFilter(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例11: ExampleSES_SetActiveReceiptRuleSet
func ExampleSES_SetActiveReceiptRuleSet() {
svc := ses.New(session.New())
params := &ses.SetActiveReceiptRuleSetInput{
RuleSetName: aws.String("ReceiptRuleSetName"),
}
resp, err := svc.SetActiveReceiptRuleSet(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:18,代码来源:examples_test.go
示例12: ExampleSES_SetIdentityFeedbackForwardingEnabled
func ExampleSES_SetIdentityFeedbackForwardingEnabled() {
svc := ses.New(session.New())
params := &ses.SetIdentityFeedbackForwardingEnabledInput{
ForwardingEnabled: aws.Bool(true), // Required
Identity: aws.String("Identity"), // Required
}
resp, err := svc.SetIdentityFeedbackForwardingEnabled(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:19,代码来源:examples_test.go
示例13: ExampleSES_SetIdentityNotificationTopic
func ExampleSES_SetIdentityNotificationTopic() {
svc := ses.New(session.New())
params := &ses.SetIdentityNotificationTopicInput{
Identity: aws.String("Identity"), // Required
NotificationType: aws.String("NotificationType"), // Required
SnsTopic: aws.String("NotificationTopic"),
}
resp, err := svc.SetIdentityNotificationTopic(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:20,代码来源:examples_test.go
示例14: ExampleSES_ListIdentities
func ExampleSES_ListIdentities() {
svc := ses.New(session.New())
params := &ses.ListIdentitiesInput{
IdentityType: aws.String("IdentityType"),
MaxItems: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.ListIdentities(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:20,代码来源:examples_test.go
示例15: ExampleSES_GetIdentityVerificationAttributes
func ExampleSES_GetIdentityVerificationAttributes() {
svc := ses.New(session.New())
params := &ses.GetIdentityVerificationAttributesInput{
Identities: []*string{ // Required
aws.String("Identity"), // Required
// More values...
},
}
resp, err := svc.GetIdentityVerificationAttributes(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:21,代码来源:examples_test.go
示例16: ExampleSES_ReorderReceiptRuleSet
func ExampleSES_ReorderReceiptRuleSet() {
svc := ses.New(session.New())
params := &ses.ReorderReceiptRuleSetInput{
RuleNames: []*string{ // Required
aws.String("ReceiptRuleName"), // Required
// More values...
},
RuleSetName: aws.String("ReceiptRuleSetName"), // Required
}
resp, err := svc.ReorderReceiptRuleSet(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:22,代码来源:examples_test.go
示例17: ExampleSES_CreateReceiptFilter
func ExampleSES_CreateReceiptFilter() {
svc := ses.New(session.New())
params := &ses.CreateReceiptFilterInput{
Filter: &ses.ReceiptFilter{ // Required
IpFilter: &ses.ReceiptIpFilter{ // Required
Cidr: aws.String("Cidr"), // Required
Policy: aws.String("ReceiptFilterPolicy"), // Required
},
Name: aws.String("ReceiptFilterName"), // Required
},
}
resp, err := svc.CreateReceiptFilter(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:24,代码来源:examples_test.go
示例18: ExampleSES_UpdateReceiptRule
func ExampleSES_UpdateReceiptRule() {
svc := ses.New(session.New())
params := &ses.UpdateReceiptRuleInput{
Rule: &ses.ReceiptRule{ // Required
Name: aws.String("ReceiptRuleName"), // Required
Actions: []*ses.ReceiptAction{
{ // Required
AddHeaderAction: &ses.AddHeaderAction{
HeaderName: aws.String("HeaderName"), // Required
HeaderValue: aws.String("HeaderValue"), // Required
},
BounceAction: &ses.BounceAction{
Message: aws.String("BounceMessage"), // Required
Sender: aws.String("Address"), // Required
SmtpReplyCode: aws.String("BounceSmtpReplyCode"), // Required
StatusCode: aws.String("BounceStatusCode"),
TopicArn: aws.String("AmazonResourceName"),
},
LambdaAction: &ses.LambdaAction{
FunctionArn: aws.String("AmazonResourceName"), // Required
InvocationType: aws.String("InvocationType"),
TopicArn: aws.String("AmazonResourceName"),
},
S3Action: &ses.S3Action{
BucketName: aws.String("S3BucketName"), // Required
KmsKeyArn: aws.String("AmazonResourceName"),
ObjectKeyPrefix: aws.String("S3KeyPrefix"),
TopicArn: aws.String("AmazonResourceName"),
},
SNSAction: &ses.SNSAction{
TopicArn: aws.String("AmazonResourceName"), // Required
},
StopAction: &ses.StopAction{
Scope: aws.String("StopScope"), // Required
TopicArn: aws.String("AmazonResourceName"),
},
WorkmailAction: &ses.WorkmailAction{
OrganizationArn: aws.String("AmazonResourceName"), // Required
TopicArn: aws.String("AmazonResourceName"),
},
},
// More values...
},
Enabled: aws.Bool(true),
Recipients: []*string{
aws.String("Recipient"), // Required
// More values...
},
ScanEnabled: aws.Bool(true),
TlsPolicy: aws.String("TlsPolicy"),
},
RuleSetName: aws.String("ReceiptRuleSetName"), // Required
}
resp, err := svc.UpdateReceiptRule(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
开发者ID:somathor,项目名称:aws-sdk-go,代码行数:66,代码来源:examples_test.go
注:本文中的github.com/somathor/aws-sdk-go/service/ses.New函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论