Upgrade AWS SDK to the latest version

This commit is contained in:
Andrey Smirnov
2017-09-28 17:57:05 +03:00
parent 9a767b7631
commit 182c21e38c
1096 changed files with 309697 additions and 132612 deletions
+82 -92
View File
@@ -1,6 +1,5 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package shield provides a client for AWS Shield.
package shield
import (
@@ -15,19 +14,18 @@ const opCreateProtection = "CreateProtection"
// CreateProtectionRequest generates a "aws/request.Request" representing the
// client's request for the CreateProtection operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See CreateProtection for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateProtection method directly
// instead.
// See CreateProtection for more information on using the CreateProtection
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateProtectionRequest method.
// req, resp := client.CreateProtectionRequest(params)
@@ -119,19 +117,18 @@ const opCreateSubscription = "CreateSubscription"
// CreateSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the CreateSubscription operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See CreateSubscription for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the CreateSubscription method directly
// instead.
// See CreateSubscription for more information on using the CreateSubscription
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the CreateSubscriptionRequest method.
// req, resp := client.CreateSubscriptionRequest(params)
@@ -203,19 +200,18 @@ const opDeleteProtection = "DeleteProtection"
// DeleteProtectionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteProtection operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DeleteProtection for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteProtection method directly
// instead.
// See DeleteProtection for more information on using the DeleteProtection
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteProtectionRequest method.
// req, resp := client.DeleteProtectionRequest(params)
@@ -291,19 +287,18 @@ const opDeleteSubscription = "DeleteSubscription"
// DeleteSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the DeleteSubscription operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DeleteSubscription for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DeleteSubscription method directly
// instead.
// See DeleteSubscription for more information on using the DeleteSubscription
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DeleteSubscriptionRequest method.
// req, resp := client.DeleteSubscriptionRequest(params)
@@ -379,19 +374,18 @@ const opDescribeAttack = "DescribeAttack"
// DescribeAttackRequest generates a "aws/request.Request" representing the
// client's request for the DescribeAttack operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DescribeAttack for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeAttack method directly
// instead.
// See DescribeAttack for more information on using the DescribeAttack
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeAttackRequest method.
// req, resp := client.DescribeAttackRequest(params)
@@ -463,19 +457,18 @@ const opDescribeProtection = "DescribeProtection"
// DescribeProtectionRequest generates a "aws/request.Request" representing the
// client's request for the DescribeProtection operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DescribeProtection for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeProtection method directly
// instead.
// See DescribeProtection for more information on using the DescribeProtection
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeProtectionRequest method.
// req, resp := client.DescribeProtectionRequest(params)
@@ -547,19 +540,18 @@ const opDescribeSubscription = "DescribeSubscription"
// DescribeSubscriptionRequest generates a "aws/request.Request" representing the
// client's request for the DescribeSubscription operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See DescribeSubscription for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the DescribeSubscription method directly
// instead.
// See DescribeSubscription for more information on using the DescribeSubscription
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the DescribeSubscriptionRequest method.
// req, resp := client.DescribeSubscriptionRequest(params)
@@ -631,19 +623,18 @@ const opListAttacks = "ListAttacks"
// ListAttacksRequest generates a "aws/request.Request" representing the
// client's request for the ListAttacks operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See ListAttacks for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListAttacks method directly
// instead.
// See ListAttacks for more information on using the ListAttacks
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the ListAttacksRequest method.
// req, resp := client.ListAttacksRequest(params)
@@ -720,19 +711,18 @@ const opListProtections = "ListProtections"
// ListProtectionsRequest generates a "aws/request.Request" representing the
// client's request for the ListProtections operation. The "output" return
// value can be used to capture response data after the request's "Send" method
// is called.
// value will be populated with the request's response once the request complets
// successfuly.
//
// See ListProtections for usage and error information.
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// Creating a request object using this method should be used when you want to inject
// custom logic into the request's lifecycle using a custom handler, or if you want to
// access properties on the request object before or after sending the request. If
// you just want the service response, call the ListProtections method directly
// instead.
// See ListProtections for more information on using the ListProtections
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
// Note: You must call the "Send" method on the returned request object in order
// to execute the request.
//
// // Example sending a request using the ListProtectionsRequest method.
// req, resp := client.ListProtectionsRequest(params)
+32
View File
@@ -0,0 +1,32 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package shield provides the client and types for making API
// requests to AWS Shield.
//
// This is the AWS Shield Advanced API Reference. This guide is for developers
// 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/).
//
// See https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02 for more information on this service.
//
// See shield package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/shield/
//
// Using the Client
//
// To AWS Shield with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service.
// These clients are safe to use concurrently.
//
// See the SDK's documentation for more information on how to use the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
// See aws.Config documentation for more information on configuring SDK clients.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the AWS Shield client Shield for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/shield/#New
package shield
+1 -1
View File
@@ -1,4 +1,4 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package shield
-214
View File
@@ -1,214 +0,0 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package shield_test
import (
"bytes"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/shield"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleShield_CreateProtection() {
sess := session.Must(session.NewSession())
svc := shield.New(sess)
params := &shield.CreateProtectionInput{
Name: aws.String("ProtectionName"), // Required
ResourceArn: aws.String("ResourceArn"), // Required
}
resp, err := svc.CreateProtection(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)
}
func ExampleShield_CreateSubscription() {
sess := session.Must(session.NewSession())
svc := shield.New(sess)
var params *shield.CreateSubscriptionInput
resp, err := svc.CreateSubscription(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)
}
func ExampleShield_DeleteProtection() {
sess := session.Must(session.NewSession())
svc := shield.New(sess)
params := &shield.DeleteProtectionInput{
ProtectionId: aws.String("ProtectionId"), // Required
}
resp, err := svc.DeleteProtection(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)
}
func ExampleShield_DeleteSubscription() {
sess := session.Must(session.NewSession())
svc := shield.New(sess)
var params *shield.DeleteSubscriptionInput
resp, err := svc.DeleteSubscription(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)
}
func ExampleShield_DescribeAttack() {
sess := session.Must(session.NewSession())
svc := shield.New(sess)
params := &shield.DescribeAttackInput{
AttackId: aws.String("AttackId"), // Required
}
resp, err := svc.DescribeAttack(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)
}
func ExampleShield_DescribeProtection() {
sess := session.Must(session.NewSession())
svc := shield.New(sess)
params := &shield.DescribeProtectionInput{
ProtectionId: aws.String("ProtectionId"), // Required
}
resp, err := svc.DescribeProtection(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)
}
func ExampleShield_DescribeSubscription() {
sess := session.Must(session.NewSession())
svc := shield.New(sess)
var params *shield.DescribeSubscriptionInput
resp, err := svc.DescribeSubscription(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)
}
func ExampleShield_ListAttacks() {
sess := session.Must(session.NewSession())
svc := shield.New(sess)
params := &shield.ListAttacksInput{
EndTime: &shield.TimeRange{
FromInclusive: aws.Time(time.Now()),
ToExclusive: aws.Time(time.Now()),
},
MaxResults: aws.Int64(1),
NextToken: aws.String("Token"),
ResourceArns: []*string{
aws.String("ResourceArn"), // Required
// More values...
},
StartTime: &shield.TimeRange{
FromInclusive: aws.Time(time.Now()),
ToExclusive: aws.Time(time.Now()),
},
}
resp, err := svc.ListAttacks(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)
}
func ExampleShield_ListProtections() {
sess := session.Must(session.NewSession())
svc := shield.New(sess)
params := &shield.ListProtectionsInput{
MaxResults: aws.Int64(1),
NextToken: aws.String("Token"),
}
resp, err := svc.ListProtections(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)
}
+7 -9
View File
@@ -1,4 +1,4 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package shield
@@ -11,14 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
// This is the AWS Shield Advanced API Reference. This guide is for developers
// 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/).
// The service client's operations are safe to be used concurrently.
// It is not safe to mutate any of the client's properties though.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02
// Shield provides the API operation methods for making requests to
// AWS Shield. See this package's package overview docs
// for details on the service.
//
// Shield methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type Shield struct {
*client.Client
}
+2 -2
View File
@@ -1,4 +1,4 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package shieldiface provides an interface to enable mocking the AWS Shield service client
// for testing your code.
@@ -21,7 +21,7 @@ import (
//
// The best way to use this interface is so the SDK's service client's calls
// can be stubbed out for unit testing your code with the SDK without needing
// to inject custom request handlers into the the SDK's request pipeline.
// to inject custom request handlers into the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // AWS Shield.