Update Go AWS SDK to the latest version

This commit is contained in:
Andrey Smirnov
2019-07-13 00:03:55 +03:00
committed by Andrey Smirnov
parent d08be990ef
commit 94a72b23ff
2183 changed files with 885887 additions and 228114 deletions
+1421 -33
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -7,7 +7,7 @@
// who need detailed information about the AWS Shield Advanced API actions,
// data types, and errors. For detailed information about AWS WAF and AWS Shield
// Advanced features and an overview of how to use the AWS WAF and AWS Shield
// Advanced APIs, see the AWS WAF and AWS Shield Developer Guide (http://docs.aws.amazon.com/waf/latest/developerguide/).
// Advanced APIs, see the AWS WAF and AWS Shield Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/).
//
// See https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02 for more information on this service.
//
+33 -2
View File
@@ -4,6 +4,22 @@ package shield
const (
// ErrCodeAccessDeniedException for service response error code
// "AccessDeniedException".
//
// Exception that indicates the specified AttackId does not exist, or the requester
// does not have the appropriate permissions to access the AttackId.
ErrCodeAccessDeniedException = "AccessDeniedException"
// ErrCodeAccessDeniedForDependencyException for service response error code
// "AccessDeniedForDependencyException".
//
// In order to grant the necessary access to the DDoS Response Team, the user
// submitting AssociateDRTRole must have the iam:PassRole permission. This error
// indicates the user did not have the appropriate permissions. For more information,
// see Granting a User Permissions to Pass a Role to an AWS Service (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html).
ErrCodeAccessDeniedForDependencyException = "AccessDeniedForDependencyException"
// ErrCodeInternalErrorException for service response error code
// "InternalErrorException".
//
@@ -18,6 +34,13 @@ const (
// occur.
ErrCodeInvalidOperationException = "InvalidOperationException"
// ErrCodeInvalidPaginationTokenException for service response error code
// "InvalidPaginationTokenException".
//
// Exception that indicates that the NextToken specified in the request is invalid.
// Submit the request using the NextToken value that was returned in the response.
ErrCodeInvalidPaginationTokenException = "InvalidPaginationTokenException"
// ErrCodeInvalidParameterException for service response error code
// "InvalidParameterException".
//
@@ -44,10 +67,18 @@ const (
// ErrCodeLockedSubscriptionException for service response error code
// "LockedSubscriptionException".
//
// Exception that indicates that the subscription you are trying to delete has
// not yet completed the 1-year commitment. You cannot delete this subscription.
// You are trying to update a subscription that has not yet completed the 1-year
// commitment. You can change the AutoRenew parameter during the last 30 days
// of your subscription. This exception indicates that you are attempting to
// change AutoRenew prior to that period.
ErrCodeLockedSubscriptionException = "LockedSubscriptionException"
// ErrCodeNoAssociatedRoleException for service response error code
// "NoAssociatedRoleException".
//
// The ARN of the role that you specifed does not exist.
ErrCodeNoAssociatedRoleException = "NoAssociatedRoleException"
// ErrCodeOptimisticLockException for service response error code
// "OptimisticLockException".
//
+34
View File
@@ -0,0 +1,34 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// +build go1.10,integration
package shield_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/shield"
)
var _ aws.Config
var _ awserr.Error
var _ request.Request
func TestInteg_00_ListAttacks(t *testing.T) {
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFn()
sess := integration.SessionWithDefaultRegion("us-east-1")
svc := shield.New(sess)
params := &shield.ListAttacksInput{}
_, err := svc.ListAttacksWithContext(ctx, params)
if err != nil {
t.Errorf("expect no error, got %v", err)
}
}
+4 -2
View File
@@ -29,8 +29,9 @@ var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "shield" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
ServiceName = "shield" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "Shield" // ServiceID is a unique identifer of a specific service.
)
// New creates a new instance of the Shield client with a session.
@@ -55,6 +56,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
+34 -2
View File
@@ -26,7 +26,7 @@ import (
// // myFunc uses an SDK service client to make a request to
// // AWS Shield.
// func myFunc(svc shieldiface.ShieldAPI) bool {
// // Make svc.CreateProtection request
// // Make svc.AssociateDRTLogBucket request
// }
//
// func main() {
@@ -42,7 +42,7 @@ import (
// type mockShieldClient struct {
// shieldiface.ShieldAPI
// }
// func (m *mockShieldClient) CreateProtection(input *shield.CreateProtectionInput) (*shield.CreateProtectionOutput, error) {
// func (m *mockShieldClient) AssociateDRTLogBucket(input *shield.AssociateDRTLogBucketInput) (*shield.AssociateDRTLogBucketOutput, error) {
// // mock response/functionality
// }
//
@@ -60,6 +60,14 @@ import (
// and waiters. Its suggested to use the pattern above for testing, or using
// tooling to generate mocks to satisfy the interfaces.
type ShieldAPI interface {
AssociateDRTLogBucket(*shield.AssociateDRTLogBucketInput) (*shield.AssociateDRTLogBucketOutput, error)
AssociateDRTLogBucketWithContext(aws.Context, *shield.AssociateDRTLogBucketInput, ...request.Option) (*shield.AssociateDRTLogBucketOutput, error)
AssociateDRTLogBucketRequest(*shield.AssociateDRTLogBucketInput) (*request.Request, *shield.AssociateDRTLogBucketOutput)
AssociateDRTRole(*shield.AssociateDRTRoleInput) (*shield.AssociateDRTRoleOutput, error)
AssociateDRTRoleWithContext(aws.Context, *shield.AssociateDRTRoleInput, ...request.Option) (*shield.AssociateDRTRoleOutput, error)
AssociateDRTRoleRequest(*shield.AssociateDRTRoleInput) (*request.Request, *shield.AssociateDRTRoleOutput)
CreateProtection(*shield.CreateProtectionInput) (*shield.CreateProtectionOutput, error)
CreateProtectionWithContext(aws.Context, *shield.CreateProtectionInput, ...request.Option) (*shield.CreateProtectionOutput, error)
CreateProtectionRequest(*shield.CreateProtectionInput) (*request.Request, *shield.CreateProtectionOutput)
@@ -80,6 +88,14 @@ type ShieldAPI interface {
DescribeAttackWithContext(aws.Context, *shield.DescribeAttackInput, ...request.Option) (*shield.DescribeAttackOutput, error)
DescribeAttackRequest(*shield.DescribeAttackInput) (*request.Request, *shield.DescribeAttackOutput)
DescribeDRTAccess(*shield.DescribeDRTAccessInput) (*shield.DescribeDRTAccessOutput, error)
DescribeDRTAccessWithContext(aws.Context, *shield.DescribeDRTAccessInput, ...request.Option) (*shield.DescribeDRTAccessOutput, error)
DescribeDRTAccessRequest(*shield.DescribeDRTAccessInput) (*request.Request, *shield.DescribeDRTAccessOutput)
DescribeEmergencyContactSettings(*shield.DescribeEmergencyContactSettingsInput) (*shield.DescribeEmergencyContactSettingsOutput, error)
DescribeEmergencyContactSettingsWithContext(aws.Context, *shield.DescribeEmergencyContactSettingsInput, ...request.Option) (*shield.DescribeEmergencyContactSettingsOutput, error)
DescribeEmergencyContactSettingsRequest(*shield.DescribeEmergencyContactSettingsInput) (*request.Request, *shield.DescribeEmergencyContactSettingsOutput)
DescribeProtection(*shield.DescribeProtectionInput) (*shield.DescribeProtectionOutput, error)
DescribeProtectionWithContext(aws.Context, *shield.DescribeProtectionInput, ...request.Option) (*shield.DescribeProtectionOutput, error)
DescribeProtectionRequest(*shield.DescribeProtectionInput) (*request.Request, *shield.DescribeProtectionOutput)
@@ -88,6 +104,14 @@ type ShieldAPI interface {
DescribeSubscriptionWithContext(aws.Context, *shield.DescribeSubscriptionInput, ...request.Option) (*shield.DescribeSubscriptionOutput, error)
DescribeSubscriptionRequest(*shield.DescribeSubscriptionInput) (*request.Request, *shield.DescribeSubscriptionOutput)
DisassociateDRTLogBucket(*shield.DisassociateDRTLogBucketInput) (*shield.DisassociateDRTLogBucketOutput, error)
DisassociateDRTLogBucketWithContext(aws.Context, *shield.DisassociateDRTLogBucketInput, ...request.Option) (*shield.DisassociateDRTLogBucketOutput, error)
DisassociateDRTLogBucketRequest(*shield.DisassociateDRTLogBucketInput) (*request.Request, *shield.DisassociateDRTLogBucketOutput)
DisassociateDRTRole(*shield.DisassociateDRTRoleInput) (*shield.DisassociateDRTRoleOutput, error)
DisassociateDRTRoleWithContext(aws.Context, *shield.DisassociateDRTRoleInput, ...request.Option) (*shield.DisassociateDRTRoleOutput, error)
DisassociateDRTRoleRequest(*shield.DisassociateDRTRoleInput) (*request.Request, *shield.DisassociateDRTRoleOutput)
GetSubscriptionState(*shield.GetSubscriptionStateInput) (*shield.GetSubscriptionStateOutput, error)
GetSubscriptionStateWithContext(aws.Context, *shield.GetSubscriptionStateInput, ...request.Option) (*shield.GetSubscriptionStateOutput, error)
GetSubscriptionStateRequest(*shield.GetSubscriptionStateInput) (*request.Request, *shield.GetSubscriptionStateOutput)
@@ -99,6 +123,14 @@ type ShieldAPI interface {
ListProtections(*shield.ListProtectionsInput) (*shield.ListProtectionsOutput, error)
ListProtectionsWithContext(aws.Context, *shield.ListProtectionsInput, ...request.Option) (*shield.ListProtectionsOutput, error)
ListProtectionsRequest(*shield.ListProtectionsInput) (*request.Request, *shield.ListProtectionsOutput)
UpdateEmergencyContactSettings(*shield.UpdateEmergencyContactSettingsInput) (*shield.UpdateEmergencyContactSettingsOutput, error)
UpdateEmergencyContactSettingsWithContext(aws.Context, *shield.UpdateEmergencyContactSettingsInput, ...request.Option) (*shield.UpdateEmergencyContactSettingsOutput, error)
UpdateEmergencyContactSettingsRequest(*shield.UpdateEmergencyContactSettingsInput) (*request.Request, *shield.UpdateEmergencyContactSettingsOutput)
UpdateSubscription(*shield.UpdateSubscriptionInput) (*shield.UpdateSubscriptionOutput, error)
UpdateSubscriptionWithContext(aws.Context, *shield.UpdateSubscriptionInput, ...request.Option) (*shield.UpdateSubscriptionOutput, error)
UpdateSubscriptionRequest(*shield.UpdateSubscriptionInput) (*request.Request, *shield.UpdateSubscriptionOutput)
}
var _ ShieldAPI = (*shield.Shield)(nil)