mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Update Go AWS SDK to the latest version
This commit is contained in:
committed by
Andrey Smirnov
parent
d08be990ef
commit
94a72b23ff
+689
-425
File diff suppressed because it is too large
Load Diff
+6
-5
@@ -3,13 +3,14 @@
|
||||
// Package ses provides the client and types for making API
|
||||
// requests to Amazon Simple Email Service.
|
||||
//
|
||||
// This is the API Reference for Amazon Simple Email Service (https://aws.amazon.com/ses/)
|
||||
// (Amazon SES). This documentation is intended to be used in conjunction with
|
||||
// the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html).
|
||||
// This document contains reference information for the Amazon Simple Email
|
||||
// Service (https://aws.amazon.com/ses/) (Amazon SES) API, version 2010-12-01.
|
||||
// This document is best used in conjunction with the Amazon SES Developer Guide
|
||||
// (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html).
|
||||
//
|
||||
// For a list of Amazon SES endpoints to use in service requests, see Regions
|
||||
// and Amazon SES (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/regions.html)
|
||||
// in the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html).
|
||||
// and Amazon SES (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/regions.html)
|
||||
// in the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html).
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01 for more information on this service.
|
||||
//
|
||||
|
||||
+13
-7
@@ -101,6 +101,12 @@ const (
|
||||
// details.
|
||||
ErrCodeInvalidConfigurationSetException = "InvalidConfigurationSet"
|
||||
|
||||
// ErrCodeInvalidDeliveryOptionsException for service response error code
|
||||
// "InvalidDeliveryOptions".
|
||||
//
|
||||
// Indicates that provided delivery option is invalid.
|
||||
ErrCodeInvalidDeliveryOptionsException = "InvalidDeliveryOptions"
|
||||
|
||||
// ErrCodeInvalidFirehoseDestinationException for service response error code
|
||||
// "InvalidFirehoseDestination".
|
||||
//
|
||||
@@ -114,7 +120,7 @@ const (
|
||||
// Indicates that the provided AWS Lambda function is invalid, or that Amazon
|
||||
// SES could not execute the provided function, possibly due to permissions
|
||||
// issues. For information about giving permissions, see the Amazon SES Developer
|
||||
// Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html).
|
||||
// Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html).
|
||||
ErrCodeInvalidLambdaFunctionException = "InvalidLambdaFunction"
|
||||
|
||||
// ErrCodeInvalidPolicyException for service response error code
|
||||
@@ -137,7 +143,7 @@ const (
|
||||
// Indicates that the provided Amazon S3 bucket or AWS KMS encryption key is
|
||||
// invalid, or that Amazon SES could not publish to the bucket, possibly due
|
||||
// to permissions issues. For information about giving permissions, see the
|
||||
// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html).
|
||||
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html).
|
||||
ErrCodeInvalidS3ConfigurationException = "InvalidS3Configuration"
|
||||
|
||||
// ErrCodeInvalidSNSDestinationException for service response error code
|
||||
@@ -152,14 +158,14 @@ const (
|
||||
//
|
||||
// Indicates that the provided Amazon SNS topic is invalid, or that Amazon SES
|
||||
// could not publish to the topic, possibly due to permissions issues. For information
|
||||
// about giving permissions, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html).
|
||||
// about giving permissions, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html).
|
||||
ErrCodeInvalidSnsTopicException = "InvalidSnsTopic"
|
||||
|
||||
// ErrCodeInvalidTemplateException for service response error code
|
||||
// "InvalidTemplate".
|
||||
//
|
||||
// Indicates that a template could not be created because it contained invalid
|
||||
// JSON.
|
||||
// Indicates that the template that you specified could not be rendered. This
|
||||
// issue may occur when a template refers to a partial that does not exist.
|
||||
ErrCodeInvalidTemplateException = "InvalidTemplate"
|
||||
|
||||
// ErrCodeInvalidTrackingOptionsException for service response error code
|
||||
@@ -177,7 +183,7 @@ const (
|
||||
// "LimitExceeded".
|
||||
//
|
||||
// Indicates that a resource could not be created because of service limits.
|
||||
// For a list of Amazon SES limits, see the Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html).
|
||||
// For a list of Amazon SES limits, see the Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html).
|
||||
ErrCodeLimitExceededException = "LimitExceeded"
|
||||
|
||||
// ErrCodeMailFromDomainNotVerifiedException for service response error code
|
||||
@@ -186,7 +192,7 @@ const (
|
||||
// Indicates that the message could not be sent because Amazon SES could not
|
||||
// read the MX record required to use the specified MAIL FROM domain. For information
|
||||
// about editing the custom MAIL FROM domain settings for an identity, see the
|
||||
// Amazon SES Developer Guide (http://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html).
|
||||
// Amazon SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/mail-from-edit.html).
|
||||
ErrCodeMailFromDomainNotVerifiedException = "MailFromDomainNotVerifiedException"
|
||||
|
||||
// ErrCodeMessageRejected for service response error code
|
||||
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// +build go1.10,integration
|
||||
|
||||
package ses_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration"
|
||||
"github.com/aws/aws-sdk-go/service/ses"
|
||||
)
|
||||
|
||||
var _ aws.Config
|
||||
var _ awserr.Error
|
||||
var _ request.Request
|
||||
|
||||
func TestInteg_00_ListIdentities(t *testing.T) {
|
||||
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancelFn()
|
||||
|
||||
sess := integration.SessionWithDefaultRegion("us-west-2")
|
||||
svc := ses.New(sess)
|
||||
params := &ses.ListIdentitiesInput{}
|
||||
_, err := svc.ListIdentitiesWithContext(ctx, params)
|
||||
if err != nil {
|
||||
t.Errorf("expect no error, got %v", err)
|
||||
}
|
||||
}
|
||||
func TestInteg_01_VerifyEmailIdentity(t *testing.T) {
|
||||
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancelFn()
|
||||
|
||||
sess := integration.SessionWithDefaultRegion("us-west-2")
|
||||
svc := ses.New(sess)
|
||||
params := &ses.VerifyEmailIdentityInput{
|
||||
EmailAddress: aws.String("fake_email"),
|
||||
}
|
||||
_, err := svc.VerifyEmailIdentityWithContext(ctx, params)
|
||||
if err == nil {
|
||||
t.Fatalf("expect request to fail")
|
||||
}
|
||||
aerr, ok := err.(awserr.RequestFailure)
|
||||
if !ok {
|
||||
t.Fatalf("expect awserr, was %T", err)
|
||||
}
|
||||
if len(aerr.Code()) == 0 {
|
||||
t.Errorf("expect non-empty error code")
|
||||
}
|
||||
if v := aerr.Code(); v == request.ErrCodeSerialization {
|
||||
t.Errorf("expect API error code got serialization failure")
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -29,8 +29,9 @@ var initRequest func(*request.Request)
|
||||
|
||||
// Service information constants
|
||||
const (
|
||||
ServiceName = "email" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
ServiceName = "email" // Name of service.
|
||||
EndpointsID = ServiceName // ID to lookup a service endpoint with.
|
||||
ServiceID = "SES" // ServiceID is a unique identifer of a specific service.
|
||||
)
|
||||
|
||||
// New creates a new instance of the SES client with a session.
|
||||
@@ -58,6 +59,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
|
||||
+4
@@ -234,6 +234,10 @@ type SESAPI interface {
|
||||
ListVerifiedEmailAddressesWithContext(aws.Context, *ses.ListVerifiedEmailAddressesInput, ...request.Option) (*ses.ListVerifiedEmailAddressesOutput, error)
|
||||
ListVerifiedEmailAddressesRequest(*ses.ListVerifiedEmailAddressesInput) (*request.Request, *ses.ListVerifiedEmailAddressesOutput)
|
||||
|
||||
PutConfigurationSetDeliveryOptions(*ses.PutConfigurationSetDeliveryOptionsInput) (*ses.PutConfigurationSetDeliveryOptionsOutput, error)
|
||||
PutConfigurationSetDeliveryOptionsWithContext(aws.Context, *ses.PutConfigurationSetDeliveryOptionsInput, ...request.Option) (*ses.PutConfigurationSetDeliveryOptionsOutput, error)
|
||||
PutConfigurationSetDeliveryOptionsRequest(*ses.PutConfigurationSetDeliveryOptionsInput) (*request.Request, *ses.PutConfigurationSetDeliveryOptionsOutput)
|
||||
|
||||
PutIdentityPolicy(*ses.PutIdentityPolicyInput) (*ses.PutIdentityPolicyOutput, error)
|
||||
PutIdentityPolicyWithContext(aws.Context, *ses.PutIdentityPolicyInput, ...request.Option) (*ses.PutIdentityPolicyOutput, error)
|
||||
PutIdentityPolicyRequest(*ses.PutIdentityPolicyInput) (*request.Request, *ses.PutIdentityPolicyOutput)
|
||||
|
||||
Reference in New Issue
Block a user