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
+129 -106
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 xray provides a client for AWS X-Ray.
package xray
import (
@@ -15,19 +14,18 @@ const opBatchGetTraces = "BatchGetTraces"
// BatchGetTracesRequest generates a "aws/request.Request" representing the
// client's request for the BatchGetTraces 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 BatchGetTraces 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 BatchGetTraces method directly
// instead.
// See BatchGetTraces for more information on using the BatchGetTraces
// 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 BatchGetTracesRequest method.
// req, resp := client.BatchGetTracesRequest(params)
@@ -100,19 +98,18 @@ const opGetServiceGraph = "GetServiceGraph"
// GetServiceGraphRequest generates a "aws/request.Request" representing the
// client's request for the GetServiceGraph 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 GetServiceGraph 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 GetServiceGraph method directly
// instead.
// See GetServiceGraph for more information on using the GetServiceGraph
// 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 GetServiceGraphRequest method.
// req, resp := client.GetServiceGraphRequest(params)
@@ -187,19 +184,18 @@ const opGetTraceGraph = "GetTraceGraph"
// GetTraceGraphRequest generates a "aws/request.Request" representing the
// client's request for the GetTraceGraph 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 GetTraceGraph 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 GetTraceGraph method directly
// instead.
// See GetTraceGraph for more information on using the GetTraceGraph
// 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 GetTraceGraphRequest method.
// req, resp := client.GetTraceGraphRequest(params)
@@ -270,19 +266,18 @@ const opGetTraceSummaries = "GetTraceSummaries"
// GetTraceSummariesRequest generates a "aws/request.Request" representing the
// client's request for the GetTraceSummaries 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 GetTraceSummaries 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 GetTraceSummaries method directly
// instead.
// See GetTraceSummaries for more information on using the GetTraceSummaries
// 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 GetTraceSummariesRequest method.
// req, resp := client.GetTraceSummariesRequest(params)
@@ -314,6 +309,21 @@ func (c *XRay) GetTraceSummariesRequest(input *GetTraceSummariesInput) (req *req
// Retrieves IDs and metadata for traces available for a specified time frame
// using an optional filter. To get the full traces, pass the trace IDs to BatchGetTraces.
//
// A filter expression can target traced requests that hit specific service
// nodes or edges, have errors, or come from a known user. For example, the
// following filter expression targets traces that pass through api.example.com:
//
// service("api.example.com")
//
// This filter expression finds traces that have an annotation named account
// with the value 12345:
//
// annotation.account = "12345"
//
// For a full list of indexed fields and keywords that you can use in filter
// expressions, see Using Filter Expressions (http://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html)
// in the AWS X-Ray Developer Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
@@ -354,19 +364,18 @@ const opPutTelemetryRecords = "PutTelemetryRecords"
// PutTelemetryRecordsRequest generates a "aws/request.Request" representing the
// client's request for the PutTelemetryRecords 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 PutTelemetryRecords 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 PutTelemetryRecords method directly
// instead.
// See PutTelemetryRecords for more information on using the PutTelemetryRecords
// 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 PutTelemetryRecordsRequest method.
// req, resp := client.PutTelemetryRecordsRequest(params)
@@ -437,19 +446,18 @@ const opPutTraceSegments = "PutTraceSegments"
// PutTraceSegmentsRequest generates a "aws/request.Request" representing the
// client's request for the PutTraceSegments 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 PutTraceSegments 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 PutTraceSegments method directly
// instead.
// See PutTraceSegments for more information on using the PutTraceSegments
// 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 PutTraceSegmentsRequest method.
// req, resp := client.PutTraceSegmentsRequest(params)
@@ -483,6 +491,48 @@ func (c *XRay) PutTraceSegmentsRequest(input *PutTraceSegmentsInput) (req *reque
// document can be a completed segment, an in-progress segment, or an array
// of subsegments.
//
// Segments must include the following fields. For the full segment document
// schema, see AWS X-Ray Segment Documents (http://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html)
// in the AWS X-Ray Developer Guide.
//
// Required Segment Document Fields
//
// * name - The name of the service that handled the request.
//
// * id - A 64-bit identifier for the segment, unique among segments in the
// same trace, in 16 hexadecimal digits.
//
// * trace_id - A unique identifier that connects all segments and subsegments
// originating from a single client request.
//
// * start_time - Time the segment or subsegment was created, in floating
// point seconds in epoch time, accurate to milliseconds. For example, 1480615200.010
// or 1.480615200010E9.
//
// * end_time - Time the segment or subsegment was closed. For example, 1480615200.090
// or 1.480615200090E9. Specify either an end_time or in_progress.
//
// * in_progress - Set to true instead of specifying an end_time to record
// that a segment has been started, but is not complete. Send an in progress
// segment when your application receives a request that will take a long
// time to serve, to trace the fact that the request was received. When the
// response is sent, send the complete segment to overwrite the in-progress
// segment.
//
// A trace_id consists of three numbers separated by hyphens. For example, 1-58406520-a006649127e371903a2de979.
// This includes:
//
// Trace ID Format
//
// * The version number, i.e. 1.
//
// * The time of the original request, in Unix epoch time, in 8 hexadecimal
// digits. For example, 10:00AM December 2nd, 2016 PST in epoch time is 1480615200
// seconds, or 58406520 in hexadecimal.
//
// * A 96-bit identifier for the trace, globally unique, in 24 hexadecimal
// digits.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
@@ -773,7 +823,7 @@ type Edge struct {
// Identifier of the edge. Unique within a service map.
ReferenceId *int64 `type:"integer"`
// Histogram describing the prominence of response times on the edge.
// A histogram that maps the spread of client response times on an edge.
ResponseTimeHistogram []*HistogramEntry `type:"list"`
// The start time of the first segment on the edge.
@@ -1475,46 +1525,7 @@ func (s PutTelemetryRecordsOutput) GoString() string {
type PutTraceSegmentsInput struct {
_ struct{} `type:"structure"`
// A JSON document defining one or more segments or subsegments. Segments must
// include the following fields.
//
// Required Segment Document Fields
//
// * name - The name of the service that handled the request.
//
// * id - A 64-bit identifier for the segment, unique among segments in the
// same trace, in 16 hexadecimal digits.
//
// * trace_id - A unique identifier that connects all segments and subsegments
// originating from a single client request.
//
// * start_time - Time the segment or subsegment was created, in floating
// point seconds in epoch time, accurate to milliseconds. For example, 1480615200.010
// or 1.480615200010E9.
//
// * end_time - Time the segment or subsegment was closed. For example, 1480615200.090
// or 1.480615200090E9. Specify either an end_time or in_progress.
//
// * in_progress - Set to true instead of specifying an end_time to record
// that a segment has been started, but is not complete. Send an in progress
// segment when your application receives a request that will take a long
// time to serve, to trace the fact that the request was received. When the
// response is sent, send the complete segment to overwrite the in-progress
// segment.
//
// A trace_id consists of three numbers separated by hyphens. For example, 1-58406520-a006649127e371903a2de979.
// This includes:
//
// Trace ID Format
//
// * The version number, i.e. 1.
//
// * The time of the original request, in Unix epoch time, in 8 hexadecimal
// digits. For example, 10:00AM December 2nd, 2016 PST in epoch time is 1480615200
// seconds, or 58406520 in hexadecimal.
//
// * A 96-bit identifier for the trace, globally unique, in 24 hexadecimal
// digits.
// A string containing a JSON document defining one or more segments or subsegments.
//
// TraceSegmentDocuments is a required field
TraceSegmentDocuments []*string `type:"list" required:"true"`
@@ -1573,12 +1584,15 @@ func (s *PutTraceSegmentsOutput) SetUnprocessedTraceSegments(v []*UnprocessedTra
return s
}
// Information about a segment
// A segment from a trace that has been ingested by the X-Ray service. The segment
// can be compiled from documents uploaded with PutTraceSegments, or an inferred
// segment for a downstream service, generated from a subsegment sent by the
// service that called it.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Segment
type Segment struct {
_ struct{} `type:"structure"`
// The segment document.
// The segment document
Document *string `min:"1" type:"string"`
// The segment's ID.
@@ -1617,7 +1631,7 @@ type Service struct {
// Identifier of the AWS account in which the service runs.
AccountId *string `type:"string"`
// Histogram mapping the spread of trace durations
// A histogram that maps the spread of service durations.
DurationHistogram []*HistogramEntry `type:"list"`
// Connections to downstream services.
@@ -1635,6 +1649,9 @@ type Service struct {
// Identifier for the service. Unique within the service map.
ReferenceId *int64 `type:"integer"`
// A histogram that maps the spread of service response times.
ResponseTimeHistogram []*HistogramEntry `type:"list"`
// Indicates that the service was the first service to process a request.
Root *bool `type:"boolean"`
@@ -1715,6 +1732,12 @@ func (s *Service) SetReferenceId(v int64) *Service {
return s
}
// SetResponseTimeHistogram sets the ResponseTimeHistogram field's value.
func (s *Service) SetResponseTimeHistogram(v []*HistogramEntry) *Service {
s.ResponseTimeHistogram = v
return s
}
// SetRoot sets the Root field's value.
func (s *Service) SetRoot(v bool) *Service {
s.Root = &v
+29
View File
@@ -0,0 +1,29 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package xray provides the client and types for making API
// requests to AWS X-Ray.
//
// AWS X-Ray provides APIs for managing debug traces and retrieving service
// maps and other data created by processing those traces.
//
// See https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12 for more information on this service.
//
// See xray package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/xray/
//
// Using the Client
//
// To AWS X-Ray 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 X-Ray client XRay for more
// information on creating client for this service.
// https://docs.aws.amazon.com/sdk-for-go/api/service/xray/#New
package xray
+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 xray
-179
View File
@@ -1,179 +0,0 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package xray_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/xray"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleXRay_BatchGetTraces() {
sess := session.Must(session.NewSession())
svc := xray.New(sess)
params := &xray.BatchGetTracesInput{
TraceIds: []*string{ // Required
aws.String("TraceId"), // Required
// More values...
},
NextToken: aws.String("String"),
}
resp, err := svc.BatchGetTraces(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 ExampleXRay_GetServiceGraph() {
sess := session.Must(session.NewSession())
svc := xray.New(sess)
params := &xray.GetServiceGraphInput{
EndTime: aws.Time(time.Now()), // Required
StartTime: aws.Time(time.Now()), // Required
NextToken: aws.String("String"),
}
resp, err := svc.GetServiceGraph(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 ExampleXRay_GetTraceGraph() {
sess := session.Must(session.NewSession())
svc := xray.New(sess)
params := &xray.GetTraceGraphInput{
TraceIds: []*string{ // Required
aws.String("TraceId"), // Required
// More values...
},
NextToken: aws.String("String"),
}
resp, err := svc.GetTraceGraph(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 ExampleXRay_GetTraceSummaries() {
sess := session.Must(session.NewSession())
svc := xray.New(sess)
params := &xray.GetTraceSummariesInput{
EndTime: aws.Time(time.Now()), // Required
StartTime: aws.Time(time.Now()), // Required
FilterExpression: aws.String("FilterExpression"),
NextToken: aws.String("String"),
Sampling: aws.Bool(true),
}
resp, err := svc.GetTraceSummaries(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 ExampleXRay_PutTelemetryRecords() {
sess := session.Must(session.NewSession())
svc := xray.New(sess)
params := &xray.PutTelemetryRecordsInput{
TelemetryRecords: []*xray.TelemetryRecord{ // Required
{ // Required
BackendConnectionErrors: &xray.BackendConnectionErrors{
ConnectionRefusedCount: aws.Int64(1),
HTTPCode4XXCount: aws.Int64(1),
HTTPCode5XXCount: aws.Int64(1),
OtherCount: aws.Int64(1),
TimeoutCount: aws.Int64(1),
UnknownHostCount: aws.Int64(1),
},
SegmentsReceivedCount: aws.Int64(1),
SegmentsRejectedCount: aws.Int64(1),
SegmentsSentCount: aws.Int64(1),
SegmentsSpilloverCount: aws.Int64(1),
Timestamp: aws.Time(time.Now()),
},
// More values...
},
EC2InstanceId: aws.String("String"),
Hostname: aws.String("String"),
ResourceARN: aws.String("String"),
}
resp, err := svc.PutTelemetryRecords(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 ExampleXRay_PutTraceSegments() {
sess := session.Must(session.NewSession())
svc := xray.New(sess)
params := &xray.PutTraceSegmentsInput{
TraceSegmentDocuments: []*string{ // Required
aws.String("TraceSegmentDocument"), // Required
// More values...
},
}
resp, err := svc.PutTraceSegments(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 -6
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 xray
@@ -11,11 +11,12 @@ import (
"github.com/aws/aws-sdk-go/private/protocol/restjson"
)
// AWS X-Ray provides APIs for managing debug traces and retrieving service
// maps and other data created by processing those traces.
// 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/xray-2016-04-12
// XRay provides the API operation methods for making requests to
// AWS X-Ray. See this package's package overview docs
// for details on the service.
//
// XRay methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type XRay 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 xrayiface provides an interface to enable mocking the AWS X-Ray 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 X-Ray.