Switch to using the dep tool and update all the dependencies
This commit is contained in:
parent
5135ff73cb
commit
98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions
3609
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go
generated
vendored
Normal file
3609
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
85
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/doc.go
generated
vendored
Normal file
85
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,85 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package elasticsearchservice provides the client and types for making API
|
||||
// requests to Amazon Elasticsearch Service.
|
||||
//
|
||||
// Use the Amazon Elasticsearch configuration API to create, configure, and
|
||||
// manage Elasticsearch domains.
|
||||
//
|
||||
// The endpoint for configuration service requests is region-specific: es.region.amazonaws.com.
|
||||
// For example, es.us-east-1.amazonaws.com. For a current list of supported
|
||||
// regions and endpoints, see Regions and Endpoints (http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticsearch-service-regions).
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/es-2015-01-01 for more information on this service.
|
||||
//
|
||||
// See elasticsearchservice package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/elasticsearchservice/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon Elasticsearch Service you will first need
|
||||
// to create a new instance of it.
|
||||
//
|
||||
// When creating a client for an AWS service you'll first need to have a Session
|
||||
// already created. The Session provides configuration that can be shared
|
||||
// between multiple service clients. Additional configuration can be applied to
|
||||
// the Session and service's client when they are constructed. The aws package's
|
||||
// Config type contains several fields such as Region for the AWS Region the
|
||||
// client should make API requests too. The optional Config value can be provided
|
||||
// as the variadic argument for Sessions and client creation.
|
||||
//
|
||||
// Once the service's client is created you can use it to make API requests the
|
||||
// AWS service. These clients are safe to use concurrently.
|
||||
//
|
||||
// // Create a session to share configuration, and load external configuration.
|
||||
// sess := session.Must(session.NewSession())
|
||||
//
|
||||
// // Create the service's client with the session.
|
||||
// svc := elasticsearchservice.New(sess)
|
||||
//
|
||||
// See the SDK's documentation for more information on how to use service clients.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/
|
||||
//
|
||||
// See aws package's Config type for more information on configuration options.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
|
||||
//
|
||||
// See the Amazon Elasticsearch Service client ElasticsearchService for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/elasticsearchservice/#New
|
||||
//
|
||||
// Once the client is created you can make an API request to the service.
|
||||
// Each API method takes a input parameter, and returns the service response
|
||||
// and an error.
|
||||
//
|
||||
// The API method will document which error codes the service can be returned
|
||||
// by the operation if the service models the API operation's errors. These
|
||||
// errors will also be available as const strings prefixed with "ErrCode".
|
||||
//
|
||||
// result, err := svc.AddTags(params)
|
||||
// if err != nil {
|
||||
// // Cast err to awserr.Error to handle specific error codes.
|
||||
// aerr, ok := err.(awserr.Error)
|
||||
// if ok && aerr.Code() == <error code to check for> {
|
||||
// // Specific error code handling
|
||||
// }
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
// fmt.Println("AddTags result:")
|
||||
// fmt.Println(result)
|
||||
//
|
||||
// Using the Client with Context
|
||||
//
|
||||
// The service's client also provides methods to make API requests with a Context
|
||||
// value. This allows you to control the timeout, and cancellation of pending
|
||||
// requests. These methods also take request Option as variadic parameter to apply
|
||||
// additional configuration to the API request.
|
||||
//
|
||||
// ctx := context.Background()
|
||||
//
|
||||
// result, err := svc.AddTagsWithContext(ctx, params)
|
||||
//
|
||||
// See the request package documentation for more information on using Context pattern
|
||||
// with the SDK.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
|
||||
package elasticsearchservice
|
122
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/elasticsearchserviceiface/interface.go
generated
vendored
Normal file
122
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/elasticsearchserviceiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,122 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package elasticsearchserviceiface provides an interface to enable mocking the Amazon Elasticsearch Service service client
|
||||
// for testing your code.
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters.
|
||||
package elasticsearchserviceiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/elasticsearchservice"
|
||||
)
|
||||
|
||||
// ElasticsearchServiceAPI provides an interface to enable mocking the
|
||||
// elasticsearchservice.ElasticsearchService service client's API operation,
|
||||
// paginators, and waiters. This make unit testing your code that calls out
|
||||
// to the SDK's service client's calls easier.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // Amazon Elasticsearch Service.
|
||||
// func myFunc(svc elasticsearchserviceiface.ElasticsearchServiceAPI) bool {
|
||||
// // Make svc.AddTags request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := elasticsearchservice.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockElasticsearchServiceClient struct {
|
||||
// elasticsearchserviceiface.ElasticsearchServiceAPI
|
||||
// }
|
||||
// func (m *mockElasticsearchServiceClient) AddTags(input *elasticsearchservice.AddTagsInput) (*elasticsearchservice.AddTagsOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockElasticsearchServiceClient{}
|
||||
//
|
||||
// myfunc(mockSvc)
|
||||
//
|
||||
// // Verify myFunc's functionality
|
||||
// }
|
||||
//
|
||||
// It is important to note that this interface will have breaking changes
|
||||
// when the service model is updated and adds new API operations, paginators,
|
||||
// and waiters. Its suggested to use the pattern above for testing, or using
|
||||
// tooling to generate mocks to satisfy the interfaces.
|
||||
type ElasticsearchServiceAPI interface {
|
||||
AddTags(*elasticsearchservice.AddTagsInput) (*elasticsearchservice.AddTagsOutput, error)
|
||||
AddTagsWithContext(aws.Context, *elasticsearchservice.AddTagsInput, ...request.Option) (*elasticsearchservice.AddTagsOutput, error)
|
||||
AddTagsRequest(*elasticsearchservice.AddTagsInput) (*request.Request, *elasticsearchservice.AddTagsOutput)
|
||||
|
||||
CreateElasticsearchDomain(*elasticsearchservice.CreateElasticsearchDomainInput) (*elasticsearchservice.CreateElasticsearchDomainOutput, error)
|
||||
CreateElasticsearchDomainWithContext(aws.Context, *elasticsearchservice.CreateElasticsearchDomainInput, ...request.Option) (*elasticsearchservice.CreateElasticsearchDomainOutput, error)
|
||||
CreateElasticsearchDomainRequest(*elasticsearchservice.CreateElasticsearchDomainInput) (*request.Request, *elasticsearchservice.CreateElasticsearchDomainOutput)
|
||||
|
||||
DeleteElasticsearchDomain(*elasticsearchservice.DeleteElasticsearchDomainInput) (*elasticsearchservice.DeleteElasticsearchDomainOutput, error)
|
||||
DeleteElasticsearchDomainWithContext(aws.Context, *elasticsearchservice.DeleteElasticsearchDomainInput, ...request.Option) (*elasticsearchservice.DeleteElasticsearchDomainOutput, error)
|
||||
DeleteElasticsearchDomainRequest(*elasticsearchservice.DeleteElasticsearchDomainInput) (*request.Request, *elasticsearchservice.DeleteElasticsearchDomainOutput)
|
||||
|
||||
DescribeElasticsearchDomain(*elasticsearchservice.DescribeElasticsearchDomainInput) (*elasticsearchservice.DescribeElasticsearchDomainOutput, error)
|
||||
DescribeElasticsearchDomainWithContext(aws.Context, *elasticsearchservice.DescribeElasticsearchDomainInput, ...request.Option) (*elasticsearchservice.DescribeElasticsearchDomainOutput, error)
|
||||
DescribeElasticsearchDomainRequest(*elasticsearchservice.DescribeElasticsearchDomainInput) (*request.Request, *elasticsearchservice.DescribeElasticsearchDomainOutput)
|
||||
|
||||
DescribeElasticsearchDomainConfig(*elasticsearchservice.DescribeElasticsearchDomainConfigInput) (*elasticsearchservice.DescribeElasticsearchDomainConfigOutput, error)
|
||||
DescribeElasticsearchDomainConfigWithContext(aws.Context, *elasticsearchservice.DescribeElasticsearchDomainConfigInput, ...request.Option) (*elasticsearchservice.DescribeElasticsearchDomainConfigOutput, error)
|
||||
DescribeElasticsearchDomainConfigRequest(*elasticsearchservice.DescribeElasticsearchDomainConfigInput) (*request.Request, *elasticsearchservice.DescribeElasticsearchDomainConfigOutput)
|
||||
|
||||
DescribeElasticsearchDomains(*elasticsearchservice.DescribeElasticsearchDomainsInput) (*elasticsearchservice.DescribeElasticsearchDomainsOutput, error)
|
||||
DescribeElasticsearchDomainsWithContext(aws.Context, *elasticsearchservice.DescribeElasticsearchDomainsInput, ...request.Option) (*elasticsearchservice.DescribeElasticsearchDomainsOutput, error)
|
||||
DescribeElasticsearchDomainsRequest(*elasticsearchservice.DescribeElasticsearchDomainsInput) (*request.Request, *elasticsearchservice.DescribeElasticsearchDomainsOutput)
|
||||
|
||||
DescribeElasticsearchInstanceTypeLimits(*elasticsearchservice.DescribeElasticsearchInstanceTypeLimitsInput) (*elasticsearchservice.DescribeElasticsearchInstanceTypeLimitsOutput, error)
|
||||
DescribeElasticsearchInstanceTypeLimitsWithContext(aws.Context, *elasticsearchservice.DescribeElasticsearchInstanceTypeLimitsInput, ...request.Option) (*elasticsearchservice.DescribeElasticsearchInstanceTypeLimitsOutput, error)
|
||||
DescribeElasticsearchInstanceTypeLimitsRequest(*elasticsearchservice.DescribeElasticsearchInstanceTypeLimitsInput) (*request.Request, *elasticsearchservice.DescribeElasticsearchInstanceTypeLimitsOutput)
|
||||
|
||||
ListDomainNames(*elasticsearchservice.ListDomainNamesInput) (*elasticsearchservice.ListDomainNamesOutput, error)
|
||||
ListDomainNamesWithContext(aws.Context, *elasticsearchservice.ListDomainNamesInput, ...request.Option) (*elasticsearchservice.ListDomainNamesOutput, error)
|
||||
ListDomainNamesRequest(*elasticsearchservice.ListDomainNamesInput) (*request.Request, *elasticsearchservice.ListDomainNamesOutput)
|
||||
|
||||
ListElasticsearchInstanceTypes(*elasticsearchservice.ListElasticsearchInstanceTypesInput) (*elasticsearchservice.ListElasticsearchInstanceTypesOutput, error)
|
||||
ListElasticsearchInstanceTypesWithContext(aws.Context, *elasticsearchservice.ListElasticsearchInstanceTypesInput, ...request.Option) (*elasticsearchservice.ListElasticsearchInstanceTypesOutput, error)
|
||||
ListElasticsearchInstanceTypesRequest(*elasticsearchservice.ListElasticsearchInstanceTypesInput) (*request.Request, *elasticsearchservice.ListElasticsearchInstanceTypesOutput)
|
||||
|
||||
ListElasticsearchInstanceTypesPages(*elasticsearchservice.ListElasticsearchInstanceTypesInput, func(*elasticsearchservice.ListElasticsearchInstanceTypesOutput, bool) bool) error
|
||||
ListElasticsearchInstanceTypesPagesWithContext(aws.Context, *elasticsearchservice.ListElasticsearchInstanceTypesInput, func(*elasticsearchservice.ListElasticsearchInstanceTypesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListElasticsearchVersions(*elasticsearchservice.ListElasticsearchVersionsInput) (*elasticsearchservice.ListElasticsearchVersionsOutput, error)
|
||||
ListElasticsearchVersionsWithContext(aws.Context, *elasticsearchservice.ListElasticsearchVersionsInput, ...request.Option) (*elasticsearchservice.ListElasticsearchVersionsOutput, error)
|
||||
ListElasticsearchVersionsRequest(*elasticsearchservice.ListElasticsearchVersionsInput) (*request.Request, *elasticsearchservice.ListElasticsearchVersionsOutput)
|
||||
|
||||
ListElasticsearchVersionsPages(*elasticsearchservice.ListElasticsearchVersionsInput, func(*elasticsearchservice.ListElasticsearchVersionsOutput, bool) bool) error
|
||||
ListElasticsearchVersionsPagesWithContext(aws.Context, *elasticsearchservice.ListElasticsearchVersionsInput, func(*elasticsearchservice.ListElasticsearchVersionsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListTags(*elasticsearchservice.ListTagsInput) (*elasticsearchservice.ListTagsOutput, error)
|
||||
ListTagsWithContext(aws.Context, *elasticsearchservice.ListTagsInput, ...request.Option) (*elasticsearchservice.ListTagsOutput, error)
|
||||
ListTagsRequest(*elasticsearchservice.ListTagsInput) (*request.Request, *elasticsearchservice.ListTagsOutput)
|
||||
|
||||
RemoveTags(*elasticsearchservice.RemoveTagsInput) (*elasticsearchservice.RemoveTagsOutput, error)
|
||||
RemoveTagsWithContext(aws.Context, *elasticsearchservice.RemoveTagsInput, ...request.Option) (*elasticsearchservice.RemoveTagsOutput, error)
|
||||
RemoveTagsRequest(*elasticsearchservice.RemoveTagsInput) (*request.Request, *elasticsearchservice.RemoveTagsOutput)
|
||||
|
||||
UpdateElasticsearchDomainConfig(*elasticsearchservice.UpdateElasticsearchDomainConfigInput) (*elasticsearchservice.UpdateElasticsearchDomainConfigOutput, error)
|
||||
UpdateElasticsearchDomainConfigWithContext(aws.Context, *elasticsearchservice.UpdateElasticsearchDomainConfigInput, ...request.Option) (*elasticsearchservice.UpdateElasticsearchDomainConfigOutput, error)
|
||||
UpdateElasticsearchDomainConfigRequest(*elasticsearchservice.UpdateElasticsearchDomainConfigInput) (*request.Request, *elasticsearchservice.UpdateElasticsearchDomainConfigOutput)
|
||||
}
|
||||
|
||||
var _ ElasticsearchServiceAPI = (*elasticsearchservice.ElasticsearchService)(nil)
|
62
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/errors.go
generated
vendored
Normal file
62
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package elasticsearchservice
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeBaseException for service response error code
|
||||
// "BaseException".
|
||||
//
|
||||
// An error occurred while processing the request.
|
||||
ErrCodeBaseException = "BaseException"
|
||||
|
||||
// ErrCodeDisabledOperationException for service response error code
|
||||
// "DisabledOperationException".
|
||||
//
|
||||
// An error occured because the client wanted to access a not supported operation.
|
||||
// Gives http status code of 409.
|
||||
ErrCodeDisabledOperationException = "DisabledOperationException"
|
||||
|
||||
// ErrCodeInternalException for service response error code
|
||||
// "InternalException".
|
||||
//
|
||||
// The request processing has failed because of an unknown error, exception
|
||||
// or failure (the failure is internal to the service) . Gives http status code
|
||||
// of 500.
|
||||
ErrCodeInternalException = "InternalException"
|
||||
|
||||
// ErrCodeInvalidTypeException for service response error code
|
||||
// "InvalidTypeException".
|
||||
//
|
||||
// An exception for trying to create or access sub-resource that is either invalid
|
||||
// or not supported. Gives http status code of 409.
|
||||
ErrCodeInvalidTypeException = "InvalidTypeException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// An exception for trying to create more than allowed resources or sub-resources.
|
||||
// Gives http status code of 409.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeResourceAlreadyExistsException for service response error code
|
||||
// "ResourceAlreadyExistsException".
|
||||
//
|
||||
// An exception for creating a resource that already exists. Gives http status
|
||||
// code of 400.
|
||||
ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// An exception for accessing or deleting a resource that does not exist. Gives
|
||||
// http status code of 400.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
|
||||
// ErrCodeValidationException for service response error code
|
||||
// "ValidationException".
|
||||
//
|
||||
// An exception for missing / invalid input fields. Gives http status code of
|
||||
// 400.
|
||||
ErrCodeValidationException = "ValidationException"
|
||||
)
|
352
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/examples_test.go
generated
vendored
Normal file
352
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,352 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package elasticsearchservice_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/elasticsearchservice"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleElasticsearchService_AddTags() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.AddTagsInput{
|
||||
ARN: aws.String("ARN"), // Required
|
||||
TagList: []*elasticsearchservice.Tag{ // Required
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"), // Required
|
||||
Value: aws.String("TagValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.AddTags(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 ExampleElasticsearchService_CreateElasticsearchDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.CreateElasticsearchDomainInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
AccessPolicies: aws.String("PolicyDocument"),
|
||||
AdvancedOptions: map[string]*string{
|
||||
"Key": aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
EBSOptions: &elasticsearchservice.EBSOptions{
|
||||
EBSEnabled: aws.Bool(true),
|
||||
Iops: aws.Int64(1),
|
||||
VolumeSize: aws.Int64(1),
|
||||
VolumeType: aws.String("VolumeType"),
|
||||
},
|
||||
ElasticsearchClusterConfig: &elasticsearchservice.ElasticsearchClusterConfig{
|
||||
DedicatedMasterCount: aws.Int64(1),
|
||||
DedicatedMasterEnabled: aws.Bool(true),
|
||||
DedicatedMasterType: aws.String("ESPartitionInstanceType"),
|
||||
InstanceCount: aws.Int64(1),
|
||||
InstanceType: aws.String("ESPartitionInstanceType"),
|
||||
ZoneAwarenessEnabled: aws.Bool(true),
|
||||
},
|
||||
ElasticsearchVersion: aws.String("ElasticsearchVersionString"),
|
||||
SnapshotOptions: &elasticsearchservice.SnapshotOptions{
|
||||
AutomatedSnapshotStartHour: aws.Int64(1),
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateElasticsearchDomain(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 ExampleElasticsearchService_DeleteElasticsearchDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.DeleteElasticsearchDomainInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteElasticsearchDomain(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 ExampleElasticsearchService_DescribeElasticsearchDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.DescribeElasticsearchDomainInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeElasticsearchDomain(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 ExampleElasticsearchService_DescribeElasticsearchDomainConfig() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.DescribeElasticsearchDomainConfigInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeElasticsearchDomainConfig(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 ExampleElasticsearchService_DescribeElasticsearchDomains() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.DescribeElasticsearchDomainsInput{
|
||||
DomainNames: []*string{ // Required
|
||||
aws.String("DomainName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeElasticsearchDomains(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 ExampleElasticsearchService_DescribeElasticsearchInstanceTypeLimits() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.DescribeElasticsearchInstanceTypeLimitsInput{
|
||||
ElasticsearchVersion: aws.String("ElasticsearchVersionString"), // Required
|
||||
InstanceType: aws.String("ESPartitionInstanceType"), // Required
|
||||
DomainName: aws.String("DomainName"),
|
||||
}
|
||||
resp, err := svc.DescribeElasticsearchInstanceTypeLimits(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 ExampleElasticsearchService_ListDomainNames() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
var params *elasticsearchservice.ListDomainNamesInput
|
||||
resp, err := svc.ListDomainNames(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 ExampleElasticsearchService_ListElasticsearchInstanceTypes() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.ListElasticsearchInstanceTypesInput{
|
||||
ElasticsearchVersion: aws.String("ElasticsearchVersionString"), // Required
|
||||
DomainName: aws.String("DomainName"),
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListElasticsearchInstanceTypes(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 ExampleElasticsearchService_ListElasticsearchVersions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.ListElasticsearchVersionsInput{
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListElasticsearchVersions(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 ExampleElasticsearchService_ListTags() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.ListTagsInput{
|
||||
ARN: aws.String("ARN"), // Required
|
||||
}
|
||||
resp, err := svc.ListTags(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 ExampleElasticsearchService_RemoveTags() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.RemoveTagsInput{
|
||||
ARN: aws.String("ARN"), // Required
|
||||
TagKeys: []*string{ // Required
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.RemoveTags(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 ExampleElasticsearchService_UpdateElasticsearchDomainConfig() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := elasticsearchservice.New(sess)
|
||||
|
||||
params := &elasticsearchservice.UpdateElasticsearchDomainConfigInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
AccessPolicies: aws.String("PolicyDocument"),
|
||||
AdvancedOptions: map[string]*string{
|
||||
"Key": aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
EBSOptions: &elasticsearchservice.EBSOptions{
|
||||
EBSEnabled: aws.Bool(true),
|
||||
Iops: aws.Int64(1),
|
||||
VolumeSize: aws.Int64(1),
|
||||
VolumeType: aws.String("VolumeType"),
|
||||
},
|
||||
ElasticsearchClusterConfig: &elasticsearchservice.ElasticsearchClusterConfig{
|
||||
DedicatedMasterCount: aws.Int64(1),
|
||||
DedicatedMasterEnabled: aws.Bool(true),
|
||||
DedicatedMasterType: aws.String("ESPartitionInstanceType"),
|
||||
InstanceCount: aws.Int64(1),
|
||||
InstanceType: aws.String("ESPartitionInstanceType"),
|
||||
ZoneAwarenessEnabled: aws.Bool(true),
|
||||
},
|
||||
SnapshotOptions: &elasticsearchservice.SnapshotOptions{
|
||||
AutomatedSnapshotStartHour: aws.Int64(1),
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateElasticsearchDomainConfig(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)
|
||||
}
|
93
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go
generated
vendored
Normal file
93
vendor/github.com/aws/aws-sdk-go/service/elasticsearchservice/service.go
generated
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package elasticsearchservice
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/client/metadata"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/aws/signer/v4"
|
||||
"github.com/aws/aws-sdk-go/private/protocol/restjson"
|
||||
)
|
||||
|
||||
// ElasticsearchService provides the API operation methods for making requests to
|
||||
// Amazon Elasticsearch Service. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// ElasticsearchService methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type ElasticsearchService struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
// Used for custom client initialization logic
|
||||
var initClient func(*client.Client)
|
||||
|
||||
// Used for custom request initialization logic
|
||||
var initRequest func(*request.Request)
|
||||
|
||||
// Service information constants
|
||||
const (
|
||||
ServiceName = "es" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the ElasticsearchService client with a session.
|
||||
// If additional configuration is needed for the client instance use the optional
|
||||
// aws.Config parameter to add your extra config.
|
||||
//
|
||||
// Example:
|
||||
// // Create a ElasticsearchService client from just a session.
|
||||
// svc := elasticsearchservice.New(mySession)
|
||||
//
|
||||
// // Create a ElasticsearchService client with additional configuration
|
||||
// svc := elasticsearchservice.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ElasticsearchService {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ElasticsearchService {
|
||||
svc := &ElasticsearchService{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2015-01-01",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(restjson.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a ElasticsearchService operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *ElasticsearchService) newRequest(op *request.Operation, params, data interface{}) *request.Request {
|
||||
req := c.NewRequest(op, params, data)
|
||||
|
||||
// Run custom request initialization if present
|
||||
if initRequest != nil {
|
||||
initRequest(req)
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue