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
+39 -6
View File
@@ -13,7 +13,7 @@ const opInvokeEndpoint = "InvokeEndpoint"
// InvokeEndpointRequest generates a "aws/request.Request" representing the
// client's request for the InvokeEndpoint operation. The "output" return
// value will be populated with the request's response once the request completes
// successfuly.
// successfully.
//
// 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.
@@ -56,12 +56,20 @@ func (c *SageMakerRuntime) InvokeEndpointRequest(input *InvokeEndpointInput) (re
// your client applications use this API to get inferences from the model hosted
// at the specified endpoint.
//
// For an overview of Amazon SageMaker, see How It Works (http://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html)
// For an overview of Amazon SageMaker, see How It Works (http://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html).
//
// Amazon SageMaker strips all POST headers except those supported by the API.
// Amazon SageMaker might add additional headers. You should not rely on the
// behavior of headers outside those enumerated in the request syntax.
//
// Cals to InvokeEndpoint are authenticated by using AWS Signature Version 4.
// For information, see Authenticating Requests (AWS Signature Version 4) (http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)
// in the Amazon S3 API Reference.
//
// Endpoints are scoped to an individual account, and are not public. The URL
// does not contain the account ID, but Amazon SageMaker determines the account
// ID from the authentication token that is supplied by the caller.
//
// 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.
@@ -71,10 +79,10 @@ func (c *SageMakerRuntime) InvokeEndpointRequest(input *InvokeEndpointInput) (re
//
// Returned Error Codes:
// * ErrCodeInternalFailure "InternalFailure"
// Internal failure occurred.
// An internal failure occurred.
//
// * ErrCodeServiceUnavailable "ServiceUnavailable"
// Service is unavailable. Try your call again.
// The service is unavailable. Try your call again.
//
// * ErrCodeValidationError "ValidationError"
// Inspect your request and try again.
@@ -113,12 +121,17 @@ type InvokeEndpointInput struct {
// Provides input data, in the format specified in the ContentType request header.
// Amazon SageMaker passes all of the data in the body to the model.
//
// For information about the format of the request body, see Common Data Formats—Inference
// (http://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html).
//
// Body is a required field
Body []byte `type:"blob" required:"true"`
Body []byte `type:"blob" required:"true" sensitive:"true"`
// The MIME type of the input data in the request body.
ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
CustomAttributes *string `location:"header" locationName:"X-Amzn-SageMaker-Custom-Attributes" type:"string" sensitive:"true"`
// The name of the endpoint that you specified when you created the endpoint
// using the CreateEndpoint (http://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateEndpoint.html)
// API.
@@ -146,6 +159,9 @@ func (s *InvokeEndpointInput) Validate() error {
if s.EndpointName == nil {
invalidParams.Add(request.NewErrParamRequired("EndpointName"))
}
if s.EndpointName != nil && len(*s.EndpointName) < 1 {
invalidParams.Add(request.NewErrParamMinLen("EndpointName", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
@@ -171,6 +187,12 @@ func (s *InvokeEndpointInput) SetContentType(v string) *InvokeEndpointInput {
return s
}
// SetCustomAttributes sets the CustomAttributes field's value.
func (s *InvokeEndpointInput) SetCustomAttributes(v string) *InvokeEndpointInput {
s.CustomAttributes = &v
return s
}
// SetEndpointName sets the EndpointName field's value.
func (s *InvokeEndpointInput) SetEndpointName(v string) *InvokeEndpointInput {
s.EndpointName = &v
@@ -182,12 +204,17 @@ type InvokeEndpointOutput struct {
// Includes the inference provided by the model.
//
// For information about the format of the response body, see Common Data Formats—Inference
// (http://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html).
//
// Body is a required field
Body []byte `type:"blob" required:"true"`
Body []byte `type:"blob" required:"true" sensitive:"true"`
// The MIME type of the inference returned in the response body.
ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
CustomAttributes *string `location:"header" locationName:"X-Amzn-SageMaker-Custom-Attributes" type:"string" sensitive:"true"`
// Identifies the production variant that was invoked.
InvokedProductionVariant *string `location:"header" locationName:"x-Amzn-Invoked-Production-Variant" type:"string"`
}
@@ -214,6 +241,12 @@ func (s *InvokeEndpointOutput) SetContentType(v string) *InvokeEndpointOutput {
return s
}
// SetCustomAttributes sets the CustomAttributes field's value.
func (s *InvokeEndpointOutput) SetCustomAttributes(v string) *InvokeEndpointOutput {
s.CustomAttributes = &v
return s
}
// SetInvokedProductionVariant sets the InvokedProductionVariant field's value.
func (s *InvokeEndpointOutput) SetInvokedProductionVariant(v string) *InvokeEndpointOutput {
s.InvokedProductionVariant = &v
+1 -1
View File
@@ -3,7 +3,7 @@
// Package sagemakerruntime provides the client and types for making API
// requests to Amazon SageMaker Runtime.
//
// Amazon SageMaker runtime API.
// The Amazon SageMaker runtime API.
//
// See https://docs.aws.amazon.com/goto/WebAPI/runtime.sagemaker-2017-05-13 for more information on this service.
//
+2 -2
View File
@@ -7,7 +7,7 @@ const (
// ErrCodeInternalFailure for service response error code
// "InternalFailure".
//
// Internal failure occurred.
// An internal failure occurred.
ErrCodeInternalFailure = "InternalFailure"
// ErrCodeModelError for service response error code
@@ -19,7 +19,7 @@ const (
// ErrCodeServiceUnavailable for service response error code
// "ServiceUnavailable".
//
// Service is unavailable. Try your call again.
// The service is unavailable. Try your call again.
ErrCodeServiceUnavailable = "ServiceUnavailable"
// ErrCodeValidationError for service response error code
+4 -3
View File
@@ -29,8 +29,9 @@ var initRequest func(*request.Request)
// Service information constants
const (
ServiceName = "runtime.sagemaker" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
ServiceName = "runtime.sagemaker" // Name of service.
EndpointsID = ServiceName // ID to lookup a service endpoint with.
ServiceID = "SageMaker Runtime" // ServiceID is a unique identifer of a specific service.
)
// New creates a new instance of the SageMakerRuntime client with a session.
@@ -58,11 +59,11 @@ func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegio
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
ServiceID: ServiceID,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2017-05-13",
JSONVersion: "1.1",
},
handlers,
),