forked from TrueCloudLab/rclone
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
107
vendor/github.com/aws/aws-sdk-go/service/acm/acmiface/interface.go
generated
vendored
Normal file
107
vendor/github.com/aws/aws-sdk-go/service/acm/acmiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,107 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package acmiface provides an interface to enable mocking the AWS Certificate Manager 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 acmiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/acm"
|
||||
)
|
||||
|
||||
// ACMAPI provides an interface to enable mocking the
|
||||
// acm.ACM 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
|
||||
// // AWS Certificate Manager.
|
||||
// func myFunc(svc acmiface.ACMAPI) bool {
|
||||
// // Make svc.AddTagsToCertificate request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := acm.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockACMClient struct {
|
||||
// acmiface.ACMAPI
|
||||
// }
|
||||
// func (m *mockACMClient) AddTagsToCertificate(input *acm.AddTagsToCertificateInput) (*acm.AddTagsToCertificateOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockACMClient{}
|
||||
//
|
||||
// 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 ACMAPI interface {
|
||||
AddTagsToCertificate(*acm.AddTagsToCertificateInput) (*acm.AddTagsToCertificateOutput, error)
|
||||
AddTagsToCertificateWithContext(aws.Context, *acm.AddTagsToCertificateInput, ...request.Option) (*acm.AddTagsToCertificateOutput, error)
|
||||
AddTagsToCertificateRequest(*acm.AddTagsToCertificateInput) (*request.Request, *acm.AddTagsToCertificateOutput)
|
||||
|
||||
DeleteCertificate(*acm.DeleteCertificateInput) (*acm.DeleteCertificateOutput, error)
|
||||
DeleteCertificateWithContext(aws.Context, *acm.DeleteCertificateInput, ...request.Option) (*acm.DeleteCertificateOutput, error)
|
||||
DeleteCertificateRequest(*acm.DeleteCertificateInput) (*request.Request, *acm.DeleteCertificateOutput)
|
||||
|
||||
DescribeCertificate(*acm.DescribeCertificateInput) (*acm.DescribeCertificateOutput, error)
|
||||
DescribeCertificateWithContext(aws.Context, *acm.DescribeCertificateInput, ...request.Option) (*acm.DescribeCertificateOutput, error)
|
||||
DescribeCertificateRequest(*acm.DescribeCertificateInput) (*request.Request, *acm.DescribeCertificateOutput)
|
||||
|
||||
GetCertificate(*acm.GetCertificateInput) (*acm.GetCertificateOutput, error)
|
||||
GetCertificateWithContext(aws.Context, *acm.GetCertificateInput, ...request.Option) (*acm.GetCertificateOutput, error)
|
||||
GetCertificateRequest(*acm.GetCertificateInput) (*request.Request, *acm.GetCertificateOutput)
|
||||
|
||||
ImportCertificate(*acm.ImportCertificateInput) (*acm.ImportCertificateOutput, error)
|
||||
ImportCertificateWithContext(aws.Context, *acm.ImportCertificateInput, ...request.Option) (*acm.ImportCertificateOutput, error)
|
||||
ImportCertificateRequest(*acm.ImportCertificateInput) (*request.Request, *acm.ImportCertificateOutput)
|
||||
|
||||
ListCertificates(*acm.ListCertificatesInput) (*acm.ListCertificatesOutput, error)
|
||||
ListCertificatesWithContext(aws.Context, *acm.ListCertificatesInput, ...request.Option) (*acm.ListCertificatesOutput, error)
|
||||
ListCertificatesRequest(*acm.ListCertificatesInput) (*request.Request, *acm.ListCertificatesOutput)
|
||||
|
||||
ListCertificatesPages(*acm.ListCertificatesInput, func(*acm.ListCertificatesOutput, bool) bool) error
|
||||
ListCertificatesPagesWithContext(aws.Context, *acm.ListCertificatesInput, func(*acm.ListCertificatesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListTagsForCertificate(*acm.ListTagsForCertificateInput) (*acm.ListTagsForCertificateOutput, error)
|
||||
ListTagsForCertificateWithContext(aws.Context, *acm.ListTagsForCertificateInput, ...request.Option) (*acm.ListTagsForCertificateOutput, error)
|
||||
ListTagsForCertificateRequest(*acm.ListTagsForCertificateInput) (*request.Request, *acm.ListTagsForCertificateOutput)
|
||||
|
||||
RemoveTagsFromCertificate(*acm.RemoveTagsFromCertificateInput) (*acm.RemoveTagsFromCertificateOutput, error)
|
||||
RemoveTagsFromCertificateWithContext(aws.Context, *acm.RemoveTagsFromCertificateInput, ...request.Option) (*acm.RemoveTagsFromCertificateOutput, error)
|
||||
RemoveTagsFromCertificateRequest(*acm.RemoveTagsFromCertificateInput) (*request.Request, *acm.RemoveTagsFromCertificateOutput)
|
||||
|
||||
RequestCertificate(*acm.RequestCertificateInput) (*acm.RequestCertificateOutput, error)
|
||||
RequestCertificateWithContext(aws.Context, *acm.RequestCertificateInput, ...request.Option) (*acm.RequestCertificateOutput, error)
|
||||
RequestCertificateRequest(*acm.RequestCertificateInput) (*request.Request, *acm.RequestCertificateOutput)
|
||||
|
||||
ResendValidationEmail(*acm.ResendValidationEmailInput) (*acm.ResendValidationEmailOutput, error)
|
||||
ResendValidationEmailWithContext(aws.Context, *acm.ResendValidationEmailInput, ...request.Option) (*acm.ResendValidationEmailOutput, error)
|
||||
ResendValidationEmailRequest(*acm.ResendValidationEmailInput) (*request.Request, *acm.ResendValidationEmailOutput)
|
||||
}
|
||||
|
||||
var _ ACMAPI = (*acm.ACM)(nil)
|
2582
vendor/github.com/aws/aws-sdk-go/service/acm/api.go
generated
vendored
Normal file
2582
vendor/github.com/aws/aws-sdk-go/service/acm/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
84
vendor/github.com/aws/aws-sdk-go/service/acm/doc.go
generated
vendored
Normal file
84
vendor/github.com/aws/aws-sdk-go/service/acm/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package acm provides the client and types for making API
|
||||
// requests to AWS Certificate Manager.
|
||||
//
|
||||
// Welcome to the AWS Certificate Manager (ACM) API documentation.
|
||||
//
|
||||
// You can use ACM to manage SSL/TLS certificates for your AWS-based websites
|
||||
// and applications. For general information about using ACM, see the AWS Certificate
|
||||
// Manager User Guide (http://docs.aws.amazon.com/acm/latest/userguide/).
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/acm-2015-12-08 for more information on this service.
|
||||
//
|
||||
// See acm package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/acm/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for AWS Certificate Manager 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 := acm.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 AWS Certificate Manager client ACM for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/acm/#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.AddTagsToCertificate(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("AddTagsToCertificate 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.AddTagsToCertificateWithContext(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 acm
|
71
vendor/github.com/aws/aws-sdk-go/service/acm/errors.go
generated
vendored
Normal file
71
vendor/github.com/aws/aws-sdk-go/service/acm/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package acm
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeInvalidArnException for service response error code
|
||||
// "InvalidArnException".
|
||||
//
|
||||
// The requested Amazon Resource Name (ARN) does not refer to an existing resource.
|
||||
ErrCodeInvalidArnException = "InvalidArnException"
|
||||
|
||||
// ErrCodeInvalidDomainValidationOptionsException for service response error code
|
||||
// "InvalidDomainValidationOptionsException".
|
||||
//
|
||||
// One or more values in the DomainValidationOption structure is incorrect.
|
||||
ErrCodeInvalidDomainValidationOptionsException = "InvalidDomainValidationOptionsException"
|
||||
|
||||
// ErrCodeInvalidStateException for service response error code
|
||||
// "InvalidStateException".
|
||||
//
|
||||
// Processing has reached an invalid state. For example, this exception can
|
||||
// occur if the specified domain is not using email validation, or the current
|
||||
// certificate status does not permit the requested operation. See the exception
|
||||
// message returned by ACM to determine which state is not valid.
|
||||
ErrCodeInvalidStateException = "InvalidStateException"
|
||||
|
||||
// ErrCodeInvalidTagException for service response error code
|
||||
// "InvalidTagException".
|
||||
//
|
||||
// One or both of the values that make up the key-value pair is not valid. For
|
||||
// example, you cannot specify a tag value that begins with aws:.
|
||||
ErrCodeInvalidTagException = "InvalidTagException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// An ACM limit has been exceeded. For example, you may have input more domains
|
||||
// than are allowed or you've requested too many certificates for your account.
|
||||
// See the exception message returned by ACM to determine which limit you have
|
||||
// violated. For more information about ACM limits, see the Limits (http://docs.aws.amazon.com/acm/latest/userguide/acm-limits.html)
|
||||
// topic.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeRequestInProgressException for service response error code
|
||||
// "RequestInProgressException".
|
||||
//
|
||||
// The certificate request is in process and the certificate in your account
|
||||
// has not yet been issued.
|
||||
ErrCodeRequestInProgressException = "RequestInProgressException"
|
||||
|
||||
// ErrCodeResourceInUseException for service response error code
|
||||
// "ResourceInUseException".
|
||||
//
|
||||
// The certificate is in use by another AWS service in the caller's account.
|
||||
// Remove the association and try again.
|
||||
ErrCodeResourceInUseException = "ResourceInUseException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// The specified certificate cannot be found in the caller's account, or the
|
||||
// caller's account cannot be found.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
|
||||
// ErrCodeTooManyTagsException for service response error code
|
||||
// "TooManyTagsException".
|
||||
//
|
||||
// The request contains too many tags. Try the request again with fewer tags.
|
||||
ErrCodeTooManyTagsException = "TooManyTagsException"
|
||||
)
|
262
vendor/github.com/aws/aws-sdk-go/service/acm/examples_test.go
generated
vendored
Normal file
262
vendor/github.com/aws/aws-sdk-go/service/acm/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,262 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package acm_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/acm"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleACM_AddTagsToCertificate() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := acm.New(sess)
|
||||
|
||||
params := &acm.AddTagsToCertificateInput{
|
||||
CertificateArn: aws.String("Arn"), // Required
|
||||
Tags: []*acm.Tag{ // Required
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"), // Required
|
||||
Value: aws.String("TagValue"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.AddTagsToCertificate(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 ExampleACM_DeleteCertificate() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := acm.New(sess)
|
||||
|
||||
params := &acm.DeleteCertificateInput{
|
||||
CertificateArn: aws.String("Arn"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteCertificate(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 ExampleACM_DescribeCertificate() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := acm.New(sess)
|
||||
|
||||
params := &acm.DescribeCertificateInput{
|
||||
CertificateArn: aws.String("Arn"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeCertificate(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 ExampleACM_GetCertificate() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := acm.New(sess)
|
||||
|
||||
params := &acm.GetCertificateInput{
|
||||
CertificateArn: aws.String("Arn"), // Required
|
||||
}
|
||||
resp, err := svc.GetCertificate(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 ExampleACM_ImportCertificate() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := acm.New(sess)
|
||||
|
||||
params := &acm.ImportCertificateInput{
|
||||
Certificate: []byte("PAYLOAD"), // Required
|
||||
PrivateKey: []byte("PAYLOAD"), // Required
|
||||
CertificateArn: aws.String("Arn"),
|
||||
CertificateChain: []byte("PAYLOAD"),
|
||||
}
|
||||
resp, err := svc.ImportCertificate(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 ExampleACM_ListCertificates() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := acm.New(sess)
|
||||
|
||||
params := &acm.ListCertificatesInput{
|
||||
CertificateStatuses: []*string{
|
||||
aws.String("CertificateStatus"), // Required
|
||||
// More values...
|
||||
},
|
||||
MaxItems: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListCertificates(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 ExampleACM_ListTagsForCertificate() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := acm.New(sess)
|
||||
|
||||
params := &acm.ListTagsForCertificateInput{
|
||||
CertificateArn: aws.String("Arn"), // Required
|
||||
}
|
||||
resp, err := svc.ListTagsForCertificate(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 ExampleACM_RemoveTagsFromCertificate() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := acm.New(sess)
|
||||
|
||||
params := &acm.RemoveTagsFromCertificateInput{
|
||||
CertificateArn: aws.String("Arn"), // Required
|
||||
Tags: []*acm.Tag{ // Required
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"), // Required
|
||||
Value: aws.String("TagValue"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.RemoveTagsFromCertificate(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 ExampleACM_RequestCertificate() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := acm.New(sess)
|
||||
|
||||
params := &acm.RequestCertificateInput{
|
||||
DomainName: aws.String("DomainNameString"), // Required
|
||||
DomainValidationOptions: []*acm.DomainValidationOption{
|
||||
{ // Required
|
||||
DomainName: aws.String("DomainNameString"), // Required
|
||||
ValidationDomain: aws.String("DomainNameString"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
IdempotencyToken: aws.String("IdempotencyToken"),
|
||||
SubjectAlternativeNames: []*string{
|
||||
aws.String("DomainNameString"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.RequestCertificate(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 ExampleACM_ResendValidationEmail() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := acm.New(sess)
|
||||
|
||||
params := &acm.ResendValidationEmailInput{
|
||||
CertificateArn: aws.String("Arn"), // Required
|
||||
Domain: aws.String("DomainNameString"), // Required
|
||||
ValidationDomain: aws.String("DomainNameString"), // Required
|
||||
}
|
||||
resp, err := svc.ResendValidationEmail(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)
|
||||
}
|
95
vendor/github.com/aws/aws-sdk-go/service/acm/service.go
generated
vendored
Normal file
95
vendor/github.com/aws/aws-sdk-go/service/acm/service.go
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package acm
|
||||
|
||||
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/jsonrpc"
|
||||
)
|
||||
|
||||
// ACM provides the API operation methods for making requests to
|
||||
// AWS Certificate Manager. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// ACM methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type ACM 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 = "acm" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the ACM 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 ACM client from just a session.
|
||||
// svc := acm.New(mySession)
|
||||
//
|
||||
// // Create a ACM client with additional configuration
|
||||
// svc := acm.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ACM {
|
||||
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) *ACM {
|
||||
svc := &ACM{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2015-12-08",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "CertificateManager",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a ACM operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *ACM) 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
|
||||
}
|
20439
vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go
generated
vendored
Normal file
20439
vendor/github.com/aws/aws-sdk-go/service/apigateway/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
525
vendor/github.com/aws/aws-sdk-go/service/apigateway/apigatewayiface/interface.go
generated
vendored
Normal file
525
vendor/github.com/aws/aws-sdk-go/service/apigateway/apigatewayiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,525 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package apigatewayiface provides an interface to enable mocking the Amazon API Gateway 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 apigatewayiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/apigateway"
|
||||
)
|
||||
|
||||
// APIGatewayAPI provides an interface to enable mocking the
|
||||
// apigateway.APIGateway 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 API Gateway.
|
||||
// func myFunc(svc apigatewayiface.APIGatewayAPI) bool {
|
||||
// // Make svc.CreateApiKey request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := apigateway.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockAPIGatewayClient struct {
|
||||
// apigatewayiface.APIGatewayAPI
|
||||
// }
|
||||
// func (m *mockAPIGatewayClient) CreateApiKey(input *apigateway.CreateApiKeyInput) (*apigateway.ApiKey, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockAPIGatewayClient{}
|
||||
//
|
||||
// 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 APIGatewayAPI interface {
|
||||
CreateApiKey(*apigateway.CreateApiKeyInput) (*apigateway.ApiKey, error)
|
||||
CreateApiKeyWithContext(aws.Context, *apigateway.CreateApiKeyInput, ...request.Option) (*apigateway.ApiKey, error)
|
||||
CreateApiKeyRequest(*apigateway.CreateApiKeyInput) (*request.Request, *apigateway.ApiKey)
|
||||
|
||||
CreateAuthorizer(*apigateway.CreateAuthorizerInput) (*apigateway.Authorizer, error)
|
||||
CreateAuthorizerWithContext(aws.Context, *apigateway.CreateAuthorizerInput, ...request.Option) (*apigateway.Authorizer, error)
|
||||
CreateAuthorizerRequest(*apigateway.CreateAuthorizerInput) (*request.Request, *apigateway.Authorizer)
|
||||
|
||||
CreateBasePathMapping(*apigateway.CreateBasePathMappingInput) (*apigateway.BasePathMapping, error)
|
||||
CreateBasePathMappingWithContext(aws.Context, *apigateway.CreateBasePathMappingInput, ...request.Option) (*apigateway.BasePathMapping, error)
|
||||
CreateBasePathMappingRequest(*apigateway.CreateBasePathMappingInput) (*request.Request, *apigateway.BasePathMapping)
|
||||
|
||||
CreateDeployment(*apigateway.CreateDeploymentInput) (*apigateway.Deployment, error)
|
||||
CreateDeploymentWithContext(aws.Context, *apigateway.CreateDeploymentInput, ...request.Option) (*apigateway.Deployment, error)
|
||||
CreateDeploymentRequest(*apigateway.CreateDeploymentInput) (*request.Request, *apigateway.Deployment)
|
||||
|
||||
CreateDocumentationPart(*apigateway.CreateDocumentationPartInput) (*apigateway.DocumentationPart, error)
|
||||
CreateDocumentationPartWithContext(aws.Context, *apigateway.CreateDocumentationPartInput, ...request.Option) (*apigateway.DocumentationPart, error)
|
||||
CreateDocumentationPartRequest(*apigateway.CreateDocumentationPartInput) (*request.Request, *apigateway.DocumentationPart)
|
||||
|
||||
CreateDocumentationVersion(*apigateway.CreateDocumentationVersionInput) (*apigateway.DocumentationVersion, error)
|
||||
CreateDocumentationVersionWithContext(aws.Context, *apigateway.CreateDocumentationVersionInput, ...request.Option) (*apigateway.DocumentationVersion, error)
|
||||
CreateDocumentationVersionRequest(*apigateway.CreateDocumentationVersionInput) (*request.Request, *apigateway.DocumentationVersion)
|
||||
|
||||
CreateDomainName(*apigateway.CreateDomainNameInput) (*apigateway.DomainName, error)
|
||||
CreateDomainNameWithContext(aws.Context, *apigateway.CreateDomainNameInput, ...request.Option) (*apigateway.DomainName, error)
|
||||
CreateDomainNameRequest(*apigateway.CreateDomainNameInput) (*request.Request, *apigateway.DomainName)
|
||||
|
||||
CreateModel(*apigateway.CreateModelInput) (*apigateway.Model, error)
|
||||
CreateModelWithContext(aws.Context, *apigateway.CreateModelInput, ...request.Option) (*apigateway.Model, error)
|
||||
CreateModelRequest(*apigateway.CreateModelInput) (*request.Request, *apigateway.Model)
|
||||
|
||||
CreateRequestValidator(*apigateway.CreateRequestValidatorInput) (*apigateway.UpdateRequestValidatorOutput, error)
|
||||
CreateRequestValidatorWithContext(aws.Context, *apigateway.CreateRequestValidatorInput, ...request.Option) (*apigateway.UpdateRequestValidatorOutput, error)
|
||||
CreateRequestValidatorRequest(*apigateway.CreateRequestValidatorInput) (*request.Request, *apigateway.UpdateRequestValidatorOutput)
|
||||
|
||||
CreateResource(*apigateway.CreateResourceInput) (*apigateway.Resource, error)
|
||||
CreateResourceWithContext(aws.Context, *apigateway.CreateResourceInput, ...request.Option) (*apigateway.Resource, error)
|
||||
CreateResourceRequest(*apigateway.CreateResourceInput) (*request.Request, *apigateway.Resource)
|
||||
|
||||
CreateRestApi(*apigateway.CreateRestApiInput) (*apigateway.RestApi, error)
|
||||
CreateRestApiWithContext(aws.Context, *apigateway.CreateRestApiInput, ...request.Option) (*apigateway.RestApi, error)
|
||||
CreateRestApiRequest(*apigateway.CreateRestApiInput) (*request.Request, *apigateway.RestApi)
|
||||
|
||||
CreateStage(*apigateway.CreateStageInput) (*apigateway.Stage, error)
|
||||
CreateStageWithContext(aws.Context, *apigateway.CreateStageInput, ...request.Option) (*apigateway.Stage, error)
|
||||
CreateStageRequest(*apigateway.CreateStageInput) (*request.Request, *apigateway.Stage)
|
||||
|
||||
CreateUsagePlan(*apigateway.CreateUsagePlanInput) (*apigateway.UsagePlan, error)
|
||||
CreateUsagePlanWithContext(aws.Context, *apigateway.CreateUsagePlanInput, ...request.Option) (*apigateway.UsagePlan, error)
|
||||
CreateUsagePlanRequest(*apigateway.CreateUsagePlanInput) (*request.Request, *apigateway.UsagePlan)
|
||||
|
||||
CreateUsagePlanKey(*apigateway.CreateUsagePlanKeyInput) (*apigateway.UsagePlanKey, error)
|
||||
CreateUsagePlanKeyWithContext(aws.Context, *apigateway.CreateUsagePlanKeyInput, ...request.Option) (*apigateway.UsagePlanKey, error)
|
||||
CreateUsagePlanKeyRequest(*apigateway.CreateUsagePlanKeyInput) (*request.Request, *apigateway.UsagePlanKey)
|
||||
|
||||
DeleteApiKey(*apigateway.DeleteApiKeyInput) (*apigateway.DeleteApiKeyOutput, error)
|
||||
DeleteApiKeyWithContext(aws.Context, *apigateway.DeleteApiKeyInput, ...request.Option) (*apigateway.DeleteApiKeyOutput, error)
|
||||
DeleteApiKeyRequest(*apigateway.DeleteApiKeyInput) (*request.Request, *apigateway.DeleteApiKeyOutput)
|
||||
|
||||
DeleteAuthorizer(*apigateway.DeleteAuthorizerInput) (*apigateway.DeleteAuthorizerOutput, error)
|
||||
DeleteAuthorizerWithContext(aws.Context, *apigateway.DeleteAuthorizerInput, ...request.Option) (*apigateway.DeleteAuthorizerOutput, error)
|
||||
DeleteAuthorizerRequest(*apigateway.DeleteAuthorizerInput) (*request.Request, *apigateway.DeleteAuthorizerOutput)
|
||||
|
||||
DeleteBasePathMapping(*apigateway.DeleteBasePathMappingInput) (*apigateway.DeleteBasePathMappingOutput, error)
|
||||
DeleteBasePathMappingWithContext(aws.Context, *apigateway.DeleteBasePathMappingInput, ...request.Option) (*apigateway.DeleteBasePathMappingOutput, error)
|
||||
DeleteBasePathMappingRequest(*apigateway.DeleteBasePathMappingInput) (*request.Request, *apigateway.DeleteBasePathMappingOutput)
|
||||
|
||||
DeleteClientCertificate(*apigateway.DeleteClientCertificateInput) (*apigateway.DeleteClientCertificateOutput, error)
|
||||
DeleteClientCertificateWithContext(aws.Context, *apigateway.DeleteClientCertificateInput, ...request.Option) (*apigateway.DeleteClientCertificateOutput, error)
|
||||
DeleteClientCertificateRequest(*apigateway.DeleteClientCertificateInput) (*request.Request, *apigateway.DeleteClientCertificateOutput)
|
||||
|
||||
DeleteDeployment(*apigateway.DeleteDeploymentInput) (*apigateway.DeleteDeploymentOutput, error)
|
||||
DeleteDeploymentWithContext(aws.Context, *apigateway.DeleteDeploymentInput, ...request.Option) (*apigateway.DeleteDeploymentOutput, error)
|
||||
DeleteDeploymentRequest(*apigateway.DeleteDeploymentInput) (*request.Request, *apigateway.DeleteDeploymentOutput)
|
||||
|
||||
DeleteDocumentationPart(*apigateway.DeleteDocumentationPartInput) (*apigateway.DeleteDocumentationPartOutput, error)
|
||||
DeleteDocumentationPartWithContext(aws.Context, *apigateway.DeleteDocumentationPartInput, ...request.Option) (*apigateway.DeleteDocumentationPartOutput, error)
|
||||
DeleteDocumentationPartRequest(*apigateway.DeleteDocumentationPartInput) (*request.Request, *apigateway.DeleteDocumentationPartOutput)
|
||||
|
||||
DeleteDocumentationVersion(*apigateway.DeleteDocumentationVersionInput) (*apigateway.DeleteDocumentationVersionOutput, error)
|
||||
DeleteDocumentationVersionWithContext(aws.Context, *apigateway.DeleteDocumentationVersionInput, ...request.Option) (*apigateway.DeleteDocumentationVersionOutput, error)
|
||||
DeleteDocumentationVersionRequest(*apigateway.DeleteDocumentationVersionInput) (*request.Request, *apigateway.DeleteDocumentationVersionOutput)
|
||||
|
||||
DeleteDomainName(*apigateway.DeleteDomainNameInput) (*apigateway.DeleteDomainNameOutput, error)
|
||||
DeleteDomainNameWithContext(aws.Context, *apigateway.DeleteDomainNameInput, ...request.Option) (*apigateway.DeleteDomainNameOutput, error)
|
||||
DeleteDomainNameRequest(*apigateway.DeleteDomainNameInput) (*request.Request, *apigateway.DeleteDomainNameOutput)
|
||||
|
||||
DeleteIntegration(*apigateway.DeleteIntegrationInput) (*apigateway.DeleteIntegrationOutput, error)
|
||||
DeleteIntegrationWithContext(aws.Context, *apigateway.DeleteIntegrationInput, ...request.Option) (*apigateway.DeleteIntegrationOutput, error)
|
||||
DeleteIntegrationRequest(*apigateway.DeleteIntegrationInput) (*request.Request, *apigateway.DeleteIntegrationOutput)
|
||||
|
||||
DeleteIntegrationResponse(*apigateway.DeleteIntegrationResponseInput) (*apigateway.DeleteIntegrationResponseOutput, error)
|
||||
DeleteIntegrationResponseWithContext(aws.Context, *apigateway.DeleteIntegrationResponseInput, ...request.Option) (*apigateway.DeleteIntegrationResponseOutput, error)
|
||||
DeleteIntegrationResponseRequest(*apigateway.DeleteIntegrationResponseInput) (*request.Request, *apigateway.DeleteIntegrationResponseOutput)
|
||||
|
||||
DeleteMethod(*apigateway.DeleteMethodInput) (*apigateway.DeleteMethodOutput, error)
|
||||
DeleteMethodWithContext(aws.Context, *apigateway.DeleteMethodInput, ...request.Option) (*apigateway.DeleteMethodOutput, error)
|
||||
DeleteMethodRequest(*apigateway.DeleteMethodInput) (*request.Request, *apigateway.DeleteMethodOutput)
|
||||
|
||||
DeleteMethodResponse(*apigateway.DeleteMethodResponseInput) (*apigateway.DeleteMethodResponseOutput, error)
|
||||
DeleteMethodResponseWithContext(aws.Context, *apigateway.DeleteMethodResponseInput, ...request.Option) (*apigateway.DeleteMethodResponseOutput, error)
|
||||
DeleteMethodResponseRequest(*apigateway.DeleteMethodResponseInput) (*request.Request, *apigateway.DeleteMethodResponseOutput)
|
||||
|
||||
DeleteModel(*apigateway.DeleteModelInput) (*apigateway.DeleteModelOutput, error)
|
||||
DeleteModelWithContext(aws.Context, *apigateway.DeleteModelInput, ...request.Option) (*apigateway.DeleteModelOutput, error)
|
||||
DeleteModelRequest(*apigateway.DeleteModelInput) (*request.Request, *apigateway.DeleteModelOutput)
|
||||
|
||||
DeleteRequestValidator(*apigateway.DeleteRequestValidatorInput) (*apigateway.DeleteRequestValidatorOutput, error)
|
||||
DeleteRequestValidatorWithContext(aws.Context, *apigateway.DeleteRequestValidatorInput, ...request.Option) (*apigateway.DeleteRequestValidatorOutput, error)
|
||||
DeleteRequestValidatorRequest(*apigateway.DeleteRequestValidatorInput) (*request.Request, *apigateway.DeleteRequestValidatorOutput)
|
||||
|
||||
DeleteResource(*apigateway.DeleteResourceInput) (*apigateway.DeleteResourceOutput, error)
|
||||
DeleteResourceWithContext(aws.Context, *apigateway.DeleteResourceInput, ...request.Option) (*apigateway.DeleteResourceOutput, error)
|
||||
DeleteResourceRequest(*apigateway.DeleteResourceInput) (*request.Request, *apigateway.DeleteResourceOutput)
|
||||
|
||||
DeleteRestApi(*apigateway.DeleteRestApiInput) (*apigateway.DeleteRestApiOutput, error)
|
||||
DeleteRestApiWithContext(aws.Context, *apigateway.DeleteRestApiInput, ...request.Option) (*apigateway.DeleteRestApiOutput, error)
|
||||
DeleteRestApiRequest(*apigateway.DeleteRestApiInput) (*request.Request, *apigateway.DeleteRestApiOutput)
|
||||
|
||||
DeleteStage(*apigateway.DeleteStageInput) (*apigateway.DeleteStageOutput, error)
|
||||
DeleteStageWithContext(aws.Context, *apigateway.DeleteStageInput, ...request.Option) (*apigateway.DeleteStageOutput, error)
|
||||
DeleteStageRequest(*apigateway.DeleteStageInput) (*request.Request, *apigateway.DeleteStageOutput)
|
||||
|
||||
DeleteUsagePlan(*apigateway.DeleteUsagePlanInput) (*apigateway.DeleteUsagePlanOutput, error)
|
||||
DeleteUsagePlanWithContext(aws.Context, *apigateway.DeleteUsagePlanInput, ...request.Option) (*apigateway.DeleteUsagePlanOutput, error)
|
||||
DeleteUsagePlanRequest(*apigateway.DeleteUsagePlanInput) (*request.Request, *apigateway.DeleteUsagePlanOutput)
|
||||
|
||||
DeleteUsagePlanKey(*apigateway.DeleteUsagePlanKeyInput) (*apigateway.DeleteUsagePlanKeyOutput, error)
|
||||
DeleteUsagePlanKeyWithContext(aws.Context, *apigateway.DeleteUsagePlanKeyInput, ...request.Option) (*apigateway.DeleteUsagePlanKeyOutput, error)
|
||||
DeleteUsagePlanKeyRequest(*apigateway.DeleteUsagePlanKeyInput) (*request.Request, *apigateway.DeleteUsagePlanKeyOutput)
|
||||
|
||||
FlushStageAuthorizersCache(*apigateway.FlushStageAuthorizersCacheInput) (*apigateway.FlushStageAuthorizersCacheOutput, error)
|
||||
FlushStageAuthorizersCacheWithContext(aws.Context, *apigateway.FlushStageAuthorizersCacheInput, ...request.Option) (*apigateway.FlushStageAuthorizersCacheOutput, error)
|
||||
FlushStageAuthorizersCacheRequest(*apigateway.FlushStageAuthorizersCacheInput) (*request.Request, *apigateway.FlushStageAuthorizersCacheOutput)
|
||||
|
||||
FlushStageCache(*apigateway.FlushStageCacheInput) (*apigateway.FlushStageCacheOutput, error)
|
||||
FlushStageCacheWithContext(aws.Context, *apigateway.FlushStageCacheInput, ...request.Option) (*apigateway.FlushStageCacheOutput, error)
|
||||
FlushStageCacheRequest(*apigateway.FlushStageCacheInput) (*request.Request, *apigateway.FlushStageCacheOutput)
|
||||
|
||||
GenerateClientCertificate(*apigateway.GenerateClientCertificateInput) (*apigateway.ClientCertificate, error)
|
||||
GenerateClientCertificateWithContext(aws.Context, *apigateway.GenerateClientCertificateInput, ...request.Option) (*apigateway.ClientCertificate, error)
|
||||
GenerateClientCertificateRequest(*apigateway.GenerateClientCertificateInput) (*request.Request, *apigateway.ClientCertificate)
|
||||
|
||||
GetAccount(*apigateway.GetAccountInput) (*apigateway.Account, error)
|
||||
GetAccountWithContext(aws.Context, *apigateway.GetAccountInput, ...request.Option) (*apigateway.Account, error)
|
||||
GetAccountRequest(*apigateway.GetAccountInput) (*request.Request, *apigateway.Account)
|
||||
|
||||
GetApiKey(*apigateway.GetApiKeyInput) (*apigateway.ApiKey, error)
|
||||
GetApiKeyWithContext(aws.Context, *apigateway.GetApiKeyInput, ...request.Option) (*apigateway.ApiKey, error)
|
||||
GetApiKeyRequest(*apigateway.GetApiKeyInput) (*request.Request, *apigateway.ApiKey)
|
||||
|
||||
GetApiKeys(*apigateway.GetApiKeysInput) (*apigateway.GetApiKeysOutput, error)
|
||||
GetApiKeysWithContext(aws.Context, *apigateway.GetApiKeysInput, ...request.Option) (*apigateway.GetApiKeysOutput, error)
|
||||
GetApiKeysRequest(*apigateway.GetApiKeysInput) (*request.Request, *apigateway.GetApiKeysOutput)
|
||||
|
||||
GetApiKeysPages(*apigateway.GetApiKeysInput, func(*apigateway.GetApiKeysOutput, bool) bool) error
|
||||
GetApiKeysPagesWithContext(aws.Context, *apigateway.GetApiKeysInput, func(*apigateway.GetApiKeysOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetAuthorizer(*apigateway.GetAuthorizerInput) (*apigateway.Authorizer, error)
|
||||
GetAuthorizerWithContext(aws.Context, *apigateway.GetAuthorizerInput, ...request.Option) (*apigateway.Authorizer, error)
|
||||
GetAuthorizerRequest(*apigateway.GetAuthorizerInput) (*request.Request, *apigateway.Authorizer)
|
||||
|
||||
GetAuthorizers(*apigateway.GetAuthorizersInput) (*apigateway.GetAuthorizersOutput, error)
|
||||
GetAuthorizersWithContext(aws.Context, *apigateway.GetAuthorizersInput, ...request.Option) (*apigateway.GetAuthorizersOutput, error)
|
||||
GetAuthorizersRequest(*apigateway.GetAuthorizersInput) (*request.Request, *apigateway.GetAuthorizersOutput)
|
||||
|
||||
GetBasePathMapping(*apigateway.GetBasePathMappingInput) (*apigateway.BasePathMapping, error)
|
||||
GetBasePathMappingWithContext(aws.Context, *apigateway.GetBasePathMappingInput, ...request.Option) (*apigateway.BasePathMapping, error)
|
||||
GetBasePathMappingRequest(*apigateway.GetBasePathMappingInput) (*request.Request, *apigateway.BasePathMapping)
|
||||
|
||||
GetBasePathMappings(*apigateway.GetBasePathMappingsInput) (*apigateway.GetBasePathMappingsOutput, error)
|
||||
GetBasePathMappingsWithContext(aws.Context, *apigateway.GetBasePathMappingsInput, ...request.Option) (*apigateway.GetBasePathMappingsOutput, error)
|
||||
GetBasePathMappingsRequest(*apigateway.GetBasePathMappingsInput) (*request.Request, *apigateway.GetBasePathMappingsOutput)
|
||||
|
||||
GetBasePathMappingsPages(*apigateway.GetBasePathMappingsInput, func(*apigateway.GetBasePathMappingsOutput, bool) bool) error
|
||||
GetBasePathMappingsPagesWithContext(aws.Context, *apigateway.GetBasePathMappingsInput, func(*apigateway.GetBasePathMappingsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetClientCertificate(*apigateway.GetClientCertificateInput) (*apigateway.ClientCertificate, error)
|
||||
GetClientCertificateWithContext(aws.Context, *apigateway.GetClientCertificateInput, ...request.Option) (*apigateway.ClientCertificate, error)
|
||||
GetClientCertificateRequest(*apigateway.GetClientCertificateInput) (*request.Request, *apigateway.ClientCertificate)
|
||||
|
||||
GetClientCertificates(*apigateway.GetClientCertificatesInput) (*apigateway.GetClientCertificatesOutput, error)
|
||||
GetClientCertificatesWithContext(aws.Context, *apigateway.GetClientCertificatesInput, ...request.Option) (*apigateway.GetClientCertificatesOutput, error)
|
||||
GetClientCertificatesRequest(*apigateway.GetClientCertificatesInput) (*request.Request, *apigateway.GetClientCertificatesOutput)
|
||||
|
||||
GetClientCertificatesPages(*apigateway.GetClientCertificatesInput, func(*apigateway.GetClientCertificatesOutput, bool) bool) error
|
||||
GetClientCertificatesPagesWithContext(aws.Context, *apigateway.GetClientCertificatesInput, func(*apigateway.GetClientCertificatesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetDeployment(*apigateway.GetDeploymentInput) (*apigateway.Deployment, error)
|
||||
GetDeploymentWithContext(aws.Context, *apigateway.GetDeploymentInput, ...request.Option) (*apigateway.Deployment, error)
|
||||
GetDeploymentRequest(*apigateway.GetDeploymentInput) (*request.Request, *apigateway.Deployment)
|
||||
|
||||
GetDeployments(*apigateway.GetDeploymentsInput) (*apigateway.GetDeploymentsOutput, error)
|
||||
GetDeploymentsWithContext(aws.Context, *apigateway.GetDeploymentsInput, ...request.Option) (*apigateway.GetDeploymentsOutput, error)
|
||||
GetDeploymentsRequest(*apigateway.GetDeploymentsInput) (*request.Request, *apigateway.GetDeploymentsOutput)
|
||||
|
||||
GetDeploymentsPages(*apigateway.GetDeploymentsInput, func(*apigateway.GetDeploymentsOutput, bool) bool) error
|
||||
GetDeploymentsPagesWithContext(aws.Context, *apigateway.GetDeploymentsInput, func(*apigateway.GetDeploymentsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetDocumentationPart(*apigateway.GetDocumentationPartInput) (*apigateway.DocumentationPart, error)
|
||||
GetDocumentationPartWithContext(aws.Context, *apigateway.GetDocumentationPartInput, ...request.Option) (*apigateway.DocumentationPart, error)
|
||||
GetDocumentationPartRequest(*apigateway.GetDocumentationPartInput) (*request.Request, *apigateway.DocumentationPart)
|
||||
|
||||
GetDocumentationParts(*apigateway.GetDocumentationPartsInput) (*apigateway.GetDocumentationPartsOutput, error)
|
||||
GetDocumentationPartsWithContext(aws.Context, *apigateway.GetDocumentationPartsInput, ...request.Option) (*apigateway.GetDocumentationPartsOutput, error)
|
||||
GetDocumentationPartsRequest(*apigateway.GetDocumentationPartsInput) (*request.Request, *apigateway.GetDocumentationPartsOutput)
|
||||
|
||||
GetDocumentationVersion(*apigateway.GetDocumentationVersionInput) (*apigateway.DocumentationVersion, error)
|
||||
GetDocumentationVersionWithContext(aws.Context, *apigateway.GetDocumentationVersionInput, ...request.Option) (*apigateway.DocumentationVersion, error)
|
||||
GetDocumentationVersionRequest(*apigateway.GetDocumentationVersionInput) (*request.Request, *apigateway.DocumentationVersion)
|
||||
|
||||
GetDocumentationVersions(*apigateway.GetDocumentationVersionsInput) (*apigateway.GetDocumentationVersionsOutput, error)
|
||||
GetDocumentationVersionsWithContext(aws.Context, *apigateway.GetDocumentationVersionsInput, ...request.Option) (*apigateway.GetDocumentationVersionsOutput, error)
|
||||
GetDocumentationVersionsRequest(*apigateway.GetDocumentationVersionsInput) (*request.Request, *apigateway.GetDocumentationVersionsOutput)
|
||||
|
||||
GetDomainName(*apigateway.GetDomainNameInput) (*apigateway.DomainName, error)
|
||||
GetDomainNameWithContext(aws.Context, *apigateway.GetDomainNameInput, ...request.Option) (*apigateway.DomainName, error)
|
||||
GetDomainNameRequest(*apigateway.GetDomainNameInput) (*request.Request, *apigateway.DomainName)
|
||||
|
||||
GetDomainNames(*apigateway.GetDomainNamesInput) (*apigateway.GetDomainNamesOutput, error)
|
||||
GetDomainNamesWithContext(aws.Context, *apigateway.GetDomainNamesInput, ...request.Option) (*apigateway.GetDomainNamesOutput, error)
|
||||
GetDomainNamesRequest(*apigateway.GetDomainNamesInput) (*request.Request, *apigateway.GetDomainNamesOutput)
|
||||
|
||||
GetDomainNamesPages(*apigateway.GetDomainNamesInput, func(*apigateway.GetDomainNamesOutput, bool) bool) error
|
||||
GetDomainNamesPagesWithContext(aws.Context, *apigateway.GetDomainNamesInput, func(*apigateway.GetDomainNamesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetExport(*apigateway.GetExportInput) (*apigateway.GetExportOutput, error)
|
||||
GetExportWithContext(aws.Context, *apigateway.GetExportInput, ...request.Option) (*apigateway.GetExportOutput, error)
|
||||
GetExportRequest(*apigateway.GetExportInput) (*request.Request, *apigateway.GetExportOutput)
|
||||
|
||||
GetIntegration(*apigateway.GetIntegrationInput) (*apigateway.Integration, error)
|
||||
GetIntegrationWithContext(aws.Context, *apigateway.GetIntegrationInput, ...request.Option) (*apigateway.Integration, error)
|
||||
GetIntegrationRequest(*apigateway.GetIntegrationInput) (*request.Request, *apigateway.Integration)
|
||||
|
||||
GetIntegrationResponse(*apigateway.GetIntegrationResponseInput) (*apigateway.IntegrationResponse, error)
|
||||
GetIntegrationResponseWithContext(aws.Context, *apigateway.GetIntegrationResponseInput, ...request.Option) (*apigateway.IntegrationResponse, error)
|
||||
GetIntegrationResponseRequest(*apigateway.GetIntegrationResponseInput) (*request.Request, *apigateway.IntegrationResponse)
|
||||
|
||||
GetMethod(*apigateway.GetMethodInput) (*apigateway.Method, error)
|
||||
GetMethodWithContext(aws.Context, *apigateway.GetMethodInput, ...request.Option) (*apigateway.Method, error)
|
||||
GetMethodRequest(*apigateway.GetMethodInput) (*request.Request, *apigateway.Method)
|
||||
|
||||
GetMethodResponse(*apigateway.GetMethodResponseInput) (*apigateway.MethodResponse, error)
|
||||
GetMethodResponseWithContext(aws.Context, *apigateway.GetMethodResponseInput, ...request.Option) (*apigateway.MethodResponse, error)
|
||||
GetMethodResponseRequest(*apigateway.GetMethodResponseInput) (*request.Request, *apigateway.MethodResponse)
|
||||
|
||||
GetModel(*apigateway.GetModelInput) (*apigateway.Model, error)
|
||||
GetModelWithContext(aws.Context, *apigateway.GetModelInput, ...request.Option) (*apigateway.Model, error)
|
||||
GetModelRequest(*apigateway.GetModelInput) (*request.Request, *apigateway.Model)
|
||||
|
||||
GetModelTemplate(*apigateway.GetModelTemplateInput) (*apigateway.GetModelTemplateOutput, error)
|
||||
GetModelTemplateWithContext(aws.Context, *apigateway.GetModelTemplateInput, ...request.Option) (*apigateway.GetModelTemplateOutput, error)
|
||||
GetModelTemplateRequest(*apigateway.GetModelTemplateInput) (*request.Request, *apigateway.GetModelTemplateOutput)
|
||||
|
||||
GetModels(*apigateway.GetModelsInput) (*apigateway.GetModelsOutput, error)
|
||||
GetModelsWithContext(aws.Context, *apigateway.GetModelsInput, ...request.Option) (*apigateway.GetModelsOutput, error)
|
||||
GetModelsRequest(*apigateway.GetModelsInput) (*request.Request, *apigateway.GetModelsOutput)
|
||||
|
||||
GetModelsPages(*apigateway.GetModelsInput, func(*apigateway.GetModelsOutput, bool) bool) error
|
||||
GetModelsPagesWithContext(aws.Context, *apigateway.GetModelsInput, func(*apigateway.GetModelsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetRequestValidator(*apigateway.GetRequestValidatorInput) (*apigateway.UpdateRequestValidatorOutput, error)
|
||||
GetRequestValidatorWithContext(aws.Context, *apigateway.GetRequestValidatorInput, ...request.Option) (*apigateway.UpdateRequestValidatorOutput, error)
|
||||
GetRequestValidatorRequest(*apigateway.GetRequestValidatorInput) (*request.Request, *apigateway.UpdateRequestValidatorOutput)
|
||||
|
||||
GetRequestValidators(*apigateway.GetRequestValidatorsInput) (*apigateway.GetRequestValidatorsOutput, error)
|
||||
GetRequestValidatorsWithContext(aws.Context, *apigateway.GetRequestValidatorsInput, ...request.Option) (*apigateway.GetRequestValidatorsOutput, error)
|
||||
GetRequestValidatorsRequest(*apigateway.GetRequestValidatorsInput) (*request.Request, *apigateway.GetRequestValidatorsOutput)
|
||||
|
||||
GetResource(*apigateway.GetResourceInput) (*apigateway.Resource, error)
|
||||
GetResourceWithContext(aws.Context, *apigateway.GetResourceInput, ...request.Option) (*apigateway.Resource, error)
|
||||
GetResourceRequest(*apigateway.GetResourceInput) (*request.Request, *apigateway.Resource)
|
||||
|
||||
GetResources(*apigateway.GetResourcesInput) (*apigateway.GetResourcesOutput, error)
|
||||
GetResourcesWithContext(aws.Context, *apigateway.GetResourcesInput, ...request.Option) (*apigateway.GetResourcesOutput, error)
|
||||
GetResourcesRequest(*apigateway.GetResourcesInput) (*request.Request, *apigateway.GetResourcesOutput)
|
||||
|
||||
GetResourcesPages(*apigateway.GetResourcesInput, func(*apigateway.GetResourcesOutput, bool) bool) error
|
||||
GetResourcesPagesWithContext(aws.Context, *apigateway.GetResourcesInput, func(*apigateway.GetResourcesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetRestApi(*apigateway.GetRestApiInput) (*apigateway.RestApi, error)
|
||||
GetRestApiWithContext(aws.Context, *apigateway.GetRestApiInput, ...request.Option) (*apigateway.RestApi, error)
|
||||
GetRestApiRequest(*apigateway.GetRestApiInput) (*request.Request, *apigateway.RestApi)
|
||||
|
||||
GetRestApis(*apigateway.GetRestApisInput) (*apigateway.GetRestApisOutput, error)
|
||||
GetRestApisWithContext(aws.Context, *apigateway.GetRestApisInput, ...request.Option) (*apigateway.GetRestApisOutput, error)
|
||||
GetRestApisRequest(*apigateway.GetRestApisInput) (*request.Request, *apigateway.GetRestApisOutput)
|
||||
|
||||
GetRestApisPages(*apigateway.GetRestApisInput, func(*apigateway.GetRestApisOutput, bool) bool) error
|
||||
GetRestApisPagesWithContext(aws.Context, *apigateway.GetRestApisInput, func(*apigateway.GetRestApisOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetSdk(*apigateway.GetSdkInput) (*apigateway.GetSdkOutput, error)
|
||||
GetSdkWithContext(aws.Context, *apigateway.GetSdkInput, ...request.Option) (*apigateway.GetSdkOutput, error)
|
||||
GetSdkRequest(*apigateway.GetSdkInput) (*request.Request, *apigateway.GetSdkOutput)
|
||||
|
||||
GetSdkType(*apigateway.GetSdkTypeInput) (*apigateway.SdkType, error)
|
||||
GetSdkTypeWithContext(aws.Context, *apigateway.GetSdkTypeInput, ...request.Option) (*apigateway.SdkType, error)
|
||||
GetSdkTypeRequest(*apigateway.GetSdkTypeInput) (*request.Request, *apigateway.SdkType)
|
||||
|
||||
GetSdkTypes(*apigateway.GetSdkTypesInput) (*apigateway.GetSdkTypesOutput, error)
|
||||
GetSdkTypesWithContext(aws.Context, *apigateway.GetSdkTypesInput, ...request.Option) (*apigateway.GetSdkTypesOutput, error)
|
||||
GetSdkTypesRequest(*apigateway.GetSdkTypesInput) (*request.Request, *apigateway.GetSdkTypesOutput)
|
||||
|
||||
GetStage(*apigateway.GetStageInput) (*apigateway.Stage, error)
|
||||
GetStageWithContext(aws.Context, *apigateway.GetStageInput, ...request.Option) (*apigateway.Stage, error)
|
||||
GetStageRequest(*apigateway.GetStageInput) (*request.Request, *apigateway.Stage)
|
||||
|
||||
GetStages(*apigateway.GetStagesInput) (*apigateway.GetStagesOutput, error)
|
||||
GetStagesWithContext(aws.Context, *apigateway.GetStagesInput, ...request.Option) (*apigateway.GetStagesOutput, error)
|
||||
GetStagesRequest(*apigateway.GetStagesInput) (*request.Request, *apigateway.GetStagesOutput)
|
||||
|
||||
GetUsage(*apigateway.GetUsageInput) (*apigateway.Usage, error)
|
||||
GetUsageWithContext(aws.Context, *apigateway.GetUsageInput, ...request.Option) (*apigateway.Usage, error)
|
||||
GetUsageRequest(*apigateway.GetUsageInput) (*request.Request, *apigateway.Usage)
|
||||
|
||||
GetUsagePages(*apigateway.GetUsageInput, func(*apigateway.Usage, bool) bool) error
|
||||
GetUsagePagesWithContext(aws.Context, *apigateway.GetUsageInput, func(*apigateway.Usage, bool) bool, ...request.Option) error
|
||||
|
||||
GetUsagePlan(*apigateway.GetUsagePlanInput) (*apigateway.UsagePlan, error)
|
||||
GetUsagePlanWithContext(aws.Context, *apigateway.GetUsagePlanInput, ...request.Option) (*apigateway.UsagePlan, error)
|
||||
GetUsagePlanRequest(*apigateway.GetUsagePlanInput) (*request.Request, *apigateway.UsagePlan)
|
||||
|
||||
GetUsagePlanKey(*apigateway.GetUsagePlanKeyInput) (*apigateway.UsagePlanKey, error)
|
||||
GetUsagePlanKeyWithContext(aws.Context, *apigateway.GetUsagePlanKeyInput, ...request.Option) (*apigateway.UsagePlanKey, error)
|
||||
GetUsagePlanKeyRequest(*apigateway.GetUsagePlanKeyInput) (*request.Request, *apigateway.UsagePlanKey)
|
||||
|
||||
GetUsagePlanKeys(*apigateway.GetUsagePlanKeysInput) (*apigateway.GetUsagePlanKeysOutput, error)
|
||||
GetUsagePlanKeysWithContext(aws.Context, *apigateway.GetUsagePlanKeysInput, ...request.Option) (*apigateway.GetUsagePlanKeysOutput, error)
|
||||
GetUsagePlanKeysRequest(*apigateway.GetUsagePlanKeysInput) (*request.Request, *apigateway.GetUsagePlanKeysOutput)
|
||||
|
||||
GetUsagePlanKeysPages(*apigateway.GetUsagePlanKeysInput, func(*apigateway.GetUsagePlanKeysOutput, bool) bool) error
|
||||
GetUsagePlanKeysPagesWithContext(aws.Context, *apigateway.GetUsagePlanKeysInput, func(*apigateway.GetUsagePlanKeysOutput, bool) bool, ...request.Option) error
|
||||
|
||||
GetUsagePlans(*apigateway.GetUsagePlansInput) (*apigateway.GetUsagePlansOutput, error)
|
||||
GetUsagePlansWithContext(aws.Context, *apigateway.GetUsagePlansInput, ...request.Option) (*apigateway.GetUsagePlansOutput, error)
|
||||
GetUsagePlansRequest(*apigateway.GetUsagePlansInput) (*request.Request, *apigateway.GetUsagePlansOutput)
|
||||
|
||||
GetUsagePlansPages(*apigateway.GetUsagePlansInput, func(*apigateway.GetUsagePlansOutput, bool) bool) error
|
||||
GetUsagePlansPagesWithContext(aws.Context, *apigateway.GetUsagePlansInput, func(*apigateway.GetUsagePlansOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ImportApiKeys(*apigateway.ImportApiKeysInput) (*apigateway.ImportApiKeysOutput, error)
|
||||
ImportApiKeysWithContext(aws.Context, *apigateway.ImportApiKeysInput, ...request.Option) (*apigateway.ImportApiKeysOutput, error)
|
||||
ImportApiKeysRequest(*apigateway.ImportApiKeysInput) (*request.Request, *apigateway.ImportApiKeysOutput)
|
||||
|
||||
ImportDocumentationParts(*apigateway.ImportDocumentationPartsInput) (*apigateway.ImportDocumentationPartsOutput, error)
|
||||
ImportDocumentationPartsWithContext(aws.Context, *apigateway.ImportDocumentationPartsInput, ...request.Option) (*apigateway.ImportDocumentationPartsOutput, error)
|
||||
ImportDocumentationPartsRequest(*apigateway.ImportDocumentationPartsInput) (*request.Request, *apigateway.ImportDocumentationPartsOutput)
|
||||
|
||||
ImportRestApi(*apigateway.ImportRestApiInput) (*apigateway.RestApi, error)
|
||||
ImportRestApiWithContext(aws.Context, *apigateway.ImportRestApiInput, ...request.Option) (*apigateway.RestApi, error)
|
||||
ImportRestApiRequest(*apigateway.ImportRestApiInput) (*request.Request, *apigateway.RestApi)
|
||||
|
||||
PutIntegration(*apigateway.PutIntegrationInput) (*apigateway.Integration, error)
|
||||
PutIntegrationWithContext(aws.Context, *apigateway.PutIntegrationInput, ...request.Option) (*apigateway.Integration, error)
|
||||
PutIntegrationRequest(*apigateway.PutIntegrationInput) (*request.Request, *apigateway.Integration)
|
||||
|
||||
PutIntegrationResponse(*apigateway.PutIntegrationResponseInput) (*apigateway.IntegrationResponse, error)
|
||||
PutIntegrationResponseWithContext(aws.Context, *apigateway.PutIntegrationResponseInput, ...request.Option) (*apigateway.IntegrationResponse, error)
|
||||
PutIntegrationResponseRequest(*apigateway.PutIntegrationResponseInput) (*request.Request, *apigateway.IntegrationResponse)
|
||||
|
||||
PutMethod(*apigateway.PutMethodInput) (*apigateway.Method, error)
|
||||
PutMethodWithContext(aws.Context, *apigateway.PutMethodInput, ...request.Option) (*apigateway.Method, error)
|
||||
PutMethodRequest(*apigateway.PutMethodInput) (*request.Request, *apigateway.Method)
|
||||
|
||||
PutMethodResponse(*apigateway.PutMethodResponseInput) (*apigateway.MethodResponse, error)
|
||||
PutMethodResponseWithContext(aws.Context, *apigateway.PutMethodResponseInput, ...request.Option) (*apigateway.MethodResponse, error)
|
||||
PutMethodResponseRequest(*apigateway.PutMethodResponseInput) (*request.Request, *apigateway.MethodResponse)
|
||||
|
||||
PutRestApi(*apigateway.PutRestApiInput) (*apigateway.RestApi, error)
|
||||
PutRestApiWithContext(aws.Context, *apigateway.PutRestApiInput, ...request.Option) (*apigateway.RestApi, error)
|
||||
PutRestApiRequest(*apigateway.PutRestApiInput) (*request.Request, *apigateway.RestApi)
|
||||
|
||||
TestInvokeAuthorizer(*apigateway.TestInvokeAuthorizerInput) (*apigateway.TestInvokeAuthorizerOutput, error)
|
||||
TestInvokeAuthorizerWithContext(aws.Context, *apigateway.TestInvokeAuthorizerInput, ...request.Option) (*apigateway.TestInvokeAuthorizerOutput, error)
|
||||
TestInvokeAuthorizerRequest(*apigateway.TestInvokeAuthorizerInput) (*request.Request, *apigateway.TestInvokeAuthorizerOutput)
|
||||
|
||||
TestInvokeMethod(*apigateway.TestInvokeMethodInput) (*apigateway.TestInvokeMethodOutput, error)
|
||||
TestInvokeMethodWithContext(aws.Context, *apigateway.TestInvokeMethodInput, ...request.Option) (*apigateway.TestInvokeMethodOutput, error)
|
||||
TestInvokeMethodRequest(*apigateway.TestInvokeMethodInput) (*request.Request, *apigateway.TestInvokeMethodOutput)
|
||||
|
||||
UpdateAccount(*apigateway.UpdateAccountInput) (*apigateway.Account, error)
|
||||
UpdateAccountWithContext(aws.Context, *apigateway.UpdateAccountInput, ...request.Option) (*apigateway.Account, error)
|
||||
UpdateAccountRequest(*apigateway.UpdateAccountInput) (*request.Request, *apigateway.Account)
|
||||
|
||||
UpdateApiKey(*apigateway.UpdateApiKeyInput) (*apigateway.ApiKey, error)
|
||||
UpdateApiKeyWithContext(aws.Context, *apigateway.UpdateApiKeyInput, ...request.Option) (*apigateway.ApiKey, error)
|
||||
UpdateApiKeyRequest(*apigateway.UpdateApiKeyInput) (*request.Request, *apigateway.ApiKey)
|
||||
|
||||
UpdateAuthorizer(*apigateway.UpdateAuthorizerInput) (*apigateway.Authorizer, error)
|
||||
UpdateAuthorizerWithContext(aws.Context, *apigateway.UpdateAuthorizerInput, ...request.Option) (*apigateway.Authorizer, error)
|
||||
UpdateAuthorizerRequest(*apigateway.UpdateAuthorizerInput) (*request.Request, *apigateway.Authorizer)
|
||||
|
||||
UpdateBasePathMapping(*apigateway.UpdateBasePathMappingInput) (*apigateway.BasePathMapping, error)
|
||||
UpdateBasePathMappingWithContext(aws.Context, *apigateway.UpdateBasePathMappingInput, ...request.Option) (*apigateway.BasePathMapping, error)
|
||||
UpdateBasePathMappingRequest(*apigateway.UpdateBasePathMappingInput) (*request.Request, *apigateway.BasePathMapping)
|
||||
|
||||
UpdateClientCertificate(*apigateway.UpdateClientCertificateInput) (*apigateway.ClientCertificate, error)
|
||||
UpdateClientCertificateWithContext(aws.Context, *apigateway.UpdateClientCertificateInput, ...request.Option) (*apigateway.ClientCertificate, error)
|
||||
UpdateClientCertificateRequest(*apigateway.UpdateClientCertificateInput) (*request.Request, *apigateway.ClientCertificate)
|
||||
|
||||
UpdateDeployment(*apigateway.UpdateDeploymentInput) (*apigateway.Deployment, error)
|
||||
UpdateDeploymentWithContext(aws.Context, *apigateway.UpdateDeploymentInput, ...request.Option) (*apigateway.Deployment, error)
|
||||
UpdateDeploymentRequest(*apigateway.UpdateDeploymentInput) (*request.Request, *apigateway.Deployment)
|
||||
|
||||
UpdateDocumentationPart(*apigateway.UpdateDocumentationPartInput) (*apigateway.DocumentationPart, error)
|
||||
UpdateDocumentationPartWithContext(aws.Context, *apigateway.UpdateDocumentationPartInput, ...request.Option) (*apigateway.DocumentationPart, error)
|
||||
UpdateDocumentationPartRequest(*apigateway.UpdateDocumentationPartInput) (*request.Request, *apigateway.DocumentationPart)
|
||||
|
||||
UpdateDocumentationVersion(*apigateway.UpdateDocumentationVersionInput) (*apigateway.DocumentationVersion, error)
|
||||
UpdateDocumentationVersionWithContext(aws.Context, *apigateway.UpdateDocumentationVersionInput, ...request.Option) (*apigateway.DocumentationVersion, error)
|
||||
UpdateDocumentationVersionRequest(*apigateway.UpdateDocumentationVersionInput) (*request.Request, *apigateway.DocumentationVersion)
|
||||
|
||||
UpdateDomainName(*apigateway.UpdateDomainNameInput) (*apigateway.DomainName, error)
|
||||
UpdateDomainNameWithContext(aws.Context, *apigateway.UpdateDomainNameInput, ...request.Option) (*apigateway.DomainName, error)
|
||||
UpdateDomainNameRequest(*apigateway.UpdateDomainNameInput) (*request.Request, *apigateway.DomainName)
|
||||
|
||||
UpdateIntegration(*apigateway.UpdateIntegrationInput) (*apigateway.Integration, error)
|
||||
UpdateIntegrationWithContext(aws.Context, *apigateway.UpdateIntegrationInput, ...request.Option) (*apigateway.Integration, error)
|
||||
UpdateIntegrationRequest(*apigateway.UpdateIntegrationInput) (*request.Request, *apigateway.Integration)
|
||||
|
||||
UpdateIntegrationResponse(*apigateway.UpdateIntegrationResponseInput) (*apigateway.IntegrationResponse, error)
|
||||
UpdateIntegrationResponseWithContext(aws.Context, *apigateway.UpdateIntegrationResponseInput, ...request.Option) (*apigateway.IntegrationResponse, error)
|
||||
UpdateIntegrationResponseRequest(*apigateway.UpdateIntegrationResponseInput) (*request.Request, *apigateway.IntegrationResponse)
|
||||
|
||||
UpdateMethod(*apigateway.UpdateMethodInput) (*apigateway.Method, error)
|
||||
UpdateMethodWithContext(aws.Context, *apigateway.UpdateMethodInput, ...request.Option) (*apigateway.Method, error)
|
||||
UpdateMethodRequest(*apigateway.UpdateMethodInput) (*request.Request, *apigateway.Method)
|
||||
|
||||
UpdateMethodResponse(*apigateway.UpdateMethodResponseInput) (*apigateway.MethodResponse, error)
|
||||
UpdateMethodResponseWithContext(aws.Context, *apigateway.UpdateMethodResponseInput, ...request.Option) (*apigateway.MethodResponse, error)
|
||||
UpdateMethodResponseRequest(*apigateway.UpdateMethodResponseInput) (*request.Request, *apigateway.MethodResponse)
|
||||
|
||||
UpdateModel(*apigateway.UpdateModelInput) (*apigateway.Model, error)
|
||||
UpdateModelWithContext(aws.Context, *apigateway.UpdateModelInput, ...request.Option) (*apigateway.Model, error)
|
||||
UpdateModelRequest(*apigateway.UpdateModelInput) (*request.Request, *apigateway.Model)
|
||||
|
||||
UpdateRequestValidator(*apigateway.UpdateRequestValidatorInput) (*apigateway.UpdateRequestValidatorOutput, error)
|
||||
UpdateRequestValidatorWithContext(aws.Context, *apigateway.UpdateRequestValidatorInput, ...request.Option) (*apigateway.UpdateRequestValidatorOutput, error)
|
||||
UpdateRequestValidatorRequest(*apigateway.UpdateRequestValidatorInput) (*request.Request, *apigateway.UpdateRequestValidatorOutput)
|
||||
|
||||
UpdateResource(*apigateway.UpdateResourceInput) (*apigateway.Resource, error)
|
||||
UpdateResourceWithContext(aws.Context, *apigateway.UpdateResourceInput, ...request.Option) (*apigateway.Resource, error)
|
||||
UpdateResourceRequest(*apigateway.UpdateResourceInput) (*request.Request, *apigateway.Resource)
|
||||
|
||||
UpdateRestApi(*apigateway.UpdateRestApiInput) (*apigateway.RestApi, error)
|
||||
UpdateRestApiWithContext(aws.Context, *apigateway.UpdateRestApiInput, ...request.Option) (*apigateway.RestApi, error)
|
||||
UpdateRestApiRequest(*apigateway.UpdateRestApiInput) (*request.Request, *apigateway.RestApi)
|
||||
|
||||
UpdateStage(*apigateway.UpdateStageInput) (*apigateway.Stage, error)
|
||||
UpdateStageWithContext(aws.Context, *apigateway.UpdateStageInput, ...request.Option) (*apigateway.Stage, error)
|
||||
UpdateStageRequest(*apigateway.UpdateStageInput) (*request.Request, *apigateway.Stage)
|
||||
|
||||
UpdateUsage(*apigateway.UpdateUsageInput) (*apigateway.Usage, error)
|
||||
UpdateUsageWithContext(aws.Context, *apigateway.UpdateUsageInput, ...request.Option) (*apigateway.Usage, error)
|
||||
UpdateUsageRequest(*apigateway.UpdateUsageInput) (*request.Request, *apigateway.Usage)
|
||||
|
||||
UpdateUsagePlan(*apigateway.UpdateUsagePlanInput) (*apigateway.UsagePlan, error)
|
||||
UpdateUsagePlanWithContext(aws.Context, *apigateway.UpdateUsagePlanInput, ...request.Option) (*apigateway.UsagePlan, error)
|
||||
UpdateUsagePlanRequest(*apigateway.UpdateUsagePlanInput) (*request.Request, *apigateway.UsagePlan)
|
||||
}
|
||||
|
||||
var _ APIGatewayAPI = (*apigateway.APIGateway)(nil)
|
14
vendor/github.com/aws/aws-sdk-go/service/apigateway/customization.go
generated
vendored
Normal file
14
vendor/github.com/aws/aws-sdk-go/service/apigateway/customization.go
generated
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
package apigateway
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws/client"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
func init() {
|
||||
initClient = func(c *client.Client) {
|
||||
c.Handlers.Build.PushBack(func(r *request.Request) {
|
||||
r.HTTPRequest.Header.Add("Accept", "application/json")
|
||||
})
|
||||
}
|
||||
}
|
82
vendor/github.com/aws/aws-sdk-go/service/apigateway/doc.go
generated
vendored
Normal file
82
vendor/github.com/aws/aws-sdk-go/service/apigateway/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package apigateway provides the client and types for making API
|
||||
// requests to Amazon API Gateway.
|
||||
//
|
||||
// Amazon API Gateway helps developers deliver robust, secure, and scalable
|
||||
// mobile and web application back ends. Amazon API Gateway allows developers
|
||||
// to securely connect mobile and web applications to APIs that run on AWS Lambda,
|
||||
// Amazon EC2, or other publicly addressable web services that are hosted outside
|
||||
// of AWS.
|
||||
//
|
||||
// See apigateway package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/apigateway/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon API Gateway 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 := apigateway.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 API Gateway client APIGateway for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/apigateway/#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.CreateApiKey(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("CreateApiKey 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.CreateApiKeyWithContext(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 apigateway
|
34
vendor/github.com/aws/aws-sdk-go/service/apigateway/errors.go
generated
vendored
Normal file
34
vendor/github.com/aws/aws-sdk-go/service/apigateway/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package apigateway
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeBadRequestException for service response error code
|
||||
// "BadRequestException".
|
||||
ErrCodeBadRequestException = "BadRequestException"
|
||||
|
||||
// ErrCodeConflictException for service response error code
|
||||
// "ConflictException".
|
||||
ErrCodeConflictException = "ConflictException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeNotFoundException for service response error code
|
||||
// "NotFoundException".
|
||||
ErrCodeNotFoundException = "NotFoundException"
|
||||
|
||||
// ErrCodeServiceUnavailableException for service response error code
|
||||
// "ServiceUnavailableException".
|
||||
ErrCodeServiceUnavailableException = "ServiceUnavailableException"
|
||||
|
||||
// ErrCodeTooManyRequestsException for service response error code
|
||||
// "TooManyRequestsException".
|
||||
ErrCodeTooManyRequestsException = "TooManyRequestsException"
|
||||
|
||||
// ErrCodeUnauthorizedException for service response error code
|
||||
// "UnauthorizedException".
|
||||
ErrCodeUnauthorizedException = "UnauthorizedException"
|
||||
)
|
2770
vendor/github.com/aws/aws-sdk-go/service/apigateway/examples_test.go
generated
vendored
Normal file
2770
vendor/github.com/aws/aws-sdk-go/service/apigateway/examples_test.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
93
vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go
generated
vendored
Normal file
93
vendor/github.com/aws/aws-sdk-go/service/apigateway/service.go
generated
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package apigateway
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// APIGateway provides the API operation methods for making requests to
|
||||
// Amazon API Gateway. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// APIGateway methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type APIGateway 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 = "apigateway" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the APIGateway 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 APIGateway client from just a session.
|
||||
// svc := apigateway.New(mySession)
|
||||
//
|
||||
// // Create a APIGateway client with additional configuration
|
||||
// svc := apigateway.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *APIGateway {
|
||||
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) *APIGateway {
|
||||
svc := &APIGateway{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2015-07-09",
|
||||
},
|
||||
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 APIGateway operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *APIGateway) 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
|
||||
}
|
2638
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go
generated
vendored
Normal file
2638
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
101
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/applicationautoscalingiface/interface.go
generated
vendored
Normal file
101
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/applicationautoscalingiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,101 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package applicationautoscalingiface provides an interface to enable mocking the Application Auto Scaling 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 applicationautoscalingiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/applicationautoscaling"
|
||||
)
|
||||
|
||||
// ApplicationAutoScalingAPI provides an interface to enable mocking the
|
||||
// applicationautoscaling.ApplicationAutoScaling 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
|
||||
// // Application Auto Scaling.
|
||||
// func myFunc(svc applicationautoscalingiface.ApplicationAutoScalingAPI) bool {
|
||||
// // Make svc.DeleteScalingPolicy request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := applicationautoscaling.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockApplicationAutoScalingClient struct {
|
||||
// applicationautoscalingiface.ApplicationAutoScalingAPI
|
||||
// }
|
||||
// func (m *mockApplicationAutoScalingClient) DeleteScalingPolicy(input *applicationautoscaling.DeleteScalingPolicyInput) (*applicationautoscaling.DeleteScalingPolicyOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockApplicationAutoScalingClient{}
|
||||
//
|
||||
// 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 ApplicationAutoScalingAPI interface {
|
||||
DeleteScalingPolicy(*applicationautoscaling.DeleteScalingPolicyInput) (*applicationautoscaling.DeleteScalingPolicyOutput, error)
|
||||
DeleteScalingPolicyWithContext(aws.Context, *applicationautoscaling.DeleteScalingPolicyInput, ...request.Option) (*applicationautoscaling.DeleteScalingPolicyOutput, error)
|
||||
DeleteScalingPolicyRequest(*applicationautoscaling.DeleteScalingPolicyInput) (*request.Request, *applicationautoscaling.DeleteScalingPolicyOutput)
|
||||
|
||||
DeregisterScalableTarget(*applicationautoscaling.DeregisterScalableTargetInput) (*applicationautoscaling.DeregisterScalableTargetOutput, error)
|
||||
DeregisterScalableTargetWithContext(aws.Context, *applicationautoscaling.DeregisterScalableTargetInput, ...request.Option) (*applicationautoscaling.DeregisterScalableTargetOutput, error)
|
||||
DeregisterScalableTargetRequest(*applicationautoscaling.DeregisterScalableTargetInput) (*request.Request, *applicationautoscaling.DeregisterScalableTargetOutput)
|
||||
|
||||
DescribeScalableTargets(*applicationautoscaling.DescribeScalableTargetsInput) (*applicationautoscaling.DescribeScalableTargetsOutput, error)
|
||||
DescribeScalableTargetsWithContext(aws.Context, *applicationautoscaling.DescribeScalableTargetsInput, ...request.Option) (*applicationautoscaling.DescribeScalableTargetsOutput, error)
|
||||
DescribeScalableTargetsRequest(*applicationautoscaling.DescribeScalableTargetsInput) (*request.Request, *applicationautoscaling.DescribeScalableTargetsOutput)
|
||||
|
||||
DescribeScalableTargetsPages(*applicationautoscaling.DescribeScalableTargetsInput, func(*applicationautoscaling.DescribeScalableTargetsOutput, bool) bool) error
|
||||
DescribeScalableTargetsPagesWithContext(aws.Context, *applicationautoscaling.DescribeScalableTargetsInput, func(*applicationautoscaling.DescribeScalableTargetsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeScalingActivities(*applicationautoscaling.DescribeScalingActivitiesInput) (*applicationautoscaling.DescribeScalingActivitiesOutput, error)
|
||||
DescribeScalingActivitiesWithContext(aws.Context, *applicationautoscaling.DescribeScalingActivitiesInput, ...request.Option) (*applicationautoscaling.DescribeScalingActivitiesOutput, error)
|
||||
DescribeScalingActivitiesRequest(*applicationautoscaling.DescribeScalingActivitiesInput) (*request.Request, *applicationautoscaling.DescribeScalingActivitiesOutput)
|
||||
|
||||
DescribeScalingActivitiesPages(*applicationautoscaling.DescribeScalingActivitiesInput, func(*applicationautoscaling.DescribeScalingActivitiesOutput, bool) bool) error
|
||||
DescribeScalingActivitiesPagesWithContext(aws.Context, *applicationautoscaling.DescribeScalingActivitiesInput, func(*applicationautoscaling.DescribeScalingActivitiesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeScalingPolicies(*applicationautoscaling.DescribeScalingPoliciesInput) (*applicationautoscaling.DescribeScalingPoliciesOutput, error)
|
||||
DescribeScalingPoliciesWithContext(aws.Context, *applicationautoscaling.DescribeScalingPoliciesInput, ...request.Option) (*applicationautoscaling.DescribeScalingPoliciesOutput, error)
|
||||
DescribeScalingPoliciesRequest(*applicationautoscaling.DescribeScalingPoliciesInput) (*request.Request, *applicationautoscaling.DescribeScalingPoliciesOutput)
|
||||
|
||||
DescribeScalingPoliciesPages(*applicationautoscaling.DescribeScalingPoliciesInput, func(*applicationautoscaling.DescribeScalingPoliciesOutput, bool) bool) error
|
||||
DescribeScalingPoliciesPagesWithContext(aws.Context, *applicationautoscaling.DescribeScalingPoliciesInput, func(*applicationautoscaling.DescribeScalingPoliciesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
PutScalingPolicy(*applicationautoscaling.PutScalingPolicyInput) (*applicationautoscaling.PutScalingPolicyOutput, error)
|
||||
PutScalingPolicyWithContext(aws.Context, *applicationautoscaling.PutScalingPolicyInput, ...request.Option) (*applicationautoscaling.PutScalingPolicyOutput, error)
|
||||
PutScalingPolicyRequest(*applicationautoscaling.PutScalingPolicyInput) (*request.Request, *applicationautoscaling.PutScalingPolicyOutput)
|
||||
|
||||
RegisterScalableTarget(*applicationautoscaling.RegisterScalableTargetInput) (*applicationautoscaling.RegisterScalableTargetOutput, error)
|
||||
RegisterScalableTargetWithContext(aws.Context, *applicationautoscaling.RegisterScalableTargetInput, ...request.Option) (*applicationautoscaling.RegisterScalableTargetOutput, error)
|
||||
RegisterScalableTargetRequest(*applicationautoscaling.RegisterScalableTargetInput) (*request.Request, *applicationautoscaling.RegisterScalableTargetOutput)
|
||||
}
|
||||
|
||||
var _ ApplicationAutoScalingAPI = (*applicationautoscaling.ApplicationAutoScaling)(nil)
|
110
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go
generated
vendored
Normal file
110
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,110 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package applicationautoscaling provides the client and types for making API
|
||||
// requests to Application Auto Scaling.
|
||||
//
|
||||
// With Application Auto Scaling, you can automatically scale your AWS resources.
|
||||
// The experience similar to that of Auto Scaling (https://aws.amazon.com/autoscaling/).
|
||||
// You can use Application Auto Scaling to accomplish the following tasks:
|
||||
//
|
||||
// * Define scaling policies to automatically scale your AWS resources
|
||||
//
|
||||
// * Scale your resources in response to CloudWatch alarms
|
||||
//
|
||||
// * View the history of your scaling events
|
||||
//
|
||||
// Application Auto Scaling can scale the following AWS resources:
|
||||
//
|
||||
// * Amazon ECS services. For more information, see Service Auto Scaling
|
||||
// (http://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html)
|
||||
// in the Amazon EC2 Container Service Developer Guide.
|
||||
//
|
||||
// * Amazon EC2 Spot fleets. For more information, see Automatic Scaling
|
||||
// for Spot Fleet (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/fleet-auto-scaling.html)
|
||||
// in the Amazon EC2 User Guide.
|
||||
//
|
||||
// * Amazon EMR clusters. For more information, see Using Automatic Scaling
|
||||
// in Amazon EMR (http://docs.aws.amazon.com/ElasticMapReduce/latest/ManagementGuide/emr-automatic-scaling.html)
|
||||
// in the Amazon EMR Management Guide.
|
||||
//
|
||||
// * AppStream 2.0 fleets. For more information, see Autoscaling Amazon AppStream
|
||||
// 2.0 Resources (http://docs.aws.amazon.com/appstream2/latest/developerguide/autoscaling.html)
|
||||
// in the Amazon AppStream 2.0 Developer Guide.
|
||||
//
|
||||
// For a list of supported regions, see AWS Regions and Endpoints: Application
|
||||
// Auto Scaling (http://docs.aws.amazon.com/general/latest/gr/rande.html#as-app_region)
|
||||
// in the AWS General Reference.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06 for more information on this service.
|
||||
//
|
||||
// See applicationautoscaling package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/applicationautoscaling/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Application Auto Scaling 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 := applicationautoscaling.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 Application Auto Scaling client ApplicationAutoScaling for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/applicationautoscaling/#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.DeleteScalingPolicy(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("DeleteScalingPolicy 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.DeleteScalingPolicyWithContext(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 applicationautoscaling
|
63
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/errors.go
generated
vendored
Normal file
63
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package applicationautoscaling
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeConcurrentUpdateException for service response error code
|
||||
// "ConcurrentUpdateException".
|
||||
//
|
||||
// Concurrent updates caused an exception, for example, if you request an update
|
||||
// to an Application Auto Scaling resource that already has a pending update.
|
||||
ErrCodeConcurrentUpdateException = "ConcurrentUpdateException"
|
||||
|
||||
// ErrCodeFailedResourceAccessException for service response error code
|
||||
// "FailedResourceAccessException".
|
||||
//
|
||||
// Failed access to resources caused an exception. This exception currently
|
||||
// only applies to DescribeScalingPolicies. It is thrown when Application Auto
|
||||
// Scaling is unable to retrieve the alarms associated with a scaling policy
|
||||
// due to a client error, for example, if the role ARN specified for a scalable
|
||||
// target does not have the proper permissions to call the CloudWatch DescribeAlarms
|
||||
// (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html)
|
||||
// API operation on behalf of your account.
|
||||
ErrCodeFailedResourceAccessException = "FailedResourceAccessException"
|
||||
|
||||
// ErrCodeInternalServiceException for service response error code
|
||||
// "InternalServiceException".
|
||||
//
|
||||
// The service encountered an internal error.
|
||||
ErrCodeInternalServiceException = "InternalServiceException"
|
||||
|
||||
// ErrCodeInvalidNextTokenException for service response error code
|
||||
// "InvalidNextTokenException".
|
||||
//
|
||||
// The next token supplied was invalid.
|
||||
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// Your account exceeded a limit. This exception is thrown when a per-account
|
||||
// resource limit is exceeded. For more information, see Application Auto Scaling
|
||||
// Limits (http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_as-app).
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeObjectNotFoundException for service response error code
|
||||
// "ObjectNotFoundException".
|
||||
//
|
||||
// The specified object could not be found. For any Put or Register API operation,
|
||||
// which depends on the existence of a scalable target, this exception is thrown
|
||||
// if the scalable target with the specified service namespace, resource ID,
|
||||
// and scalable dimension does not exist. For any Delete or Deregister API operation,
|
||||
// this exception is thrown if the resource that is to be deleted or deregistered
|
||||
// cannot be found.
|
||||
ErrCodeObjectNotFoundException = "ObjectNotFoundException"
|
||||
|
||||
// ErrCodeValidationException for service response error code
|
||||
// "ValidationException".
|
||||
//
|
||||
// An exception was thrown for a validation issue. Review the available parameters
|
||||
// for the API request.
|
||||
ErrCodeValidationException = "ValidationException"
|
||||
)
|
210
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/examples_test.go
generated
vendored
Normal file
210
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,210 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package applicationautoscaling_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/applicationautoscaling"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleApplicationAutoScaling_DeleteScalingPolicy() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationautoscaling.New(sess)
|
||||
|
||||
params := &applicationautoscaling.DeleteScalingPolicyInput{
|
||||
PolicyName: aws.String("ResourceIdMaxLen1600"), // Required
|
||||
ResourceId: aws.String("ResourceIdMaxLen1600"), // Required
|
||||
ScalableDimension: aws.String("ScalableDimension"), // Required
|
||||
ServiceNamespace: aws.String("ServiceNamespace"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteScalingPolicy(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 ExampleApplicationAutoScaling_DeregisterScalableTarget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationautoscaling.New(sess)
|
||||
|
||||
params := &applicationautoscaling.DeregisterScalableTargetInput{
|
||||
ResourceId: aws.String("ResourceIdMaxLen1600"), // Required
|
||||
ScalableDimension: aws.String("ScalableDimension"), // Required
|
||||
ServiceNamespace: aws.String("ServiceNamespace"), // Required
|
||||
}
|
||||
resp, err := svc.DeregisterScalableTarget(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 ExampleApplicationAutoScaling_DescribeScalableTargets() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationautoscaling.New(sess)
|
||||
|
||||
params := &applicationautoscaling.DescribeScalableTargetsInput{
|
||||
ServiceNamespace: aws.String("ServiceNamespace"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("XmlString"),
|
||||
ResourceIds: []*string{
|
||||
aws.String("ResourceIdMaxLen1600"), // Required
|
||||
// More values...
|
||||
},
|
||||
ScalableDimension: aws.String("ScalableDimension"),
|
||||
}
|
||||
resp, err := svc.DescribeScalableTargets(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 ExampleApplicationAutoScaling_DescribeScalingActivities() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationautoscaling.New(sess)
|
||||
|
||||
params := &applicationautoscaling.DescribeScalingActivitiesInput{
|
||||
ServiceNamespace: aws.String("ServiceNamespace"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("XmlString"),
|
||||
ResourceId: aws.String("ResourceIdMaxLen1600"),
|
||||
ScalableDimension: aws.String("ScalableDimension"),
|
||||
}
|
||||
resp, err := svc.DescribeScalingActivities(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 ExampleApplicationAutoScaling_DescribeScalingPolicies() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationautoscaling.New(sess)
|
||||
|
||||
params := &applicationautoscaling.DescribeScalingPoliciesInput{
|
||||
ServiceNamespace: aws.String("ServiceNamespace"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("XmlString"),
|
||||
PolicyNames: []*string{
|
||||
aws.String("ResourceIdMaxLen1600"), // Required
|
||||
// More values...
|
||||
},
|
||||
ResourceId: aws.String("ResourceIdMaxLen1600"),
|
||||
ScalableDimension: aws.String("ScalableDimension"),
|
||||
}
|
||||
resp, err := svc.DescribeScalingPolicies(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 ExampleApplicationAutoScaling_PutScalingPolicy() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationautoscaling.New(sess)
|
||||
|
||||
params := &applicationautoscaling.PutScalingPolicyInput{
|
||||
PolicyName: aws.String("PolicyName"), // Required
|
||||
ResourceId: aws.String("ResourceIdMaxLen1600"), // Required
|
||||
ScalableDimension: aws.String("ScalableDimension"), // Required
|
||||
ServiceNamespace: aws.String("ServiceNamespace"), // Required
|
||||
PolicyType: aws.String("PolicyType"),
|
||||
StepScalingPolicyConfiguration: &applicationautoscaling.StepScalingPolicyConfiguration{
|
||||
AdjustmentType: aws.String("AdjustmentType"),
|
||||
Cooldown: aws.Int64(1),
|
||||
MetricAggregationType: aws.String("MetricAggregationType"),
|
||||
MinAdjustmentMagnitude: aws.Int64(1),
|
||||
StepAdjustments: []*applicationautoscaling.StepAdjustment{
|
||||
{ // Required
|
||||
ScalingAdjustment: aws.Int64(1), // Required
|
||||
MetricIntervalLowerBound: aws.Float64(1.0),
|
||||
MetricIntervalUpperBound: aws.Float64(1.0),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.PutScalingPolicy(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 ExampleApplicationAutoScaling_RegisterScalableTarget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationautoscaling.New(sess)
|
||||
|
||||
params := &applicationautoscaling.RegisterScalableTargetInput{
|
||||
ResourceId: aws.String("ResourceIdMaxLen1600"), // Required
|
||||
ScalableDimension: aws.String("ScalableDimension"), // Required
|
||||
ServiceNamespace: aws.String("ServiceNamespace"), // Required
|
||||
MaxCapacity: aws.Int64(1),
|
||||
MinCapacity: aws.Int64(1),
|
||||
RoleARN: aws.String("ResourceIdMaxLen1600"),
|
||||
}
|
||||
resp, err := svc.RegisterScalableTarget(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)
|
||||
}
|
98
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go
generated
vendored
Normal file
98
vendor/github.com/aws/aws-sdk-go/service/applicationautoscaling/service.go
generated
vendored
Normal file
|
@ -0,0 +1,98 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package applicationautoscaling
|
||||
|
||||
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/jsonrpc"
|
||||
)
|
||||
|
||||
// ApplicationAutoScaling provides the API operation methods for making requests to
|
||||
// Application Auto Scaling. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// ApplicationAutoScaling methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type ApplicationAutoScaling 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 = "autoscaling" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = "application-autoscaling" // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the ApplicationAutoScaling 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 ApplicationAutoScaling client from just a session.
|
||||
// svc := applicationautoscaling.New(mySession)
|
||||
//
|
||||
// // Create a ApplicationAutoScaling client with additional configuration
|
||||
// svc := applicationautoscaling.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ApplicationAutoScaling {
|
||||
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) *ApplicationAutoScaling {
|
||||
if len(signingName) == 0 {
|
||||
signingName = "application-autoscaling"
|
||||
}
|
||||
svc := &ApplicationAutoScaling{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2016-02-06",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "AnyScaleFrontendService",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a ApplicationAutoScaling operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *ApplicationAutoScaling) 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
|
||||
}
|
4194
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/api.go
generated
vendored
Normal file
4194
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
140
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/applicationdiscoveryserviceiface/interface.go
generated
vendored
Normal file
140
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/applicationdiscoveryserviceiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,140 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package applicationdiscoveryserviceiface provides an interface to enable mocking the AWS Application Discovery 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 applicationdiscoveryserviceiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/applicationdiscoveryservice"
|
||||
)
|
||||
|
||||
// ApplicationDiscoveryServiceAPI provides an interface to enable mocking the
|
||||
// applicationdiscoveryservice.ApplicationDiscoveryService 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
|
||||
// // AWS Application Discovery Service.
|
||||
// func myFunc(svc applicationdiscoveryserviceiface.ApplicationDiscoveryServiceAPI) bool {
|
||||
// // Make svc.AssociateConfigurationItemsToApplication request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := applicationdiscoveryservice.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockApplicationDiscoveryServiceClient struct {
|
||||
// applicationdiscoveryserviceiface.ApplicationDiscoveryServiceAPI
|
||||
// }
|
||||
// func (m *mockApplicationDiscoveryServiceClient) AssociateConfigurationItemsToApplication(input *applicationdiscoveryservice.AssociateConfigurationItemsToApplicationInput) (*applicationdiscoveryservice.AssociateConfigurationItemsToApplicationOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockApplicationDiscoveryServiceClient{}
|
||||
//
|
||||
// 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 ApplicationDiscoveryServiceAPI interface {
|
||||
AssociateConfigurationItemsToApplication(*applicationdiscoveryservice.AssociateConfigurationItemsToApplicationInput) (*applicationdiscoveryservice.AssociateConfigurationItemsToApplicationOutput, error)
|
||||
AssociateConfigurationItemsToApplicationWithContext(aws.Context, *applicationdiscoveryservice.AssociateConfigurationItemsToApplicationInput, ...request.Option) (*applicationdiscoveryservice.AssociateConfigurationItemsToApplicationOutput, error)
|
||||
AssociateConfigurationItemsToApplicationRequest(*applicationdiscoveryservice.AssociateConfigurationItemsToApplicationInput) (*request.Request, *applicationdiscoveryservice.AssociateConfigurationItemsToApplicationOutput)
|
||||
|
||||
CreateApplication(*applicationdiscoveryservice.CreateApplicationInput) (*applicationdiscoveryservice.CreateApplicationOutput, error)
|
||||
CreateApplicationWithContext(aws.Context, *applicationdiscoveryservice.CreateApplicationInput, ...request.Option) (*applicationdiscoveryservice.CreateApplicationOutput, error)
|
||||
CreateApplicationRequest(*applicationdiscoveryservice.CreateApplicationInput) (*request.Request, *applicationdiscoveryservice.CreateApplicationOutput)
|
||||
|
||||
CreateTags(*applicationdiscoveryservice.CreateTagsInput) (*applicationdiscoveryservice.CreateTagsOutput, error)
|
||||
CreateTagsWithContext(aws.Context, *applicationdiscoveryservice.CreateTagsInput, ...request.Option) (*applicationdiscoveryservice.CreateTagsOutput, error)
|
||||
CreateTagsRequest(*applicationdiscoveryservice.CreateTagsInput) (*request.Request, *applicationdiscoveryservice.CreateTagsOutput)
|
||||
|
||||
DeleteApplications(*applicationdiscoveryservice.DeleteApplicationsInput) (*applicationdiscoveryservice.DeleteApplicationsOutput, error)
|
||||
DeleteApplicationsWithContext(aws.Context, *applicationdiscoveryservice.DeleteApplicationsInput, ...request.Option) (*applicationdiscoveryservice.DeleteApplicationsOutput, error)
|
||||
DeleteApplicationsRequest(*applicationdiscoveryservice.DeleteApplicationsInput) (*request.Request, *applicationdiscoveryservice.DeleteApplicationsOutput)
|
||||
|
||||
DeleteTags(*applicationdiscoveryservice.DeleteTagsInput) (*applicationdiscoveryservice.DeleteTagsOutput, error)
|
||||
DeleteTagsWithContext(aws.Context, *applicationdiscoveryservice.DeleteTagsInput, ...request.Option) (*applicationdiscoveryservice.DeleteTagsOutput, error)
|
||||
DeleteTagsRequest(*applicationdiscoveryservice.DeleteTagsInput) (*request.Request, *applicationdiscoveryservice.DeleteTagsOutput)
|
||||
|
||||
DescribeAgents(*applicationdiscoveryservice.DescribeAgentsInput) (*applicationdiscoveryservice.DescribeAgentsOutput, error)
|
||||
DescribeAgentsWithContext(aws.Context, *applicationdiscoveryservice.DescribeAgentsInput, ...request.Option) (*applicationdiscoveryservice.DescribeAgentsOutput, error)
|
||||
DescribeAgentsRequest(*applicationdiscoveryservice.DescribeAgentsInput) (*request.Request, *applicationdiscoveryservice.DescribeAgentsOutput)
|
||||
|
||||
DescribeConfigurations(*applicationdiscoveryservice.DescribeConfigurationsInput) (*applicationdiscoveryservice.DescribeConfigurationsOutput, error)
|
||||
DescribeConfigurationsWithContext(aws.Context, *applicationdiscoveryservice.DescribeConfigurationsInput, ...request.Option) (*applicationdiscoveryservice.DescribeConfigurationsOutput, error)
|
||||
DescribeConfigurationsRequest(*applicationdiscoveryservice.DescribeConfigurationsInput) (*request.Request, *applicationdiscoveryservice.DescribeConfigurationsOutput)
|
||||
|
||||
DescribeExportConfigurations(*applicationdiscoveryservice.DescribeExportConfigurationsInput) (*applicationdiscoveryservice.DescribeExportConfigurationsOutput, error)
|
||||
DescribeExportConfigurationsWithContext(aws.Context, *applicationdiscoveryservice.DescribeExportConfigurationsInput, ...request.Option) (*applicationdiscoveryservice.DescribeExportConfigurationsOutput, error)
|
||||
DescribeExportConfigurationsRequest(*applicationdiscoveryservice.DescribeExportConfigurationsInput) (*request.Request, *applicationdiscoveryservice.DescribeExportConfigurationsOutput)
|
||||
|
||||
DescribeExportTasks(*applicationdiscoveryservice.DescribeExportTasksInput) (*applicationdiscoveryservice.DescribeExportTasksOutput, error)
|
||||
DescribeExportTasksWithContext(aws.Context, *applicationdiscoveryservice.DescribeExportTasksInput, ...request.Option) (*applicationdiscoveryservice.DescribeExportTasksOutput, error)
|
||||
DescribeExportTasksRequest(*applicationdiscoveryservice.DescribeExportTasksInput) (*request.Request, *applicationdiscoveryservice.DescribeExportTasksOutput)
|
||||
|
||||
DescribeTags(*applicationdiscoveryservice.DescribeTagsInput) (*applicationdiscoveryservice.DescribeTagsOutput, error)
|
||||
DescribeTagsWithContext(aws.Context, *applicationdiscoveryservice.DescribeTagsInput, ...request.Option) (*applicationdiscoveryservice.DescribeTagsOutput, error)
|
||||
DescribeTagsRequest(*applicationdiscoveryservice.DescribeTagsInput) (*request.Request, *applicationdiscoveryservice.DescribeTagsOutput)
|
||||
|
||||
DisassociateConfigurationItemsFromApplication(*applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationInput) (*applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationOutput, error)
|
||||
DisassociateConfigurationItemsFromApplicationWithContext(aws.Context, *applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationInput, ...request.Option) (*applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationOutput, error)
|
||||
DisassociateConfigurationItemsFromApplicationRequest(*applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationInput) (*request.Request, *applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationOutput)
|
||||
|
||||
ExportConfigurations(*applicationdiscoveryservice.ExportConfigurationsInput) (*applicationdiscoveryservice.ExportConfigurationsOutput, error)
|
||||
ExportConfigurationsWithContext(aws.Context, *applicationdiscoveryservice.ExportConfigurationsInput, ...request.Option) (*applicationdiscoveryservice.ExportConfigurationsOutput, error)
|
||||
ExportConfigurationsRequest(*applicationdiscoveryservice.ExportConfigurationsInput) (*request.Request, *applicationdiscoveryservice.ExportConfigurationsOutput)
|
||||
|
||||
GetDiscoverySummary(*applicationdiscoveryservice.GetDiscoverySummaryInput) (*applicationdiscoveryservice.GetDiscoverySummaryOutput, error)
|
||||
GetDiscoverySummaryWithContext(aws.Context, *applicationdiscoveryservice.GetDiscoverySummaryInput, ...request.Option) (*applicationdiscoveryservice.GetDiscoverySummaryOutput, error)
|
||||
GetDiscoverySummaryRequest(*applicationdiscoveryservice.GetDiscoverySummaryInput) (*request.Request, *applicationdiscoveryservice.GetDiscoverySummaryOutput)
|
||||
|
||||
ListConfigurations(*applicationdiscoveryservice.ListConfigurationsInput) (*applicationdiscoveryservice.ListConfigurationsOutput, error)
|
||||
ListConfigurationsWithContext(aws.Context, *applicationdiscoveryservice.ListConfigurationsInput, ...request.Option) (*applicationdiscoveryservice.ListConfigurationsOutput, error)
|
||||
ListConfigurationsRequest(*applicationdiscoveryservice.ListConfigurationsInput) (*request.Request, *applicationdiscoveryservice.ListConfigurationsOutput)
|
||||
|
||||
ListServerNeighbors(*applicationdiscoveryservice.ListServerNeighborsInput) (*applicationdiscoveryservice.ListServerNeighborsOutput, error)
|
||||
ListServerNeighborsWithContext(aws.Context, *applicationdiscoveryservice.ListServerNeighborsInput, ...request.Option) (*applicationdiscoveryservice.ListServerNeighborsOutput, error)
|
||||
ListServerNeighborsRequest(*applicationdiscoveryservice.ListServerNeighborsInput) (*request.Request, *applicationdiscoveryservice.ListServerNeighborsOutput)
|
||||
|
||||
StartDataCollectionByAgentIds(*applicationdiscoveryservice.StartDataCollectionByAgentIdsInput) (*applicationdiscoveryservice.StartDataCollectionByAgentIdsOutput, error)
|
||||
StartDataCollectionByAgentIdsWithContext(aws.Context, *applicationdiscoveryservice.StartDataCollectionByAgentIdsInput, ...request.Option) (*applicationdiscoveryservice.StartDataCollectionByAgentIdsOutput, error)
|
||||
StartDataCollectionByAgentIdsRequest(*applicationdiscoveryservice.StartDataCollectionByAgentIdsInput) (*request.Request, *applicationdiscoveryservice.StartDataCollectionByAgentIdsOutput)
|
||||
|
||||
StartExportTask(*applicationdiscoveryservice.StartExportTaskInput) (*applicationdiscoveryservice.StartExportTaskOutput, error)
|
||||
StartExportTaskWithContext(aws.Context, *applicationdiscoveryservice.StartExportTaskInput, ...request.Option) (*applicationdiscoveryservice.StartExportTaskOutput, error)
|
||||
StartExportTaskRequest(*applicationdiscoveryservice.StartExportTaskInput) (*request.Request, *applicationdiscoveryservice.StartExportTaskOutput)
|
||||
|
||||
StopDataCollectionByAgentIds(*applicationdiscoveryservice.StopDataCollectionByAgentIdsInput) (*applicationdiscoveryservice.StopDataCollectionByAgentIdsOutput, error)
|
||||
StopDataCollectionByAgentIdsWithContext(aws.Context, *applicationdiscoveryservice.StopDataCollectionByAgentIdsInput, ...request.Option) (*applicationdiscoveryservice.StopDataCollectionByAgentIdsOutput, error)
|
||||
StopDataCollectionByAgentIdsRequest(*applicationdiscoveryservice.StopDataCollectionByAgentIdsInput) (*request.Request, *applicationdiscoveryservice.StopDataCollectionByAgentIdsOutput)
|
||||
|
||||
UpdateApplication(*applicationdiscoveryservice.UpdateApplicationInput) (*applicationdiscoveryservice.UpdateApplicationOutput, error)
|
||||
UpdateApplicationWithContext(aws.Context, *applicationdiscoveryservice.UpdateApplicationInput, ...request.Option) (*applicationdiscoveryservice.UpdateApplicationOutput, error)
|
||||
UpdateApplicationRequest(*applicationdiscoveryservice.UpdateApplicationInput) (*request.Request, *applicationdiscoveryservice.UpdateApplicationOutput)
|
||||
}
|
||||
|
||||
var _ ApplicationDiscoveryServiceAPI = (*applicationdiscoveryservice.ApplicationDiscoveryService)(nil)
|
139
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/doc.go
generated
vendored
Normal file
139
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,139 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package applicationdiscoveryservice provides the client and types for making API
|
||||
// requests to AWS Application Discovery Service.
|
||||
//
|
||||
// AWS Application Discovery Service helps you plan application migration projects
|
||||
// by automatically identifying servers, virtual machines (VMs), software, and
|
||||
// software dependencies running in your on-premises data centers. Application
|
||||
// Discovery Service also collects application performance data, which can help
|
||||
// you assess the outcome of your migration. The data collected by Application
|
||||
// Discovery Service is securely retained in an Amazon-hosted and managed database
|
||||
// in the cloud. You can export the data as a CSV or XML file into your preferred
|
||||
// visualization tool or cloud-migration solution to plan your migration. For
|
||||
// more information, see the Application Discovery Service FAQ (http://aws.amazon.com/application-discovery/faqs/).
|
||||
//
|
||||
// Application Discovery Service offers two modes of operation.
|
||||
//
|
||||
// * Agentless discovery mode is recommended for environments that use VMware
|
||||
// vCenter Server. This mode doesn't require you to install an agent on each
|
||||
// host. Agentless discovery gathers server information regardless of the
|
||||
// operating systems, which minimizes the time required for initial on-premises
|
||||
// infrastructure assessment. Agentless discovery doesn't collect information
|
||||
// about software and software dependencies. It also doesn't work in non-VMware
|
||||
// environments. We recommend that you use agent-based discovery for non-VMware
|
||||
// environments and if you want to collect information about software and
|
||||
// software dependencies. You can also run agent-based and agentless discovery
|
||||
// simultaneously. Use agentless discovery to quickly complete the initial
|
||||
// infrastructure assessment and then install agents on select hosts to gather
|
||||
// information about software and software dependencies.
|
||||
//
|
||||
// * Agent-based discovery mode collects a richer set of data than agentless
|
||||
// discovery by using Amazon software, the AWS Application Discovery Agent,
|
||||
// which you install on one or more hosts in your data center. The agent
|
||||
// captures infrastructure and application information, including an inventory
|
||||
// of installed software applications, system and process performance, resource
|
||||
// utilization, and network dependencies between workloads. The information
|
||||
// collected by agents is secured at rest and in transit to the Application
|
||||
// Discovery Service database in the cloud.
|
||||
//
|
||||
// Application Discovery Service integrates with application discovery solutions
|
||||
// from AWS Partner Network (APN) partners. Third-party application discovery
|
||||
// tools can query Application Discovery Service and write to the Application
|
||||
// Discovery Service database using a public API. You can then import the data
|
||||
// into either a visualization tool or cloud-migration solution.
|
||||
//
|
||||
// Application Discovery Service doesn't gather sensitive information. All data
|
||||
// is handled according to the AWS Privacy Policy (http://aws.amazon.com/privacy/).
|
||||
// You can operate Application Discovery Service using offline mode to inspect
|
||||
// collected data before it is shared with the service.
|
||||
//
|
||||
// Your AWS account must be granted access to Application Discovery Service,
|
||||
// a process called whitelisting. This is true for AWS partners and customers
|
||||
// alike. To request access, sign up for AWS Application Discovery Service here
|
||||
// (http://aws.amazon.com/application-discovery/preview/). We send you information
|
||||
// about how to get started.
|
||||
//
|
||||
// This API reference provides descriptions, syntax, and usage examples for
|
||||
// each of the actions and data types for Application Discovery Service. The
|
||||
// topic for each action shows the API request parameters and the response.
|
||||
// Alternatively, you can use one of the AWS SDKs to access an API that is tailored
|
||||
// to the programming language or platform that you're using. For more information,
|
||||
// see AWS SDKs (http://aws.amazon.com/tools/#SDKs).
|
||||
//
|
||||
// This guide is intended for use with the AWS Application Discovery Service
|
||||
// User Guide (http://docs.aws.amazon.com/application-discovery/latest/userguide/).
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/discovery-2015-11-01 for more information on this service.
|
||||
//
|
||||
// See applicationdiscoveryservice package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/applicationdiscoveryservice/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for AWS Application Discovery 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 := applicationdiscoveryservice.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 AWS Application Discovery Service client ApplicationDiscoveryService for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/applicationdiscoveryservice/#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.AssociateConfigurationItemsToApplication(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("AssociateConfigurationItemsToApplication 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.AssociateConfigurationItemsToApplicationWithContext(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 applicationdiscoveryservice
|
45
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/errors.go
generated
vendored
Normal file
45
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package applicationdiscoveryservice
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAuthorizationErrorException for service response error code
|
||||
// "AuthorizationErrorException".
|
||||
//
|
||||
// The AWS user account does not have permission to perform the action. Check
|
||||
// the IAM policy associated with this account.
|
||||
ErrCodeAuthorizationErrorException = "AuthorizationErrorException"
|
||||
|
||||
// ErrCodeInvalidParameterException for service response error code
|
||||
// "InvalidParameterException".
|
||||
//
|
||||
// One or more parameters are not valid. Verify the parameters and try again.
|
||||
ErrCodeInvalidParameterException = "InvalidParameterException"
|
||||
|
||||
// ErrCodeInvalidParameterValueException for service response error code
|
||||
// "InvalidParameterValueException".
|
||||
//
|
||||
// The value of one or more parameters are either invalid or out of range. Verify
|
||||
// the parameter values and try again.
|
||||
ErrCodeInvalidParameterValueException = "InvalidParameterValueException"
|
||||
|
||||
// ErrCodeOperationNotPermittedException for service response error code
|
||||
// "OperationNotPermittedException".
|
||||
//
|
||||
// This operation is not permitted.
|
||||
ErrCodeOperationNotPermittedException = "OperationNotPermittedException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// The specified configuration ID was not located. Verify the configuration
|
||||
// ID and try again.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
|
||||
// ErrCodeServerInternalErrorException for service response error code
|
||||
// "ServerInternalErrorException".
|
||||
//
|
||||
// The server experienced an internal error. Try again.
|
||||
ErrCodeServerInternalErrorException = "ServerInternalErrorException"
|
||||
)
|
521
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/examples_test.go
generated
vendored
Normal file
521
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,521 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package applicationdiscoveryservice_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/applicationdiscoveryservice"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleApplicationDiscoveryService_AssociateConfigurationItemsToApplication() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.AssociateConfigurationItemsToApplicationInput{
|
||||
ApplicationConfigurationId: aws.String("ApplicationId"), // Required
|
||||
ConfigurationIds: []*string{ // Required
|
||||
aws.String("ConfigurationId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.AssociateConfigurationItemsToApplication(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 ExampleApplicationDiscoveryService_CreateApplication() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.CreateApplicationInput{
|
||||
Name: aws.String("String"), // Required
|
||||
Description: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.CreateApplication(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 ExampleApplicationDiscoveryService_CreateTags() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.CreateTagsInput{
|
||||
ConfigurationIds: []*string{ // Required
|
||||
aws.String("ConfigurationId"), // Required
|
||||
// More values...
|
||||
},
|
||||
Tags: []*applicationdiscoveryservice.Tag{ // Required
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"), // Required
|
||||
Value: aws.String("TagValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateTags(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 ExampleApplicationDiscoveryService_DeleteApplications() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.DeleteApplicationsInput{
|
||||
ConfigurationIds: []*string{ // Required
|
||||
aws.String("ApplicationId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DeleteApplications(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 ExampleApplicationDiscoveryService_DeleteTags() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.DeleteTagsInput{
|
||||
ConfigurationIds: []*string{ // Required
|
||||
aws.String("ConfigurationId"), // Required
|
||||
// More values...
|
||||
},
|
||||
Tags: []*applicationdiscoveryservice.Tag{
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"), // Required
|
||||
Value: aws.String("TagValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DeleteTags(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 ExampleApplicationDiscoveryService_DescribeAgents() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.DescribeAgentsInput{
|
||||
AgentIds: []*string{
|
||||
aws.String("AgentId"), // Required
|
||||
// More values...
|
||||
},
|
||||
Filters: []*applicationdiscoveryservice.Filter{
|
||||
{ // Required
|
||||
Condition: aws.String("Condition"), // Required
|
||||
Name: aws.String("String"), // Required
|
||||
Values: []*string{ // Required
|
||||
aws.String("FilterValue"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.DescribeAgents(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 ExampleApplicationDiscoveryService_DescribeConfigurations() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.DescribeConfigurationsInput{
|
||||
ConfigurationIds: []*string{ // Required
|
||||
aws.String("ConfigurationId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeConfigurations(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 ExampleApplicationDiscoveryService_DescribeExportConfigurations() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.DescribeExportConfigurationsInput{
|
||||
ExportIds: []*string{
|
||||
aws.String("ConfigurationsExportId"), // Required
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.DescribeExportConfigurations(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 ExampleApplicationDiscoveryService_DescribeExportTasks() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.DescribeExportTasksInput{
|
||||
ExportIds: []*string{
|
||||
aws.String("ConfigurationsExportId"), // Required
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.DescribeExportTasks(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 ExampleApplicationDiscoveryService_DescribeTags() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.DescribeTagsInput{
|
||||
Filters: []*applicationdiscoveryservice.TagFilter{
|
||||
{ // Required
|
||||
Name: aws.String("FilterName"), // Required
|
||||
Values: []*string{ // Required
|
||||
aws.String("FilterValue"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.DescribeTags(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 ExampleApplicationDiscoveryService_DisassociateConfigurationItemsFromApplication() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationInput{
|
||||
ApplicationConfigurationId: aws.String("ApplicationId"), // Required
|
||||
ConfigurationIds: []*string{ // Required
|
||||
aws.String("ConfigurationId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DisassociateConfigurationItemsFromApplication(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 ExampleApplicationDiscoveryService_ExportConfigurations() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
var params *applicationdiscoveryservice.ExportConfigurationsInput
|
||||
resp, err := svc.ExportConfigurations(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 ExampleApplicationDiscoveryService_GetDiscoverySummary() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
var params *applicationdiscoveryservice.GetDiscoverySummaryInput
|
||||
resp, err := svc.GetDiscoverySummary(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 ExampleApplicationDiscoveryService_ListConfigurations() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.ListConfigurationsInput{
|
||||
ConfigurationType: aws.String("ConfigurationItemType"), // Required
|
||||
Filters: []*applicationdiscoveryservice.Filter{
|
||||
{ // Required
|
||||
Condition: aws.String("Condition"), // Required
|
||||
Name: aws.String("String"), // Required
|
||||
Values: []*string{ // Required
|
||||
aws.String("FilterValue"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("NextToken"),
|
||||
OrderBy: []*applicationdiscoveryservice.OrderByElement{
|
||||
{ // Required
|
||||
FieldName: aws.String("String"), // Required
|
||||
SortOrder: aws.String("orderString"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.ListConfigurations(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 ExampleApplicationDiscoveryService_ListServerNeighbors() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.ListServerNeighborsInput{
|
||||
ConfigurationId: aws.String("ConfigurationId"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NeighborConfigurationIds: []*string{
|
||||
aws.String("ConfigurationId"), // Required
|
||||
// More values...
|
||||
},
|
||||
NextToken: aws.String("String"),
|
||||
PortInformationNeeded: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.ListServerNeighbors(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 ExampleApplicationDiscoveryService_StartDataCollectionByAgentIds() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.StartDataCollectionByAgentIdsInput{
|
||||
AgentIds: []*string{ // Required
|
||||
aws.String("AgentId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.StartDataCollectionByAgentIds(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 ExampleApplicationDiscoveryService_StartExportTask() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.StartExportTaskInput{
|
||||
ExportDataFormat: []*string{
|
||||
aws.String("ExportDataFormat"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.StartExportTask(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 ExampleApplicationDiscoveryService_StopDataCollectionByAgentIds() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.StopDataCollectionByAgentIdsInput{
|
||||
AgentIds: []*string{ // Required
|
||||
aws.String("AgentId"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.StopDataCollectionByAgentIds(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 ExampleApplicationDiscoveryService_UpdateApplication() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := applicationdiscoveryservice.New(sess)
|
||||
|
||||
params := &applicationdiscoveryservice.UpdateApplicationInput{
|
||||
ConfigurationId: aws.String("ApplicationId"), // Required
|
||||
Description: aws.String("String"),
|
||||
Name: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.UpdateApplication(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)
|
||||
}
|
95
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/service.go
generated
vendored
Normal file
95
vendor/github.com/aws/aws-sdk-go/service/applicationdiscoveryservice/service.go
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package applicationdiscoveryservice
|
||||
|
||||
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/jsonrpc"
|
||||
)
|
||||
|
||||
// ApplicationDiscoveryService provides the API operation methods for making requests to
|
||||
// AWS Application Discovery Service. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// ApplicationDiscoveryService methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type ApplicationDiscoveryService 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 = "discovery" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the ApplicationDiscoveryService 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 ApplicationDiscoveryService client from just a session.
|
||||
// svc := applicationdiscoveryservice.New(mySession)
|
||||
//
|
||||
// // Create a ApplicationDiscoveryService client with additional configuration
|
||||
// svc := applicationdiscoveryservice.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ApplicationDiscoveryService {
|
||||
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) *ApplicationDiscoveryService {
|
||||
svc := &ApplicationDiscoveryService{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2015-11-01",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "AWSPoseidonService_V2015_11_01",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a ApplicationDiscoveryService operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *ApplicationDiscoveryService) 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
|
||||
}
|
3986
vendor/github.com/aws/aws-sdk-go/service/appstream/api.go
generated
vendored
Normal file
3986
vendor/github.com/aws/aws-sdk-go/service/appstream/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
142
vendor/github.com/aws/aws-sdk-go/service/appstream/appstreamiface/interface.go
generated
vendored
Normal file
142
vendor/github.com/aws/aws-sdk-go/service/appstream/appstreamiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,142 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package appstreamiface provides an interface to enable mocking the Amazon AppStream 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 appstreamiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/appstream"
|
||||
)
|
||||
|
||||
// AppStreamAPI provides an interface to enable mocking the
|
||||
// appstream.AppStream 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 AppStream.
|
||||
// func myFunc(svc appstreamiface.AppStreamAPI) bool {
|
||||
// // Make svc.AssociateFleet request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := appstream.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockAppStreamClient struct {
|
||||
// appstreamiface.AppStreamAPI
|
||||
// }
|
||||
// func (m *mockAppStreamClient) AssociateFleet(input *appstream.AssociateFleetInput) (*appstream.AssociateFleetOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockAppStreamClient{}
|
||||
//
|
||||
// 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 AppStreamAPI interface {
|
||||
AssociateFleet(*appstream.AssociateFleetInput) (*appstream.AssociateFleetOutput, error)
|
||||
AssociateFleetWithContext(aws.Context, *appstream.AssociateFleetInput, ...request.Option) (*appstream.AssociateFleetOutput, error)
|
||||
AssociateFleetRequest(*appstream.AssociateFleetInput) (*request.Request, *appstream.AssociateFleetOutput)
|
||||
|
||||
CreateFleet(*appstream.CreateFleetInput) (*appstream.CreateFleetOutput, error)
|
||||
CreateFleetWithContext(aws.Context, *appstream.CreateFleetInput, ...request.Option) (*appstream.CreateFleetOutput, error)
|
||||
CreateFleetRequest(*appstream.CreateFleetInput) (*request.Request, *appstream.CreateFleetOutput)
|
||||
|
||||
CreateStack(*appstream.CreateStackInput) (*appstream.CreateStackOutput, error)
|
||||
CreateStackWithContext(aws.Context, *appstream.CreateStackInput, ...request.Option) (*appstream.CreateStackOutput, error)
|
||||
CreateStackRequest(*appstream.CreateStackInput) (*request.Request, *appstream.CreateStackOutput)
|
||||
|
||||
CreateStreamingURL(*appstream.CreateStreamingURLInput) (*appstream.CreateStreamingURLOutput, error)
|
||||
CreateStreamingURLWithContext(aws.Context, *appstream.CreateStreamingURLInput, ...request.Option) (*appstream.CreateStreamingURLOutput, error)
|
||||
CreateStreamingURLRequest(*appstream.CreateStreamingURLInput) (*request.Request, *appstream.CreateStreamingURLOutput)
|
||||
|
||||
DeleteFleet(*appstream.DeleteFleetInput) (*appstream.DeleteFleetOutput, error)
|
||||
DeleteFleetWithContext(aws.Context, *appstream.DeleteFleetInput, ...request.Option) (*appstream.DeleteFleetOutput, error)
|
||||
DeleteFleetRequest(*appstream.DeleteFleetInput) (*request.Request, *appstream.DeleteFleetOutput)
|
||||
|
||||
DeleteStack(*appstream.DeleteStackInput) (*appstream.DeleteStackOutput, error)
|
||||
DeleteStackWithContext(aws.Context, *appstream.DeleteStackInput, ...request.Option) (*appstream.DeleteStackOutput, error)
|
||||
DeleteStackRequest(*appstream.DeleteStackInput) (*request.Request, *appstream.DeleteStackOutput)
|
||||
|
||||
DescribeFleets(*appstream.DescribeFleetsInput) (*appstream.DescribeFleetsOutput, error)
|
||||
DescribeFleetsWithContext(aws.Context, *appstream.DescribeFleetsInput, ...request.Option) (*appstream.DescribeFleetsOutput, error)
|
||||
DescribeFleetsRequest(*appstream.DescribeFleetsInput) (*request.Request, *appstream.DescribeFleetsOutput)
|
||||
|
||||
DescribeImages(*appstream.DescribeImagesInput) (*appstream.DescribeImagesOutput, error)
|
||||
DescribeImagesWithContext(aws.Context, *appstream.DescribeImagesInput, ...request.Option) (*appstream.DescribeImagesOutput, error)
|
||||
DescribeImagesRequest(*appstream.DescribeImagesInput) (*request.Request, *appstream.DescribeImagesOutput)
|
||||
|
||||
DescribeSessions(*appstream.DescribeSessionsInput) (*appstream.DescribeSessionsOutput, error)
|
||||
DescribeSessionsWithContext(aws.Context, *appstream.DescribeSessionsInput, ...request.Option) (*appstream.DescribeSessionsOutput, error)
|
||||
DescribeSessionsRequest(*appstream.DescribeSessionsInput) (*request.Request, *appstream.DescribeSessionsOutput)
|
||||
|
||||
DescribeStacks(*appstream.DescribeStacksInput) (*appstream.DescribeStacksOutput, error)
|
||||
DescribeStacksWithContext(aws.Context, *appstream.DescribeStacksInput, ...request.Option) (*appstream.DescribeStacksOutput, error)
|
||||
DescribeStacksRequest(*appstream.DescribeStacksInput) (*request.Request, *appstream.DescribeStacksOutput)
|
||||
|
||||
DisassociateFleet(*appstream.DisassociateFleetInput) (*appstream.DisassociateFleetOutput, error)
|
||||
DisassociateFleetWithContext(aws.Context, *appstream.DisassociateFleetInput, ...request.Option) (*appstream.DisassociateFleetOutput, error)
|
||||
DisassociateFleetRequest(*appstream.DisassociateFleetInput) (*request.Request, *appstream.DisassociateFleetOutput)
|
||||
|
||||
ExpireSession(*appstream.ExpireSessionInput) (*appstream.ExpireSessionOutput, error)
|
||||
ExpireSessionWithContext(aws.Context, *appstream.ExpireSessionInput, ...request.Option) (*appstream.ExpireSessionOutput, error)
|
||||
ExpireSessionRequest(*appstream.ExpireSessionInput) (*request.Request, *appstream.ExpireSessionOutput)
|
||||
|
||||
ListAssociatedFleets(*appstream.ListAssociatedFleetsInput) (*appstream.ListAssociatedFleetsOutput, error)
|
||||
ListAssociatedFleetsWithContext(aws.Context, *appstream.ListAssociatedFleetsInput, ...request.Option) (*appstream.ListAssociatedFleetsOutput, error)
|
||||
ListAssociatedFleetsRequest(*appstream.ListAssociatedFleetsInput) (*request.Request, *appstream.ListAssociatedFleetsOutput)
|
||||
|
||||
ListAssociatedStacks(*appstream.ListAssociatedStacksInput) (*appstream.ListAssociatedStacksOutput, error)
|
||||
ListAssociatedStacksWithContext(aws.Context, *appstream.ListAssociatedStacksInput, ...request.Option) (*appstream.ListAssociatedStacksOutput, error)
|
||||
ListAssociatedStacksRequest(*appstream.ListAssociatedStacksInput) (*request.Request, *appstream.ListAssociatedStacksOutput)
|
||||
|
||||
StartFleet(*appstream.StartFleetInput) (*appstream.StartFleetOutput, error)
|
||||
StartFleetWithContext(aws.Context, *appstream.StartFleetInput, ...request.Option) (*appstream.StartFleetOutput, error)
|
||||
StartFleetRequest(*appstream.StartFleetInput) (*request.Request, *appstream.StartFleetOutput)
|
||||
|
||||
StopFleet(*appstream.StopFleetInput) (*appstream.StopFleetOutput, error)
|
||||
StopFleetWithContext(aws.Context, *appstream.StopFleetInput, ...request.Option) (*appstream.StopFleetOutput, error)
|
||||
StopFleetRequest(*appstream.StopFleetInput) (*request.Request, *appstream.StopFleetOutput)
|
||||
|
||||
UpdateFleet(*appstream.UpdateFleetInput) (*appstream.UpdateFleetOutput, error)
|
||||
UpdateFleetWithContext(aws.Context, *appstream.UpdateFleetInput, ...request.Option) (*appstream.UpdateFleetOutput, error)
|
||||
UpdateFleetRequest(*appstream.UpdateFleetInput) (*request.Request, *appstream.UpdateFleetOutput)
|
||||
|
||||
UpdateStack(*appstream.UpdateStackInput) (*appstream.UpdateStackOutput, error)
|
||||
UpdateStackWithContext(aws.Context, *appstream.UpdateStackInput, ...request.Option) (*appstream.UpdateStackOutput, error)
|
||||
UpdateStackRequest(*appstream.UpdateStackInput) (*request.Request, *appstream.UpdateStackOutput)
|
||||
|
||||
WaitUntilFleetStarted(*appstream.DescribeFleetsInput) error
|
||||
WaitUntilFleetStartedWithContext(aws.Context, *appstream.DescribeFleetsInput, ...request.WaiterOption) error
|
||||
|
||||
WaitUntilFleetStopped(*appstream.DescribeFleetsInput) error
|
||||
WaitUntilFleetStoppedWithContext(aws.Context, *appstream.DescribeFleetsInput, ...request.WaiterOption) error
|
||||
}
|
||||
|
||||
var _ AppStreamAPI = (*appstream.AppStream)(nil)
|
80
vendor/github.com/aws/aws-sdk-go/service/appstream/doc.go
generated
vendored
Normal file
80
vendor/github.com/aws/aws-sdk-go/service/appstream/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package appstream provides the client and types for making API
|
||||
// requests to Amazon AppStream.
|
||||
//
|
||||
// API documentation for Amazon AppStream 2.0.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/appstream-2016-12-01 for more information on this service.
|
||||
//
|
||||
// See appstream package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/appstream/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon AppStream 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 := appstream.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 AppStream client AppStream for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/appstream/#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.AssociateFleet(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("AssociateFleet 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.AssociateFleetWithContext(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 appstream
|
60
vendor/github.com/aws/aws-sdk-go/service/appstream/errors.go
generated
vendored
Normal file
60
vendor/github.com/aws/aws-sdk-go/service/appstream/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package appstream
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeConcurrentModificationException for service response error code
|
||||
// "ConcurrentModificationException".
|
||||
//
|
||||
// An API error occurred, please try again.
|
||||
ErrCodeConcurrentModificationException = "ConcurrentModificationException"
|
||||
|
||||
// ErrCodeInvalidParameterCombinationException for service response error code
|
||||
// "InvalidParameterCombinationException".
|
||||
//
|
||||
// Indicates an incorrect combination of parameters, or a missing parameter.
|
||||
ErrCodeInvalidParameterCombinationException = "InvalidParameterCombinationException"
|
||||
|
||||
// ErrCodeInvalidRoleException for service response error code
|
||||
// "InvalidRoleException".
|
||||
//
|
||||
// The specified role is invalid.
|
||||
ErrCodeInvalidRoleException = "InvalidRoleException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// The requested limit exceeds the permitted limit for an account.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeOperationNotPermittedException for service response error code
|
||||
// "OperationNotPermittedException".
|
||||
//
|
||||
// The attempted operation is not permitted.
|
||||
ErrCodeOperationNotPermittedException = "OperationNotPermittedException"
|
||||
|
||||
// ErrCodeResourceAlreadyExistsException for service response error code
|
||||
// "ResourceAlreadyExistsException".
|
||||
//
|
||||
// The specified resource already exists.
|
||||
ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"
|
||||
|
||||
// ErrCodeResourceInUseException for service response error code
|
||||
// "ResourceInUseException".
|
||||
//
|
||||
// The specified resource is in use.
|
||||
ErrCodeResourceInUseException = "ResourceInUseException"
|
||||
|
||||
// ErrCodeResourceNotAvailableException for service response error code
|
||||
// "ResourceNotAvailableException".
|
||||
//
|
||||
// The specified resource exists and is not in use, but isn't available.
|
||||
ErrCodeResourceNotAvailableException = "ResourceNotAvailableException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// The specified resource was not found.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
)
|
456
vendor/github.com/aws/aws-sdk-go/service/appstream/examples_test.go
generated
vendored
Normal file
456
vendor/github.com/aws/aws-sdk-go/service/appstream/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,456 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package appstream_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/appstream"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleAppStream_AssociateFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.AssociateFleetInput{
|
||||
FleetName: aws.String("String"), // Required
|
||||
StackName: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.AssociateFleet(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 ExampleAppStream_CreateFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.CreateFleetInput{
|
||||
ComputeCapacity: &appstream.ComputeCapacity{ // Required
|
||||
DesiredInstances: aws.Int64(1), // Required
|
||||
},
|
||||
ImageName: aws.String("String"), // Required
|
||||
InstanceType: aws.String("String"), // Required
|
||||
Name: aws.String("Name"), // Required
|
||||
Description: aws.String("Description"),
|
||||
DisconnectTimeoutInSeconds: aws.Int64(1),
|
||||
DisplayName: aws.String("DisplayName"),
|
||||
EnableDefaultInternetAccess: aws.Bool(true),
|
||||
MaxUserDurationInSeconds: aws.Int64(1),
|
||||
VpcConfig: &appstream.VpcConfig{
|
||||
SubnetIds: []*string{ // Required
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateFleet(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 ExampleAppStream_CreateStack() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.CreateStackInput{
|
||||
Name: aws.String("String"), // Required
|
||||
Description: aws.String("Description"),
|
||||
DisplayName: aws.String("DisplayName"),
|
||||
}
|
||||
resp, err := svc.CreateStack(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 ExampleAppStream_CreateStreamingURL() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.CreateStreamingURLInput{
|
||||
FleetName: aws.String("String"), // Required
|
||||
StackName: aws.String("String"), // Required
|
||||
UserId: aws.String("UserId"), // Required
|
||||
ApplicationId: aws.String("String"),
|
||||
SessionContext: aws.String("String"),
|
||||
Validity: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.CreateStreamingURL(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 ExampleAppStream_DeleteFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DeleteFleetInput{
|
||||
Name: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteFleet(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 ExampleAppStream_DeleteStack() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DeleteStackInput{
|
||||
Name: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteStack(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 ExampleAppStream_DescribeFleets() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DescribeFleetsInput{
|
||||
Names: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.DescribeFleets(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 ExampleAppStream_DescribeImages() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DescribeImagesInput{
|
||||
Names: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeImages(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 ExampleAppStream_DescribeSessions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DescribeSessionsInput{
|
||||
FleetName: aws.String("String"), // Required
|
||||
StackName: aws.String("String"), // Required
|
||||
AuthenticationType: aws.String("AuthenticationType"),
|
||||
Limit: aws.Int64(1),
|
||||
NextToken: aws.String("String"),
|
||||
UserId: aws.String("UserId"),
|
||||
}
|
||||
resp, err := svc.DescribeSessions(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 ExampleAppStream_DescribeStacks() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DescribeStacksInput{
|
||||
Names: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.DescribeStacks(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 ExampleAppStream_DisassociateFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.DisassociateFleetInput{
|
||||
FleetName: aws.String("String"), // Required
|
||||
StackName: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.DisassociateFleet(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 ExampleAppStream_ExpireSession() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.ExpireSessionInput{
|
||||
SessionId: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.ExpireSession(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 ExampleAppStream_ListAssociatedFleets() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.ListAssociatedFleetsInput{
|
||||
StackName: aws.String("String"), // Required
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.ListAssociatedFleets(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 ExampleAppStream_ListAssociatedStacks() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.ListAssociatedStacksInput{
|
||||
FleetName: aws.String("String"), // Required
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.ListAssociatedStacks(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 ExampleAppStream_StartFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.StartFleetInput{
|
||||
Name: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.StartFleet(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 ExampleAppStream_StopFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.StopFleetInput{
|
||||
Name: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.StopFleet(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 ExampleAppStream_UpdateFleet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.UpdateFleetInput{
|
||||
Name: aws.String("String"), // Required
|
||||
ComputeCapacity: &appstream.ComputeCapacity{
|
||||
DesiredInstances: aws.Int64(1), // Required
|
||||
},
|
||||
DeleteVpcConfig: aws.Bool(true),
|
||||
Description: aws.String("Description"),
|
||||
DisconnectTimeoutInSeconds: aws.Int64(1),
|
||||
DisplayName: aws.String("DisplayName"),
|
||||
EnableDefaultInternetAccess: aws.Bool(true),
|
||||
ImageName: aws.String("String"),
|
||||
InstanceType: aws.String("String"),
|
||||
MaxUserDurationInSeconds: aws.Int64(1),
|
||||
VpcConfig: &appstream.VpcConfig{
|
||||
SubnetIds: []*string{ // Required
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateFleet(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 ExampleAppStream_UpdateStack() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := appstream.New(sess)
|
||||
|
||||
params := &appstream.UpdateStackInput{
|
||||
Name: aws.String("String"), // Required
|
||||
Description: aws.String("Description"),
|
||||
DisplayName: aws.String("DisplayName"),
|
||||
}
|
||||
resp, err := svc.UpdateStack(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)
|
||||
}
|
98
vendor/github.com/aws/aws-sdk-go/service/appstream/service.go
generated
vendored
Normal file
98
vendor/github.com/aws/aws-sdk-go/service/appstream/service.go
generated
vendored
Normal file
|
@ -0,0 +1,98 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package appstream
|
||||
|
||||
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/jsonrpc"
|
||||
)
|
||||
|
||||
// AppStream provides the API operation methods for making requests to
|
||||
// Amazon AppStream. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// AppStream methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type AppStream 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 = "appstream2" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the AppStream 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 AppStream client from just a session.
|
||||
// svc := appstream.New(mySession)
|
||||
//
|
||||
// // Create a AppStream client with additional configuration
|
||||
// svc := appstream.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *AppStream {
|
||||
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) *AppStream {
|
||||
if len(signingName) == 0 {
|
||||
signingName = "appstream"
|
||||
}
|
||||
svc := &AppStream{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2016-12-01",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "PhotonAdminProxyService",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a AppStream operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *AppStream) 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
|
||||
}
|
122
vendor/github.com/aws/aws-sdk-go/service/appstream/waiters.go
generated
vendored
Normal file
122
vendor/github.com/aws/aws-sdk-go/service/appstream/waiters.go
generated
vendored
Normal file
|
@ -0,0 +1,122 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package appstream
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
// WaitUntilFleetStarted uses the Amazon AppStream API operation
|
||||
// DescribeFleets to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *AppStream) WaitUntilFleetStarted(input *DescribeFleetsInput) error {
|
||||
return c.WaitUntilFleetStartedWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilFleetStartedWithContext is an extended version of WaitUntilFleetStarted.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *AppStream) WaitUntilFleetStartedWithContext(ctx aws.Context, input *DescribeFleetsInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilFleetStarted",
|
||||
MaxAttempts: 40,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "fleets[].state",
|
||||
Expected: "ACTIVE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "fleets[].state",
|
||||
Expected: "PENDING_DEACTIVATE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "fleets[].state",
|
||||
Expected: "INACTIVE",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeFleetsInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeFleetsRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilFleetStopped uses the Amazon AppStream API operation
|
||||
// DescribeFleets to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *AppStream) WaitUntilFleetStopped(input *DescribeFleetsInput) error {
|
||||
return c.WaitUntilFleetStoppedWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilFleetStoppedWithContext is an extended version of WaitUntilFleetStopped.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *AppStream) WaitUntilFleetStoppedWithContext(ctx aws.Context, input *DescribeFleetsInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilFleetStopped",
|
||||
MaxAttempts: 40,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "fleets[].state",
|
||||
Expected: "INACTIVE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "fleets[].state",
|
||||
Expected: "PENDING_ACTIVATE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "fleets[].state",
|
||||
Expected: "ACTIVE",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeFleetsInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeFleetsRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
12179
vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go
generated
vendored
Normal file
12179
vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
305
vendor/github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface/interface.go
generated
vendored
Normal file
305
vendor/github.com/aws/aws-sdk-go/service/autoscaling/autoscalingiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,305 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package autoscalingiface provides an interface to enable mocking the Auto Scaling 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 autoscalingiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/autoscaling"
|
||||
)
|
||||
|
||||
// AutoScalingAPI provides an interface to enable mocking the
|
||||
// autoscaling.AutoScaling 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
|
||||
// // Auto Scaling.
|
||||
// func myFunc(svc autoscalingiface.AutoScalingAPI) bool {
|
||||
// // Make svc.AttachInstances request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := autoscaling.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockAutoScalingClient struct {
|
||||
// autoscalingiface.AutoScalingAPI
|
||||
// }
|
||||
// func (m *mockAutoScalingClient) AttachInstances(input *autoscaling.AttachInstancesInput) (*autoscaling.AttachInstancesOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockAutoScalingClient{}
|
||||
//
|
||||
// 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 AutoScalingAPI interface {
|
||||
AttachInstances(*autoscaling.AttachInstancesInput) (*autoscaling.AttachInstancesOutput, error)
|
||||
AttachInstancesWithContext(aws.Context, *autoscaling.AttachInstancesInput, ...request.Option) (*autoscaling.AttachInstancesOutput, error)
|
||||
AttachInstancesRequest(*autoscaling.AttachInstancesInput) (*request.Request, *autoscaling.AttachInstancesOutput)
|
||||
|
||||
AttachLoadBalancerTargetGroups(*autoscaling.AttachLoadBalancerTargetGroupsInput) (*autoscaling.AttachLoadBalancerTargetGroupsOutput, error)
|
||||
AttachLoadBalancerTargetGroupsWithContext(aws.Context, *autoscaling.AttachLoadBalancerTargetGroupsInput, ...request.Option) (*autoscaling.AttachLoadBalancerTargetGroupsOutput, error)
|
||||
AttachLoadBalancerTargetGroupsRequest(*autoscaling.AttachLoadBalancerTargetGroupsInput) (*request.Request, *autoscaling.AttachLoadBalancerTargetGroupsOutput)
|
||||
|
||||
AttachLoadBalancers(*autoscaling.AttachLoadBalancersInput) (*autoscaling.AttachLoadBalancersOutput, error)
|
||||
AttachLoadBalancersWithContext(aws.Context, *autoscaling.AttachLoadBalancersInput, ...request.Option) (*autoscaling.AttachLoadBalancersOutput, error)
|
||||
AttachLoadBalancersRequest(*autoscaling.AttachLoadBalancersInput) (*request.Request, *autoscaling.AttachLoadBalancersOutput)
|
||||
|
||||
CompleteLifecycleAction(*autoscaling.CompleteLifecycleActionInput) (*autoscaling.CompleteLifecycleActionOutput, error)
|
||||
CompleteLifecycleActionWithContext(aws.Context, *autoscaling.CompleteLifecycleActionInput, ...request.Option) (*autoscaling.CompleteLifecycleActionOutput, error)
|
||||
CompleteLifecycleActionRequest(*autoscaling.CompleteLifecycleActionInput) (*request.Request, *autoscaling.CompleteLifecycleActionOutput)
|
||||
|
||||
CreateAutoScalingGroup(*autoscaling.CreateAutoScalingGroupInput) (*autoscaling.CreateAutoScalingGroupOutput, error)
|
||||
CreateAutoScalingGroupWithContext(aws.Context, *autoscaling.CreateAutoScalingGroupInput, ...request.Option) (*autoscaling.CreateAutoScalingGroupOutput, error)
|
||||
CreateAutoScalingGroupRequest(*autoscaling.CreateAutoScalingGroupInput) (*request.Request, *autoscaling.CreateAutoScalingGroupOutput)
|
||||
|
||||
CreateLaunchConfiguration(*autoscaling.CreateLaunchConfigurationInput) (*autoscaling.CreateLaunchConfigurationOutput, error)
|
||||
CreateLaunchConfigurationWithContext(aws.Context, *autoscaling.CreateLaunchConfigurationInput, ...request.Option) (*autoscaling.CreateLaunchConfigurationOutput, error)
|
||||
CreateLaunchConfigurationRequest(*autoscaling.CreateLaunchConfigurationInput) (*request.Request, *autoscaling.CreateLaunchConfigurationOutput)
|
||||
|
||||
CreateOrUpdateTags(*autoscaling.CreateOrUpdateTagsInput) (*autoscaling.CreateOrUpdateTagsOutput, error)
|
||||
CreateOrUpdateTagsWithContext(aws.Context, *autoscaling.CreateOrUpdateTagsInput, ...request.Option) (*autoscaling.CreateOrUpdateTagsOutput, error)
|
||||
CreateOrUpdateTagsRequest(*autoscaling.CreateOrUpdateTagsInput) (*request.Request, *autoscaling.CreateOrUpdateTagsOutput)
|
||||
|
||||
DeleteAutoScalingGroup(*autoscaling.DeleteAutoScalingGroupInput) (*autoscaling.DeleteAutoScalingGroupOutput, error)
|
||||
DeleteAutoScalingGroupWithContext(aws.Context, *autoscaling.DeleteAutoScalingGroupInput, ...request.Option) (*autoscaling.DeleteAutoScalingGroupOutput, error)
|
||||
DeleteAutoScalingGroupRequest(*autoscaling.DeleteAutoScalingGroupInput) (*request.Request, *autoscaling.DeleteAutoScalingGroupOutput)
|
||||
|
||||
DeleteLaunchConfiguration(*autoscaling.DeleteLaunchConfigurationInput) (*autoscaling.DeleteLaunchConfigurationOutput, error)
|
||||
DeleteLaunchConfigurationWithContext(aws.Context, *autoscaling.DeleteLaunchConfigurationInput, ...request.Option) (*autoscaling.DeleteLaunchConfigurationOutput, error)
|
||||
DeleteLaunchConfigurationRequest(*autoscaling.DeleteLaunchConfigurationInput) (*request.Request, *autoscaling.DeleteLaunchConfigurationOutput)
|
||||
|
||||
DeleteLifecycleHook(*autoscaling.DeleteLifecycleHookInput) (*autoscaling.DeleteLifecycleHookOutput, error)
|
||||
DeleteLifecycleHookWithContext(aws.Context, *autoscaling.DeleteLifecycleHookInput, ...request.Option) (*autoscaling.DeleteLifecycleHookOutput, error)
|
||||
DeleteLifecycleHookRequest(*autoscaling.DeleteLifecycleHookInput) (*request.Request, *autoscaling.DeleteLifecycleHookOutput)
|
||||
|
||||
DeleteNotificationConfiguration(*autoscaling.DeleteNotificationConfigurationInput) (*autoscaling.DeleteNotificationConfigurationOutput, error)
|
||||
DeleteNotificationConfigurationWithContext(aws.Context, *autoscaling.DeleteNotificationConfigurationInput, ...request.Option) (*autoscaling.DeleteNotificationConfigurationOutput, error)
|
||||
DeleteNotificationConfigurationRequest(*autoscaling.DeleteNotificationConfigurationInput) (*request.Request, *autoscaling.DeleteNotificationConfigurationOutput)
|
||||
|
||||
DeletePolicy(*autoscaling.DeletePolicyInput) (*autoscaling.DeletePolicyOutput, error)
|
||||
DeletePolicyWithContext(aws.Context, *autoscaling.DeletePolicyInput, ...request.Option) (*autoscaling.DeletePolicyOutput, error)
|
||||
DeletePolicyRequest(*autoscaling.DeletePolicyInput) (*request.Request, *autoscaling.DeletePolicyOutput)
|
||||
|
||||
DeleteScheduledAction(*autoscaling.DeleteScheduledActionInput) (*autoscaling.DeleteScheduledActionOutput, error)
|
||||
DeleteScheduledActionWithContext(aws.Context, *autoscaling.DeleteScheduledActionInput, ...request.Option) (*autoscaling.DeleteScheduledActionOutput, error)
|
||||
DeleteScheduledActionRequest(*autoscaling.DeleteScheduledActionInput) (*request.Request, *autoscaling.DeleteScheduledActionOutput)
|
||||
|
||||
DeleteTags(*autoscaling.DeleteTagsInput) (*autoscaling.DeleteTagsOutput, error)
|
||||
DeleteTagsWithContext(aws.Context, *autoscaling.DeleteTagsInput, ...request.Option) (*autoscaling.DeleteTagsOutput, error)
|
||||
DeleteTagsRequest(*autoscaling.DeleteTagsInput) (*request.Request, *autoscaling.DeleteTagsOutput)
|
||||
|
||||
DescribeAccountLimits(*autoscaling.DescribeAccountLimitsInput) (*autoscaling.DescribeAccountLimitsOutput, error)
|
||||
DescribeAccountLimitsWithContext(aws.Context, *autoscaling.DescribeAccountLimitsInput, ...request.Option) (*autoscaling.DescribeAccountLimitsOutput, error)
|
||||
DescribeAccountLimitsRequest(*autoscaling.DescribeAccountLimitsInput) (*request.Request, *autoscaling.DescribeAccountLimitsOutput)
|
||||
|
||||
DescribeAdjustmentTypes(*autoscaling.DescribeAdjustmentTypesInput) (*autoscaling.DescribeAdjustmentTypesOutput, error)
|
||||
DescribeAdjustmentTypesWithContext(aws.Context, *autoscaling.DescribeAdjustmentTypesInput, ...request.Option) (*autoscaling.DescribeAdjustmentTypesOutput, error)
|
||||
DescribeAdjustmentTypesRequest(*autoscaling.DescribeAdjustmentTypesInput) (*request.Request, *autoscaling.DescribeAdjustmentTypesOutput)
|
||||
|
||||
DescribeAutoScalingGroups(*autoscaling.DescribeAutoScalingGroupsInput) (*autoscaling.DescribeAutoScalingGroupsOutput, error)
|
||||
DescribeAutoScalingGroupsWithContext(aws.Context, *autoscaling.DescribeAutoScalingGroupsInput, ...request.Option) (*autoscaling.DescribeAutoScalingGroupsOutput, error)
|
||||
DescribeAutoScalingGroupsRequest(*autoscaling.DescribeAutoScalingGroupsInput) (*request.Request, *autoscaling.DescribeAutoScalingGroupsOutput)
|
||||
|
||||
DescribeAutoScalingGroupsPages(*autoscaling.DescribeAutoScalingGroupsInput, func(*autoscaling.DescribeAutoScalingGroupsOutput, bool) bool) error
|
||||
DescribeAutoScalingGroupsPagesWithContext(aws.Context, *autoscaling.DescribeAutoScalingGroupsInput, func(*autoscaling.DescribeAutoScalingGroupsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeAutoScalingInstances(*autoscaling.DescribeAutoScalingInstancesInput) (*autoscaling.DescribeAutoScalingInstancesOutput, error)
|
||||
DescribeAutoScalingInstancesWithContext(aws.Context, *autoscaling.DescribeAutoScalingInstancesInput, ...request.Option) (*autoscaling.DescribeAutoScalingInstancesOutput, error)
|
||||
DescribeAutoScalingInstancesRequest(*autoscaling.DescribeAutoScalingInstancesInput) (*request.Request, *autoscaling.DescribeAutoScalingInstancesOutput)
|
||||
|
||||
DescribeAutoScalingInstancesPages(*autoscaling.DescribeAutoScalingInstancesInput, func(*autoscaling.DescribeAutoScalingInstancesOutput, bool) bool) error
|
||||
DescribeAutoScalingInstancesPagesWithContext(aws.Context, *autoscaling.DescribeAutoScalingInstancesInput, func(*autoscaling.DescribeAutoScalingInstancesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeAutoScalingNotificationTypes(*autoscaling.DescribeAutoScalingNotificationTypesInput) (*autoscaling.DescribeAutoScalingNotificationTypesOutput, error)
|
||||
DescribeAutoScalingNotificationTypesWithContext(aws.Context, *autoscaling.DescribeAutoScalingNotificationTypesInput, ...request.Option) (*autoscaling.DescribeAutoScalingNotificationTypesOutput, error)
|
||||
DescribeAutoScalingNotificationTypesRequest(*autoscaling.DescribeAutoScalingNotificationTypesInput) (*request.Request, *autoscaling.DescribeAutoScalingNotificationTypesOutput)
|
||||
|
||||
DescribeLaunchConfigurations(*autoscaling.DescribeLaunchConfigurationsInput) (*autoscaling.DescribeLaunchConfigurationsOutput, error)
|
||||
DescribeLaunchConfigurationsWithContext(aws.Context, *autoscaling.DescribeLaunchConfigurationsInput, ...request.Option) (*autoscaling.DescribeLaunchConfigurationsOutput, error)
|
||||
DescribeLaunchConfigurationsRequest(*autoscaling.DescribeLaunchConfigurationsInput) (*request.Request, *autoscaling.DescribeLaunchConfigurationsOutput)
|
||||
|
||||
DescribeLaunchConfigurationsPages(*autoscaling.DescribeLaunchConfigurationsInput, func(*autoscaling.DescribeLaunchConfigurationsOutput, bool) bool) error
|
||||
DescribeLaunchConfigurationsPagesWithContext(aws.Context, *autoscaling.DescribeLaunchConfigurationsInput, func(*autoscaling.DescribeLaunchConfigurationsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeLifecycleHookTypes(*autoscaling.DescribeLifecycleHookTypesInput) (*autoscaling.DescribeLifecycleHookTypesOutput, error)
|
||||
DescribeLifecycleHookTypesWithContext(aws.Context, *autoscaling.DescribeLifecycleHookTypesInput, ...request.Option) (*autoscaling.DescribeLifecycleHookTypesOutput, error)
|
||||
DescribeLifecycleHookTypesRequest(*autoscaling.DescribeLifecycleHookTypesInput) (*request.Request, *autoscaling.DescribeLifecycleHookTypesOutput)
|
||||
|
||||
DescribeLifecycleHooks(*autoscaling.DescribeLifecycleHooksInput) (*autoscaling.DescribeLifecycleHooksOutput, error)
|
||||
DescribeLifecycleHooksWithContext(aws.Context, *autoscaling.DescribeLifecycleHooksInput, ...request.Option) (*autoscaling.DescribeLifecycleHooksOutput, error)
|
||||
DescribeLifecycleHooksRequest(*autoscaling.DescribeLifecycleHooksInput) (*request.Request, *autoscaling.DescribeLifecycleHooksOutput)
|
||||
|
||||
DescribeLoadBalancerTargetGroups(*autoscaling.DescribeLoadBalancerTargetGroupsInput) (*autoscaling.DescribeLoadBalancerTargetGroupsOutput, error)
|
||||
DescribeLoadBalancerTargetGroupsWithContext(aws.Context, *autoscaling.DescribeLoadBalancerTargetGroupsInput, ...request.Option) (*autoscaling.DescribeLoadBalancerTargetGroupsOutput, error)
|
||||
DescribeLoadBalancerTargetGroupsRequest(*autoscaling.DescribeLoadBalancerTargetGroupsInput) (*request.Request, *autoscaling.DescribeLoadBalancerTargetGroupsOutput)
|
||||
|
||||
DescribeLoadBalancers(*autoscaling.DescribeLoadBalancersInput) (*autoscaling.DescribeLoadBalancersOutput, error)
|
||||
DescribeLoadBalancersWithContext(aws.Context, *autoscaling.DescribeLoadBalancersInput, ...request.Option) (*autoscaling.DescribeLoadBalancersOutput, error)
|
||||
DescribeLoadBalancersRequest(*autoscaling.DescribeLoadBalancersInput) (*request.Request, *autoscaling.DescribeLoadBalancersOutput)
|
||||
|
||||
DescribeMetricCollectionTypes(*autoscaling.DescribeMetricCollectionTypesInput) (*autoscaling.DescribeMetricCollectionTypesOutput, error)
|
||||
DescribeMetricCollectionTypesWithContext(aws.Context, *autoscaling.DescribeMetricCollectionTypesInput, ...request.Option) (*autoscaling.DescribeMetricCollectionTypesOutput, error)
|
||||
DescribeMetricCollectionTypesRequest(*autoscaling.DescribeMetricCollectionTypesInput) (*request.Request, *autoscaling.DescribeMetricCollectionTypesOutput)
|
||||
|
||||
DescribeNotificationConfigurations(*autoscaling.DescribeNotificationConfigurationsInput) (*autoscaling.DescribeNotificationConfigurationsOutput, error)
|
||||
DescribeNotificationConfigurationsWithContext(aws.Context, *autoscaling.DescribeNotificationConfigurationsInput, ...request.Option) (*autoscaling.DescribeNotificationConfigurationsOutput, error)
|
||||
DescribeNotificationConfigurationsRequest(*autoscaling.DescribeNotificationConfigurationsInput) (*request.Request, *autoscaling.DescribeNotificationConfigurationsOutput)
|
||||
|
||||
DescribeNotificationConfigurationsPages(*autoscaling.DescribeNotificationConfigurationsInput, func(*autoscaling.DescribeNotificationConfigurationsOutput, bool) bool) error
|
||||
DescribeNotificationConfigurationsPagesWithContext(aws.Context, *autoscaling.DescribeNotificationConfigurationsInput, func(*autoscaling.DescribeNotificationConfigurationsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribePolicies(*autoscaling.DescribePoliciesInput) (*autoscaling.DescribePoliciesOutput, error)
|
||||
DescribePoliciesWithContext(aws.Context, *autoscaling.DescribePoliciesInput, ...request.Option) (*autoscaling.DescribePoliciesOutput, error)
|
||||
DescribePoliciesRequest(*autoscaling.DescribePoliciesInput) (*request.Request, *autoscaling.DescribePoliciesOutput)
|
||||
|
||||
DescribePoliciesPages(*autoscaling.DescribePoliciesInput, func(*autoscaling.DescribePoliciesOutput, bool) bool) error
|
||||
DescribePoliciesPagesWithContext(aws.Context, *autoscaling.DescribePoliciesInput, func(*autoscaling.DescribePoliciesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeScalingActivities(*autoscaling.DescribeScalingActivitiesInput) (*autoscaling.DescribeScalingActivitiesOutput, error)
|
||||
DescribeScalingActivitiesWithContext(aws.Context, *autoscaling.DescribeScalingActivitiesInput, ...request.Option) (*autoscaling.DescribeScalingActivitiesOutput, error)
|
||||
DescribeScalingActivitiesRequest(*autoscaling.DescribeScalingActivitiesInput) (*request.Request, *autoscaling.DescribeScalingActivitiesOutput)
|
||||
|
||||
DescribeScalingActivitiesPages(*autoscaling.DescribeScalingActivitiesInput, func(*autoscaling.DescribeScalingActivitiesOutput, bool) bool) error
|
||||
DescribeScalingActivitiesPagesWithContext(aws.Context, *autoscaling.DescribeScalingActivitiesInput, func(*autoscaling.DescribeScalingActivitiesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeScalingProcessTypes(*autoscaling.DescribeScalingProcessTypesInput) (*autoscaling.DescribeScalingProcessTypesOutput, error)
|
||||
DescribeScalingProcessTypesWithContext(aws.Context, *autoscaling.DescribeScalingProcessTypesInput, ...request.Option) (*autoscaling.DescribeScalingProcessTypesOutput, error)
|
||||
DescribeScalingProcessTypesRequest(*autoscaling.DescribeScalingProcessTypesInput) (*request.Request, *autoscaling.DescribeScalingProcessTypesOutput)
|
||||
|
||||
DescribeScheduledActions(*autoscaling.DescribeScheduledActionsInput) (*autoscaling.DescribeScheduledActionsOutput, error)
|
||||
DescribeScheduledActionsWithContext(aws.Context, *autoscaling.DescribeScheduledActionsInput, ...request.Option) (*autoscaling.DescribeScheduledActionsOutput, error)
|
||||
DescribeScheduledActionsRequest(*autoscaling.DescribeScheduledActionsInput) (*request.Request, *autoscaling.DescribeScheduledActionsOutput)
|
||||
|
||||
DescribeScheduledActionsPages(*autoscaling.DescribeScheduledActionsInput, func(*autoscaling.DescribeScheduledActionsOutput, bool) bool) error
|
||||
DescribeScheduledActionsPagesWithContext(aws.Context, *autoscaling.DescribeScheduledActionsInput, func(*autoscaling.DescribeScheduledActionsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeTags(*autoscaling.DescribeTagsInput) (*autoscaling.DescribeTagsOutput, error)
|
||||
DescribeTagsWithContext(aws.Context, *autoscaling.DescribeTagsInput, ...request.Option) (*autoscaling.DescribeTagsOutput, error)
|
||||
DescribeTagsRequest(*autoscaling.DescribeTagsInput) (*request.Request, *autoscaling.DescribeTagsOutput)
|
||||
|
||||
DescribeTagsPages(*autoscaling.DescribeTagsInput, func(*autoscaling.DescribeTagsOutput, bool) bool) error
|
||||
DescribeTagsPagesWithContext(aws.Context, *autoscaling.DescribeTagsInput, func(*autoscaling.DescribeTagsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeTerminationPolicyTypes(*autoscaling.DescribeTerminationPolicyTypesInput) (*autoscaling.DescribeTerminationPolicyTypesOutput, error)
|
||||
DescribeTerminationPolicyTypesWithContext(aws.Context, *autoscaling.DescribeTerminationPolicyTypesInput, ...request.Option) (*autoscaling.DescribeTerminationPolicyTypesOutput, error)
|
||||
DescribeTerminationPolicyTypesRequest(*autoscaling.DescribeTerminationPolicyTypesInput) (*request.Request, *autoscaling.DescribeTerminationPolicyTypesOutput)
|
||||
|
||||
DetachInstances(*autoscaling.DetachInstancesInput) (*autoscaling.DetachInstancesOutput, error)
|
||||
DetachInstancesWithContext(aws.Context, *autoscaling.DetachInstancesInput, ...request.Option) (*autoscaling.DetachInstancesOutput, error)
|
||||
DetachInstancesRequest(*autoscaling.DetachInstancesInput) (*request.Request, *autoscaling.DetachInstancesOutput)
|
||||
|
||||
DetachLoadBalancerTargetGroups(*autoscaling.DetachLoadBalancerTargetGroupsInput) (*autoscaling.DetachLoadBalancerTargetGroupsOutput, error)
|
||||
DetachLoadBalancerTargetGroupsWithContext(aws.Context, *autoscaling.DetachLoadBalancerTargetGroupsInput, ...request.Option) (*autoscaling.DetachLoadBalancerTargetGroupsOutput, error)
|
||||
DetachLoadBalancerTargetGroupsRequest(*autoscaling.DetachLoadBalancerTargetGroupsInput) (*request.Request, *autoscaling.DetachLoadBalancerTargetGroupsOutput)
|
||||
|
||||
DetachLoadBalancers(*autoscaling.DetachLoadBalancersInput) (*autoscaling.DetachLoadBalancersOutput, error)
|
||||
DetachLoadBalancersWithContext(aws.Context, *autoscaling.DetachLoadBalancersInput, ...request.Option) (*autoscaling.DetachLoadBalancersOutput, error)
|
||||
DetachLoadBalancersRequest(*autoscaling.DetachLoadBalancersInput) (*request.Request, *autoscaling.DetachLoadBalancersOutput)
|
||||
|
||||
DisableMetricsCollection(*autoscaling.DisableMetricsCollectionInput) (*autoscaling.DisableMetricsCollectionOutput, error)
|
||||
DisableMetricsCollectionWithContext(aws.Context, *autoscaling.DisableMetricsCollectionInput, ...request.Option) (*autoscaling.DisableMetricsCollectionOutput, error)
|
||||
DisableMetricsCollectionRequest(*autoscaling.DisableMetricsCollectionInput) (*request.Request, *autoscaling.DisableMetricsCollectionOutput)
|
||||
|
||||
EnableMetricsCollection(*autoscaling.EnableMetricsCollectionInput) (*autoscaling.EnableMetricsCollectionOutput, error)
|
||||
EnableMetricsCollectionWithContext(aws.Context, *autoscaling.EnableMetricsCollectionInput, ...request.Option) (*autoscaling.EnableMetricsCollectionOutput, error)
|
||||
EnableMetricsCollectionRequest(*autoscaling.EnableMetricsCollectionInput) (*request.Request, *autoscaling.EnableMetricsCollectionOutput)
|
||||
|
||||
EnterStandby(*autoscaling.EnterStandbyInput) (*autoscaling.EnterStandbyOutput, error)
|
||||
EnterStandbyWithContext(aws.Context, *autoscaling.EnterStandbyInput, ...request.Option) (*autoscaling.EnterStandbyOutput, error)
|
||||
EnterStandbyRequest(*autoscaling.EnterStandbyInput) (*request.Request, *autoscaling.EnterStandbyOutput)
|
||||
|
||||
ExecutePolicy(*autoscaling.ExecutePolicyInput) (*autoscaling.ExecutePolicyOutput, error)
|
||||
ExecutePolicyWithContext(aws.Context, *autoscaling.ExecutePolicyInput, ...request.Option) (*autoscaling.ExecutePolicyOutput, error)
|
||||
ExecutePolicyRequest(*autoscaling.ExecutePolicyInput) (*request.Request, *autoscaling.ExecutePolicyOutput)
|
||||
|
||||
ExitStandby(*autoscaling.ExitStandbyInput) (*autoscaling.ExitStandbyOutput, error)
|
||||
ExitStandbyWithContext(aws.Context, *autoscaling.ExitStandbyInput, ...request.Option) (*autoscaling.ExitStandbyOutput, error)
|
||||
ExitStandbyRequest(*autoscaling.ExitStandbyInput) (*request.Request, *autoscaling.ExitStandbyOutput)
|
||||
|
||||
PutLifecycleHook(*autoscaling.PutLifecycleHookInput) (*autoscaling.PutLifecycleHookOutput, error)
|
||||
PutLifecycleHookWithContext(aws.Context, *autoscaling.PutLifecycleHookInput, ...request.Option) (*autoscaling.PutLifecycleHookOutput, error)
|
||||
PutLifecycleHookRequest(*autoscaling.PutLifecycleHookInput) (*request.Request, *autoscaling.PutLifecycleHookOutput)
|
||||
|
||||
PutNotificationConfiguration(*autoscaling.PutNotificationConfigurationInput) (*autoscaling.PutNotificationConfigurationOutput, error)
|
||||
PutNotificationConfigurationWithContext(aws.Context, *autoscaling.PutNotificationConfigurationInput, ...request.Option) (*autoscaling.PutNotificationConfigurationOutput, error)
|
||||
PutNotificationConfigurationRequest(*autoscaling.PutNotificationConfigurationInput) (*request.Request, *autoscaling.PutNotificationConfigurationOutput)
|
||||
|
||||
PutScalingPolicy(*autoscaling.PutScalingPolicyInput) (*autoscaling.PutScalingPolicyOutput, error)
|
||||
PutScalingPolicyWithContext(aws.Context, *autoscaling.PutScalingPolicyInput, ...request.Option) (*autoscaling.PutScalingPolicyOutput, error)
|
||||
PutScalingPolicyRequest(*autoscaling.PutScalingPolicyInput) (*request.Request, *autoscaling.PutScalingPolicyOutput)
|
||||
|
||||
PutScheduledUpdateGroupAction(*autoscaling.PutScheduledUpdateGroupActionInput) (*autoscaling.PutScheduledUpdateGroupActionOutput, error)
|
||||
PutScheduledUpdateGroupActionWithContext(aws.Context, *autoscaling.PutScheduledUpdateGroupActionInput, ...request.Option) (*autoscaling.PutScheduledUpdateGroupActionOutput, error)
|
||||
PutScheduledUpdateGroupActionRequest(*autoscaling.PutScheduledUpdateGroupActionInput) (*request.Request, *autoscaling.PutScheduledUpdateGroupActionOutput)
|
||||
|
||||
RecordLifecycleActionHeartbeat(*autoscaling.RecordLifecycleActionHeartbeatInput) (*autoscaling.RecordLifecycleActionHeartbeatOutput, error)
|
||||
RecordLifecycleActionHeartbeatWithContext(aws.Context, *autoscaling.RecordLifecycleActionHeartbeatInput, ...request.Option) (*autoscaling.RecordLifecycleActionHeartbeatOutput, error)
|
||||
RecordLifecycleActionHeartbeatRequest(*autoscaling.RecordLifecycleActionHeartbeatInput) (*request.Request, *autoscaling.RecordLifecycleActionHeartbeatOutput)
|
||||
|
||||
ResumeProcesses(*autoscaling.ScalingProcessQuery) (*autoscaling.ResumeProcessesOutput, error)
|
||||
ResumeProcessesWithContext(aws.Context, *autoscaling.ScalingProcessQuery, ...request.Option) (*autoscaling.ResumeProcessesOutput, error)
|
||||
ResumeProcessesRequest(*autoscaling.ScalingProcessQuery) (*request.Request, *autoscaling.ResumeProcessesOutput)
|
||||
|
||||
SetDesiredCapacity(*autoscaling.SetDesiredCapacityInput) (*autoscaling.SetDesiredCapacityOutput, error)
|
||||
SetDesiredCapacityWithContext(aws.Context, *autoscaling.SetDesiredCapacityInput, ...request.Option) (*autoscaling.SetDesiredCapacityOutput, error)
|
||||
SetDesiredCapacityRequest(*autoscaling.SetDesiredCapacityInput) (*request.Request, *autoscaling.SetDesiredCapacityOutput)
|
||||
|
||||
SetInstanceHealth(*autoscaling.SetInstanceHealthInput) (*autoscaling.SetInstanceHealthOutput, error)
|
||||
SetInstanceHealthWithContext(aws.Context, *autoscaling.SetInstanceHealthInput, ...request.Option) (*autoscaling.SetInstanceHealthOutput, error)
|
||||
SetInstanceHealthRequest(*autoscaling.SetInstanceHealthInput) (*request.Request, *autoscaling.SetInstanceHealthOutput)
|
||||
|
||||
SetInstanceProtection(*autoscaling.SetInstanceProtectionInput) (*autoscaling.SetInstanceProtectionOutput, error)
|
||||
SetInstanceProtectionWithContext(aws.Context, *autoscaling.SetInstanceProtectionInput, ...request.Option) (*autoscaling.SetInstanceProtectionOutput, error)
|
||||
SetInstanceProtectionRequest(*autoscaling.SetInstanceProtectionInput) (*request.Request, *autoscaling.SetInstanceProtectionOutput)
|
||||
|
||||
SuspendProcesses(*autoscaling.ScalingProcessQuery) (*autoscaling.SuspendProcessesOutput, error)
|
||||
SuspendProcessesWithContext(aws.Context, *autoscaling.ScalingProcessQuery, ...request.Option) (*autoscaling.SuspendProcessesOutput, error)
|
||||
SuspendProcessesRequest(*autoscaling.ScalingProcessQuery) (*request.Request, *autoscaling.SuspendProcessesOutput)
|
||||
|
||||
TerminateInstanceInAutoScalingGroup(*autoscaling.TerminateInstanceInAutoScalingGroupInput) (*autoscaling.TerminateInstanceInAutoScalingGroupOutput, error)
|
||||
TerminateInstanceInAutoScalingGroupWithContext(aws.Context, *autoscaling.TerminateInstanceInAutoScalingGroupInput, ...request.Option) (*autoscaling.TerminateInstanceInAutoScalingGroupOutput, error)
|
||||
TerminateInstanceInAutoScalingGroupRequest(*autoscaling.TerminateInstanceInAutoScalingGroupInput) (*request.Request, *autoscaling.TerminateInstanceInAutoScalingGroupOutput)
|
||||
|
||||
UpdateAutoScalingGroup(*autoscaling.UpdateAutoScalingGroupInput) (*autoscaling.UpdateAutoScalingGroupOutput, error)
|
||||
UpdateAutoScalingGroupWithContext(aws.Context, *autoscaling.UpdateAutoScalingGroupInput, ...request.Option) (*autoscaling.UpdateAutoScalingGroupOutput, error)
|
||||
UpdateAutoScalingGroupRequest(*autoscaling.UpdateAutoScalingGroupInput) (*request.Request, *autoscaling.UpdateAutoScalingGroupOutput)
|
||||
|
||||
WaitUntilGroupExists(*autoscaling.DescribeAutoScalingGroupsInput) error
|
||||
WaitUntilGroupExistsWithContext(aws.Context, *autoscaling.DescribeAutoScalingGroupsInput, ...request.WaiterOption) error
|
||||
|
||||
WaitUntilGroupInService(*autoscaling.DescribeAutoScalingGroupsInput) error
|
||||
WaitUntilGroupInServiceWithContext(aws.Context, *autoscaling.DescribeAutoScalingGroupsInput, ...request.WaiterOption) error
|
||||
|
||||
WaitUntilGroupNotExists(*autoscaling.DescribeAutoScalingGroupsInput) error
|
||||
WaitUntilGroupNotExistsWithContext(aws.Context, *autoscaling.DescribeAutoScalingGroupsInput, ...request.WaiterOption) error
|
||||
}
|
||||
|
||||
var _ AutoScalingAPI = (*autoscaling.AutoScaling)(nil)
|
82
vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go
generated
vendored
Normal file
82
vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package autoscaling provides the client and types for making API
|
||||
// requests to Auto Scaling.
|
||||
//
|
||||
// Auto Scaling is designed to automatically launch or terminate EC2 instances
|
||||
// based on user-defined policies, schedules, and health checks. Use this service
|
||||
// in conjunction with the Amazon CloudWatch and Elastic Load Balancing services.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01 for more information on this service.
|
||||
//
|
||||
// See autoscaling package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/autoscaling/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Auto Scaling 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 := autoscaling.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 Auto Scaling client AutoScaling for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/autoscaling/#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.AttachInstances(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("AttachInstances 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.AttachInstancesWithContext(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 autoscaling
|
47
vendor/github.com/aws/aws-sdk-go/service/autoscaling/errors.go
generated
vendored
Normal file
47
vendor/github.com/aws/aws-sdk-go/service/autoscaling/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package autoscaling
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAlreadyExistsFault for service response error code
|
||||
// "AlreadyExists".
|
||||
//
|
||||
// You already have an Auto Scaling group or launch configuration with this
|
||||
// name.
|
||||
ErrCodeAlreadyExistsFault = "AlreadyExists"
|
||||
|
||||
// ErrCodeInvalidNextToken for service response error code
|
||||
// "InvalidNextToken".
|
||||
//
|
||||
// The NextToken value is not valid.
|
||||
ErrCodeInvalidNextToken = "InvalidNextToken"
|
||||
|
||||
// ErrCodeLimitExceededFault for service response error code
|
||||
// "LimitExceeded".
|
||||
//
|
||||
// You have already reached a limit for your Auto Scaling resources (for example,
|
||||
// groups, launch configurations, or lifecycle hooks). For more information,
|
||||
// see DescribeAccountLimits.
|
||||
ErrCodeLimitExceededFault = "LimitExceeded"
|
||||
|
||||
// ErrCodeResourceContentionFault for service response error code
|
||||
// "ResourceContention".
|
||||
//
|
||||
// You already have a pending update to an Auto Scaling resource (for example,
|
||||
// a group, instance, or load balancer).
|
||||
ErrCodeResourceContentionFault = "ResourceContention"
|
||||
|
||||
// ErrCodeResourceInUseFault for service response error code
|
||||
// "ResourceInUse".
|
||||
//
|
||||
// The operation can't be performed because the resource is in use.
|
||||
ErrCodeResourceInUseFault = "ResourceInUse"
|
||||
|
||||
// ErrCodeScalingActivityInProgressFault for service response error code
|
||||
// "ScalingActivityInProgress".
|
||||
//
|
||||
// The operation can't be performed because there are scaling activities in
|
||||
// progress.
|
||||
ErrCodeScalingActivityInProgressFault = "ScalingActivityInProgress"
|
||||
)
|
1384
vendor/github.com/aws/aws-sdk-go/service/autoscaling/examples_test.go
generated
vendored
Normal file
1384
vendor/github.com/aws/aws-sdk-go/service/autoscaling/examples_test.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
93
vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go
generated
vendored
Normal file
93
vendor/github.com/aws/aws-sdk-go/service/autoscaling/service.go
generated
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package autoscaling
|
||||
|
||||
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/query"
|
||||
)
|
||||
|
||||
// AutoScaling provides the API operation methods for making requests to
|
||||
// Auto Scaling. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// AutoScaling methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type AutoScaling 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 = "autoscaling" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the AutoScaling 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 AutoScaling client from just a session.
|
||||
// svc := autoscaling.New(mySession)
|
||||
//
|
||||
// // Create a AutoScaling client with additional configuration
|
||||
// svc := autoscaling.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *AutoScaling {
|
||||
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) *AutoScaling {
|
||||
svc := &AutoScaling{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2011-01-01",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(query.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a AutoScaling operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *AutoScaling) 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
|
||||
}
|
163
vendor/github.com/aws/aws-sdk-go/service/autoscaling/waiters.go
generated
vendored
Normal file
163
vendor/github.com/aws/aws-sdk-go/service/autoscaling/waiters.go
generated
vendored
Normal file
|
@ -0,0 +1,163 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package autoscaling
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
// WaitUntilGroupExists uses the Auto Scaling API operation
|
||||
// DescribeAutoScalingGroups to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *AutoScaling) WaitUntilGroupExists(input *DescribeAutoScalingGroupsInput) error {
|
||||
return c.WaitUntilGroupExistsWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilGroupExistsWithContext is an extended version of WaitUntilGroupExists.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *AutoScaling) WaitUntilGroupExistsWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilGroupExists",
|
||||
MaxAttempts: 10,
|
||||
Delay: request.ConstantWaiterDelay(5 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "length(AutoScalingGroups) > `0`",
|
||||
Expected: true,
|
||||
},
|
||||
{
|
||||
State: request.RetryWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "length(AutoScalingGroups) > `0`",
|
||||
Expected: false,
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeAutoScalingGroupsInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeAutoScalingGroupsRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilGroupInService uses the Auto Scaling API operation
|
||||
// DescribeAutoScalingGroups to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *AutoScaling) WaitUntilGroupInService(input *DescribeAutoScalingGroupsInput) error {
|
||||
return c.WaitUntilGroupInServiceWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilGroupInServiceWithContext is an extended version of WaitUntilGroupInService.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *AutoScaling) WaitUntilGroupInServiceWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilGroupInService",
|
||||
MaxAttempts: 40,
|
||||
Delay: request.ConstantWaiterDelay(15 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "contains(AutoScalingGroups[].[length(Instances[?LifecycleState=='InService']) >= MinSize][], `false`)",
|
||||
Expected: false,
|
||||
},
|
||||
{
|
||||
State: request.RetryWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "contains(AutoScalingGroups[].[length(Instances[?LifecycleState=='InService']) >= MinSize][], `false`)",
|
||||
Expected: true,
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeAutoScalingGroupsInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeAutoScalingGroupsRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilGroupNotExists uses the Auto Scaling API operation
|
||||
// DescribeAutoScalingGroups to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *AutoScaling) WaitUntilGroupNotExists(input *DescribeAutoScalingGroupsInput) error {
|
||||
return c.WaitUntilGroupNotExistsWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilGroupNotExistsWithContext is an extended version of WaitUntilGroupNotExists.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *AutoScaling) WaitUntilGroupNotExistsWithContext(ctx aws.Context, input *DescribeAutoScalingGroupsInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilGroupNotExists",
|
||||
MaxAttempts: 40,
|
||||
Delay: request.ConstantWaiterDelay(15 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "length(AutoScalingGroups) > `0`",
|
||||
Expected: false,
|
||||
},
|
||||
{
|
||||
State: request.RetryWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "length(AutoScalingGroups) > `0`",
|
||||
Expected: true,
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeAutoScalingGroupsInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeAutoScalingGroupsRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
4684
vendor/github.com/aws/aws-sdk-go/service/batch/api.go
generated
vendored
Normal file
4684
vendor/github.com/aws/aws-sdk-go/service/batch/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
128
vendor/github.com/aws/aws-sdk-go/service/batch/batchiface/interface.go
generated
vendored
Normal file
128
vendor/github.com/aws/aws-sdk-go/service/batch/batchiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,128 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package batchiface provides an interface to enable mocking the AWS Batch 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 batchiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/batch"
|
||||
)
|
||||
|
||||
// BatchAPI provides an interface to enable mocking the
|
||||
// batch.Batch 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
|
||||
// // AWS Batch.
|
||||
// func myFunc(svc batchiface.BatchAPI) bool {
|
||||
// // Make svc.CancelJob request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := batch.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockBatchClient struct {
|
||||
// batchiface.BatchAPI
|
||||
// }
|
||||
// func (m *mockBatchClient) CancelJob(input *batch.CancelJobInput) (*batch.CancelJobOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockBatchClient{}
|
||||
//
|
||||
// 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 BatchAPI interface {
|
||||
CancelJob(*batch.CancelJobInput) (*batch.CancelJobOutput, error)
|
||||
CancelJobWithContext(aws.Context, *batch.CancelJobInput, ...request.Option) (*batch.CancelJobOutput, error)
|
||||
CancelJobRequest(*batch.CancelJobInput) (*request.Request, *batch.CancelJobOutput)
|
||||
|
||||
CreateComputeEnvironment(*batch.CreateComputeEnvironmentInput) (*batch.CreateComputeEnvironmentOutput, error)
|
||||
CreateComputeEnvironmentWithContext(aws.Context, *batch.CreateComputeEnvironmentInput, ...request.Option) (*batch.CreateComputeEnvironmentOutput, error)
|
||||
CreateComputeEnvironmentRequest(*batch.CreateComputeEnvironmentInput) (*request.Request, *batch.CreateComputeEnvironmentOutput)
|
||||
|
||||
CreateJobQueue(*batch.CreateJobQueueInput) (*batch.CreateJobQueueOutput, error)
|
||||
CreateJobQueueWithContext(aws.Context, *batch.CreateJobQueueInput, ...request.Option) (*batch.CreateJobQueueOutput, error)
|
||||
CreateJobQueueRequest(*batch.CreateJobQueueInput) (*request.Request, *batch.CreateJobQueueOutput)
|
||||
|
||||
DeleteComputeEnvironment(*batch.DeleteComputeEnvironmentInput) (*batch.DeleteComputeEnvironmentOutput, error)
|
||||
DeleteComputeEnvironmentWithContext(aws.Context, *batch.DeleteComputeEnvironmentInput, ...request.Option) (*batch.DeleteComputeEnvironmentOutput, error)
|
||||
DeleteComputeEnvironmentRequest(*batch.DeleteComputeEnvironmentInput) (*request.Request, *batch.DeleteComputeEnvironmentOutput)
|
||||
|
||||
DeleteJobQueue(*batch.DeleteJobQueueInput) (*batch.DeleteJobQueueOutput, error)
|
||||
DeleteJobQueueWithContext(aws.Context, *batch.DeleteJobQueueInput, ...request.Option) (*batch.DeleteJobQueueOutput, error)
|
||||
DeleteJobQueueRequest(*batch.DeleteJobQueueInput) (*request.Request, *batch.DeleteJobQueueOutput)
|
||||
|
||||
DeregisterJobDefinition(*batch.DeregisterJobDefinitionInput) (*batch.DeregisterJobDefinitionOutput, error)
|
||||
DeregisterJobDefinitionWithContext(aws.Context, *batch.DeregisterJobDefinitionInput, ...request.Option) (*batch.DeregisterJobDefinitionOutput, error)
|
||||
DeregisterJobDefinitionRequest(*batch.DeregisterJobDefinitionInput) (*request.Request, *batch.DeregisterJobDefinitionOutput)
|
||||
|
||||
DescribeComputeEnvironments(*batch.DescribeComputeEnvironmentsInput) (*batch.DescribeComputeEnvironmentsOutput, error)
|
||||
DescribeComputeEnvironmentsWithContext(aws.Context, *batch.DescribeComputeEnvironmentsInput, ...request.Option) (*batch.DescribeComputeEnvironmentsOutput, error)
|
||||
DescribeComputeEnvironmentsRequest(*batch.DescribeComputeEnvironmentsInput) (*request.Request, *batch.DescribeComputeEnvironmentsOutput)
|
||||
|
||||
DescribeJobDefinitions(*batch.DescribeJobDefinitionsInput) (*batch.DescribeJobDefinitionsOutput, error)
|
||||
DescribeJobDefinitionsWithContext(aws.Context, *batch.DescribeJobDefinitionsInput, ...request.Option) (*batch.DescribeJobDefinitionsOutput, error)
|
||||
DescribeJobDefinitionsRequest(*batch.DescribeJobDefinitionsInput) (*request.Request, *batch.DescribeJobDefinitionsOutput)
|
||||
|
||||
DescribeJobQueues(*batch.DescribeJobQueuesInput) (*batch.DescribeJobQueuesOutput, error)
|
||||
DescribeJobQueuesWithContext(aws.Context, *batch.DescribeJobQueuesInput, ...request.Option) (*batch.DescribeJobQueuesOutput, error)
|
||||
DescribeJobQueuesRequest(*batch.DescribeJobQueuesInput) (*request.Request, *batch.DescribeJobQueuesOutput)
|
||||
|
||||
DescribeJobs(*batch.DescribeJobsInput) (*batch.DescribeJobsOutput, error)
|
||||
DescribeJobsWithContext(aws.Context, *batch.DescribeJobsInput, ...request.Option) (*batch.DescribeJobsOutput, error)
|
||||
DescribeJobsRequest(*batch.DescribeJobsInput) (*request.Request, *batch.DescribeJobsOutput)
|
||||
|
||||
ListJobs(*batch.ListJobsInput) (*batch.ListJobsOutput, error)
|
||||
ListJobsWithContext(aws.Context, *batch.ListJobsInput, ...request.Option) (*batch.ListJobsOutput, error)
|
||||
ListJobsRequest(*batch.ListJobsInput) (*request.Request, *batch.ListJobsOutput)
|
||||
|
||||
RegisterJobDefinition(*batch.RegisterJobDefinitionInput) (*batch.RegisterJobDefinitionOutput, error)
|
||||
RegisterJobDefinitionWithContext(aws.Context, *batch.RegisterJobDefinitionInput, ...request.Option) (*batch.RegisterJobDefinitionOutput, error)
|
||||
RegisterJobDefinitionRequest(*batch.RegisterJobDefinitionInput) (*request.Request, *batch.RegisterJobDefinitionOutput)
|
||||
|
||||
SubmitJob(*batch.SubmitJobInput) (*batch.SubmitJobOutput, error)
|
||||
SubmitJobWithContext(aws.Context, *batch.SubmitJobInput, ...request.Option) (*batch.SubmitJobOutput, error)
|
||||
SubmitJobRequest(*batch.SubmitJobInput) (*request.Request, *batch.SubmitJobOutput)
|
||||
|
||||
TerminateJob(*batch.TerminateJobInput) (*batch.TerminateJobOutput, error)
|
||||
TerminateJobWithContext(aws.Context, *batch.TerminateJobInput, ...request.Option) (*batch.TerminateJobOutput, error)
|
||||
TerminateJobRequest(*batch.TerminateJobInput) (*request.Request, *batch.TerminateJobOutput)
|
||||
|
||||
UpdateComputeEnvironment(*batch.UpdateComputeEnvironmentInput) (*batch.UpdateComputeEnvironmentOutput, error)
|
||||
UpdateComputeEnvironmentWithContext(aws.Context, *batch.UpdateComputeEnvironmentInput, ...request.Option) (*batch.UpdateComputeEnvironmentOutput, error)
|
||||
UpdateComputeEnvironmentRequest(*batch.UpdateComputeEnvironmentInput) (*request.Request, *batch.UpdateComputeEnvironmentOutput)
|
||||
|
||||
UpdateJobQueue(*batch.UpdateJobQueueInput) (*batch.UpdateJobQueueOutput, error)
|
||||
UpdateJobQueueWithContext(aws.Context, *batch.UpdateJobQueueInput, ...request.Option) (*batch.UpdateJobQueueOutput, error)
|
||||
UpdateJobQueueRequest(*batch.UpdateJobQueueInput) (*request.Request, *batch.UpdateJobQueueOutput)
|
||||
}
|
||||
|
||||
var _ BatchAPI = (*batch.Batch)(nil)
|
96
vendor/github.com/aws/aws-sdk-go/service/batch/doc.go
generated
vendored
Normal file
96
vendor/github.com/aws/aws-sdk-go/service/batch/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,96 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package batch provides the client and types for making API
|
||||
// requests to AWS Batch.
|
||||
//
|
||||
// AWS Batch enables you to run batch computing workloads on the AWS Cloud.
|
||||
// Batch computing is a common way for developers, scientists, and engineers
|
||||
// to access large amounts of compute resources, and AWS Batch removes the undifferentiated
|
||||
// heavy lifting of configuring and managing the required infrastructure. AWS
|
||||
// Batch will be familiar to users of traditional batch computing software.
|
||||
// This service can efficiently provision resources in response to jobs submitted
|
||||
// in order to eliminate capacity constraints, reduce compute costs, and deliver
|
||||
// results quickly.
|
||||
//
|
||||
// As a fully managed service, AWS Batch enables developers, scientists, and
|
||||
// engineers to run batch computing workloads of any scale. AWS Batch automatically
|
||||
// provisions compute resources and optimizes the workload distribution based
|
||||
// on the quantity and scale of the workloads. With AWS Batch, there is no need
|
||||
// to install or manage batch computing software, which allows you to focus
|
||||
// on analyzing results and solving problems. AWS Batch reduces operational
|
||||
// complexities, saves time, and reduces costs, which makes it easy for developers,
|
||||
// scientists, and engineers to run their batch jobs in the AWS Cloud.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/batch-2016-08-10 for more information on this service.
|
||||
//
|
||||
// See batch package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/batch/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for AWS Batch 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 := batch.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 AWS Batch client Batch for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/batch/#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.CancelJob(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("CancelJob 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.CancelJobWithContext(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 batch
|
20
vendor/github.com/aws/aws-sdk-go/service/batch/errors.go
generated
vendored
Normal file
20
vendor/github.com/aws/aws-sdk-go/service/batch/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package batch
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeClientException for service response error code
|
||||
// "ClientException".
|
||||
//
|
||||
// These errors are usually caused by a client action, such as using an action
|
||||
// or resource on behalf of a user that doesn't have permission to use the action
|
||||
// or resource, or specifying an identifier that is not valid.
|
||||
ErrCodeClientException = "ClientException"
|
||||
|
||||
// ErrCodeServerException for service response error code
|
||||
// "ServerException".
|
||||
//
|
||||
// These errors are usually caused by a server issue.
|
||||
ErrCodeServerException = "ServerException"
|
||||
)
|
515
vendor/github.com/aws/aws-sdk-go/service/batch/examples_test.go
generated
vendored
Normal file
515
vendor/github.com/aws/aws-sdk-go/service/batch/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,515 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package batch_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/batch"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleBatch_CancelJob() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.CancelJobInput{
|
||||
JobId: aws.String("String"), // Required
|
||||
Reason: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.CancelJob(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 ExampleBatch_CreateComputeEnvironment() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.CreateComputeEnvironmentInput{
|
||||
ComputeEnvironmentName: aws.String("String"), // Required
|
||||
ServiceRole: aws.String("String"), // Required
|
||||
Type: aws.String("CEType"), // Required
|
||||
ComputeResources: &batch.ComputeResource{
|
||||
InstanceRole: aws.String("String"), // Required
|
||||
InstanceTypes: []*string{ // Required
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
MaxvCpus: aws.Int64(1), // Required
|
||||
MinvCpus: aws.Int64(1), // Required
|
||||
SecurityGroupIds: []*string{ // Required
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
Subnets: []*string{ // Required
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
Type: aws.String("CRType"), // Required
|
||||
BidPercentage: aws.Int64(1),
|
||||
DesiredvCpus: aws.Int64(1),
|
||||
Ec2KeyPair: aws.String("String"),
|
||||
ImageId: aws.String("String"),
|
||||
SpotIamFleetRole: aws.String("String"),
|
||||
Tags: map[string]*string{
|
||||
"Key": aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
State: aws.String("CEState"),
|
||||
}
|
||||
resp, err := svc.CreateComputeEnvironment(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 ExampleBatch_CreateJobQueue() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.CreateJobQueueInput{
|
||||
ComputeEnvironmentOrder: []*batch.ComputeEnvironmentOrder{ // Required
|
||||
{ // Required
|
||||
ComputeEnvironment: aws.String("String"), // Required
|
||||
Order: aws.Int64(1), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
JobQueueName: aws.String("String"), // Required
|
||||
Priority: aws.Int64(1), // Required
|
||||
State: aws.String("JQState"),
|
||||
}
|
||||
resp, err := svc.CreateJobQueue(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 ExampleBatch_DeleteComputeEnvironment() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.DeleteComputeEnvironmentInput{
|
||||
ComputeEnvironment: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteComputeEnvironment(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 ExampleBatch_DeleteJobQueue() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.DeleteJobQueueInput{
|
||||
JobQueue: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteJobQueue(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 ExampleBatch_DeregisterJobDefinition() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.DeregisterJobDefinitionInput{
|
||||
JobDefinition: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.DeregisterJobDefinition(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 ExampleBatch_DescribeComputeEnvironments() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.DescribeComputeEnvironmentsInput{
|
||||
ComputeEnvironments: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.DescribeComputeEnvironments(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 ExampleBatch_DescribeJobDefinitions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.DescribeJobDefinitionsInput{
|
||||
JobDefinitionName: aws.String("String"),
|
||||
JobDefinitions: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("String"),
|
||||
Status: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.DescribeJobDefinitions(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 ExampleBatch_DescribeJobQueues() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.DescribeJobQueuesInput{
|
||||
JobQueues: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.DescribeJobQueues(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 ExampleBatch_DescribeJobs() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.DescribeJobsInput{
|
||||
Jobs: []*string{ // Required
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeJobs(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 ExampleBatch_ListJobs() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.ListJobsInput{
|
||||
JobQueue: aws.String("String"), // Required
|
||||
JobStatus: aws.String("JobStatus"),
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("String"),
|
||||
}
|
||||
resp, err := svc.ListJobs(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 ExampleBatch_RegisterJobDefinition() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.RegisterJobDefinitionInput{
|
||||
JobDefinitionName: aws.String("String"), // Required
|
||||
Type: aws.String("JobDefinitionType"), // Required
|
||||
ContainerProperties: &batch.ContainerProperties{
|
||||
Image: aws.String("String"), // Required
|
||||
Memory: aws.Int64(1), // Required
|
||||
Vcpus: aws.Int64(1), // Required
|
||||
Command: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
Environment: []*batch.KeyValuePair{
|
||||
{ // Required
|
||||
Name: aws.String("String"),
|
||||
Value: aws.String("String"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
JobRoleArn: aws.String("String"),
|
||||
MountPoints: []*batch.MountPoint{
|
||||
{ // Required
|
||||
ContainerPath: aws.String("String"),
|
||||
ReadOnly: aws.Bool(true),
|
||||
SourceVolume: aws.String("String"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Privileged: aws.Bool(true),
|
||||
ReadonlyRootFilesystem: aws.Bool(true),
|
||||
Ulimits: []*batch.Ulimit{
|
||||
{ // Required
|
||||
HardLimit: aws.Int64(1), // Required
|
||||
Name: aws.String("String"), // Required
|
||||
SoftLimit: aws.Int64(1), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
User: aws.String("String"),
|
||||
Volumes: []*batch.Volume{
|
||||
{ // Required
|
||||
Host: &batch.Host{
|
||||
SourcePath: aws.String("String"),
|
||||
},
|
||||
Name: aws.String("String"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
Parameters: map[string]*string{
|
||||
"Key": aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
RetryStrategy: &batch.RetryStrategy{
|
||||
Attempts: aws.Int64(1),
|
||||
},
|
||||
}
|
||||
resp, err := svc.RegisterJobDefinition(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 ExampleBatch_SubmitJob() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.SubmitJobInput{
|
||||
JobDefinition: aws.String("String"), // Required
|
||||
JobName: aws.String("String"), // Required
|
||||
JobQueue: aws.String("String"), // Required
|
||||
ContainerOverrides: &batch.ContainerOverrides{
|
||||
Command: []*string{
|
||||
aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
Environment: []*batch.KeyValuePair{
|
||||
{ // Required
|
||||
Name: aws.String("String"),
|
||||
Value: aws.String("String"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Memory: aws.Int64(1),
|
||||
Vcpus: aws.Int64(1),
|
||||
},
|
||||
DependsOn: []*batch.JobDependency{
|
||||
{ // Required
|
||||
JobId: aws.String("String"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Parameters: map[string]*string{
|
||||
"Key": aws.String("String"), // Required
|
||||
// More values...
|
||||
},
|
||||
RetryStrategy: &batch.RetryStrategy{
|
||||
Attempts: aws.Int64(1),
|
||||
},
|
||||
}
|
||||
resp, err := svc.SubmitJob(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 ExampleBatch_TerminateJob() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.TerminateJobInput{
|
||||
JobId: aws.String("String"), // Required
|
||||
Reason: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.TerminateJob(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 ExampleBatch_UpdateComputeEnvironment() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.UpdateComputeEnvironmentInput{
|
||||
ComputeEnvironment: aws.String("String"), // Required
|
||||
ComputeResources: &batch.ComputeResourceUpdate{
|
||||
DesiredvCpus: aws.Int64(1),
|
||||
MaxvCpus: aws.Int64(1),
|
||||
MinvCpus: aws.Int64(1),
|
||||
},
|
||||
ServiceRole: aws.String("String"),
|
||||
State: aws.String("CEState"),
|
||||
}
|
||||
resp, err := svc.UpdateComputeEnvironment(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 ExampleBatch_UpdateJobQueue() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := batch.New(sess)
|
||||
|
||||
params := &batch.UpdateJobQueueInput{
|
||||
JobQueue: aws.String("String"), // Required
|
||||
ComputeEnvironmentOrder: []*batch.ComputeEnvironmentOrder{
|
||||
{ // Required
|
||||
ComputeEnvironment: aws.String("String"), // Required
|
||||
Order: aws.Int64(1), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
Priority: aws.Int64(1),
|
||||
State: aws.String("JQState"),
|
||||
}
|
||||
resp, err := svc.UpdateJobQueue(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)
|
||||
}
|
94
vendor/github.com/aws/aws-sdk-go/service/batch/service.go
generated
vendored
Normal file
94
vendor/github.com/aws/aws-sdk-go/service/batch/service.go
generated
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package batch
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// Batch provides the API operation methods for making requests to
|
||||
// AWS Batch. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// Batch methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type Batch 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 = "batch" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the Batch 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 Batch client from just a session.
|
||||
// svc := batch.New(mySession)
|
||||
//
|
||||
// // Create a Batch client with additional configuration
|
||||
// svc := batch.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *Batch {
|
||||
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) *Batch {
|
||||
svc := &Batch{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2016-08-10",
|
||||
JSONVersion: "1.1",
|
||||
},
|
||||
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 Batch operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *Batch) 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
|
||||
}
|
3126
vendor/github.com/aws/aws-sdk-go/service/budgets/api.go
generated
vendored
Normal file
3126
vendor/github.com/aws/aws-sdk-go/service/budgets/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
116
vendor/github.com/aws/aws-sdk-go/service/budgets/budgetsiface/interface.go
generated
vendored
Normal file
116
vendor/github.com/aws/aws-sdk-go/service/budgets/budgetsiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,116 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package budgetsiface provides an interface to enable mocking the AWS Budgets 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 budgetsiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/budgets"
|
||||
)
|
||||
|
||||
// BudgetsAPI provides an interface to enable mocking the
|
||||
// budgets.Budgets 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
|
||||
// // AWS Budgets.
|
||||
// func myFunc(svc budgetsiface.BudgetsAPI) bool {
|
||||
// // Make svc.CreateBudget request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := budgets.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockBudgetsClient struct {
|
||||
// budgetsiface.BudgetsAPI
|
||||
// }
|
||||
// func (m *mockBudgetsClient) CreateBudget(input *budgets.CreateBudgetInput) (*budgets.CreateBudgetOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockBudgetsClient{}
|
||||
//
|
||||
// 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 BudgetsAPI interface {
|
||||
CreateBudget(*budgets.CreateBudgetInput) (*budgets.CreateBudgetOutput, error)
|
||||
CreateBudgetWithContext(aws.Context, *budgets.CreateBudgetInput, ...request.Option) (*budgets.CreateBudgetOutput, error)
|
||||
CreateBudgetRequest(*budgets.CreateBudgetInput) (*request.Request, *budgets.CreateBudgetOutput)
|
||||
|
||||
CreateNotification(*budgets.CreateNotificationInput) (*budgets.CreateNotificationOutput, error)
|
||||
CreateNotificationWithContext(aws.Context, *budgets.CreateNotificationInput, ...request.Option) (*budgets.CreateNotificationOutput, error)
|
||||
CreateNotificationRequest(*budgets.CreateNotificationInput) (*request.Request, *budgets.CreateNotificationOutput)
|
||||
|
||||
CreateSubscriber(*budgets.CreateSubscriberInput) (*budgets.CreateSubscriberOutput, error)
|
||||
CreateSubscriberWithContext(aws.Context, *budgets.CreateSubscriberInput, ...request.Option) (*budgets.CreateSubscriberOutput, error)
|
||||
CreateSubscriberRequest(*budgets.CreateSubscriberInput) (*request.Request, *budgets.CreateSubscriberOutput)
|
||||
|
||||
DeleteBudget(*budgets.DeleteBudgetInput) (*budgets.DeleteBudgetOutput, error)
|
||||
DeleteBudgetWithContext(aws.Context, *budgets.DeleteBudgetInput, ...request.Option) (*budgets.DeleteBudgetOutput, error)
|
||||
DeleteBudgetRequest(*budgets.DeleteBudgetInput) (*request.Request, *budgets.DeleteBudgetOutput)
|
||||
|
||||
DeleteNotification(*budgets.DeleteNotificationInput) (*budgets.DeleteNotificationOutput, error)
|
||||
DeleteNotificationWithContext(aws.Context, *budgets.DeleteNotificationInput, ...request.Option) (*budgets.DeleteNotificationOutput, error)
|
||||
DeleteNotificationRequest(*budgets.DeleteNotificationInput) (*request.Request, *budgets.DeleteNotificationOutput)
|
||||
|
||||
DeleteSubscriber(*budgets.DeleteSubscriberInput) (*budgets.DeleteSubscriberOutput, error)
|
||||
DeleteSubscriberWithContext(aws.Context, *budgets.DeleteSubscriberInput, ...request.Option) (*budgets.DeleteSubscriberOutput, error)
|
||||
DeleteSubscriberRequest(*budgets.DeleteSubscriberInput) (*request.Request, *budgets.DeleteSubscriberOutput)
|
||||
|
||||
DescribeBudget(*budgets.DescribeBudgetInput) (*budgets.DescribeBudgetOutput, error)
|
||||
DescribeBudgetWithContext(aws.Context, *budgets.DescribeBudgetInput, ...request.Option) (*budgets.DescribeBudgetOutput, error)
|
||||
DescribeBudgetRequest(*budgets.DescribeBudgetInput) (*request.Request, *budgets.DescribeBudgetOutput)
|
||||
|
||||
DescribeBudgets(*budgets.DescribeBudgetsInput) (*budgets.DescribeBudgetsOutput, error)
|
||||
DescribeBudgetsWithContext(aws.Context, *budgets.DescribeBudgetsInput, ...request.Option) (*budgets.DescribeBudgetsOutput, error)
|
||||
DescribeBudgetsRequest(*budgets.DescribeBudgetsInput) (*request.Request, *budgets.DescribeBudgetsOutput)
|
||||
|
||||
DescribeNotificationsForBudget(*budgets.DescribeNotificationsForBudgetInput) (*budgets.DescribeNotificationsForBudgetOutput, error)
|
||||
DescribeNotificationsForBudgetWithContext(aws.Context, *budgets.DescribeNotificationsForBudgetInput, ...request.Option) (*budgets.DescribeNotificationsForBudgetOutput, error)
|
||||
DescribeNotificationsForBudgetRequest(*budgets.DescribeNotificationsForBudgetInput) (*request.Request, *budgets.DescribeNotificationsForBudgetOutput)
|
||||
|
||||
DescribeSubscribersForNotification(*budgets.DescribeSubscribersForNotificationInput) (*budgets.DescribeSubscribersForNotificationOutput, error)
|
||||
DescribeSubscribersForNotificationWithContext(aws.Context, *budgets.DescribeSubscribersForNotificationInput, ...request.Option) (*budgets.DescribeSubscribersForNotificationOutput, error)
|
||||
DescribeSubscribersForNotificationRequest(*budgets.DescribeSubscribersForNotificationInput) (*request.Request, *budgets.DescribeSubscribersForNotificationOutput)
|
||||
|
||||
UpdateBudget(*budgets.UpdateBudgetInput) (*budgets.UpdateBudgetOutput, error)
|
||||
UpdateBudgetWithContext(aws.Context, *budgets.UpdateBudgetInput, ...request.Option) (*budgets.UpdateBudgetOutput, error)
|
||||
UpdateBudgetRequest(*budgets.UpdateBudgetInput) (*request.Request, *budgets.UpdateBudgetOutput)
|
||||
|
||||
UpdateNotification(*budgets.UpdateNotificationInput) (*budgets.UpdateNotificationOutput, error)
|
||||
UpdateNotificationWithContext(aws.Context, *budgets.UpdateNotificationInput, ...request.Option) (*budgets.UpdateNotificationOutput, error)
|
||||
UpdateNotificationRequest(*budgets.UpdateNotificationInput) (*request.Request, *budgets.UpdateNotificationOutput)
|
||||
|
||||
UpdateSubscriber(*budgets.UpdateSubscriberInput) (*budgets.UpdateSubscriberOutput, error)
|
||||
UpdateSubscriberWithContext(aws.Context, *budgets.UpdateSubscriberInput, ...request.Option) (*budgets.UpdateSubscriberOutput, error)
|
||||
UpdateSubscriberRequest(*budgets.UpdateSubscriberInput) (*request.Request, *budgets.UpdateSubscriberOutput)
|
||||
}
|
||||
|
||||
var _ BudgetsAPI = (*budgets.Budgets)(nil)
|
78
vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go
generated
vendored
Normal file
78
vendor/github.com/aws/aws-sdk-go/service/budgets/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,78 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package budgets provides the client and types for making API
|
||||
// requests to AWS Budgets.
|
||||
//
|
||||
// All public APIs for AWS Budgets
|
||||
//
|
||||
// See budgets package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/budgets/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for AWS Budgets 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 := budgets.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 AWS Budgets client Budgets for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/budgets/#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.CreateBudget(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("CreateBudget 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.CreateBudgetWithContext(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 budgets
|
53
vendor/github.com/aws/aws-sdk-go/service/budgets/errors.go
generated
vendored
Normal file
53
vendor/github.com/aws/aws-sdk-go/service/budgets/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package budgets
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeCreationLimitExceededException for service response error code
|
||||
// "CreationLimitExceededException".
|
||||
//
|
||||
// The exception is thrown when customer tries to create a record (e.g. budget),
|
||||
// but the number this record already exceeds the limitation.
|
||||
ErrCodeCreationLimitExceededException = "CreationLimitExceededException"
|
||||
|
||||
// ErrCodeDuplicateRecordException for service response error code
|
||||
// "DuplicateRecordException".
|
||||
//
|
||||
// The exception is thrown when customer tries to create a record (e.g. budget)
|
||||
// that already exists.
|
||||
ErrCodeDuplicateRecordException = "DuplicateRecordException"
|
||||
|
||||
// ErrCodeExpiredNextTokenException for service response error code
|
||||
// "ExpiredNextTokenException".
|
||||
//
|
||||
// This exception is thrown if the paging token is expired - past its TTL
|
||||
ErrCodeExpiredNextTokenException = "ExpiredNextTokenException"
|
||||
|
||||
// ErrCodeInternalErrorException for service response error code
|
||||
// "InternalErrorException".
|
||||
//
|
||||
// This exception is thrown on an unknown internal failure.
|
||||
ErrCodeInternalErrorException = "InternalErrorException"
|
||||
|
||||
// ErrCodeInvalidNextTokenException for service response error code
|
||||
// "InvalidNextTokenException".
|
||||
//
|
||||
// This exception is thrown if paging token signature didn't match the token,
|
||||
// or the paging token isn't for this request
|
||||
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
|
||||
|
||||
// ErrCodeInvalidParameterException for service response error code
|
||||
// "InvalidParameterException".
|
||||
//
|
||||
// This exception is thrown if any request is given an invalid parameter. E.g.,
|
||||
// if a required Date field is null.
|
||||
ErrCodeInvalidParameterException = "InvalidParameterException"
|
||||
|
||||
// ErrCodeNotFoundException for service response error code
|
||||
// "NotFoundException".
|
||||
//
|
||||
// This exception is thrown if a requested entity is not found. E.g., if a budget
|
||||
// id doesn't exist for an account ID.
|
||||
ErrCodeNotFoundException = "NotFoundException"
|
||||
)
|
455
vendor/github.com/aws/aws-sdk-go/service/budgets/examples_test.go
generated
vendored
Normal file
455
vendor/github.com/aws/aws-sdk-go/service/budgets/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,455 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package budgets_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/budgets"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleBudgets_CreateBudget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.CreateBudgetInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
Budget: &budgets.Budget{ // Required
|
||||
BudgetLimit: &budgets.Spend{ // Required
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
BudgetType: aws.String("BudgetType"), // Required
|
||||
CostTypes: &budgets.CostTypes{ // Required
|
||||
IncludeSubscription: aws.Bool(true), // Required
|
||||
IncludeTax: aws.Bool(true), // Required
|
||||
UseBlended: aws.Bool(true), // Required
|
||||
},
|
||||
TimePeriod: &budgets.TimePeriod{ // Required
|
||||
End: aws.Time(time.Now()), // Required
|
||||
Start: aws.Time(time.Now()), // Required
|
||||
},
|
||||
TimeUnit: aws.String("TimeUnit"), // Required
|
||||
CalculatedSpend: &budgets.CalculatedSpend{
|
||||
ActualSpend: &budgets.Spend{ // Required
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
ForecastedSpend: &budgets.Spend{
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
},
|
||||
CostFilters: map[string][]*string{
|
||||
"Key": { // Required
|
||||
aws.String("GenericString"), // Required
|
||||
// More values...
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
NotificationsWithSubscribers: []*budgets.NotificationWithSubscribers{
|
||||
{ // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
Subscribers: []*budgets.Subscriber{ // Required
|
||||
{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateBudget(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 ExampleBudgets_CreateNotification() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.CreateNotificationInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
Subscribers: []*budgets.Subscriber{ // Required
|
||||
{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateNotification(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 ExampleBudgets_CreateSubscriber() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.CreateSubscriberInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
Subscriber: &budgets.Subscriber{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.CreateSubscriber(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 ExampleBudgets_DeleteBudget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DeleteBudgetInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteBudget(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 ExampleBudgets_DeleteNotification() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DeleteNotificationInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.DeleteNotification(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 ExampleBudgets_DeleteSubscriber() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DeleteSubscriberInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
Subscriber: &budgets.Subscriber{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.DeleteSubscriber(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 ExampleBudgets_DescribeBudget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DescribeBudgetInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeBudget(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 ExampleBudgets_DescribeBudgets() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DescribeBudgetsInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("GenericString"),
|
||||
}
|
||||
resp, err := svc.DescribeBudgets(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 ExampleBudgets_DescribeNotificationsForBudget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DescribeNotificationsForBudgetInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("GenericString"),
|
||||
}
|
||||
resp, err := svc.DescribeNotificationsForBudget(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 ExampleBudgets_DescribeSubscribersForNotification() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.DescribeSubscribersForNotificationInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
MaxResults: aws.Int64(1),
|
||||
NextToken: aws.String("GenericString"),
|
||||
}
|
||||
resp, err := svc.DescribeSubscribersForNotification(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 ExampleBudgets_UpdateBudget() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.UpdateBudgetInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
NewBudget: &budgets.Budget{ // Required
|
||||
BudgetLimit: &budgets.Spend{ // Required
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
BudgetType: aws.String("BudgetType"), // Required
|
||||
CostTypes: &budgets.CostTypes{ // Required
|
||||
IncludeSubscription: aws.Bool(true), // Required
|
||||
IncludeTax: aws.Bool(true), // Required
|
||||
UseBlended: aws.Bool(true), // Required
|
||||
},
|
||||
TimePeriod: &budgets.TimePeriod{ // Required
|
||||
End: aws.Time(time.Now()), // Required
|
||||
Start: aws.Time(time.Now()), // Required
|
||||
},
|
||||
TimeUnit: aws.String("TimeUnit"), // Required
|
||||
CalculatedSpend: &budgets.CalculatedSpend{
|
||||
ActualSpend: &budgets.Spend{ // Required
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
ForecastedSpend: &budgets.Spend{
|
||||
Amount: aws.String("NumericValue"), // Required
|
||||
Unit: aws.String("GenericString"), // Required
|
||||
},
|
||||
},
|
||||
CostFilters: map[string][]*string{
|
||||
"Key": { // Required
|
||||
aws.String("GenericString"), // Required
|
||||
// More values...
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateBudget(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 ExampleBudgets_UpdateNotification() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.UpdateNotificationInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
NewNotification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
OldNotification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateNotification(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 ExampleBudgets_UpdateSubscriber() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := budgets.New(sess)
|
||||
|
||||
params := &budgets.UpdateSubscriberInput{
|
||||
AccountId: aws.String("AccountId"), // Required
|
||||
BudgetName: aws.String("BudgetName"), // Required
|
||||
NewSubscriber: &budgets.Subscriber{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
Notification: &budgets.Notification{ // Required
|
||||
ComparisonOperator: aws.String("ComparisonOperator"), // Required
|
||||
NotificationType: aws.String("NotificationType"), // Required
|
||||
Threshold: aws.Float64(1.0), // Required
|
||||
},
|
||||
OldSubscriber: &budgets.Subscriber{ // Required
|
||||
Address: aws.String("GenericString"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateSubscriber(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)
|
||||
}
|
95
vendor/github.com/aws/aws-sdk-go/service/budgets/service.go
generated
vendored
Normal file
95
vendor/github.com/aws/aws-sdk-go/service/budgets/service.go
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package budgets
|
||||
|
||||
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/jsonrpc"
|
||||
)
|
||||
|
||||
// Budgets provides the API operation methods for making requests to
|
||||
// AWS Budgets. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// Budgets methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type Budgets 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 = "budgets" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the Budgets 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 Budgets client from just a session.
|
||||
// svc := budgets.New(mySession)
|
||||
//
|
||||
// // Create a Budgets client with additional configuration
|
||||
// svc := budgets.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *Budgets {
|
||||
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) *Budgets {
|
||||
svc := &Budgets{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2016-10-20",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "AWSBudgetServiceGateway",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a Budgets operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *Budgets) 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
|
||||
}
|
13509
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/api.go
generated
vendored
Normal file
13509
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
308
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/clouddirectoryiface/interface.go
generated
vendored
Normal file
308
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/clouddirectoryiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,308 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package clouddirectoryiface provides an interface to enable mocking the Amazon CloudDirectory 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 clouddirectoryiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/clouddirectory"
|
||||
)
|
||||
|
||||
// CloudDirectoryAPI provides an interface to enable mocking the
|
||||
// clouddirectory.CloudDirectory 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 CloudDirectory.
|
||||
// func myFunc(svc clouddirectoryiface.CloudDirectoryAPI) bool {
|
||||
// // Make svc.AddFacetToObject request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := clouddirectory.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockCloudDirectoryClient struct {
|
||||
// clouddirectoryiface.CloudDirectoryAPI
|
||||
// }
|
||||
// func (m *mockCloudDirectoryClient) AddFacetToObject(input *clouddirectory.AddFacetToObjectInput) (*clouddirectory.AddFacetToObjectOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockCloudDirectoryClient{}
|
||||
//
|
||||
// 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 CloudDirectoryAPI interface {
|
||||
AddFacetToObject(*clouddirectory.AddFacetToObjectInput) (*clouddirectory.AddFacetToObjectOutput, error)
|
||||
AddFacetToObjectWithContext(aws.Context, *clouddirectory.AddFacetToObjectInput, ...request.Option) (*clouddirectory.AddFacetToObjectOutput, error)
|
||||
AddFacetToObjectRequest(*clouddirectory.AddFacetToObjectInput) (*request.Request, *clouddirectory.AddFacetToObjectOutput)
|
||||
|
||||
ApplySchema(*clouddirectory.ApplySchemaInput) (*clouddirectory.ApplySchemaOutput, error)
|
||||
ApplySchemaWithContext(aws.Context, *clouddirectory.ApplySchemaInput, ...request.Option) (*clouddirectory.ApplySchemaOutput, error)
|
||||
ApplySchemaRequest(*clouddirectory.ApplySchemaInput) (*request.Request, *clouddirectory.ApplySchemaOutput)
|
||||
|
||||
AttachObject(*clouddirectory.AttachObjectInput) (*clouddirectory.AttachObjectOutput, error)
|
||||
AttachObjectWithContext(aws.Context, *clouddirectory.AttachObjectInput, ...request.Option) (*clouddirectory.AttachObjectOutput, error)
|
||||
AttachObjectRequest(*clouddirectory.AttachObjectInput) (*request.Request, *clouddirectory.AttachObjectOutput)
|
||||
|
||||
AttachPolicy(*clouddirectory.AttachPolicyInput) (*clouddirectory.AttachPolicyOutput, error)
|
||||
AttachPolicyWithContext(aws.Context, *clouddirectory.AttachPolicyInput, ...request.Option) (*clouddirectory.AttachPolicyOutput, error)
|
||||
AttachPolicyRequest(*clouddirectory.AttachPolicyInput) (*request.Request, *clouddirectory.AttachPolicyOutput)
|
||||
|
||||
AttachToIndex(*clouddirectory.AttachToIndexInput) (*clouddirectory.AttachToIndexOutput, error)
|
||||
AttachToIndexWithContext(aws.Context, *clouddirectory.AttachToIndexInput, ...request.Option) (*clouddirectory.AttachToIndexOutput, error)
|
||||
AttachToIndexRequest(*clouddirectory.AttachToIndexInput) (*request.Request, *clouddirectory.AttachToIndexOutput)
|
||||
|
||||
BatchRead(*clouddirectory.BatchReadInput) (*clouddirectory.BatchReadOutput, error)
|
||||
BatchReadWithContext(aws.Context, *clouddirectory.BatchReadInput, ...request.Option) (*clouddirectory.BatchReadOutput, error)
|
||||
BatchReadRequest(*clouddirectory.BatchReadInput) (*request.Request, *clouddirectory.BatchReadOutput)
|
||||
|
||||
BatchWrite(*clouddirectory.BatchWriteInput) (*clouddirectory.BatchWriteOutput, error)
|
||||
BatchWriteWithContext(aws.Context, *clouddirectory.BatchWriteInput, ...request.Option) (*clouddirectory.BatchWriteOutput, error)
|
||||
BatchWriteRequest(*clouddirectory.BatchWriteInput) (*request.Request, *clouddirectory.BatchWriteOutput)
|
||||
|
||||
CreateDirectory(*clouddirectory.CreateDirectoryInput) (*clouddirectory.CreateDirectoryOutput, error)
|
||||
CreateDirectoryWithContext(aws.Context, *clouddirectory.CreateDirectoryInput, ...request.Option) (*clouddirectory.CreateDirectoryOutput, error)
|
||||
CreateDirectoryRequest(*clouddirectory.CreateDirectoryInput) (*request.Request, *clouddirectory.CreateDirectoryOutput)
|
||||
|
||||
CreateFacet(*clouddirectory.CreateFacetInput) (*clouddirectory.CreateFacetOutput, error)
|
||||
CreateFacetWithContext(aws.Context, *clouddirectory.CreateFacetInput, ...request.Option) (*clouddirectory.CreateFacetOutput, error)
|
||||
CreateFacetRequest(*clouddirectory.CreateFacetInput) (*request.Request, *clouddirectory.CreateFacetOutput)
|
||||
|
||||
CreateIndex(*clouddirectory.CreateIndexInput) (*clouddirectory.CreateIndexOutput, error)
|
||||
CreateIndexWithContext(aws.Context, *clouddirectory.CreateIndexInput, ...request.Option) (*clouddirectory.CreateIndexOutput, error)
|
||||
CreateIndexRequest(*clouddirectory.CreateIndexInput) (*request.Request, *clouddirectory.CreateIndexOutput)
|
||||
|
||||
CreateObject(*clouddirectory.CreateObjectInput) (*clouddirectory.CreateObjectOutput, error)
|
||||
CreateObjectWithContext(aws.Context, *clouddirectory.CreateObjectInput, ...request.Option) (*clouddirectory.CreateObjectOutput, error)
|
||||
CreateObjectRequest(*clouddirectory.CreateObjectInput) (*request.Request, *clouddirectory.CreateObjectOutput)
|
||||
|
||||
CreateSchema(*clouddirectory.CreateSchemaInput) (*clouddirectory.CreateSchemaOutput, error)
|
||||
CreateSchemaWithContext(aws.Context, *clouddirectory.CreateSchemaInput, ...request.Option) (*clouddirectory.CreateSchemaOutput, error)
|
||||
CreateSchemaRequest(*clouddirectory.CreateSchemaInput) (*request.Request, *clouddirectory.CreateSchemaOutput)
|
||||
|
||||
DeleteDirectory(*clouddirectory.DeleteDirectoryInput) (*clouddirectory.DeleteDirectoryOutput, error)
|
||||
DeleteDirectoryWithContext(aws.Context, *clouddirectory.DeleteDirectoryInput, ...request.Option) (*clouddirectory.DeleteDirectoryOutput, error)
|
||||
DeleteDirectoryRequest(*clouddirectory.DeleteDirectoryInput) (*request.Request, *clouddirectory.DeleteDirectoryOutput)
|
||||
|
||||
DeleteFacet(*clouddirectory.DeleteFacetInput) (*clouddirectory.DeleteFacetOutput, error)
|
||||
DeleteFacetWithContext(aws.Context, *clouddirectory.DeleteFacetInput, ...request.Option) (*clouddirectory.DeleteFacetOutput, error)
|
||||
DeleteFacetRequest(*clouddirectory.DeleteFacetInput) (*request.Request, *clouddirectory.DeleteFacetOutput)
|
||||
|
||||
DeleteObject(*clouddirectory.DeleteObjectInput) (*clouddirectory.DeleteObjectOutput, error)
|
||||
DeleteObjectWithContext(aws.Context, *clouddirectory.DeleteObjectInput, ...request.Option) (*clouddirectory.DeleteObjectOutput, error)
|
||||
DeleteObjectRequest(*clouddirectory.DeleteObjectInput) (*request.Request, *clouddirectory.DeleteObjectOutput)
|
||||
|
||||
DeleteSchema(*clouddirectory.DeleteSchemaInput) (*clouddirectory.DeleteSchemaOutput, error)
|
||||
DeleteSchemaWithContext(aws.Context, *clouddirectory.DeleteSchemaInput, ...request.Option) (*clouddirectory.DeleteSchemaOutput, error)
|
||||
DeleteSchemaRequest(*clouddirectory.DeleteSchemaInput) (*request.Request, *clouddirectory.DeleteSchemaOutput)
|
||||
|
||||
DetachFromIndex(*clouddirectory.DetachFromIndexInput) (*clouddirectory.DetachFromIndexOutput, error)
|
||||
DetachFromIndexWithContext(aws.Context, *clouddirectory.DetachFromIndexInput, ...request.Option) (*clouddirectory.DetachFromIndexOutput, error)
|
||||
DetachFromIndexRequest(*clouddirectory.DetachFromIndexInput) (*request.Request, *clouddirectory.DetachFromIndexOutput)
|
||||
|
||||
DetachObject(*clouddirectory.DetachObjectInput) (*clouddirectory.DetachObjectOutput, error)
|
||||
DetachObjectWithContext(aws.Context, *clouddirectory.DetachObjectInput, ...request.Option) (*clouddirectory.DetachObjectOutput, error)
|
||||
DetachObjectRequest(*clouddirectory.DetachObjectInput) (*request.Request, *clouddirectory.DetachObjectOutput)
|
||||
|
||||
DetachPolicy(*clouddirectory.DetachPolicyInput) (*clouddirectory.DetachPolicyOutput, error)
|
||||
DetachPolicyWithContext(aws.Context, *clouddirectory.DetachPolicyInput, ...request.Option) (*clouddirectory.DetachPolicyOutput, error)
|
||||
DetachPolicyRequest(*clouddirectory.DetachPolicyInput) (*request.Request, *clouddirectory.DetachPolicyOutput)
|
||||
|
||||
DisableDirectory(*clouddirectory.DisableDirectoryInput) (*clouddirectory.DisableDirectoryOutput, error)
|
||||
DisableDirectoryWithContext(aws.Context, *clouddirectory.DisableDirectoryInput, ...request.Option) (*clouddirectory.DisableDirectoryOutput, error)
|
||||
DisableDirectoryRequest(*clouddirectory.DisableDirectoryInput) (*request.Request, *clouddirectory.DisableDirectoryOutput)
|
||||
|
||||
EnableDirectory(*clouddirectory.EnableDirectoryInput) (*clouddirectory.EnableDirectoryOutput, error)
|
||||
EnableDirectoryWithContext(aws.Context, *clouddirectory.EnableDirectoryInput, ...request.Option) (*clouddirectory.EnableDirectoryOutput, error)
|
||||
EnableDirectoryRequest(*clouddirectory.EnableDirectoryInput) (*request.Request, *clouddirectory.EnableDirectoryOutput)
|
||||
|
||||
GetDirectory(*clouddirectory.GetDirectoryInput) (*clouddirectory.GetDirectoryOutput, error)
|
||||
GetDirectoryWithContext(aws.Context, *clouddirectory.GetDirectoryInput, ...request.Option) (*clouddirectory.GetDirectoryOutput, error)
|
||||
GetDirectoryRequest(*clouddirectory.GetDirectoryInput) (*request.Request, *clouddirectory.GetDirectoryOutput)
|
||||
|
||||
GetFacet(*clouddirectory.GetFacetInput) (*clouddirectory.GetFacetOutput, error)
|
||||
GetFacetWithContext(aws.Context, *clouddirectory.GetFacetInput, ...request.Option) (*clouddirectory.GetFacetOutput, error)
|
||||
GetFacetRequest(*clouddirectory.GetFacetInput) (*request.Request, *clouddirectory.GetFacetOutput)
|
||||
|
||||
GetObjectInformation(*clouddirectory.GetObjectInformationInput) (*clouddirectory.GetObjectInformationOutput, error)
|
||||
GetObjectInformationWithContext(aws.Context, *clouddirectory.GetObjectInformationInput, ...request.Option) (*clouddirectory.GetObjectInformationOutput, error)
|
||||
GetObjectInformationRequest(*clouddirectory.GetObjectInformationInput) (*request.Request, *clouddirectory.GetObjectInformationOutput)
|
||||
|
||||
GetSchemaAsJson(*clouddirectory.GetSchemaAsJsonInput) (*clouddirectory.GetSchemaAsJsonOutput, error)
|
||||
GetSchemaAsJsonWithContext(aws.Context, *clouddirectory.GetSchemaAsJsonInput, ...request.Option) (*clouddirectory.GetSchemaAsJsonOutput, error)
|
||||
GetSchemaAsJsonRequest(*clouddirectory.GetSchemaAsJsonInput) (*request.Request, *clouddirectory.GetSchemaAsJsonOutput)
|
||||
|
||||
ListAppliedSchemaArns(*clouddirectory.ListAppliedSchemaArnsInput) (*clouddirectory.ListAppliedSchemaArnsOutput, error)
|
||||
ListAppliedSchemaArnsWithContext(aws.Context, *clouddirectory.ListAppliedSchemaArnsInput, ...request.Option) (*clouddirectory.ListAppliedSchemaArnsOutput, error)
|
||||
ListAppliedSchemaArnsRequest(*clouddirectory.ListAppliedSchemaArnsInput) (*request.Request, *clouddirectory.ListAppliedSchemaArnsOutput)
|
||||
|
||||
ListAppliedSchemaArnsPages(*clouddirectory.ListAppliedSchemaArnsInput, func(*clouddirectory.ListAppliedSchemaArnsOutput, bool) bool) error
|
||||
ListAppliedSchemaArnsPagesWithContext(aws.Context, *clouddirectory.ListAppliedSchemaArnsInput, func(*clouddirectory.ListAppliedSchemaArnsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListAttachedIndices(*clouddirectory.ListAttachedIndicesInput) (*clouddirectory.ListAttachedIndicesOutput, error)
|
||||
ListAttachedIndicesWithContext(aws.Context, *clouddirectory.ListAttachedIndicesInput, ...request.Option) (*clouddirectory.ListAttachedIndicesOutput, error)
|
||||
ListAttachedIndicesRequest(*clouddirectory.ListAttachedIndicesInput) (*request.Request, *clouddirectory.ListAttachedIndicesOutput)
|
||||
|
||||
ListAttachedIndicesPages(*clouddirectory.ListAttachedIndicesInput, func(*clouddirectory.ListAttachedIndicesOutput, bool) bool) error
|
||||
ListAttachedIndicesPagesWithContext(aws.Context, *clouddirectory.ListAttachedIndicesInput, func(*clouddirectory.ListAttachedIndicesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListDevelopmentSchemaArns(*clouddirectory.ListDevelopmentSchemaArnsInput) (*clouddirectory.ListDevelopmentSchemaArnsOutput, error)
|
||||
ListDevelopmentSchemaArnsWithContext(aws.Context, *clouddirectory.ListDevelopmentSchemaArnsInput, ...request.Option) (*clouddirectory.ListDevelopmentSchemaArnsOutput, error)
|
||||
ListDevelopmentSchemaArnsRequest(*clouddirectory.ListDevelopmentSchemaArnsInput) (*request.Request, *clouddirectory.ListDevelopmentSchemaArnsOutput)
|
||||
|
||||
ListDevelopmentSchemaArnsPages(*clouddirectory.ListDevelopmentSchemaArnsInput, func(*clouddirectory.ListDevelopmentSchemaArnsOutput, bool) bool) error
|
||||
ListDevelopmentSchemaArnsPagesWithContext(aws.Context, *clouddirectory.ListDevelopmentSchemaArnsInput, func(*clouddirectory.ListDevelopmentSchemaArnsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListDirectories(*clouddirectory.ListDirectoriesInput) (*clouddirectory.ListDirectoriesOutput, error)
|
||||
ListDirectoriesWithContext(aws.Context, *clouddirectory.ListDirectoriesInput, ...request.Option) (*clouddirectory.ListDirectoriesOutput, error)
|
||||
ListDirectoriesRequest(*clouddirectory.ListDirectoriesInput) (*request.Request, *clouddirectory.ListDirectoriesOutput)
|
||||
|
||||
ListDirectoriesPages(*clouddirectory.ListDirectoriesInput, func(*clouddirectory.ListDirectoriesOutput, bool) bool) error
|
||||
ListDirectoriesPagesWithContext(aws.Context, *clouddirectory.ListDirectoriesInput, func(*clouddirectory.ListDirectoriesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListFacetAttributes(*clouddirectory.ListFacetAttributesInput) (*clouddirectory.ListFacetAttributesOutput, error)
|
||||
ListFacetAttributesWithContext(aws.Context, *clouddirectory.ListFacetAttributesInput, ...request.Option) (*clouddirectory.ListFacetAttributesOutput, error)
|
||||
ListFacetAttributesRequest(*clouddirectory.ListFacetAttributesInput) (*request.Request, *clouddirectory.ListFacetAttributesOutput)
|
||||
|
||||
ListFacetAttributesPages(*clouddirectory.ListFacetAttributesInput, func(*clouddirectory.ListFacetAttributesOutput, bool) bool) error
|
||||
ListFacetAttributesPagesWithContext(aws.Context, *clouddirectory.ListFacetAttributesInput, func(*clouddirectory.ListFacetAttributesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListFacetNames(*clouddirectory.ListFacetNamesInput) (*clouddirectory.ListFacetNamesOutput, error)
|
||||
ListFacetNamesWithContext(aws.Context, *clouddirectory.ListFacetNamesInput, ...request.Option) (*clouddirectory.ListFacetNamesOutput, error)
|
||||
ListFacetNamesRequest(*clouddirectory.ListFacetNamesInput) (*request.Request, *clouddirectory.ListFacetNamesOutput)
|
||||
|
||||
ListFacetNamesPages(*clouddirectory.ListFacetNamesInput, func(*clouddirectory.ListFacetNamesOutput, bool) bool) error
|
||||
ListFacetNamesPagesWithContext(aws.Context, *clouddirectory.ListFacetNamesInput, func(*clouddirectory.ListFacetNamesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListIndex(*clouddirectory.ListIndexInput) (*clouddirectory.ListIndexOutput, error)
|
||||
ListIndexWithContext(aws.Context, *clouddirectory.ListIndexInput, ...request.Option) (*clouddirectory.ListIndexOutput, error)
|
||||
ListIndexRequest(*clouddirectory.ListIndexInput) (*request.Request, *clouddirectory.ListIndexOutput)
|
||||
|
||||
ListIndexPages(*clouddirectory.ListIndexInput, func(*clouddirectory.ListIndexOutput, bool) bool) error
|
||||
ListIndexPagesWithContext(aws.Context, *clouddirectory.ListIndexInput, func(*clouddirectory.ListIndexOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListObjectAttributes(*clouddirectory.ListObjectAttributesInput) (*clouddirectory.ListObjectAttributesOutput, error)
|
||||
ListObjectAttributesWithContext(aws.Context, *clouddirectory.ListObjectAttributesInput, ...request.Option) (*clouddirectory.ListObjectAttributesOutput, error)
|
||||
ListObjectAttributesRequest(*clouddirectory.ListObjectAttributesInput) (*request.Request, *clouddirectory.ListObjectAttributesOutput)
|
||||
|
||||
ListObjectAttributesPages(*clouddirectory.ListObjectAttributesInput, func(*clouddirectory.ListObjectAttributesOutput, bool) bool) error
|
||||
ListObjectAttributesPagesWithContext(aws.Context, *clouddirectory.ListObjectAttributesInput, func(*clouddirectory.ListObjectAttributesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListObjectChildren(*clouddirectory.ListObjectChildrenInput) (*clouddirectory.ListObjectChildrenOutput, error)
|
||||
ListObjectChildrenWithContext(aws.Context, *clouddirectory.ListObjectChildrenInput, ...request.Option) (*clouddirectory.ListObjectChildrenOutput, error)
|
||||
ListObjectChildrenRequest(*clouddirectory.ListObjectChildrenInput) (*request.Request, *clouddirectory.ListObjectChildrenOutput)
|
||||
|
||||
ListObjectChildrenPages(*clouddirectory.ListObjectChildrenInput, func(*clouddirectory.ListObjectChildrenOutput, bool) bool) error
|
||||
ListObjectChildrenPagesWithContext(aws.Context, *clouddirectory.ListObjectChildrenInput, func(*clouddirectory.ListObjectChildrenOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListObjectParentPaths(*clouddirectory.ListObjectParentPathsInput) (*clouddirectory.ListObjectParentPathsOutput, error)
|
||||
ListObjectParentPathsWithContext(aws.Context, *clouddirectory.ListObjectParentPathsInput, ...request.Option) (*clouddirectory.ListObjectParentPathsOutput, error)
|
||||
ListObjectParentPathsRequest(*clouddirectory.ListObjectParentPathsInput) (*request.Request, *clouddirectory.ListObjectParentPathsOutput)
|
||||
|
||||
ListObjectParentPathsPages(*clouddirectory.ListObjectParentPathsInput, func(*clouddirectory.ListObjectParentPathsOutput, bool) bool) error
|
||||
ListObjectParentPathsPagesWithContext(aws.Context, *clouddirectory.ListObjectParentPathsInput, func(*clouddirectory.ListObjectParentPathsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListObjectParents(*clouddirectory.ListObjectParentsInput) (*clouddirectory.ListObjectParentsOutput, error)
|
||||
ListObjectParentsWithContext(aws.Context, *clouddirectory.ListObjectParentsInput, ...request.Option) (*clouddirectory.ListObjectParentsOutput, error)
|
||||
ListObjectParentsRequest(*clouddirectory.ListObjectParentsInput) (*request.Request, *clouddirectory.ListObjectParentsOutput)
|
||||
|
||||
ListObjectParentsPages(*clouddirectory.ListObjectParentsInput, func(*clouddirectory.ListObjectParentsOutput, bool) bool) error
|
||||
ListObjectParentsPagesWithContext(aws.Context, *clouddirectory.ListObjectParentsInput, func(*clouddirectory.ListObjectParentsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListObjectPolicies(*clouddirectory.ListObjectPoliciesInput) (*clouddirectory.ListObjectPoliciesOutput, error)
|
||||
ListObjectPoliciesWithContext(aws.Context, *clouddirectory.ListObjectPoliciesInput, ...request.Option) (*clouddirectory.ListObjectPoliciesOutput, error)
|
||||
ListObjectPoliciesRequest(*clouddirectory.ListObjectPoliciesInput) (*request.Request, *clouddirectory.ListObjectPoliciesOutput)
|
||||
|
||||
ListObjectPoliciesPages(*clouddirectory.ListObjectPoliciesInput, func(*clouddirectory.ListObjectPoliciesOutput, bool) bool) error
|
||||
ListObjectPoliciesPagesWithContext(aws.Context, *clouddirectory.ListObjectPoliciesInput, func(*clouddirectory.ListObjectPoliciesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListPolicyAttachments(*clouddirectory.ListPolicyAttachmentsInput) (*clouddirectory.ListPolicyAttachmentsOutput, error)
|
||||
ListPolicyAttachmentsWithContext(aws.Context, *clouddirectory.ListPolicyAttachmentsInput, ...request.Option) (*clouddirectory.ListPolicyAttachmentsOutput, error)
|
||||
ListPolicyAttachmentsRequest(*clouddirectory.ListPolicyAttachmentsInput) (*request.Request, *clouddirectory.ListPolicyAttachmentsOutput)
|
||||
|
||||
ListPolicyAttachmentsPages(*clouddirectory.ListPolicyAttachmentsInput, func(*clouddirectory.ListPolicyAttachmentsOutput, bool) bool) error
|
||||
ListPolicyAttachmentsPagesWithContext(aws.Context, *clouddirectory.ListPolicyAttachmentsInput, func(*clouddirectory.ListPolicyAttachmentsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListPublishedSchemaArns(*clouddirectory.ListPublishedSchemaArnsInput) (*clouddirectory.ListPublishedSchemaArnsOutput, error)
|
||||
ListPublishedSchemaArnsWithContext(aws.Context, *clouddirectory.ListPublishedSchemaArnsInput, ...request.Option) (*clouddirectory.ListPublishedSchemaArnsOutput, error)
|
||||
ListPublishedSchemaArnsRequest(*clouddirectory.ListPublishedSchemaArnsInput) (*request.Request, *clouddirectory.ListPublishedSchemaArnsOutput)
|
||||
|
||||
ListPublishedSchemaArnsPages(*clouddirectory.ListPublishedSchemaArnsInput, func(*clouddirectory.ListPublishedSchemaArnsOutput, bool) bool) error
|
||||
ListPublishedSchemaArnsPagesWithContext(aws.Context, *clouddirectory.ListPublishedSchemaArnsInput, func(*clouddirectory.ListPublishedSchemaArnsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListTagsForResource(*clouddirectory.ListTagsForResourceInput) (*clouddirectory.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceWithContext(aws.Context, *clouddirectory.ListTagsForResourceInput, ...request.Option) (*clouddirectory.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceRequest(*clouddirectory.ListTagsForResourceInput) (*request.Request, *clouddirectory.ListTagsForResourceOutput)
|
||||
|
||||
ListTagsForResourcePages(*clouddirectory.ListTagsForResourceInput, func(*clouddirectory.ListTagsForResourceOutput, bool) bool) error
|
||||
ListTagsForResourcePagesWithContext(aws.Context, *clouddirectory.ListTagsForResourceInput, func(*clouddirectory.ListTagsForResourceOutput, bool) bool, ...request.Option) error
|
||||
|
||||
LookupPolicy(*clouddirectory.LookupPolicyInput) (*clouddirectory.LookupPolicyOutput, error)
|
||||
LookupPolicyWithContext(aws.Context, *clouddirectory.LookupPolicyInput, ...request.Option) (*clouddirectory.LookupPolicyOutput, error)
|
||||
LookupPolicyRequest(*clouddirectory.LookupPolicyInput) (*request.Request, *clouddirectory.LookupPolicyOutput)
|
||||
|
||||
LookupPolicyPages(*clouddirectory.LookupPolicyInput, func(*clouddirectory.LookupPolicyOutput, bool) bool) error
|
||||
LookupPolicyPagesWithContext(aws.Context, *clouddirectory.LookupPolicyInput, func(*clouddirectory.LookupPolicyOutput, bool) bool, ...request.Option) error
|
||||
|
||||
PublishSchema(*clouddirectory.PublishSchemaInput) (*clouddirectory.PublishSchemaOutput, error)
|
||||
PublishSchemaWithContext(aws.Context, *clouddirectory.PublishSchemaInput, ...request.Option) (*clouddirectory.PublishSchemaOutput, error)
|
||||
PublishSchemaRequest(*clouddirectory.PublishSchemaInput) (*request.Request, *clouddirectory.PublishSchemaOutput)
|
||||
|
||||
PutSchemaFromJson(*clouddirectory.PutSchemaFromJsonInput) (*clouddirectory.PutSchemaFromJsonOutput, error)
|
||||
PutSchemaFromJsonWithContext(aws.Context, *clouddirectory.PutSchemaFromJsonInput, ...request.Option) (*clouddirectory.PutSchemaFromJsonOutput, error)
|
||||
PutSchemaFromJsonRequest(*clouddirectory.PutSchemaFromJsonInput) (*request.Request, *clouddirectory.PutSchemaFromJsonOutput)
|
||||
|
||||
RemoveFacetFromObject(*clouddirectory.RemoveFacetFromObjectInput) (*clouddirectory.RemoveFacetFromObjectOutput, error)
|
||||
RemoveFacetFromObjectWithContext(aws.Context, *clouddirectory.RemoveFacetFromObjectInput, ...request.Option) (*clouddirectory.RemoveFacetFromObjectOutput, error)
|
||||
RemoveFacetFromObjectRequest(*clouddirectory.RemoveFacetFromObjectInput) (*request.Request, *clouddirectory.RemoveFacetFromObjectOutput)
|
||||
|
||||
TagResource(*clouddirectory.TagResourceInput) (*clouddirectory.TagResourceOutput, error)
|
||||
TagResourceWithContext(aws.Context, *clouddirectory.TagResourceInput, ...request.Option) (*clouddirectory.TagResourceOutput, error)
|
||||
TagResourceRequest(*clouddirectory.TagResourceInput) (*request.Request, *clouddirectory.TagResourceOutput)
|
||||
|
||||
UntagResource(*clouddirectory.UntagResourceInput) (*clouddirectory.UntagResourceOutput, error)
|
||||
UntagResourceWithContext(aws.Context, *clouddirectory.UntagResourceInput, ...request.Option) (*clouddirectory.UntagResourceOutput, error)
|
||||
UntagResourceRequest(*clouddirectory.UntagResourceInput) (*request.Request, *clouddirectory.UntagResourceOutput)
|
||||
|
||||
UpdateFacet(*clouddirectory.UpdateFacetInput) (*clouddirectory.UpdateFacetOutput, error)
|
||||
UpdateFacetWithContext(aws.Context, *clouddirectory.UpdateFacetInput, ...request.Option) (*clouddirectory.UpdateFacetOutput, error)
|
||||
UpdateFacetRequest(*clouddirectory.UpdateFacetInput) (*request.Request, *clouddirectory.UpdateFacetOutput)
|
||||
|
||||
UpdateObjectAttributes(*clouddirectory.UpdateObjectAttributesInput) (*clouddirectory.UpdateObjectAttributesOutput, error)
|
||||
UpdateObjectAttributesWithContext(aws.Context, *clouddirectory.UpdateObjectAttributesInput, ...request.Option) (*clouddirectory.UpdateObjectAttributesOutput, error)
|
||||
UpdateObjectAttributesRequest(*clouddirectory.UpdateObjectAttributesInput) (*request.Request, *clouddirectory.UpdateObjectAttributesOutput)
|
||||
|
||||
UpdateSchema(*clouddirectory.UpdateSchemaInput) (*clouddirectory.UpdateSchemaOutput, error)
|
||||
UpdateSchemaWithContext(aws.Context, *clouddirectory.UpdateSchemaInput, ...request.Option) (*clouddirectory.UpdateSchemaOutput, error)
|
||||
UpdateSchemaRequest(*clouddirectory.UpdateSchemaInput) (*request.Request, *clouddirectory.UpdateSchemaOutput)
|
||||
}
|
||||
|
||||
var _ CloudDirectoryAPI = (*clouddirectory.CloudDirectory)(nil)
|
85
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/doc.go
generated
vendored
Normal file
85
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,85 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package clouddirectory provides the client and types for making API
|
||||
// requests to Amazon CloudDirectory.
|
||||
//
|
||||
// Amazon Cloud Directory is a component of the AWS Directory Service that simplifies
|
||||
// the development and management of cloud-scale web, mobile and IoT applications.
|
||||
// This guide describes the Cloud Directory operations that you can call programatically
|
||||
// and includes detailed information on data types and errors. For information
|
||||
// about AWS Directory Services features, see AWS Directory Service (https://aws.amazon.com/directoryservice/)
|
||||
// and the AWS Directory Service Administration Guide (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/what_is.html).
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2016-05-10 for more information on this service.
|
||||
//
|
||||
// See clouddirectory package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/clouddirectory/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon CloudDirectory 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 := clouddirectory.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 CloudDirectory client CloudDirectory for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/clouddirectory/#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.AddFacetToObject(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("AddFacetToObject 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.AddFacetToObjectWithContext(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 clouddirectory
|
233
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/errors.go
generated
vendored
Normal file
233
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,233 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package clouddirectory
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAccessDeniedException for service response error code
|
||||
// "AccessDeniedException".
|
||||
//
|
||||
// Access denied. Check your permissions.
|
||||
ErrCodeAccessDeniedException = "AccessDeniedException"
|
||||
|
||||
// ErrCodeBatchWriteException for service response error code
|
||||
// "BatchWriteException".
|
||||
//
|
||||
// A BatchWrite exception has occurred.
|
||||
ErrCodeBatchWriteException = "BatchWriteException"
|
||||
|
||||
// ErrCodeCannotListParentOfRootException for service response error code
|
||||
// "CannotListParentOfRootException".
|
||||
//
|
||||
// Cannot list the parents of a Directory root.
|
||||
ErrCodeCannotListParentOfRootException = "CannotListParentOfRootException"
|
||||
|
||||
// ErrCodeDirectoryAlreadyExistsException for service response error code
|
||||
// "DirectoryAlreadyExistsException".
|
||||
//
|
||||
// Indicates that a Directory could not be created due to a naming conflict.
|
||||
// Choose a different name and try again.
|
||||
ErrCodeDirectoryAlreadyExistsException = "DirectoryAlreadyExistsException"
|
||||
|
||||
// ErrCodeDirectoryDeletedException for service response error code
|
||||
// "DirectoryDeletedException".
|
||||
//
|
||||
// A directory that has been deleted has been attempted to be accessed. Note:
|
||||
// The requested resource will eventually cease to exist.
|
||||
ErrCodeDirectoryDeletedException = "DirectoryDeletedException"
|
||||
|
||||
// ErrCodeDirectoryNotDisabledException for service response error code
|
||||
// "DirectoryNotDisabledException".
|
||||
//
|
||||
// An operation can only operate on a disabled directory.
|
||||
ErrCodeDirectoryNotDisabledException = "DirectoryNotDisabledException"
|
||||
|
||||
// ErrCodeDirectoryNotEnabledException for service response error code
|
||||
// "DirectoryNotEnabledException".
|
||||
//
|
||||
// An operation can only operate on a directory that is not enabled.
|
||||
ErrCodeDirectoryNotEnabledException = "DirectoryNotEnabledException"
|
||||
|
||||
// ErrCodeFacetAlreadyExistsException for service response error code
|
||||
// "FacetAlreadyExistsException".
|
||||
//
|
||||
// A facet with the same name already exists.
|
||||
ErrCodeFacetAlreadyExistsException = "FacetAlreadyExistsException"
|
||||
|
||||
// ErrCodeFacetInUseException for service response error code
|
||||
// "FacetInUseException".
|
||||
//
|
||||
// Occurs when deleting a facet that contains an attribute which is a target
|
||||
// to an attribute reference in a different facet.
|
||||
ErrCodeFacetInUseException = "FacetInUseException"
|
||||
|
||||
// ErrCodeFacetNotFoundException for service response error code
|
||||
// "FacetNotFoundException".
|
||||
//
|
||||
// The specified Facet could not be found.
|
||||
ErrCodeFacetNotFoundException = "FacetNotFoundException"
|
||||
|
||||
// ErrCodeFacetValidationException for service response error code
|
||||
// "FacetValidationException".
|
||||
//
|
||||
// The Facet you provided was not well formed or could not be validated with
|
||||
// the schema.
|
||||
ErrCodeFacetValidationException = "FacetValidationException"
|
||||
|
||||
// ErrCodeIndexedAttributeMissingException for service response error code
|
||||
// "IndexedAttributeMissingException".
|
||||
//
|
||||
// An object has been attempted to be attached to an object that does not have
|
||||
// the appropriate attribute value.
|
||||
ErrCodeIndexedAttributeMissingException = "IndexedAttributeMissingException"
|
||||
|
||||
// ErrCodeInternalServiceException for service response error code
|
||||
// "InternalServiceException".
|
||||
//
|
||||
// Indicates a problem that must be resolved by Amazon Web Services. This might
|
||||
// be a transient error in which case you can retry your request until it succeeds.
|
||||
// Otherwise, go to the AWS Service Health Dashboard (http://status.aws.amazon.com/)
|
||||
// site to see if there are any operational issues with the service.
|
||||
ErrCodeInternalServiceException = "InternalServiceException"
|
||||
|
||||
// ErrCodeInvalidArnException for service response error code
|
||||
// "InvalidArnException".
|
||||
//
|
||||
// Indicates that the provided ARN value is not valid.
|
||||
ErrCodeInvalidArnException = "InvalidArnException"
|
||||
|
||||
// ErrCodeInvalidAttachmentException for service response error code
|
||||
// "InvalidAttachmentException".
|
||||
//
|
||||
// Indicates that an attempt to attach an object with the same link name or
|
||||
// to apply a schema with same name has occurred. Rename the link or the schema
|
||||
// and then try again.
|
||||
ErrCodeInvalidAttachmentException = "InvalidAttachmentException"
|
||||
|
||||
// ErrCodeInvalidFacetUpdateException for service response error code
|
||||
// "InvalidFacetUpdateException".
|
||||
//
|
||||
// An attempt to modify a Facet resulted in an invalid schema exception.
|
||||
ErrCodeInvalidFacetUpdateException = "InvalidFacetUpdateException"
|
||||
|
||||
// ErrCodeInvalidNextTokenException for service response error code
|
||||
// "InvalidNextTokenException".
|
||||
//
|
||||
// Indicates that the NextToken value is not valid.
|
||||
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
|
||||
|
||||
// ErrCodeInvalidRuleException for service response error code
|
||||
// "InvalidRuleException".
|
||||
//
|
||||
// Occurs when any of the rule parameter keys or values are invalid.
|
||||
ErrCodeInvalidRuleException = "InvalidRuleException"
|
||||
|
||||
// ErrCodeInvalidSchemaDocException for service response error code
|
||||
// "InvalidSchemaDocException".
|
||||
//
|
||||
// Indicates that the provided SchemaDoc value is not valid.
|
||||
ErrCodeInvalidSchemaDocException = "InvalidSchemaDocException"
|
||||
|
||||
// ErrCodeInvalidTaggingRequestException for service response error code
|
||||
// "InvalidTaggingRequestException".
|
||||
//
|
||||
// Can occur for multiple reasons such as when you tag a resource that doesn’t
|
||||
// exist or if you specify a higher number of tags for a resource than the allowed
|
||||
// limit. Allowed limit is 50 tags per resource.
|
||||
ErrCodeInvalidTaggingRequestException = "InvalidTaggingRequestException"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// Indicates limits are exceeded. See Limits (http://docs.aws.amazon.com/directoryservice/latest/admin-guide/limits.html)
|
||||
// for more information.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeLinkNameAlreadyInUseException for service response error code
|
||||
// "LinkNameAlreadyInUseException".
|
||||
//
|
||||
// Indicates that a link could not be created due to a naming conflict. Choose
|
||||
// a different name and then try again.
|
||||
ErrCodeLinkNameAlreadyInUseException = "LinkNameAlreadyInUseException"
|
||||
|
||||
// ErrCodeNotIndexException for service response error code
|
||||
// "NotIndexException".
|
||||
//
|
||||
// Indicates the requested operation can only operate on index objects.
|
||||
ErrCodeNotIndexException = "NotIndexException"
|
||||
|
||||
// ErrCodeNotNodeException for service response error code
|
||||
// "NotNodeException".
|
||||
//
|
||||
// Occurs when any invalid operations are performed on an object which is not
|
||||
// a node, such as calling ListObjectChildren for a leaf node object.
|
||||
ErrCodeNotNodeException = "NotNodeException"
|
||||
|
||||
// ErrCodeNotPolicyException for service response error code
|
||||
// "NotPolicyException".
|
||||
//
|
||||
// Indicates the requested operation can only operate on policy objects.
|
||||
ErrCodeNotPolicyException = "NotPolicyException"
|
||||
|
||||
// ErrCodeObjectAlreadyDetachedException for service response error code
|
||||
// "ObjectAlreadyDetachedException".
|
||||
//
|
||||
// Indicates the object is not attached to the index.
|
||||
ErrCodeObjectAlreadyDetachedException = "ObjectAlreadyDetachedException"
|
||||
|
||||
// ErrCodeObjectNotDetachedException for service response error code
|
||||
// "ObjectNotDetachedException".
|
||||
//
|
||||
// Indicates the requested operation cannot be completed because the object
|
||||
// has not been detached from the tree.
|
||||
ErrCodeObjectNotDetachedException = "ObjectNotDetachedException"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFoundException".
|
||||
//
|
||||
// The specified resource could not be found.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
|
||||
|
||||
// ErrCodeRetryableConflictException for service response error code
|
||||
// "RetryableConflictException".
|
||||
//
|
||||
// Occurs when a conflict with a previous successful write is detected. For
|
||||
// example, if a write operation occurs on an object and then an attempt is
|
||||
// made to read the object using “SERIALIZABLE” consistency, this exception
|
||||
// may result. This generally occurs when the previous write did not have time
|
||||
// to propagate to the host serving the current request. A retry (with appropriate
|
||||
// backoff logic) is the recommended response to this exception.
|
||||
ErrCodeRetryableConflictException = "RetryableConflictException"
|
||||
|
||||
// ErrCodeSchemaAlreadyExistsException for service response error code
|
||||
// "SchemaAlreadyExistsException".
|
||||
//
|
||||
// Indicates that a schema could not be created due to a naming conflict. Please
|
||||
// select a different name and then try again.
|
||||
ErrCodeSchemaAlreadyExistsException = "SchemaAlreadyExistsException"
|
||||
|
||||
// ErrCodeSchemaAlreadyPublishedException for service response error code
|
||||
// "SchemaAlreadyPublishedException".
|
||||
//
|
||||
// Indicates a schema is already published.
|
||||
ErrCodeSchemaAlreadyPublishedException = "SchemaAlreadyPublishedException"
|
||||
|
||||
// ErrCodeStillContainsLinksException for service response error code
|
||||
// "StillContainsLinksException".
|
||||
//
|
||||
// The object could not be deleted because links still exist. Remove the links
|
||||
// and then try the operation again.
|
||||
ErrCodeStillContainsLinksException = "StillContainsLinksException"
|
||||
|
||||
// ErrCodeUnsupportedIndexTypeException for service response error code
|
||||
// "UnsupportedIndexTypeException".
|
||||
//
|
||||
// Indicates the requested index type is not supported.
|
||||
ErrCodeUnsupportedIndexTypeException = "UnsupportedIndexTypeException"
|
||||
|
||||
// ErrCodeValidationException for service response error code
|
||||
// "ValidationException".
|
||||
//
|
||||
// Indicates your request is malformed in some manner. See the exception message.
|
||||
ErrCodeValidationException = "ValidationException"
|
||||
)
|
1510
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/examples_test.go
generated
vendored
Normal file
1510
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/examples_test.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
96
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/service.go
generated
vendored
Normal file
96
vendor/github.com/aws/aws-sdk-go/service/clouddirectory/service.go
generated
vendored
Normal file
|
@ -0,0 +1,96 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package clouddirectory
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// CloudDirectory provides the API operation methods for making requests to
|
||||
// Amazon CloudDirectory. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// CloudDirectory methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CloudDirectory 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 = "clouddirectory" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the CloudDirectory 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 CloudDirectory client from just a session.
|
||||
// svc := clouddirectory.New(mySession)
|
||||
//
|
||||
// // Create a CloudDirectory client with additional configuration
|
||||
// svc := clouddirectory.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudDirectory {
|
||||
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) *CloudDirectory {
|
||||
if len(signingName) == 0 {
|
||||
signingName = "clouddirectory"
|
||||
}
|
||||
svc := &CloudDirectory{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2016-05-10",
|
||||
},
|
||||
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 CloudDirectory operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CloudDirectory) 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
|
||||
}
|
7494
vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go
generated
vendored
Normal file
7494
vendor/github.com/aws/aws-sdk-go/service/cloudformation/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
201
vendor/github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface/interface.go
generated
vendored
Normal file
201
vendor/github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,201 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudformationiface provides an interface to enable mocking the AWS CloudFormation 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 cloudformationiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/cloudformation"
|
||||
)
|
||||
|
||||
// CloudFormationAPI provides an interface to enable mocking the
|
||||
// cloudformation.CloudFormation 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
|
||||
// // AWS CloudFormation.
|
||||
// func myFunc(svc cloudformationiface.CloudFormationAPI) bool {
|
||||
// // Make svc.CancelUpdateStack request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := cloudformation.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockCloudFormationClient struct {
|
||||
// cloudformationiface.CloudFormationAPI
|
||||
// }
|
||||
// func (m *mockCloudFormationClient) CancelUpdateStack(input *cloudformation.CancelUpdateStackInput) (*cloudformation.CancelUpdateStackOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockCloudFormationClient{}
|
||||
//
|
||||
// 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 CloudFormationAPI interface {
|
||||
CancelUpdateStack(*cloudformation.CancelUpdateStackInput) (*cloudformation.CancelUpdateStackOutput, error)
|
||||
CancelUpdateStackWithContext(aws.Context, *cloudformation.CancelUpdateStackInput, ...request.Option) (*cloudformation.CancelUpdateStackOutput, error)
|
||||
CancelUpdateStackRequest(*cloudformation.CancelUpdateStackInput) (*request.Request, *cloudformation.CancelUpdateStackOutput)
|
||||
|
||||
ContinueUpdateRollback(*cloudformation.ContinueUpdateRollbackInput) (*cloudformation.ContinueUpdateRollbackOutput, error)
|
||||
ContinueUpdateRollbackWithContext(aws.Context, *cloudformation.ContinueUpdateRollbackInput, ...request.Option) (*cloudformation.ContinueUpdateRollbackOutput, error)
|
||||
ContinueUpdateRollbackRequest(*cloudformation.ContinueUpdateRollbackInput) (*request.Request, *cloudformation.ContinueUpdateRollbackOutput)
|
||||
|
||||
CreateChangeSet(*cloudformation.CreateChangeSetInput) (*cloudformation.CreateChangeSetOutput, error)
|
||||
CreateChangeSetWithContext(aws.Context, *cloudformation.CreateChangeSetInput, ...request.Option) (*cloudformation.CreateChangeSetOutput, error)
|
||||
CreateChangeSetRequest(*cloudformation.CreateChangeSetInput) (*request.Request, *cloudformation.CreateChangeSetOutput)
|
||||
|
||||
CreateStack(*cloudformation.CreateStackInput) (*cloudformation.CreateStackOutput, error)
|
||||
CreateStackWithContext(aws.Context, *cloudformation.CreateStackInput, ...request.Option) (*cloudformation.CreateStackOutput, error)
|
||||
CreateStackRequest(*cloudformation.CreateStackInput) (*request.Request, *cloudformation.CreateStackOutput)
|
||||
|
||||
DeleteChangeSet(*cloudformation.DeleteChangeSetInput) (*cloudformation.DeleteChangeSetOutput, error)
|
||||
DeleteChangeSetWithContext(aws.Context, *cloudformation.DeleteChangeSetInput, ...request.Option) (*cloudformation.DeleteChangeSetOutput, error)
|
||||
DeleteChangeSetRequest(*cloudformation.DeleteChangeSetInput) (*request.Request, *cloudformation.DeleteChangeSetOutput)
|
||||
|
||||
DeleteStack(*cloudformation.DeleteStackInput) (*cloudformation.DeleteStackOutput, error)
|
||||
DeleteStackWithContext(aws.Context, *cloudformation.DeleteStackInput, ...request.Option) (*cloudformation.DeleteStackOutput, error)
|
||||
DeleteStackRequest(*cloudformation.DeleteStackInput) (*request.Request, *cloudformation.DeleteStackOutput)
|
||||
|
||||
DescribeAccountLimits(*cloudformation.DescribeAccountLimitsInput) (*cloudformation.DescribeAccountLimitsOutput, error)
|
||||
DescribeAccountLimitsWithContext(aws.Context, *cloudformation.DescribeAccountLimitsInput, ...request.Option) (*cloudformation.DescribeAccountLimitsOutput, error)
|
||||
DescribeAccountLimitsRequest(*cloudformation.DescribeAccountLimitsInput) (*request.Request, *cloudformation.DescribeAccountLimitsOutput)
|
||||
|
||||
DescribeChangeSet(*cloudformation.DescribeChangeSetInput) (*cloudformation.DescribeChangeSetOutput, error)
|
||||
DescribeChangeSetWithContext(aws.Context, *cloudformation.DescribeChangeSetInput, ...request.Option) (*cloudformation.DescribeChangeSetOutput, error)
|
||||
DescribeChangeSetRequest(*cloudformation.DescribeChangeSetInput) (*request.Request, *cloudformation.DescribeChangeSetOutput)
|
||||
|
||||
DescribeStackEvents(*cloudformation.DescribeStackEventsInput) (*cloudformation.DescribeStackEventsOutput, error)
|
||||
DescribeStackEventsWithContext(aws.Context, *cloudformation.DescribeStackEventsInput, ...request.Option) (*cloudformation.DescribeStackEventsOutput, error)
|
||||
DescribeStackEventsRequest(*cloudformation.DescribeStackEventsInput) (*request.Request, *cloudformation.DescribeStackEventsOutput)
|
||||
|
||||
DescribeStackEventsPages(*cloudformation.DescribeStackEventsInput, func(*cloudformation.DescribeStackEventsOutput, bool) bool) error
|
||||
DescribeStackEventsPagesWithContext(aws.Context, *cloudformation.DescribeStackEventsInput, func(*cloudformation.DescribeStackEventsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
DescribeStackResource(*cloudformation.DescribeStackResourceInput) (*cloudformation.DescribeStackResourceOutput, error)
|
||||
DescribeStackResourceWithContext(aws.Context, *cloudformation.DescribeStackResourceInput, ...request.Option) (*cloudformation.DescribeStackResourceOutput, error)
|
||||
DescribeStackResourceRequest(*cloudformation.DescribeStackResourceInput) (*request.Request, *cloudformation.DescribeStackResourceOutput)
|
||||
|
||||
DescribeStackResources(*cloudformation.DescribeStackResourcesInput) (*cloudformation.DescribeStackResourcesOutput, error)
|
||||
DescribeStackResourcesWithContext(aws.Context, *cloudformation.DescribeStackResourcesInput, ...request.Option) (*cloudformation.DescribeStackResourcesOutput, error)
|
||||
DescribeStackResourcesRequest(*cloudformation.DescribeStackResourcesInput) (*request.Request, *cloudformation.DescribeStackResourcesOutput)
|
||||
|
||||
DescribeStacks(*cloudformation.DescribeStacksInput) (*cloudformation.DescribeStacksOutput, error)
|
||||
DescribeStacksWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.Option) (*cloudformation.DescribeStacksOutput, error)
|
||||
DescribeStacksRequest(*cloudformation.DescribeStacksInput) (*request.Request, *cloudformation.DescribeStacksOutput)
|
||||
|
||||
DescribeStacksPages(*cloudformation.DescribeStacksInput, func(*cloudformation.DescribeStacksOutput, bool) bool) error
|
||||
DescribeStacksPagesWithContext(aws.Context, *cloudformation.DescribeStacksInput, func(*cloudformation.DescribeStacksOutput, bool) bool, ...request.Option) error
|
||||
|
||||
EstimateTemplateCost(*cloudformation.EstimateTemplateCostInput) (*cloudformation.EstimateTemplateCostOutput, error)
|
||||
EstimateTemplateCostWithContext(aws.Context, *cloudformation.EstimateTemplateCostInput, ...request.Option) (*cloudformation.EstimateTemplateCostOutput, error)
|
||||
EstimateTemplateCostRequest(*cloudformation.EstimateTemplateCostInput) (*request.Request, *cloudformation.EstimateTemplateCostOutput)
|
||||
|
||||
ExecuteChangeSet(*cloudformation.ExecuteChangeSetInput) (*cloudformation.ExecuteChangeSetOutput, error)
|
||||
ExecuteChangeSetWithContext(aws.Context, *cloudformation.ExecuteChangeSetInput, ...request.Option) (*cloudformation.ExecuteChangeSetOutput, error)
|
||||
ExecuteChangeSetRequest(*cloudformation.ExecuteChangeSetInput) (*request.Request, *cloudformation.ExecuteChangeSetOutput)
|
||||
|
||||
GetStackPolicy(*cloudformation.GetStackPolicyInput) (*cloudformation.GetStackPolicyOutput, error)
|
||||
GetStackPolicyWithContext(aws.Context, *cloudformation.GetStackPolicyInput, ...request.Option) (*cloudformation.GetStackPolicyOutput, error)
|
||||
GetStackPolicyRequest(*cloudformation.GetStackPolicyInput) (*request.Request, *cloudformation.GetStackPolicyOutput)
|
||||
|
||||
GetTemplate(*cloudformation.GetTemplateInput) (*cloudformation.GetTemplateOutput, error)
|
||||
GetTemplateWithContext(aws.Context, *cloudformation.GetTemplateInput, ...request.Option) (*cloudformation.GetTemplateOutput, error)
|
||||
GetTemplateRequest(*cloudformation.GetTemplateInput) (*request.Request, *cloudformation.GetTemplateOutput)
|
||||
|
||||
GetTemplateSummary(*cloudformation.GetTemplateSummaryInput) (*cloudformation.GetTemplateSummaryOutput, error)
|
||||
GetTemplateSummaryWithContext(aws.Context, *cloudformation.GetTemplateSummaryInput, ...request.Option) (*cloudformation.GetTemplateSummaryOutput, error)
|
||||
GetTemplateSummaryRequest(*cloudformation.GetTemplateSummaryInput) (*request.Request, *cloudformation.GetTemplateSummaryOutput)
|
||||
|
||||
ListChangeSets(*cloudformation.ListChangeSetsInput) (*cloudformation.ListChangeSetsOutput, error)
|
||||
ListChangeSetsWithContext(aws.Context, *cloudformation.ListChangeSetsInput, ...request.Option) (*cloudformation.ListChangeSetsOutput, error)
|
||||
ListChangeSetsRequest(*cloudformation.ListChangeSetsInput) (*request.Request, *cloudformation.ListChangeSetsOutput)
|
||||
|
||||
ListExports(*cloudformation.ListExportsInput) (*cloudformation.ListExportsOutput, error)
|
||||
ListExportsWithContext(aws.Context, *cloudformation.ListExportsInput, ...request.Option) (*cloudformation.ListExportsOutput, error)
|
||||
ListExportsRequest(*cloudformation.ListExportsInput) (*request.Request, *cloudformation.ListExportsOutput)
|
||||
|
||||
ListExportsPages(*cloudformation.ListExportsInput, func(*cloudformation.ListExportsOutput, bool) bool) error
|
||||
ListExportsPagesWithContext(aws.Context, *cloudformation.ListExportsInput, func(*cloudformation.ListExportsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListImports(*cloudformation.ListImportsInput) (*cloudformation.ListImportsOutput, error)
|
||||
ListImportsWithContext(aws.Context, *cloudformation.ListImportsInput, ...request.Option) (*cloudformation.ListImportsOutput, error)
|
||||
ListImportsRequest(*cloudformation.ListImportsInput) (*request.Request, *cloudformation.ListImportsOutput)
|
||||
|
||||
ListImportsPages(*cloudformation.ListImportsInput, func(*cloudformation.ListImportsOutput, bool) bool) error
|
||||
ListImportsPagesWithContext(aws.Context, *cloudformation.ListImportsInput, func(*cloudformation.ListImportsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListStackResources(*cloudformation.ListStackResourcesInput) (*cloudformation.ListStackResourcesOutput, error)
|
||||
ListStackResourcesWithContext(aws.Context, *cloudformation.ListStackResourcesInput, ...request.Option) (*cloudformation.ListStackResourcesOutput, error)
|
||||
ListStackResourcesRequest(*cloudformation.ListStackResourcesInput) (*request.Request, *cloudformation.ListStackResourcesOutput)
|
||||
|
||||
ListStackResourcesPages(*cloudformation.ListStackResourcesInput, func(*cloudformation.ListStackResourcesOutput, bool) bool) error
|
||||
ListStackResourcesPagesWithContext(aws.Context, *cloudformation.ListStackResourcesInput, func(*cloudformation.ListStackResourcesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListStacks(*cloudformation.ListStacksInput) (*cloudformation.ListStacksOutput, error)
|
||||
ListStacksWithContext(aws.Context, *cloudformation.ListStacksInput, ...request.Option) (*cloudformation.ListStacksOutput, error)
|
||||
ListStacksRequest(*cloudformation.ListStacksInput) (*request.Request, *cloudformation.ListStacksOutput)
|
||||
|
||||
ListStacksPages(*cloudformation.ListStacksInput, func(*cloudformation.ListStacksOutput, bool) bool) error
|
||||
ListStacksPagesWithContext(aws.Context, *cloudformation.ListStacksInput, func(*cloudformation.ListStacksOutput, bool) bool, ...request.Option) error
|
||||
|
||||
SetStackPolicy(*cloudformation.SetStackPolicyInput) (*cloudformation.SetStackPolicyOutput, error)
|
||||
SetStackPolicyWithContext(aws.Context, *cloudformation.SetStackPolicyInput, ...request.Option) (*cloudformation.SetStackPolicyOutput, error)
|
||||
SetStackPolicyRequest(*cloudformation.SetStackPolicyInput) (*request.Request, *cloudformation.SetStackPolicyOutput)
|
||||
|
||||
SignalResource(*cloudformation.SignalResourceInput) (*cloudformation.SignalResourceOutput, error)
|
||||
SignalResourceWithContext(aws.Context, *cloudformation.SignalResourceInput, ...request.Option) (*cloudformation.SignalResourceOutput, error)
|
||||
SignalResourceRequest(*cloudformation.SignalResourceInput) (*request.Request, *cloudformation.SignalResourceOutput)
|
||||
|
||||
UpdateStack(*cloudformation.UpdateStackInput) (*cloudformation.UpdateStackOutput, error)
|
||||
UpdateStackWithContext(aws.Context, *cloudformation.UpdateStackInput, ...request.Option) (*cloudformation.UpdateStackOutput, error)
|
||||
UpdateStackRequest(*cloudformation.UpdateStackInput) (*request.Request, *cloudformation.UpdateStackOutput)
|
||||
|
||||
ValidateTemplate(*cloudformation.ValidateTemplateInput) (*cloudformation.ValidateTemplateOutput, error)
|
||||
ValidateTemplateWithContext(aws.Context, *cloudformation.ValidateTemplateInput, ...request.Option) (*cloudformation.ValidateTemplateOutput, error)
|
||||
ValidateTemplateRequest(*cloudformation.ValidateTemplateInput) (*request.Request, *cloudformation.ValidateTemplateOutput)
|
||||
|
||||
WaitUntilChangeSetCreateComplete(*cloudformation.DescribeChangeSetInput) error
|
||||
WaitUntilChangeSetCreateCompleteWithContext(aws.Context, *cloudformation.DescribeChangeSetInput, ...request.WaiterOption) error
|
||||
|
||||
WaitUntilStackCreateComplete(*cloudformation.DescribeStacksInput) error
|
||||
WaitUntilStackCreateCompleteWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
|
||||
|
||||
WaitUntilStackDeleteComplete(*cloudformation.DescribeStacksInput) error
|
||||
WaitUntilStackDeleteCompleteWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
|
||||
|
||||
WaitUntilStackExists(*cloudformation.DescribeStacksInput) error
|
||||
WaitUntilStackExistsWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
|
||||
|
||||
WaitUntilStackUpdateComplete(*cloudformation.DescribeStacksInput) error
|
||||
WaitUntilStackUpdateCompleteWithContext(aws.Context, *cloudformation.DescribeStacksInput, ...request.WaiterOption) error
|
||||
}
|
||||
|
||||
var _ CloudFormationAPI = (*cloudformation.CloudFormation)(nil)
|
98
vendor/github.com/aws/aws-sdk-go/service/cloudformation/doc.go
generated
vendored
Normal file
98
vendor/github.com/aws/aws-sdk-go/service/cloudformation/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,98 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudformation provides the client and types for making API
|
||||
// requests to AWS CloudFormation.
|
||||
//
|
||||
// AWS CloudFormation allows you to create and manage AWS infrastructure deployments
|
||||
// predictably and repeatedly. You can use AWS CloudFormation to leverage AWS
|
||||
// products, such as Amazon Elastic Compute Cloud, Amazon Elastic Block Store,
|
||||
// Amazon Simple Notification Service, Elastic Load Balancing, and Auto Scaling
|
||||
// to build highly-reliable, highly scalable, cost-effective applications without
|
||||
// creating or configuring the underlying AWS infrastructure.
|
||||
//
|
||||
// With AWS CloudFormation, you declare all of your resources and dependencies
|
||||
// in a template file. The template defines a collection of resources as a single
|
||||
// unit called a stack. AWS CloudFormation creates and deletes all member resources
|
||||
// of the stack together and manages all dependencies between the resources
|
||||
// for you.
|
||||
//
|
||||
// For more information about AWS CloudFormation, see the AWS CloudFormation
|
||||
// Product Page (http://aws.amazon.com/cloudformation/).
|
||||
//
|
||||
// Amazon CloudFormation makes use of other AWS products. If you need additional
|
||||
// technical information about a specific AWS product, you can find the product's
|
||||
// technical documentation at docs.aws.amazon.com (http://docs.aws.amazon.com/).
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15 for more information on this service.
|
||||
//
|
||||
// See cloudformation package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudformation/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for AWS CloudFormation 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 := cloudformation.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 AWS CloudFormation client CloudFormation for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudformation/#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.CancelUpdateStack(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("CancelUpdateStack 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.CancelUpdateStackWithContext(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 cloudformation
|
46
vendor/github.com/aws/aws-sdk-go/service/cloudformation/errors.go
generated
vendored
Normal file
46
vendor/github.com/aws/aws-sdk-go/service/cloudformation/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudformation
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAlreadyExistsException for service response error code
|
||||
// "AlreadyExistsException".
|
||||
//
|
||||
// Resource with the name requested already exists.
|
||||
ErrCodeAlreadyExistsException = "AlreadyExistsException"
|
||||
|
||||
// ErrCodeChangeSetNotFoundException for service response error code
|
||||
// "ChangeSetNotFound".
|
||||
//
|
||||
// The specified change set name or ID doesn't exit. To view valid change sets
|
||||
// for a stack, use the ListChangeSets action.
|
||||
ErrCodeChangeSetNotFoundException = "ChangeSetNotFound"
|
||||
|
||||
// ErrCodeInsufficientCapabilitiesException for service response error code
|
||||
// "InsufficientCapabilitiesException".
|
||||
//
|
||||
// The template contains resources with capabilities that were not specified
|
||||
// in the Capabilities parameter.
|
||||
ErrCodeInsufficientCapabilitiesException = "InsufficientCapabilitiesException"
|
||||
|
||||
// ErrCodeInvalidChangeSetStatusException for service response error code
|
||||
// "InvalidChangeSetStatus".
|
||||
//
|
||||
// The specified change set cannot be used to update the stack. For example,
|
||||
// the change set status might be CREATE_IN_PROGRESS or the stack status might
|
||||
// be UPDATE_IN_PROGRESS.
|
||||
ErrCodeInvalidChangeSetStatusException = "InvalidChangeSetStatus"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceededException".
|
||||
//
|
||||
// Quota for the resource has already been reached.
|
||||
ErrCodeLimitExceededException = "LimitExceededException"
|
||||
|
||||
// ErrCodeTokenAlreadyExistsException for service response error code
|
||||
// "TokenAlreadyExistsException".
|
||||
//
|
||||
// A client request token already exists.
|
||||
ErrCodeTokenAlreadyExistsException = "TokenAlreadyExistsException"
|
||||
)
|
718
vendor/github.com/aws/aws-sdk-go/service/cloudformation/examples_test.go
generated
vendored
Normal file
718
vendor/github.com/aws/aws-sdk-go/service/cloudformation/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,718 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudformation_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/cloudformation"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCloudFormation_CancelUpdateStack() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.CancelUpdateStackInput{
|
||||
StackName: aws.String("StackName"), // Required
|
||||
ClientRequestToken: aws.String("ClientRequestToken"),
|
||||
}
|
||||
resp, err := svc.CancelUpdateStack(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 ExampleCloudFormation_ContinueUpdateRollback() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.ContinueUpdateRollbackInput{
|
||||
StackName: aws.String("StackNameOrId"), // Required
|
||||
ClientRequestToken: aws.String("ClientRequestToken"),
|
||||
ResourcesToSkip: []*string{
|
||||
aws.String("ResourceToSkip"), // Required
|
||||
// More values...
|
||||
},
|
||||
RoleARN: aws.String("RoleARN"),
|
||||
}
|
||||
resp, err := svc.ContinueUpdateRollback(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 ExampleCloudFormation_CreateChangeSet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.CreateChangeSetInput{
|
||||
ChangeSetName: aws.String("ChangeSetName"), // Required
|
||||
StackName: aws.String("StackNameOrId"), // Required
|
||||
Capabilities: []*string{
|
||||
aws.String("Capability"), // Required
|
||||
// More values...
|
||||
},
|
||||
ChangeSetType: aws.String("ChangeSetType"),
|
||||
ClientToken: aws.String("ClientToken"),
|
||||
Description: aws.String("Description"),
|
||||
NotificationARNs: []*string{
|
||||
aws.String("NotificationARN"), // Required
|
||||
// More values...
|
||||
},
|
||||
Parameters: []*cloudformation.Parameter{
|
||||
{ // Required
|
||||
ParameterKey: aws.String("ParameterKey"),
|
||||
ParameterValue: aws.String("ParameterValue"),
|
||||
UsePreviousValue: aws.Bool(true),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ResourceTypes: []*string{
|
||||
aws.String("ResourceType"), // Required
|
||||
// More values...
|
||||
},
|
||||
RoleARN: aws.String("RoleARN"),
|
||||
Tags: []*cloudformation.Tag{
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"),
|
||||
Value: aws.String("TagValue"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
TemplateBody: aws.String("TemplateBody"),
|
||||
TemplateURL: aws.String("TemplateURL"),
|
||||
UsePreviousTemplate: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.CreateChangeSet(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 ExampleCloudFormation_CreateStack() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.CreateStackInput{
|
||||
StackName: aws.String("StackName"), // Required
|
||||
Capabilities: []*string{
|
||||
aws.String("Capability"), // Required
|
||||
// More values...
|
||||
},
|
||||
ClientRequestToken: aws.String("ClientRequestToken"),
|
||||
DisableRollback: aws.Bool(true),
|
||||
NotificationARNs: []*string{
|
||||
aws.String("NotificationARN"), // Required
|
||||
// More values...
|
||||
},
|
||||
OnFailure: aws.String("OnFailure"),
|
||||
Parameters: []*cloudformation.Parameter{
|
||||
{ // Required
|
||||
ParameterKey: aws.String("ParameterKey"),
|
||||
ParameterValue: aws.String("ParameterValue"),
|
||||
UsePreviousValue: aws.Bool(true),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ResourceTypes: []*string{
|
||||
aws.String("ResourceType"), // Required
|
||||
// More values...
|
||||
},
|
||||
RoleARN: aws.String("RoleARN"),
|
||||
StackPolicyBody: aws.String("StackPolicyBody"),
|
||||
StackPolicyURL: aws.String("StackPolicyURL"),
|
||||
Tags: []*cloudformation.Tag{
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"),
|
||||
Value: aws.String("TagValue"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
TemplateBody: aws.String("TemplateBody"),
|
||||
TemplateURL: aws.String("TemplateURL"),
|
||||
TimeoutInMinutes: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.CreateStack(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 ExampleCloudFormation_DeleteChangeSet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.DeleteChangeSetInput{
|
||||
ChangeSetName: aws.String("ChangeSetNameOrId"), // Required
|
||||
StackName: aws.String("StackNameOrId"),
|
||||
}
|
||||
resp, err := svc.DeleteChangeSet(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 ExampleCloudFormation_DeleteStack() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.DeleteStackInput{
|
||||
StackName: aws.String("StackName"), // Required
|
||||
ClientRequestToken: aws.String("ClientRequestToken"),
|
||||
RetainResources: []*string{
|
||||
aws.String("LogicalResourceId"), // Required
|
||||
// More values...
|
||||
},
|
||||
RoleARN: aws.String("RoleARN"),
|
||||
}
|
||||
resp, err := svc.DeleteStack(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 ExampleCloudFormation_DescribeAccountLimits() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.DescribeAccountLimitsInput{
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.DescribeAccountLimits(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 ExampleCloudFormation_DescribeChangeSet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.DescribeChangeSetInput{
|
||||
ChangeSetName: aws.String("ChangeSetNameOrId"), // Required
|
||||
NextToken: aws.String("NextToken"),
|
||||
StackName: aws.String("StackNameOrId"),
|
||||
}
|
||||
resp, err := svc.DescribeChangeSet(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 ExampleCloudFormation_DescribeStackEvents() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.DescribeStackEventsInput{
|
||||
NextToken: aws.String("NextToken"),
|
||||
StackName: aws.String("StackName"),
|
||||
}
|
||||
resp, err := svc.DescribeStackEvents(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 ExampleCloudFormation_DescribeStackResource() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.DescribeStackResourceInput{
|
||||
LogicalResourceId: aws.String("LogicalResourceId"), // Required
|
||||
StackName: aws.String("StackName"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeStackResource(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 ExampleCloudFormation_DescribeStackResources() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.DescribeStackResourcesInput{
|
||||
LogicalResourceId: aws.String("LogicalResourceId"),
|
||||
PhysicalResourceId: aws.String("PhysicalResourceId"),
|
||||
StackName: aws.String("StackName"),
|
||||
}
|
||||
resp, err := svc.DescribeStackResources(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 ExampleCloudFormation_DescribeStacks() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.DescribeStacksInput{
|
||||
NextToken: aws.String("NextToken"),
|
||||
StackName: aws.String("StackName"),
|
||||
}
|
||||
resp, err := svc.DescribeStacks(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 ExampleCloudFormation_EstimateTemplateCost() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.EstimateTemplateCostInput{
|
||||
Parameters: []*cloudformation.Parameter{
|
||||
{ // Required
|
||||
ParameterKey: aws.String("ParameterKey"),
|
||||
ParameterValue: aws.String("ParameterValue"),
|
||||
UsePreviousValue: aws.Bool(true),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
TemplateBody: aws.String("TemplateBody"),
|
||||
TemplateURL: aws.String("TemplateURL"),
|
||||
}
|
||||
resp, err := svc.EstimateTemplateCost(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 ExampleCloudFormation_ExecuteChangeSet() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.ExecuteChangeSetInput{
|
||||
ChangeSetName: aws.String("ChangeSetNameOrId"), // Required
|
||||
ClientRequestToken: aws.String("ClientRequestToken"),
|
||||
StackName: aws.String("StackNameOrId"),
|
||||
}
|
||||
resp, err := svc.ExecuteChangeSet(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 ExampleCloudFormation_GetStackPolicy() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.GetStackPolicyInput{
|
||||
StackName: aws.String("StackName"), // Required
|
||||
}
|
||||
resp, err := svc.GetStackPolicy(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 ExampleCloudFormation_GetTemplate() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.GetTemplateInput{
|
||||
ChangeSetName: aws.String("ChangeSetNameOrId"),
|
||||
StackName: aws.String("StackName"),
|
||||
TemplateStage: aws.String("TemplateStage"),
|
||||
}
|
||||
resp, err := svc.GetTemplate(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 ExampleCloudFormation_GetTemplateSummary() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.GetTemplateSummaryInput{
|
||||
StackName: aws.String("StackNameOrId"),
|
||||
TemplateBody: aws.String("TemplateBody"),
|
||||
TemplateURL: aws.String("TemplateURL"),
|
||||
}
|
||||
resp, err := svc.GetTemplateSummary(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 ExampleCloudFormation_ListChangeSets() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.ListChangeSetsInput{
|
||||
StackName: aws.String("StackNameOrId"), // Required
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListChangeSets(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 ExampleCloudFormation_ListExports() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.ListExportsInput{
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListExports(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 ExampleCloudFormation_ListImports() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.ListImportsInput{
|
||||
ExportName: aws.String("ExportName"), // Required
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListImports(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 ExampleCloudFormation_ListStackResources() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.ListStackResourcesInput{
|
||||
StackName: aws.String("StackName"), // Required
|
||||
NextToken: aws.String("NextToken"),
|
||||
}
|
||||
resp, err := svc.ListStackResources(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 ExampleCloudFormation_ListStacks() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.ListStacksInput{
|
||||
NextToken: aws.String("NextToken"),
|
||||
StackStatusFilter: []*string{
|
||||
aws.String("StackStatus"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.ListStacks(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 ExampleCloudFormation_SetStackPolicy() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.SetStackPolicyInput{
|
||||
StackName: aws.String("StackName"), // Required
|
||||
StackPolicyBody: aws.String("StackPolicyBody"),
|
||||
StackPolicyURL: aws.String("StackPolicyURL"),
|
||||
}
|
||||
resp, err := svc.SetStackPolicy(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 ExampleCloudFormation_SignalResource() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.SignalResourceInput{
|
||||
LogicalResourceId: aws.String("LogicalResourceId"), // Required
|
||||
StackName: aws.String("StackNameOrId"), // Required
|
||||
Status: aws.String("ResourceSignalStatus"), // Required
|
||||
UniqueId: aws.String("ResourceSignalUniqueId"), // Required
|
||||
}
|
||||
resp, err := svc.SignalResource(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 ExampleCloudFormation_UpdateStack() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.UpdateStackInput{
|
||||
StackName: aws.String("StackName"), // Required
|
||||
Capabilities: []*string{
|
||||
aws.String("Capability"), // Required
|
||||
// More values...
|
||||
},
|
||||
ClientRequestToken: aws.String("ClientRequestToken"),
|
||||
NotificationARNs: []*string{
|
||||
aws.String("NotificationARN"), // Required
|
||||
// More values...
|
||||
},
|
||||
Parameters: []*cloudformation.Parameter{
|
||||
{ // Required
|
||||
ParameterKey: aws.String("ParameterKey"),
|
||||
ParameterValue: aws.String("ParameterValue"),
|
||||
UsePreviousValue: aws.Bool(true),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
ResourceTypes: []*string{
|
||||
aws.String("ResourceType"), // Required
|
||||
// More values...
|
||||
},
|
||||
RoleARN: aws.String("RoleARN"),
|
||||
StackPolicyBody: aws.String("StackPolicyBody"),
|
||||
StackPolicyDuringUpdateBody: aws.String("StackPolicyDuringUpdateBody"),
|
||||
StackPolicyDuringUpdateURL: aws.String("StackPolicyDuringUpdateURL"),
|
||||
StackPolicyURL: aws.String("StackPolicyURL"),
|
||||
Tags: []*cloudformation.Tag{
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"),
|
||||
Value: aws.String("TagValue"),
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
TemplateBody: aws.String("TemplateBody"),
|
||||
TemplateURL: aws.String("TemplateURL"),
|
||||
UsePreviousTemplate: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.UpdateStack(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 ExampleCloudFormation_ValidateTemplate() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudformation.New(sess)
|
||||
|
||||
params := &cloudformation.ValidateTemplateInput{
|
||||
TemplateBody: aws.String("TemplateBody"),
|
||||
TemplateURL: aws.String("TemplateURL"),
|
||||
}
|
||||
resp, err := svc.ValidateTemplate(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/cloudformation/service.go
generated
vendored
Normal file
93
vendor/github.com/aws/aws-sdk-go/service/cloudformation/service.go
generated
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudformation
|
||||
|
||||
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/query"
|
||||
)
|
||||
|
||||
// CloudFormation provides the API operation methods for making requests to
|
||||
// AWS CloudFormation. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// CloudFormation methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CloudFormation 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 = "cloudformation" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the CloudFormation 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 CloudFormation client from just a session.
|
||||
// svc := cloudformation.New(mySession)
|
||||
//
|
||||
// // Create a CloudFormation client with additional configuration
|
||||
// svc := cloudformation.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudFormation {
|
||||
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) *CloudFormation {
|
||||
svc := &CloudFormation{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2010-05-15",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(query.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a CloudFormation operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CloudFormation) 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
|
||||
}
|
335
vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go
generated
vendored
Normal file
335
vendor/github.com/aws/aws-sdk-go/service/cloudformation/waiters.go
generated
vendored
Normal file
|
@ -0,0 +1,335 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudformation
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
// WaitUntilChangeSetCreateComplete uses the AWS CloudFormation API operation
|
||||
// DescribeChangeSet to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilChangeSetCreateComplete(input *DescribeChangeSetInput) error {
|
||||
return c.WaitUntilChangeSetCreateCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilChangeSetCreateCompleteWithContext is an extended version of WaitUntilChangeSetCreateComplete.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *CloudFormation) WaitUntilChangeSetCreateCompleteWithContext(ctx aws.Context, input *DescribeChangeSetInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilChangeSetCreateComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "Status",
|
||||
Expected: "CREATE_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "Status",
|
||||
Expected: "FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeChangeSetInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeChangeSetRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilStackCreateComplete uses the AWS CloudFormation API operation
|
||||
// DescribeStacks to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilStackCreateComplete(input *DescribeStacksInput) error {
|
||||
return c.WaitUntilStackCreateCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilStackCreateCompleteWithContext is an extended version of WaitUntilStackCreateComplete.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *CloudFormation) WaitUntilStackCreateCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilStackCreateComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "CREATE_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "CREATE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "DELETE_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "DELETE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "ROLLBACK_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "ROLLBACK_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeStacksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeStacksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilStackDeleteComplete uses the AWS CloudFormation API operation
|
||||
// DescribeStacks to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilStackDeleteComplete(input *DescribeStacksInput) error {
|
||||
return c.WaitUntilStackDeleteCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilStackDeleteCompleteWithContext is an extended version of WaitUntilStackDeleteComplete.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *CloudFormation) WaitUntilStackDeleteCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilStackDeleteComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "DELETE_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "DELETE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "CREATE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "ROLLBACK_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_ROLLBACK_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_ROLLBACK_IN_PROGRESS",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeStacksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeStacksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilStackExists uses the AWS CloudFormation API operation
|
||||
// DescribeStacks to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilStackExists(input *DescribeStacksInput) error {
|
||||
return c.WaitUntilStackExistsWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilStackExistsWithContext is an extended version of WaitUntilStackExists.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *CloudFormation) WaitUntilStackExistsWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilStackExists",
|
||||
MaxAttempts: 20,
|
||||
Delay: request.ConstantWaiterDelay(5 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.StatusWaiterMatch,
|
||||
Expected: 200,
|
||||
},
|
||||
{
|
||||
State: request.RetryWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeStacksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeStacksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilStackUpdateComplete uses the AWS CloudFormation API operation
|
||||
// DescribeStacks to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *CloudFormation) WaitUntilStackUpdateComplete(input *DescribeStacksInput) error {
|
||||
return c.WaitUntilStackUpdateCompleteWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilStackUpdateCompleteWithContext is an extended version of WaitUntilStackUpdateComplete.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *CloudFormation) WaitUntilStackUpdateCompleteWithContext(ctx aws.Context, input *DescribeStacksInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilStackUpdateComplete",
|
||||
MaxAttempts: 120,
|
||||
Delay: request.ConstantWaiterDelay(30 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathAllWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_ROLLBACK_FAILED",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.PathAnyWaiterMatch, Argument: "Stacks[].StackStatus",
|
||||
Expected: "UPDATE_ROLLBACK_COMPLETE",
|
||||
},
|
||||
{
|
||||
State: request.FailureWaiterState,
|
||||
Matcher: request.ErrorWaiterMatch,
|
||||
Expected: "ValidationError",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *DescribeStacksInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.DescribeStacksRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
10441
vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go
generated
vendored
Normal file
10441
vendor/github.com/aws/aws-sdk-go/service/cloudfront/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
193
vendor/github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface/interface.go
generated
vendored
Normal file
193
vendor/github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,193 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudfrontiface provides an interface to enable mocking the Amazon CloudFront 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 cloudfrontiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/cloudfront"
|
||||
)
|
||||
|
||||
// CloudFrontAPI provides an interface to enable mocking the
|
||||
// cloudfront.CloudFront 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 CloudFront.
|
||||
// func myFunc(svc cloudfrontiface.CloudFrontAPI) bool {
|
||||
// // Make svc.CreateCloudFrontOriginAccessIdentity request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := cloudfront.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockCloudFrontClient struct {
|
||||
// cloudfrontiface.CloudFrontAPI
|
||||
// }
|
||||
// func (m *mockCloudFrontClient) CreateCloudFrontOriginAccessIdentity(input *cloudfront.CreateCloudFrontOriginAccessIdentityInput) (*cloudfront.CreateCloudFrontOriginAccessIdentityOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockCloudFrontClient{}
|
||||
//
|
||||
// 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 CloudFrontAPI interface {
|
||||
CreateCloudFrontOriginAccessIdentity(*cloudfront.CreateCloudFrontOriginAccessIdentityInput) (*cloudfront.CreateCloudFrontOriginAccessIdentityOutput, error)
|
||||
CreateCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.CreateCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.CreateCloudFrontOriginAccessIdentityOutput, error)
|
||||
CreateCloudFrontOriginAccessIdentityRequest(*cloudfront.CreateCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.CreateCloudFrontOriginAccessIdentityOutput)
|
||||
|
||||
CreateDistribution(*cloudfront.CreateDistributionInput) (*cloudfront.CreateDistributionOutput, error)
|
||||
CreateDistributionWithContext(aws.Context, *cloudfront.CreateDistributionInput, ...request.Option) (*cloudfront.CreateDistributionOutput, error)
|
||||
CreateDistributionRequest(*cloudfront.CreateDistributionInput) (*request.Request, *cloudfront.CreateDistributionOutput)
|
||||
|
||||
CreateDistributionWithTags(*cloudfront.CreateDistributionWithTagsInput) (*cloudfront.CreateDistributionWithTagsOutput, error)
|
||||
CreateDistributionWithTagsWithContext(aws.Context, *cloudfront.CreateDistributionWithTagsInput, ...request.Option) (*cloudfront.CreateDistributionWithTagsOutput, error)
|
||||
CreateDistributionWithTagsRequest(*cloudfront.CreateDistributionWithTagsInput) (*request.Request, *cloudfront.CreateDistributionWithTagsOutput)
|
||||
|
||||
CreateInvalidation(*cloudfront.CreateInvalidationInput) (*cloudfront.CreateInvalidationOutput, error)
|
||||
CreateInvalidationWithContext(aws.Context, *cloudfront.CreateInvalidationInput, ...request.Option) (*cloudfront.CreateInvalidationOutput, error)
|
||||
CreateInvalidationRequest(*cloudfront.CreateInvalidationInput) (*request.Request, *cloudfront.CreateInvalidationOutput)
|
||||
|
||||
CreateStreamingDistribution(*cloudfront.CreateStreamingDistributionInput) (*cloudfront.CreateStreamingDistributionOutput, error)
|
||||
CreateStreamingDistributionWithContext(aws.Context, *cloudfront.CreateStreamingDistributionInput, ...request.Option) (*cloudfront.CreateStreamingDistributionOutput, error)
|
||||
CreateStreamingDistributionRequest(*cloudfront.CreateStreamingDistributionInput) (*request.Request, *cloudfront.CreateStreamingDistributionOutput)
|
||||
|
||||
CreateStreamingDistributionWithTags(*cloudfront.CreateStreamingDistributionWithTagsInput) (*cloudfront.CreateStreamingDistributionWithTagsOutput, error)
|
||||
CreateStreamingDistributionWithTagsWithContext(aws.Context, *cloudfront.CreateStreamingDistributionWithTagsInput, ...request.Option) (*cloudfront.CreateStreamingDistributionWithTagsOutput, error)
|
||||
CreateStreamingDistributionWithTagsRequest(*cloudfront.CreateStreamingDistributionWithTagsInput) (*request.Request, *cloudfront.CreateStreamingDistributionWithTagsOutput)
|
||||
|
||||
DeleteCloudFrontOriginAccessIdentity(*cloudfront.DeleteCloudFrontOriginAccessIdentityInput) (*cloudfront.DeleteCloudFrontOriginAccessIdentityOutput, error)
|
||||
DeleteCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.DeleteCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.DeleteCloudFrontOriginAccessIdentityOutput, error)
|
||||
DeleteCloudFrontOriginAccessIdentityRequest(*cloudfront.DeleteCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.DeleteCloudFrontOriginAccessIdentityOutput)
|
||||
|
||||
DeleteDistribution(*cloudfront.DeleteDistributionInput) (*cloudfront.DeleteDistributionOutput, error)
|
||||
DeleteDistributionWithContext(aws.Context, *cloudfront.DeleteDistributionInput, ...request.Option) (*cloudfront.DeleteDistributionOutput, error)
|
||||
DeleteDistributionRequest(*cloudfront.DeleteDistributionInput) (*request.Request, *cloudfront.DeleteDistributionOutput)
|
||||
|
||||
DeleteStreamingDistribution(*cloudfront.DeleteStreamingDistributionInput) (*cloudfront.DeleteStreamingDistributionOutput, error)
|
||||
DeleteStreamingDistributionWithContext(aws.Context, *cloudfront.DeleteStreamingDistributionInput, ...request.Option) (*cloudfront.DeleteStreamingDistributionOutput, error)
|
||||
DeleteStreamingDistributionRequest(*cloudfront.DeleteStreamingDistributionInput) (*request.Request, *cloudfront.DeleteStreamingDistributionOutput)
|
||||
|
||||
GetCloudFrontOriginAccessIdentity(*cloudfront.GetCloudFrontOriginAccessIdentityInput) (*cloudfront.GetCloudFrontOriginAccessIdentityOutput, error)
|
||||
GetCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.GetCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.GetCloudFrontOriginAccessIdentityOutput, error)
|
||||
GetCloudFrontOriginAccessIdentityRequest(*cloudfront.GetCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.GetCloudFrontOriginAccessIdentityOutput)
|
||||
|
||||
GetCloudFrontOriginAccessIdentityConfig(*cloudfront.GetCloudFrontOriginAccessIdentityConfigInput) (*cloudfront.GetCloudFrontOriginAccessIdentityConfigOutput, error)
|
||||
GetCloudFrontOriginAccessIdentityConfigWithContext(aws.Context, *cloudfront.GetCloudFrontOriginAccessIdentityConfigInput, ...request.Option) (*cloudfront.GetCloudFrontOriginAccessIdentityConfigOutput, error)
|
||||
GetCloudFrontOriginAccessIdentityConfigRequest(*cloudfront.GetCloudFrontOriginAccessIdentityConfigInput) (*request.Request, *cloudfront.GetCloudFrontOriginAccessIdentityConfigOutput)
|
||||
|
||||
GetDistribution(*cloudfront.GetDistributionInput) (*cloudfront.GetDistributionOutput, error)
|
||||
GetDistributionWithContext(aws.Context, *cloudfront.GetDistributionInput, ...request.Option) (*cloudfront.GetDistributionOutput, error)
|
||||
GetDistributionRequest(*cloudfront.GetDistributionInput) (*request.Request, *cloudfront.GetDistributionOutput)
|
||||
|
||||
GetDistributionConfig(*cloudfront.GetDistributionConfigInput) (*cloudfront.GetDistributionConfigOutput, error)
|
||||
GetDistributionConfigWithContext(aws.Context, *cloudfront.GetDistributionConfigInput, ...request.Option) (*cloudfront.GetDistributionConfigOutput, error)
|
||||
GetDistributionConfigRequest(*cloudfront.GetDistributionConfigInput) (*request.Request, *cloudfront.GetDistributionConfigOutput)
|
||||
|
||||
GetInvalidation(*cloudfront.GetInvalidationInput) (*cloudfront.GetInvalidationOutput, error)
|
||||
GetInvalidationWithContext(aws.Context, *cloudfront.GetInvalidationInput, ...request.Option) (*cloudfront.GetInvalidationOutput, error)
|
||||
GetInvalidationRequest(*cloudfront.GetInvalidationInput) (*request.Request, *cloudfront.GetInvalidationOutput)
|
||||
|
||||
GetStreamingDistribution(*cloudfront.GetStreamingDistributionInput) (*cloudfront.GetStreamingDistributionOutput, error)
|
||||
GetStreamingDistributionWithContext(aws.Context, *cloudfront.GetStreamingDistributionInput, ...request.Option) (*cloudfront.GetStreamingDistributionOutput, error)
|
||||
GetStreamingDistributionRequest(*cloudfront.GetStreamingDistributionInput) (*request.Request, *cloudfront.GetStreamingDistributionOutput)
|
||||
|
||||
GetStreamingDistributionConfig(*cloudfront.GetStreamingDistributionConfigInput) (*cloudfront.GetStreamingDistributionConfigOutput, error)
|
||||
GetStreamingDistributionConfigWithContext(aws.Context, *cloudfront.GetStreamingDistributionConfigInput, ...request.Option) (*cloudfront.GetStreamingDistributionConfigOutput, error)
|
||||
GetStreamingDistributionConfigRequest(*cloudfront.GetStreamingDistributionConfigInput) (*request.Request, *cloudfront.GetStreamingDistributionConfigOutput)
|
||||
|
||||
ListCloudFrontOriginAccessIdentities(*cloudfront.ListCloudFrontOriginAccessIdentitiesInput) (*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, error)
|
||||
ListCloudFrontOriginAccessIdentitiesWithContext(aws.Context, *cloudfront.ListCloudFrontOriginAccessIdentitiesInput, ...request.Option) (*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, error)
|
||||
ListCloudFrontOriginAccessIdentitiesRequest(*cloudfront.ListCloudFrontOriginAccessIdentitiesInput) (*request.Request, *cloudfront.ListCloudFrontOriginAccessIdentitiesOutput)
|
||||
|
||||
ListCloudFrontOriginAccessIdentitiesPages(*cloudfront.ListCloudFrontOriginAccessIdentitiesInput, func(*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, bool) bool) error
|
||||
ListCloudFrontOriginAccessIdentitiesPagesWithContext(aws.Context, *cloudfront.ListCloudFrontOriginAccessIdentitiesInput, func(*cloudfront.ListCloudFrontOriginAccessIdentitiesOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListDistributions(*cloudfront.ListDistributionsInput) (*cloudfront.ListDistributionsOutput, error)
|
||||
ListDistributionsWithContext(aws.Context, *cloudfront.ListDistributionsInput, ...request.Option) (*cloudfront.ListDistributionsOutput, error)
|
||||
ListDistributionsRequest(*cloudfront.ListDistributionsInput) (*request.Request, *cloudfront.ListDistributionsOutput)
|
||||
|
||||
ListDistributionsPages(*cloudfront.ListDistributionsInput, func(*cloudfront.ListDistributionsOutput, bool) bool) error
|
||||
ListDistributionsPagesWithContext(aws.Context, *cloudfront.ListDistributionsInput, func(*cloudfront.ListDistributionsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListDistributionsByWebACLId(*cloudfront.ListDistributionsByWebACLIdInput) (*cloudfront.ListDistributionsByWebACLIdOutput, error)
|
||||
ListDistributionsByWebACLIdWithContext(aws.Context, *cloudfront.ListDistributionsByWebACLIdInput, ...request.Option) (*cloudfront.ListDistributionsByWebACLIdOutput, error)
|
||||
ListDistributionsByWebACLIdRequest(*cloudfront.ListDistributionsByWebACLIdInput) (*request.Request, *cloudfront.ListDistributionsByWebACLIdOutput)
|
||||
|
||||
ListInvalidations(*cloudfront.ListInvalidationsInput) (*cloudfront.ListInvalidationsOutput, error)
|
||||
ListInvalidationsWithContext(aws.Context, *cloudfront.ListInvalidationsInput, ...request.Option) (*cloudfront.ListInvalidationsOutput, error)
|
||||
ListInvalidationsRequest(*cloudfront.ListInvalidationsInput) (*request.Request, *cloudfront.ListInvalidationsOutput)
|
||||
|
||||
ListInvalidationsPages(*cloudfront.ListInvalidationsInput, func(*cloudfront.ListInvalidationsOutput, bool) bool) error
|
||||
ListInvalidationsPagesWithContext(aws.Context, *cloudfront.ListInvalidationsInput, func(*cloudfront.ListInvalidationsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListStreamingDistributions(*cloudfront.ListStreamingDistributionsInput) (*cloudfront.ListStreamingDistributionsOutput, error)
|
||||
ListStreamingDistributionsWithContext(aws.Context, *cloudfront.ListStreamingDistributionsInput, ...request.Option) (*cloudfront.ListStreamingDistributionsOutput, error)
|
||||
ListStreamingDistributionsRequest(*cloudfront.ListStreamingDistributionsInput) (*request.Request, *cloudfront.ListStreamingDistributionsOutput)
|
||||
|
||||
ListStreamingDistributionsPages(*cloudfront.ListStreamingDistributionsInput, func(*cloudfront.ListStreamingDistributionsOutput, bool) bool) error
|
||||
ListStreamingDistributionsPagesWithContext(aws.Context, *cloudfront.ListStreamingDistributionsInput, func(*cloudfront.ListStreamingDistributionsOutput, bool) bool, ...request.Option) error
|
||||
|
||||
ListTagsForResource(*cloudfront.ListTagsForResourceInput) (*cloudfront.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceWithContext(aws.Context, *cloudfront.ListTagsForResourceInput, ...request.Option) (*cloudfront.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceRequest(*cloudfront.ListTagsForResourceInput) (*request.Request, *cloudfront.ListTagsForResourceOutput)
|
||||
|
||||
TagResource(*cloudfront.TagResourceInput) (*cloudfront.TagResourceOutput, error)
|
||||
TagResourceWithContext(aws.Context, *cloudfront.TagResourceInput, ...request.Option) (*cloudfront.TagResourceOutput, error)
|
||||
TagResourceRequest(*cloudfront.TagResourceInput) (*request.Request, *cloudfront.TagResourceOutput)
|
||||
|
||||
UntagResource(*cloudfront.UntagResourceInput) (*cloudfront.UntagResourceOutput, error)
|
||||
UntagResourceWithContext(aws.Context, *cloudfront.UntagResourceInput, ...request.Option) (*cloudfront.UntagResourceOutput, error)
|
||||
UntagResourceRequest(*cloudfront.UntagResourceInput) (*request.Request, *cloudfront.UntagResourceOutput)
|
||||
|
||||
UpdateCloudFrontOriginAccessIdentity(*cloudfront.UpdateCloudFrontOriginAccessIdentityInput) (*cloudfront.UpdateCloudFrontOriginAccessIdentityOutput, error)
|
||||
UpdateCloudFrontOriginAccessIdentityWithContext(aws.Context, *cloudfront.UpdateCloudFrontOriginAccessIdentityInput, ...request.Option) (*cloudfront.UpdateCloudFrontOriginAccessIdentityOutput, error)
|
||||
UpdateCloudFrontOriginAccessIdentityRequest(*cloudfront.UpdateCloudFrontOriginAccessIdentityInput) (*request.Request, *cloudfront.UpdateCloudFrontOriginAccessIdentityOutput)
|
||||
|
||||
UpdateDistribution(*cloudfront.UpdateDistributionInput) (*cloudfront.UpdateDistributionOutput, error)
|
||||
UpdateDistributionWithContext(aws.Context, *cloudfront.UpdateDistributionInput, ...request.Option) (*cloudfront.UpdateDistributionOutput, error)
|
||||
UpdateDistributionRequest(*cloudfront.UpdateDistributionInput) (*request.Request, *cloudfront.UpdateDistributionOutput)
|
||||
|
||||
UpdateStreamingDistribution(*cloudfront.UpdateStreamingDistributionInput) (*cloudfront.UpdateStreamingDistributionOutput, error)
|
||||
UpdateStreamingDistributionWithContext(aws.Context, *cloudfront.UpdateStreamingDistributionInput, ...request.Option) (*cloudfront.UpdateStreamingDistributionOutput, error)
|
||||
UpdateStreamingDistributionRequest(*cloudfront.UpdateStreamingDistributionInput) (*request.Request, *cloudfront.UpdateStreamingDistributionOutput)
|
||||
|
||||
WaitUntilDistributionDeployed(*cloudfront.GetDistributionInput) error
|
||||
WaitUntilDistributionDeployedWithContext(aws.Context, *cloudfront.GetDistributionInput, ...request.WaiterOption) error
|
||||
|
||||
WaitUntilInvalidationCompleted(*cloudfront.GetInvalidationInput) error
|
||||
WaitUntilInvalidationCompletedWithContext(aws.Context, *cloudfront.GetInvalidationInput, ...request.WaiterOption) error
|
||||
|
||||
WaitUntilStreamingDistributionDeployed(*cloudfront.GetStreamingDistributionInput) error
|
||||
WaitUntilStreamingDistributionDeployedWithContext(aws.Context, *cloudfront.GetStreamingDistributionInput, ...request.WaiterOption) error
|
||||
}
|
||||
|
||||
var _ CloudFrontAPI = (*cloudfront.CloudFront)(nil)
|
83
vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go
generated
vendored
Normal file
83
vendor/github.com/aws/aws-sdk-go/service/cloudfront/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,83 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudfront provides the client and types for making API
|
||||
// requests to Amazon CloudFront.
|
||||
//
|
||||
// This is the Amazon CloudFront API Reference. This guide is for developers
|
||||
// who need detailed information about the CloudFront API actions, data types,
|
||||
// and errors. For detailed information about CloudFront features and their
|
||||
// associated API calls, see the Amazon CloudFront Developer Guide.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/cloudfront-2017-03-25 for more information on this service.
|
||||
//
|
||||
// See cloudfront package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon CloudFront 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 := cloudfront.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 CloudFront client CloudFront for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudfront/#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.CreateCloudFrontOriginAccessIdentity(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("CreateCloudFrontOriginAccessIdentity 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.CreateCloudFrontOriginAccessIdentityWithContext(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 cloudfront
|
333
vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go
generated
vendored
Normal file
333
vendor/github.com/aws/aws-sdk-go/service/cloudfront/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,333 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudfront
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAccessDenied for service response error code
|
||||
// "AccessDenied".
|
||||
//
|
||||
// Access denied.
|
||||
ErrCodeAccessDenied = "AccessDenied"
|
||||
|
||||
// ErrCodeBatchTooLarge for service response error code
|
||||
// "BatchTooLarge".
|
||||
ErrCodeBatchTooLarge = "BatchTooLarge"
|
||||
|
||||
// ErrCodeCNAMEAlreadyExists for service response error code
|
||||
// "CNAMEAlreadyExists".
|
||||
ErrCodeCNAMEAlreadyExists = "CNAMEAlreadyExists"
|
||||
|
||||
// ErrCodeDistributionAlreadyExists for service response error code
|
||||
// "DistributionAlreadyExists".
|
||||
//
|
||||
// The caller reference you attempted to create the distribution with is associated
|
||||
// with another distribution.
|
||||
ErrCodeDistributionAlreadyExists = "DistributionAlreadyExists"
|
||||
|
||||
// ErrCodeDistributionNotDisabled for service response error code
|
||||
// "DistributionNotDisabled".
|
||||
ErrCodeDistributionNotDisabled = "DistributionNotDisabled"
|
||||
|
||||
// ErrCodeIllegalUpdate for service response error code
|
||||
// "IllegalUpdate".
|
||||
//
|
||||
// Origin and CallerReference cannot be updated.
|
||||
ErrCodeIllegalUpdate = "IllegalUpdate"
|
||||
|
||||
// ErrCodeInconsistentQuantities for service response error code
|
||||
// "InconsistentQuantities".
|
||||
//
|
||||
// The value of Quantity and the size of Items do not match.
|
||||
ErrCodeInconsistentQuantities = "InconsistentQuantities"
|
||||
|
||||
// ErrCodeInvalidArgument for service response error code
|
||||
// "InvalidArgument".
|
||||
//
|
||||
// The argument is invalid.
|
||||
ErrCodeInvalidArgument = "InvalidArgument"
|
||||
|
||||
// ErrCodeInvalidDefaultRootObject for service response error code
|
||||
// "InvalidDefaultRootObject".
|
||||
//
|
||||
// The default root object file name is too big or contains an invalid character.
|
||||
ErrCodeInvalidDefaultRootObject = "InvalidDefaultRootObject"
|
||||
|
||||
// ErrCodeInvalidErrorCode for service response error code
|
||||
// "InvalidErrorCode".
|
||||
ErrCodeInvalidErrorCode = "InvalidErrorCode"
|
||||
|
||||
// ErrCodeInvalidForwardCookies for service response error code
|
||||
// "InvalidForwardCookies".
|
||||
//
|
||||
// Your request contains forward cookies option which doesn't match with the
|
||||
// expectation for the whitelisted list of cookie names. Either list of cookie
|
||||
// names has been specified when not allowed or list of cookie names is missing
|
||||
// when expected.
|
||||
ErrCodeInvalidForwardCookies = "InvalidForwardCookies"
|
||||
|
||||
// ErrCodeInvalidGeoRestrictionParameter for service response error code
|
||||
// "InvalidGeoRestrictionParameter".
|
||||
ErrCodeInvalidGeoRestrictionParameter = "InvalidGeoRestrictionParameter"
|
||||
|
||||
// ErrCodeInvalidHeadersForS3Origin for service response error code
|
||||
// "InvalidHeadersForS3Origin".
|
||||
ErrCodeInvalidHeadersForS3Origin = "InvalidHeadersForS3Origin"
|
||||
|
||||
// ErrCodeInvalidIfMatchVersion for service response error code
|
||||
// "InvalidIfMatchVersion".
|
||||
//
|
||||
// The If-Match version is missing or not valid for the distribution.
|
||||
ErrCodeInvalidIfMatchVersion = "InvalidIfMatchVersion"
|
||||
|
||||
// ErrCodeInvalidLambdaFunctionAssociation for service response error code
|
||||
// "InvalidLambdaFunctionAssociation".
|
||||
//
|
||||
// The specified Lambda function association is invalid.
|
||||
ErrCodeInvalidLambdaFunctionAssociation = "InvalidLambdaFunctionAssociation"
|
||||
|
||||
// ErrCodeInvalidLocationCode for service response error code
|
||||
// "InvalidLocationCode".
|
||||
ErrCodeInvalidLocationCode = "InvalidLocationCode"
|
||||
|
||||
// ErrCodeInvalidMinimumProtocolVersion for service response error code
|
||||
// "InvalidMinimumProtocolVersion".
|
||||
ErrCodeInvalidMinimumProtocolVersion = "InvalidMinimumProtocolVersion"
|
||||
|
||||
// ErrCodeInvalidOrigin for service response error code
|
||||
// "InvalidOrigin".
|
||||
//
|
||||
// The Amazon S3 origin server specified does not refer to a valid Amazon S3
|
||||
// bucket.
|
||||
ErrCodeInvalidOrigin = "InvalidOrigin"
|
||||
|
||||
// ErrCodeInvalidOriginAccessIdentity for service response error code
|
||||
// "InvalidOriginAccessIdentity".
|
||||
//
|
||||
// The origin access identity is not valid or doesn't exist.
|
||||
ErrCodeInvalidOriginAccessIdentity = "InvalidOriginAccessIdentity"
|
||||
|
||||
// ErrCodeInvalidOriginKeepaliveTimeout for service response error code
|
||||
// "InvalidOriginKeepaliveTimeout".
|
||||
ErrCodeInvalidOriginKeepaliveTimeout = "InvalidOriginKeepaliveTimeout"
|
||||
|
||||
// ErrCodeInvalidOriginReadTimeout for service response error code
|
||||
// "InvalidOriginReadTimeout".
|
||||
ErrCodeInvalidOriginReadTimeout = "InvalidOriginReadTimeout"
|
||||
|
||||
// ErrCodeInvalidProtocolSettings for service response error code
|
||||
// "InvalidProtocolSettings".
|
||||
//
|
||||
// You cannot specify SSLv3 as the minimum protocol version if you only want
|
||||
// to support only clients that support Server Name Indication (SNI).
|
||||
ErrCodeInvalidProtocolSettings = "InvalidProtocolSettings"
|
||||
|
||||
// ErrCodeInvalidQueryStringParameters for service response error code
|
||||
// "InvalidQueryStringParameters".
|
||||
ErrCodeInvalidQueryStringParameters = "InvalidQueryStringParameters"
|
||||
|
||||
// ErrCodeInvalidRelativePath for service response error code
|
||||
// "InvalidRelativePath".
|
||||
//
|
||||
// The relative path is too big, is not URL-encoded, or does not begin with
|
||||
// a slash (/).
|
||||
ErrCodeInvalidRelativePath = "InvalidRelativePath"
|
||||
|
||||
// ErrCodeInvalidRequiredProtocol for service response error code
|
||||
// "InvalidRequiredProtocol".
|
||||
//
|
||||
// This operation requires the HTTPS protocol. Ensure that you specify the HTTPS
|
||||
// protocol in your request, or omit the RequiredProtocols element from your
|
||||
// distribution configuration.
|
||||
ErrCodeInvalidRequiredProtocol = "InvalidRequiredProtocol"
|
||||
|
||||
// ErrCodeInvalidResponseCode for service response error code
|
||||
// "InvalidResponseCode".
|
||||
ErrCodeInvalidResponseCode = "InvalidResponseCode"
|
||||
|
||||
// ErrCodeInvalidTTLOrder for service response error code
|
||||
// "InvalidTTLOrder".
|
||||
ErrCodeInvalidTTLOrder = "InvalidTTLOrder"
|
||||
|
||||
// ErrCodeInvalidTagging for service response error code
|
||||
// "InvalidTagging".
|
||||
ErrCodeInvalidTagging = "InvalidTagging"
|
||||
|
||||
// ErrCodeInvalidViewerCertificate for service response error code
|
||||
// "InvalidViewerCertificate".
|
||||
ErrCodeInvalidViewerCertificate = "InvalidViewerCertificate"
|
||||
|
||||
// ErrCodeInvalidWebACLId for service response error code
|
||||
// "InvalidWebACLId".
|
||||
ErrCodeInvalidWebACLId = "InvalidWebACLId"
|
||||
|
||||
// ErrCodeMissingBody for service response error code
|
||||
// "MissingBody".
|
||||
//
|
||||
// This operation requires a body. Ensure that the body is present and the Content-Type
|
||||
// header is set.
|
||||
ErrCodeMissingBody = "MissingBody"
|
||||
|
||||
// ErrCodeNoSuchCloudFrontOriginAccessIdentity for service response error code
|
||||
// "NoSuchCloudFrontOriginAccessIdentity".
|
||||
//
|
||||
// The specified origin access identity does not exist.
|
||||
ErrCodeNoSuchCloudFrontOriginAccessIdentity = "NoSuchCloudFrontOriginAccessIdentity"
|
||||
|
||||
// ErrCodeNoSuchDistribution for service response error code
|
||||
// "NoSuchDistribution".
|
||||
//
|
||||
// The specified distribution does not exist.
|
||||
ErrCodeNoSuchDistribution = "NoSuchDistribution"
|
||||
|
||||
// ErrCodeNoSuchInvalidation for service response error code
|
||||
// "NoSuchInvalidation".
|
||||
//
|
||||
// The specified invalidation does not exist.
|
||||
ErrCodeNoSuchInvalidation = "NoSuchInvalidation"
|
||||
|
||||
// ErrCodeNoSuchOrigin for service response error code
|
||||
// "NoSuchOrigin".
|
||||
//
|
||||
// No origin exists with the specified Origin Id.
|
||||
ErrCodeNoSuchOrigin = "NoSuchOrigin"
|
||||
|
||||
// ErrCodeNoSuchResource for service response error code
|
||||
// "NoSuchResource".
|
||||
ErrCodeNoSuchResource = "NoSuchResource"
|
||||
|
||||
// ErrCodeNoSuchStreamingDistribution for service response error code
|
||||
// "NoSuchStreamingDistribution".
|
||||
//
|
||||
// The specified streaming distribution does not exist.
|
||||
ErrCodeNoSuchStreamingDistribution = "NoSuchStreamingDistribution"
|
||||
|
||||
// ErrCodeOriginAccessIdentityAlreadyExists for service response error code
|
||||
// "OriginAccessIdentityAlreadyExists".
|
||||
//
|
||||
// If the CallerReference is a value you already sent in a previous request
|
||||
// to create an identity but the content of the CloudFrontOriginAccessIdentityConfig
|
||||
// is different from the original request, CloudFront returns a CloudFrontOriginAccessIdentityAlreadyExists
|
||||
// error.
|
||||
ErrCodeOriginAccessIdentityAlreadyExists = "OriginAccessIdentityAlreadyExists"
|
||||
|
||||
// ErrCodeOriginAccessIdentityInUse for service response error code
|
||||
// "OriginAccessIdentityInUse".
|
||||
ErrCodeOriginAccessIdentityInUse = "OriginAccessIdentityInUse"
|
||||
|
||||
// ErrCodePreconditionFailed for service response error code
|
||||
// "PreconditionFailed".
|
||||
//
|
||||
// The precondition given in one or more of the request-header fields evaluated
|
||||
// to false.
|
||||
ErrCodePreconditionFailed = "PreconditionFailed"
|
||||
|
||||
// ErrCodeStreamingDistributionAlreadyExists for service response error code
|
||||
// "StreamingDistributionAlreadyExists".
|
||||
ErrCodeStreamingDistributionAlreadyExists = "StreamingDistributionAlreadyExists"
|
||||
|
||||
// ErrCodeStreamingDistributionNotDisabled for service response error code
|
||||
// "StreamingDistributionNotDisabled".
|
||||
ErrCodeStreamingDistributionNotDisabled = "StreamingDistributionNotDisabled"
|
||||
|
||||
// ErrCodeTooManyCacheBehaviors for service response error code
|
||||
// "TooManyCacheBehaviors".
|
||||
//
|
||||
// You cannot create more cache behaviors for the distribution.
|
||||
ErrCodeTooManyCacheBehaviors = "TooManyCacheBehaviors"
|
||||
|
||||
// ErrCodeTooManyCertificates for service response error code
|
||||
// "TooManyCertificates".
|
||||
//
|
||||
// You cannot create anymore custom SSL/TLS certificates.
|
||||
ErrCodeTooManyCertificates = "TooManyCertificates"
|
||||
|
||||
// ErrCodeTooManyCloudFrontOriginAccessIdentities for service response error code
|
||||
// "TooManyCloudFrontOriginAccessIdentities".
|
||||
//
|
||||
// Processing your request would cause you to exceed the maximum number of origin
|
||||
// access identities allowed.
|
||||
ErrCodeTooManyCloudFrontOriginAccessIdentities = "TooManyCloudFrontOriginAccessIdentities"
|
||||
|
||||
// ErrCodeTooManyCookieNamesInWhiteList for service response error code
|
||||
// "TooManyCookieNamesInWhiteList".
|
||||
//
|
||||
// Your request contains more cookie names in the whitelist than are allowed
|
||||
// per cache behavior.
|
||||
ErrCodeTooManyCookieNamesInWhiteList = "TooManyCookieNamesInWhiteList"
|
||||
|
||||
// ErrCodeTooManyDistributionCNAMEs for service response error code
|
||||
// "TooManyDistributionCNAMEs".
|
||||
//
|
||||
// Your request contains more CNAMEs than are allowed per distribution.
|
||||
ErrCodeTooManyDistributionCNAMEs = "TooManyDistributionCNAMEs"
|
||||
|
||||
// ErrCodeTooManyDistributions for service response error code
|
||||
// "TooManyDistributions".
|
||||
//
|
||||
// Processing your request would cause you to exceed the maximum number of distributions
|
||||
// allowed.
|
||||
ErrCodeTooManyDistributions = "TooManyDistributions"
|
||||
|
||||
// ErrCodeTooManyDistributionsWithLambdaAssociations for service response error code
|
||||
// "TooManyDistributionsWithLambdaAssociations".
|
||||
//
|
||||
// Processing your request would cause the maximum number of distributions with
|
||||
// Lambda function associations per owner to be exceeded.
|
||||
ErrCodeTooManyDistributionsWithLambdaAssociations = "TooManyDistributionsWithLambdaAssociations"
|
||||
|
||||
// ErrCodeTooManyHeadersInForwardedValues for service response error code
|
||||
// "TooManyHeadersInForwardedValues".
|
||||
ErrCodeTooManyHeadersInForwardedValues = "TooManyHeadersInForwardedValues"
|
||||
|
||||
// ErrCodeTooManyInvalidationsInProgress for service response error code
|
||||
// "TooManyInvalidationsInProgress".
|
||||
//
|
||||
// You have exceeded the maximum number of allowable InProgress invalidation
|
||||
// batch requests, or invalidation objects.
|
||||
ErrCodeTooManyInvalidationsInProgress = "TooManyInvalidationsInProgress"
|
||||
|
||||
// ErrCodeTooManyLambdaFunctionAssociations for service response error code
|
||||
// "TooManyLambdaFunctionAssociations".
|
||||
//
|
||||
// Your request contains more Lambda function associations than are allowed
|
||||
// per distribution.
|
||||
ErrCodeTooManyLambdaFunctionAssociations = "TooManyLambdaFunctionAssociations"
|
||||
|
||||
// ErrCodeTooManyOriginCustomHeaders for service response error code
|
||||
// "TooManyOriginCustomHeaders".
|
||||
ErrCodeTooManyOriginCustomHeaders = "TooManyOriginCustomHeaders"
|
||||
|
||||
// ErrCodeTooManyOrigins for service response error code
|
||||
// "TooManyOrigins".
|
||||
//
|
||||
// You cannot create more origins for the distribution.
|
||||
ErrCodeTooManyOrigins = "TooManyOrigins"
|
||||
|
||||
// ErrCodeTooManyQueryStringParameters for service response error code
|
||||
// "TooManyQueryStringParameters".
|
||||
ErrCodeTooManyQueryStringParameters = "TooManyQueryStringParameters"
|
||||
|
||||
// ErrCodeTooManyStreamingDistributionCNAMEs for service response error code
|
||||
// "TooManyStreamingDistributionCNAMEs".
|
||||
ErrCodeTooManyStreamingDistributionCNAMEs = "TooManyStreamingDistributionCNAMEs"
|
||||
|
||||
// ErrCodeTooManyStreamingDistributions for service response error code
|
||||
// "TooManyStreamingDistributions".
|
||||
//
|
||||
// Processing your request would cause you to exceed the maximum number of streaming
|
||||
// distributions allowed.
|
||||
ErrCodeTooManyStreamingDistributions = "TooManyStreamingDistributions"
|
||||
|
||||
// ErrCodeTooManyTrustedSigners for service response error code
|
||||
// "TooManyTrustedSigners".
|
||||
//
|
||||
// Your request contains more trusted signers than are allowed per distribution.
|
||||
ErrCodeTooManyTrustedSigners = "TooManyTrustedSigners"
|
||||
|
||||
// ErrCodeTrustedSignerDoesNotExist for service response error code
|
||||
// "TrustedSignerDoesNotExist".
|
||||
//
|
||||
// One or more of your trusted signers do not exist.
|
||||
ErrCodeTrustedSignerDoesNotExist = "TrustedSignerDoesNotExist"
|
||||
)
|
1442
vendor/github.com/aws/aws-sdk-go/service/cloudfront/examples_test.go
generated
vendored
Normal file
1442
vendor/github.com/aws/aws-sdk-go/service/cloudfront/examples_test.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
93
vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go
generated
vendored
Normal file
93
vendor/github.com/aws/aws-sdk-go/service/cloudfront/service.go
generated
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudfront
|
||||
|
||||
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/restxml"
|
||||
)
|
||||
|
||||
// CloudFront provides the API operation methods for making requests to
|
||||
// Amazon CloudFront. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// CloudFront methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CloudFront 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 = "cloudfront" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the CloudFront 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 CloudFront client from just a session.
|
||||
// svc := cloudfront.New(mySession)
|
||||
//
|
||||
// // Create a CloudFront client with additional configuration
|
||||
// svc := cloudfront.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudFront {
|
||||
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) *CloudFront {
|
||||
svc := &CloudFront{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2017-03-25",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a CloudFront operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CloudFront) 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
|
||||
}
|
226
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/policy.go
generated
vendored
Normal file
226
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/policy.go
generated
vendored
Normal file
|
@ -0,0 +1,226 @@
|
|||
package sign
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto"
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/sha1"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode"
|
||||
)
|
||||
|
||||
// An AWSEpochTime wraps a time value providing JSON serialization needed for
|
||||
// AWS Policy epoch time fields.
|
||||
type AWSEpochTime struct {
|
||||
time.Time
|
||||
}
|
||||
|
||||
// NewAWSEpochTime returns a new AWSEpochTime pointer wrapping the Go time provided.
|
||||
func NewAWSEpochTime(t time.Time) *AWSEpochTime {
|
||||
return &AWSEpochTime{t}
|
||||
}
|
||||
|
||||
// MarshalJSON serializes the epoch time as AWS Profile epoch time.
|
||||
func (t AWSEpochTime) MarshalJSON() ([]byte, error) {
|
||||
return []byte(fmt.Sprintf(`{"AWS:EpochTime":%d}`, t.UTC().Unix())), nil
|
||||
}
|
||||
|
||||
// An IPAddress wraps an IPAddress source IP providing JSON serialization information
|
||||
type IPAddress struct {
|
||||
SourceIP string `json:"AWS:SourceIp"`
|
||||
}
|
||||
|
||||
// A Condition defines the restrictions for how a signed URL can be used.
|
||||
type Condition struct {
|
||||
// Optional IP address mask the signed URL must be requested from.
|
||||
IPAddress *IPAddress `json:"IpAddress,omitempty"`
|
||||
|
||||
// Optional date that the signed URL cannot be used until. It is invalid
|
||||
// to make requests with the signed URL prior to this date.
|
||||
DateGreaterThan *AWSEpochTime `json:",omitempty"`
|
||||
|
||||
// Required date that the signed URL will expire. A DateLessThan is required
|
||||
// sign cloud front URLs
|
||||
DateLessThan *AWSEpochTime `json:",omitempty"`
|
||||
}
|
||||
|
||||
// A Statement is a collection of conditions for resources
|
||||
type Statement struct {
|
||||
// The Web or RTMP resource the URL will be signed for
|
||||
Resource string
|
||||
|
||||
// The set of conditions for this resource
|
||||
Condition Condition
|
||||
}
|
||||
|
||||
// A Policy defines the resources that a signed will be signed for.
|
||||
//
|
||||
// See the following page for more information on how policies are constructed.
|
||||
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html#private-content-custom-policy-statement
|
||||
type Policy struct {
|
||||
// List of resource and condition statements.
|
||||
// Signed URLs should only provide a single statement.
|
||||
Statements []Statement `json:"Statement"`
|
||||
}
|
||||
|
||||
// Override for testing to mock out usage of crypto/rand.Reader
|
||||
var randReader = rand.Reader
|
||||
|
||||
// Sign will sign a policy using an RSA private key. It will return a base 64
|
||||
// encoded signature and policy if no error is encountered.
|
||||
//
|
||||
// The signature and policy should be added to the signed URL following the
|
||||
// guidelines in:
|
||||
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html
|
||||
func (p *Policy) Sign(privKey *rsa.PrivateKey) (b64Signature, b64Policy []byte, err error) {
|
||||
if err = p.Validate(); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
// Build and escape the policy
|
||||
b64Policy, jsonPolicy, err := encodePolicy(p)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
awsEscapeEncoded(b64Policy)
|
||||
|
||||
// Build and escape the signature
|
||||
b64Signature, err = signEncodedPolicy(randReader, jsonPolicy, privKey)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
awsEscapeEncoded(b64Signature)
|
||||
|
||||
return b64Signature, b64Policy, nil
|
||||
}
|
||||
|
||||
// Validate verifies that the policy is valid and usable, and returns an
|
||||
// error if there is a problem.
|
||||
func (p *Policy) Validate() error {
|
||||
if len(p.Statements) == 0 {
|
||||
return fmt.Errorf("at least one policy statement is required")
|
||||
}
|
||||
for i, s := range p.Statements {
|
||||
if s.Resource == "" {
|
||||
return fmt.Errorf("statement at index %d does not have a resource", i)
|
||||
}
|
||||
if !isASCII(s.Resource) {
|
||||
return fmt.Errorf("unable to sign resource, [%s]. "+
|
||||
"Resources must only contain ascii characters. "+
|
||||
"Hostnames with unicode should be encoded as Punycode, (e.g. golang.org/x/net/idna), "+
|
||||
"and URL unicode path/query characters should be escaped.", s.Resource)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// CreateResource constructs, validates, and returns a resource URL string. An
|
||||
// error will be returned if unable to create the resource string.
|
||||
func CreateResource(scheme, u string) (string, error) {
|
||||
scheme = strings.ToLower(scheme)
|
||||
|
||||
if scheme == "http" || scheme == "https" || scheme == "http*" || scheme == "*" {
|
||||
return u, nil
|
||||
}
|
||||
|
||||
if scheme == "rtmp" {
|
||||
parsed, err := url.Parse(u)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("unable to parse rtmp URL, err: %s", err)
|
||||
}
|
||||
|
||||
rtmpURL := strings.TrimLeft(parsed.Path, "/")
|
||||
if parsed.RawQuery != "" {
|
||||
rtmpURL = fmt.Sprintf("%s?%s", rtmpURL, parsed.RawQuery)
|
||||
}
|
||||
|
||||
return rtmpURL, nil
|
||||
}
|
||||
|
||||
return "", fmt.Errorf("invalid URL scheme must be http, https, or rtmp. Provided: %s", scheme)
|
||||
}
|
||||
|
||||
// NewCannedPolicy returns a new Canned Policy constructed using the resource
|
||||
// and expires time. This can be used to generate the basic model for a Policy
|
||||
// that can be then augmented with additional conditions.
|
||||
//
|
||||
// See the following page for more information on how policies are constructed.
|
||||
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html#private-content-custom-policy-statement
|
||||
func NewCannedPolicy(resource string, expires time.Time) *Policy {
|
||||
return &Policy{
|
||||
Statements: []Statement{
|
||||
{
|
||||
Resource: resource,
|
||||
Condition: Condition{
|
||||
DateLessThan: NewAWSEpochTime(expires),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// encodePolicy encodes the Policy as JSON and also base 64 encodes it.
|
||||
func encodePolicy(p *Policy) (b64Policy, jsonPolicy []byte, err error) {
|
||||
jsonPolicy, err = json.Marshal(p)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("failed to encode policy, %s", err.Error())
|
||||
}
|
||||
|
||||
// Remove leading and trailing white space, JSON encoding will note include
|
||||
// whitespace within the encoding.
|
||||
jsonPolicy = bytes.TrimSpace(jsonPolicy)
|
||||
|
||||
b64Policy = make([]byte, base64.StdEncoding.EncodedLen(len(jsonPolicy)))
|
||||
base64.StdEncoding.Encode(b64Policy, jsonPolicy)
|
||||
return b64Policy, jsonPolicy, nil
|
||||
}
|
||||
|
||||
// signEncodedPolicy will sign and base 64 encode the JSON encoded policy.
|
||||
func signEncodedPolicy(randReader io.Reader, jsonPolicy []byte, privKey *rsa.PrivateKey) ([]byte, error) {
|
||||
hash := sha1.New()
|
||||
if _, err := bytes.NewReader(jsonPolicy).WriteTo(hash); err != nil {
|
||||
return nil, fmt.Errorf("failed to calculate signing hash, %s", err.Error())
|
||||
}
|
||||
|
||||
sig, err := rsa.SignPKCS1v15(randReader, privKey, crypto.SHA1, hash.Sum(nil))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to sign policy, %s", err.Error())
|
||||
}
|
||||
|
||||
b64Sig := make([]byte, base64.StdEncoding.EncodedLen(len(sig)))
|
||||
base64.StdEncoding.Encode(b64Sig, sig)
|
||||
return b64Sig, nil
|
||||
}
|
||||
|
||||
// special characters to be replaced with awsEscapeEncoded
|
||||
var invalidEncodedChar = map[byte]byte{
|
||||
'+': '-',
|
||||
'=': '_',
|
||||
'/': '~',
|
||||
}
|
||||
|
||||
// awsEscapeEncoded will replace base64 encoding's special characters to be URL safe.
|
||||
func awsEscapeEncoded(b []byte) {
|
||||
for i, v := range b {
|
||||
if r, ok := invalidEncodedChar[v]; ok {
|
||||
b[i] = r
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func isASCII(u string) bool {
|
||||
for _, c := range u {
|
||||
if c > unicode.MaxASCII {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
139
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/policy_test.go
generated
vendored
Normal file
139
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/policy_test.go
generated
vendored
Normal file
|
@ -0,0 +1,139 @@
|
|||
package sign
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto"
|
||||
"crypto/rsa"
|
||||
"crypto/sha1"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestEpochTimeMarshal(t *testing.T) {
|
||||
v := AWSEpochTime{time.Now()}
|
||||
b, err := v.MarshalJSON()
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error, %#v", err)
|
||||
}
|
||||
|
||||
expected := fmt.Sprintf(`{"AWS:EpochTime":%d}`, v.UTC().Unix())
|
||||
if string(b) != expected {
|
||||
t.Errorf("Expected marshaled time to match, expect: %s, actual: %s",
|
||||
expected, string(b))
|
||||
}
|
||||
}
|
||||
|
||||
var testCreateResource = []struct {
|
||||
scheme, u string
|
||||
expect string
|
||||
errPrefix string
|
||||
}{
|
||||
{
|
||||
"https", "https://example.com/a?b=1",
|
||||
"https://example.com/a?b=1", "",
|
||||
},
|
||||
{
|
||||
"http", "http*://example.com/a?b=1",
|
||||
"http*://example.com/a?b=1", "",
|
||||
},
|
||||
{
|
||||
"rtmp", "https://example.com/a?b=1",
|
||||
"a?b=1", "",
|
||||
},
|
||||
{
|
||||
"ftp", "ftp://example.com/a?b=1",
|
||||
"", "invalid URL scheme",
|
||||
},
|
||||
}
|
||||
|
||||
func TestCreateResource(t *testing.T) {
|
||||
for i, v := range testCreateResource {
|
||||
r, err := CreateResource(v.scheme, v.u)
|
||||
if err != nil {
|
||||
if v.errPrefix == "" {
|
||||
t.Errorf("%d, Unexpected error %s", i, err.Error())
|
||||
continue
|
||||
}
|
||||
if !strings.HasPrefix(err.Error(), v.errPrefix) {
|
||||
t.Errorf("%d, Expected to find prefix\nexpect: %s\nactual: %s", i, v.errPrefix, err.Error())
|
||||
continue
|
||||
}
|
||||
} else if v.errPrefix != "" {
|
||||
t.Errorf("%d, Expected error %s", i, v.errPrefix)
|
||||
continue
|
||||
}
|
||||
|
||||
if v.expect != r {
|
||||
t.Errorf("%d, Expected to find prefix\nexpect: %s\nactual: %s", i, v.expect, r)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var testTime = time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
|
||||
|
||||
const expectedJSONPolicy = `{"Statement":[{"Resource":"https://example.com/a","Condition":{"DateLessThan":{"AWS:EpochTime":1257894000}}}]}`
|
||||
const expectedB64Policy = `eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS9hIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxMjU3ODk0MDAwfX19XX0=`
|
||||
|
||||
func TestEncodePolicy(t *testing.T) {
|
||||
p := NewCannedPolicy("https://example.com/a", testTime)
|
||||
|
||||
b64Policy, jsonPolicy, err := encodePolicy(p)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error, %#v", err)
|
||||
}
|
||||
|
||||
if string(jsonPolicy) != expectedJSONPolicy {
|
||||
t.Errorf("Expected json encoding to match, \nexpect: %s\nactual: %s\n", expectedJSONPolicy, jsonPolicy)
|
||||
}
|
||||
|
||||
if string(b64Policy) != expectedB64Policy {
|
||||
t.Errorf("Expected b64 encoding to match, \nexpect: %s\nactual: %s\n", expectedB64Policy, b64Policy)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSignEncodedPolicy(t *testing.T) {
|
||||
p := NewCannedPolicy("https://example.com/a", testTime)
|
||||
_, jsonPolicy, err := encodePolicy(p)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected policy encode error, %#v", err)
|
||||
}
|
||||
|
||||
r := newRandomReader(rand.New(rand.NewSource(1)))
|
||||
|
||||
privKey, err := rsa.GenerateKey(r, 1024)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected priv key error, %#v", err)
|
||||
}
|
||||
|
||||
b64Signature, err := signEncodedPolicy(r, jsonPolicy, privKey)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected policy sign error, %#v", err)
|
||||
}
|
||||
|
||||
hash := sha1.New()
|
||||
if _, err = bytes.NewReader(jsonPolicy).WriteTo(hash); err != nil {
|
||||
t.Fatalf("Unexpected hash error, %#v", err)
|
||||
}
|
||||
|
||||
decodedSig, err := base64.StdEncoding.DecodeString(string(b64Signature))
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected base64 decode signature, %#v", err)
|
||||
}
|
||||
|
||||
if err := rsa.VerifyPKCS1v15(&privKey.PublicKey, crypto.SHA1, hash.Sum(nil), decodedSig); err != nil {
|
||||
t.Fatalf("Unable to verify signature, %#v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAWSEscape(t *testing.T) {
|
||||
expect := "a-b_c~"
|
||||
actual := []byte("a+b=c/")
|
||||
awsEscapeEncoded(actual)
|
||||
if string(actual) != expect {
|
||||
t.Errorf("expect: %s, actual: %s", expect, string(actual))
|
||||
}
|
||||
}
|
68
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/privkey.go
generated
vendored
Normal file
68
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/privkey.go
generated
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
package sign
|
||||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
)
|
||||
|
||||
// LoadPEMPrivKeyFile reads a PEM encoded RSA private key from the file name.
|
||||
// A new RSA private key will be returned if no error.
|
||||
func LoadPEMPrivKeyFile(name string) (*rsa.PrivateKey, error) {
|
||||
file, err := os.Open(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
return LoadPEMPrivKey(file)
|
||||
}
|
||||
|
||||
// LoadPEMPrivKey reads a PEM encoded RSA private key from the io.Reader.
|
||||
// A new RSA private key will be returned if no error.
|
||||
func LoadPEMPrivKey(reader io.Reader) (*rsa.PrivateKey, error) {
|
||||
block, err := loadPem(reader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return x509.ParsePKCS1PrivateKey(block.Bytes)
|
||||
}
|
||||
|
||||
// LoadEncryptedPEMPrivKey decrypts the PEM encoded private key using the
|
||||
// password provided returning a RSA private key. If the PEM data is invalid,
|
||||
// or unable to decrypt an error will be returned.
|
||||
func LoadEncryptedPEMPrivKey(reader io.Reader, password []byte) (*rsa.PrivateKey, error) {
|
||||
block, err := loadPem(reader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
decryptedBlock, err := x509.DecryptPEMBlock(block, password)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return x509.ParsePKCS1PrivateKey(decryptedBlock)
|
||||
}
|
||||
|
||||
func loadPem(reader io.Reader) (*pem.Block, error) {
|
||||
b, err := ioutil.ReadAll(reader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
block, _ := pem.Decode(b)
|
||||
if block == nil {
|
||||
// pem.Decode will set block to nil if there is no PEM data in the input
|
||||
// the second parameter will contain the provided bytes that failed
|
||||
// to be decoded.
|
||||
return nil, fmt.Errorf("no valid PEM data provided")
|
||||
}
|
||||
|
||||
return block, nil
|
||||
}
|
90
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/privkey_test.go
generated
vendored
Normal file
90
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/privkey_test.go
generated
vendored
Normal file
|
@ -0,0 +1,90 @@
|
|||
package sign
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"encoding/pem"
|
||||
"io"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func generatePEM(randReader io.Reader, password []byte) (buf *bytes.Buffer, err error) {
|
||||
k, err := rsa.GenerateKey(randReader, 1024)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
derBytes := x509.MarshalPKCS1PrivateKey(k)
|
||||
|
||||
var block *pem.Block
|
||||
if password != nil {
|
||||
block, err = x509.EncryptPEMBlock(randReader, "RSA PRIVATE KEY", derBytes, password, x509.PEMCipherAES128)
|
||||
} else {
|
||||
block = &pem.Block{
|
||||
Type: "RSA PRIVATE KEY",
|
||||
Bytes: derBytes,
|
||||
}
|
||||
}
|
||||
|
||||
buf = &bytes.Buffer{}
|
||||
err = pem.Encode(buf, block)
|
||||
return buf, err
|
||||
}
|
||||
|
||||
func TestLoadPemPrivKey(t *testing.T) {
|
||||
reader, err := generatePEM(newRandomReader(rand.New(rand.NewSource(1))), nil)
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected pem generation err %s", err.Error())
|
||||
}
|
||||
|
||||
privKey, err := LoadPEMPrivKey(reader)
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected key load error, %s", err.Error())
|
||||
}
|
||||
if privKey == nil {
|
||||
t.Errorf("Expected valid privKey, but got nil")
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadPemPrivKeyInvalidPEM(t *testing.T) {
|
||||
reader := strings.NewReader("invalid PEM data")
|
||||
privKey, err := LoadPEMPrivKey(reader)
|
||||
|
||||
if err == nil {
|
||||
t.Errorf("Expected error invalid PEM data error")
|
||||
}
|
||||
if privKey != nil {
|
||||
t.Errorf("Expected nil privKey but got %#v", privKey)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadEncryptedPEMPrivKey(t *testing.T) {
|
||||
reader, err := generatePEM(newRandomReader(rand.New(rand.NewSource(1))), []byte("password"))
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected pem generation err %s", err.Error())
|
||||
}
|
||||
|
||||
privKey, err := LoadEncryptedPEMPrivKey(reader, []byte("password"))
|
||||
|
||||
if err != nil {
|
||||
t.Errorf("Unexpected key load error, %s", err.Error())
|
||||
}
|
||||
if privKey == nil {
|
||||
t.Errorf("Expected valid privKey, but got nil")
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadEncryptedPEMPrivKeyWrongPassword(t *testing.T) {
|
||||
reader, err := generatePEM(newRandomReader(rand.New(rand.NewSource(1))), []byte("password"))
|
||||
privKey, err := LoadEncryptedPEMPrivKey(reader, []byte("wrong password"))
|
||||
|
||||
if err == nil {
|
||||
t.Errorf("Expected error invalid PEM data error")
|
||||
}
|
||||
if privKey != nil {
|
||||
t.Errorf("Expected nil privKey but got %#v", privKey)
|
||||
}
|
||||
}
|
30
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/randomreader.go
generated
vendored
Normal file
30
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/randomreader.go
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
package sign
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"math/rand"
|
||||
)
|
||||
|
||||
// A randomReader wraps a math/rand.Rand within an reader so that it can used
|
||||
// as a predictable testing replacement for crypto/rand.Reader
|
||||
type randomReader struct {
|
||||
b *bytes.Buffer
|
||||
r *rand.Rand
|
||||
}
|
||||
|
||||
// newRandomReader returns a new instance of the random reader
|
||||
func newRandomReader(r *rand.Rand) *randomReader {
|
||||
return &randomReader{b: &bytes.Buffer{}, r: r}
|
||||
}
|
||||
|
||||
// Read will read random bytes from up to the length of b.
|
||||
func (m *randomReader) Read(b []byte) (int, error) {
|
||||
for i := 0; i < len(b); {
|
||||
binary.Write(m.b, binary.LittleEndian, m.r.Int63())
|
||||
n, _ := m.b.Read(b[i:])
|
||||
i += n
|
||||
}
|
||||
|
||||
return len(b), nil
|
||||
}
|
241
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/sign_cookie.go
generated
vendored
Normal file
241
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/sign_cookie.go
generated
vendored
Normal file
|
@ -0,0 +1,241 @@
|
|||
package sign
|
||||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
// CookiePolicyName name of the policy cookie
|
||||
CookiePolicyName = "CloudFront-Policy"
|
||||
// CookieSignatureName name of the signature cookie
|
||||
CookieSignatureName = "CloudFront-Signature"
|
||||
// CookieKeyIDName name of the signing Key ID cookie
|
||||
CookieKeyIDName = "CloudFront-Key-Pair-Id"
|
||||
)
|
||||
|
||||
// A CookieOptions optional additional options that can be applied to the signed
|
||||
// cookies.
|
||||
type CookieOptions struct {
|
||||
Path string
|
||||
Domain string
|
||||
Secure bool
|
||||
}
|
||||
|
||||
// apply will integration the options provided into the base cookie options
|
||||
// a new copy will be returned. The base CookieOption will not be modified.
|
||||
func (o CookieOptions) apply(opts ...func(*CookieOptions)) CookieOptions {
|
||||
if len(opts) == 0 {
|
||||
return o
|
||||
}
|
||||
|
||||
for _, opt := range opts {
|
||||
opt(&o)
|
||||
}
|
||||
|
||||
return o
|
||||
}
|
||||
|
||||
// A CookieSigner provides signing utilities to sign Cookies for Amazon CloudFront
|
||||
// resources. Using a private key and Credential Key Pair key ID the CookieSigner
|
||||
// only needs to be created once per Credential Key Pair key ID and private key.
|
||||
//
|
||||
// More information about signed Cookies and their structure can be found at:
|
||||
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-setting-signed-cookie-custom-policy.html
|
||||
//
|
||||
// To sign a Cookie, create a CookieSigner with your private key and credential
|
||||
// pair key ID. Once you have a CookieSigner instance you can call Sign or
|
||||
// SignWithPolicy to sign the URLs.
|
||||
//
|
||||
// The signer is safe to use concurrently, but the optional cookies options
|
||||
// are not safe to modify concurrently.
|
||||
type CookieSigner struct {
|
||||
keyID string
|
||||
privKey *rsa.PrivateKey
|
||||
|
||||
Opts CookieOptions
|
||||
}
|
||||
|
||||
// NewCookieSigner constructs and returns a new CookieSigner to be used to for
|
||||
// signing Amazon CloudFront URL resources with.
|
||||
func NewCookieSigner(keyID string, privKey *rsa.PrivateKey, opts ...func(*CookieOptions)) *CookieSigner {
|
||||
signer := &CookieSigner{
|
||||
keyID: keyID,
|
||||
privKey: privKey,
|
||||
Opts: CookieOptions{}.apply(opts...),
|
||||
}
|
||||
|
||||
return signer
|
||||
}
|
||||
|
||||
// Sign returns the cookies needed to allow user agents to make arbetrary
|
||||
// requests to cloudfront for the resource(s) defined by the policy.
|
||||
//
|
||||
// Sign will create a CloudFront policy with only a resource and condition of
|
||||
// DateLessThan equal to the expires time provided.
|
||||
//
|
||||
// The returned slice cookies should all be added to the Client's cookies or
|
||||
// server's response.
|
||||
//
|
||||
// Example:
|
||||
// s := sign.NewCookieSigner(keyID, privKey)
|
||||
//
|
||||
// // Get Signed cookies for a resource that will expire in 1 hour
|
||||
// cookies, err := s.Sign("*", time.Now().Add(1 * time.Hour))
|
||||
// if err != nil {
|
||||
// fmt.Println("failed to create signed cookies", err)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// // Or get Signed cookies for a resource that will expire in 1 hour
|
||||
// // and set path and domain of cookies
|
||||
// cookies, err := s.Sign("*", time.Now().Add(1 * time.Hour), func(o *sign.CookieOptions) {
|
||||
// o.Path = "/"
|
||||
// o.Domain = ".example.com"
|
||||
// })
|
||||
// if err != nil {
|
||||
// fmt.Println("failed to create signed cookies", err)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// // Server Response via http.ResponseWriter
|
||||
// for _, c := range cookies {
|
||||
// http.SetCookie(w, c)
|
||||
// }
|
||||
//
|
||||
// // Client request via the cookie jar
|
||||
// if client.CookieJar != nil {
|
||||
// for _, c := range cookies {
|
||||
// client.Cookie(w, c)
|
||||
// }
|
||||
// }
|
||||
func (s CookieSigner) Sign(u string, expires time.Time, opts ...func(*CookieOptions)) ([]*http.Cookie, error) {
|
||||
scheme, err := cookieURLScheme(u)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resource, err := CreateResource(scheme, u)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
p := NewCannedPolicy(resource, expires)
|
||||
return createCookies(p, s.keyID, s.privKey, s.Opts.apply(opts...))
|
||||
}
|
||||
|
||||
// Returns and validates the URL's scheme.
|
||||
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-setting-signed-cookie-custom-policy.html#private-content-custom-policy-statement-cookies
|
||||
func cookieURLScheme(u string) (string, error) {
|
||||
parts := strings.SplitN(u, "://", 2)
|
||||
if len(parts) != 2 {
|
||||
return "", fmt.Errorf("invalid cookie URL, missing scheme")
|
||||
}
|
||||
|
||||
scheme := strings.ToLower(parts[0])
|
||||
if scheme != "http" && scheme != "https" && scheme != "http*" {
|
||||
return "", fmt.Errorf("invalid cookie URL scheme. Expect http, https, or http*. Go, %s", scheme)
|
||||
}
|
||||
|
||||
return scheme, nil
|
||||
}
|
||||
|
||||
// SignWithPolicy returns the cookies needed to allow user agents to make
|
||||
// arbetrairy requets to cloudfront for the resource(s) defined by the policy.
|
||||
//
|
||||
// The returned slice cookies should all be added to the Client's cookies or
|
||||
// server's response.
|
||||
//
|
||||
// Example:
|
||||
// s := sign.NewCookieSigner(keyID, privKey)
|
||||
//
|
||||
// policy := &sign.Policy{
|
||||
// Statements: []sign.Statement{
|
||||
// {
|
||||
// // Read the provided documentation on how to set this
|
||||
// // correctly, you'll probably want to use wildcards.
|
||||
// Resource: rawCloudFrontURL,
|
||||
// Condition: sign.Condition{
|
||||
// // Optional IP source address range
|
||||
// IPAddress: &sign.IPAddress{SourceIP: "192.0.2.0/24"},
|
||||
// // Optional date URL is not valid until
|
||||
// DateGreaterThan: &sign.AWSEpochTime{time.Now().Add(30 * time.Minute)},
|
||||
// // Required date the URL will expire after
|
||||
// DateLessThan: &sign.AWSEpochTime{time.Now().Add(1 * time.Hour)},
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
//
|
||||
// // Get Signed cookies for a resource that will expire in 1 hour
|
||||
// cookies, err := s.SignWithPolicy(policy)
|
||||
// if err != nil {
|
||||
// fmt.Println("failed to create signed cookies", err)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// // Or get Signed cookies for a resource that will expire in 1 hour
|
||||
// // and set path and domain of cookies
|
||||
// cookies, err := s.Sign(policy, func(o *sign.CookieOptions) {
|
||||
// o.Path = "/"
|
||||
// o.Domain = ".example.com"
|
||||
// })
|
||||
// if err != nil {
|
||||
// fmt.Println("failed to create signed cookies", err)
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// // Server Response via http.ResponseWriter
|
||||
// for _, c := range cookies {
|
||||
// http.SetCookie(w, c)
|
||||
// }
|
||||
//
|
||||
// // Client request via the cookie jar
|
||||
// if client.CookieJar != nil {
|
||||
// for _, c := range cookies {
|
||||
// client.Cookie(w, c)
|
||||
// }
|
||||
// }
|
||||
func (s CookieSigner) SignWithPolicy(p *Policy, opts ...func(*CookieOptions)) ([]*http.Cookie, error) {
|
||||
return createCookies(p, s.keyID, s.privKey, s.Opts.apply(opts...))
|
||||
}
|
||||
|
||||
// Prepares the cookies to be attached to the header. An (optional) options
|
||||
// struct is provided in case people don't want to manually edit their cookies.
|
||||
func createCookies(p *Policy, keyID string, privKey *rsa.PrivateKey, opt CookieOptions) ([]*http.Cookie, error) {
|
||||
b64Sig, b64Policy, err := p.Sign(privKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Creates proper cookies
|
||||
cPolicy := &http.Cookie{
|
||||
Name: CookiePolicyName,
|
||||
Value: string(b64Policy),
|
||||
HttpOnly: true,
|
||||
}
|
||||
cSignature := &http.Cookie{
|
||||
Name: CookieSignatureName,
|
||||
Value: string(b64Sig),
|
||||
HttpOnly: true,
|
||||
}
|
||||
cKey := &http.Cookie{
|
||||
Name: CookieKeyIDName,
|
||||
Value: keyID,
|
||||
HttpOnly: true,
|
||||
}
|
||||
|
||||
cookies := []*http.Cookie{cPolicy, cSignature, cKey}
|
||||
|
||||
// Applie the cookie options
|
||||
for _, c := range cookies {
|
||||
c.Path = opt.Path
|
||||
c.Domain = opt.Domain
|
||||
c.Secure = opt.Secure
|
||||
}
|
||||
|
||||
return cookies, nil
|
||||
}
|
163
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/sign_cookie_example_test.go
generated
vendored
Normal file
163
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/sign_cookie_example_test.go
generated
vendored
Normal file
|
@ -0,0 +1,163 @@
|
|||
package sign
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
func examplePEMReader() io.Reader {
|
||||
reader, err := generatePEM(randReader, nil)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("Unexpected pem generation err %v", err))
|
||||
}
|
||||
|
||||
return reader
|
||||
}
|
||||
|
||||
func ExampleCookieSigner_Sign() {
|
||||
origRandReader := randReader
|
||||
randReader = newRandomReader(rand.New(rand.NewSource(1)))
|
||||
defer func() {
|
||||
randReader = origRandReader
|
||||
}()
|
||||
|
||||
// Load your private key so it can be used by the CookieSigner
|
||||
// To load private key from file use `sign.LoadPEMPrivKeyFile`.
|
||||
privKey, err := LoadPEMPrivKey(examplePEMReader())
|
||||
if err != nil {
|
||||
fmt.Println("failed to load private key", err)
|
||||
return
|
||||
}
|
||||
|
||||
cookieSigner := NewCookieSigner("keyID", privKey)
|
||||
|
||||
// Use the signer to sign the URL
|
||||
cookies, err := cookieSigner.Sign("http://example.com/somepath/*", testSignTime.Add(30*time.Minute))
|
||||
if err != nil {
|
||||
fmt.Println("failed to sign cookies with policy,", err)
|
||||
return
|
||||
}
|
||||
|
||||
printExampleCookies(cookies)
|
||||
// Output:
|
||||
// Cookies:
|
||||
// CloudFront-Policy: eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL2V4YW1wbGUuY29tL3NvbWVwYXRoLyoiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTU4MDB9fX1dfQ__, , , false
|
||||
// CloudFront-Signature: o~jvj~CFkvGZB~yYED3elicKZag-CRijy8yD2E5yF1s7VNV7kNeQWC7MDtEcBQ8-eh7Xgjh0wMPQdAVdh09gBObd-hXDpKUyh8YKxogj~oloV~8KOvqE5xzWiKcqjdfJjmT5iEqIui~H1ExYjyKjgir79npmlyYkaJS5s62EQa8_, , , false
|
||||
// CloudFront-Key-Pair-Id: keyID, , , false
|
||||
}
|
||||
|
||||
func ExampleCookieSigner_SignWithPolicy() {
|
||||
origRandReader := randReader
|
||||
randReader = newRandomReader(rand.New(rand.NewSource(1)))
|
||||
defer func() {
|
||||
randReader = origRandReader
|
||||
}()
|
||||
|
||||
// Sign cookie to be valid for 30 minutes from now, expires one hour
|
||||
// from now, and restricted to the 192.0.2.0/24 IP address range.
|
||||
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-setting-signed-cookie-custom-policy.html
|
||||
p := &Policy{
|
||||
// Only a single policy statement can be used with CloudFront
|
||||
// cookie signatures.
|
||||
Statements: []Statement{{
|
||||
// Read the provided documentation on how to set this correctly,
|
||||
// you'll probably want to use wildcards
|
||||
Resource: "http://sub.cloudfront.com",
|
||||
Condition: Condition{
|
||||
// Optional IP source address range
|
||||
IPAddress: &IPAddress{SourceIP: "192.0.2.0/24"},
|
||||
// Optional date URL is not valid until
|
||||
DateGreaterThan: &AWSEpochTime{testSignTime.Add(30 * time.Minute)},
|
||||
// Required date the URL will expire after
|
||||
DateLessThan: &AWSEpochTime{testSignTime.Add(1 * time.Hour)},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Load your private key so it can be used by the CookieSigner
|
||||
// To load private key from file use `sign.LoadPEMPrivKeyFile`.
|
||||
privKey, err := LoadPEMPrivKey(examplePEMReader())
|
||||
if err != nil {
|
||||
fmt.Println("failed to load private key", err)
|
||||
return
|
||||
}
|
||||
|
||||
// Key ID that represents the key pair associated with the private key
|
||||
keyID := "privateKeyID"
|
||||
|
||||
// Set credentials to the CookieSigner.
|
||||
cookieSigner := NewCookieSigner(keyID, privKey)
|
||||
|
||||
// Avoid adding an Expire or MaxAge. See provided AWS Documentation for
|
||||
// more info.
|
||||
cookies, err := cookieSigner.SignWithPolicy(p)
|
||||
if err != nil {
|
||||
fmt.Println("failed to sign cookies with policy,", err)
|
||||
return
|
||||
}
|
||||
|
||||
printExampleCookies(cookies)
|
||||
// Output:
|
||||
// Cookies:
|
||||
// CloudFront-Policy: eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL3N1Yi5jbG91ZGZyb250LmNvbSIsIkNvbmRpdGlvbiI6eyJJcEFkZHJlc3MiOnsiQVdTOlNvdXJjZUlwIjoiMTkyLjAuMi4wLzI0In0sIkRhdGVHcmVhdGVyVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxMjU3ODk1ODAwfSwiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTc2MDB9fX1dfQ__, , , false
|
||||
// CloudFront-Signature: JaWdcbr98colrDAhOpkyxqCZev2IAxURu1RKKo1wS~sI5XdNXWYbZJs2FdpbJ475ZvmhZ1-r4ENUqBXAlRfPfOc21Hm4~24jRmPTO3512D4uuJHrPVxSfgeGuFeigfCGWAqyfYYH1DsFl5JQDpzetsNI3ZhGRkQb8V-oYFanddg_, , , false
|
||||
// CloudFront-Key-Pair-Id: privateKeyID, , , false
|
||||
}
|
||||
|
||||
func ExampleCookieOptions() {
|
||||
origRandReader := randReader
|
||||
randReader = newRandomReader(rand.New(rand.NewSource(1)))
|
||||
defer func() {
|
||||
randReader = origRandReader
|
||||
}()
|
||||
|
||||
// Load your private key so it can be used by the CookieSigner
|
||||
// To load private key from file use `sign.LoadPEMPrivKeyFile`.
|
||||
privKey, err := LoadPEMPrivKey(examplePEMReader())
|
||||
if err != nil {
|
||||
fmt.Println("failed to load private key", err)
|
||||
return
|
||||
}
|
||||
|
||||
// Create the CookieSigner with options set. These options can be set
|
||||
// directly with cookieSigner.Opts. These values can be overridden on
|
||||
// individual Sign and SignWithProfile calls.
|
||||
cookieSigner := NewCookieSigner("keyID", privKey, func(o *CookieOptions) {
|
||||
//provide an optional struct fields to specify other options
|
||||
o.Path = "/"
|
||||
|
||||
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html
|
||||
o.Domain = ".cNameAssociatedWithMyDistribution.com"
|
||||
|
||||
// Make sure your app/site can handle https payloads, otherwise
|
||||
// set this to false.
|
||||
o.Secure = true
|
||||
})
|
||||
|
||||
// Use the signer to sign the URL
|
||||
cookies, err := cookieSigner.Sign("http*://*", testSignTime.Add(30*time.Minute), func(o *CookieOptions) {
|
||||
o.Path = "/mypath/"
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Println("failed to sign cookies with policy,", err)
|
||||
return
|
||||
}
|
||||
|
||||
printExampleCookies(cookies)
|
||||
// Output:
|
||||
// Cookies:
|
||||
// CloudFront-Policy: eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly8qIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxMjU3ODk1ODAwfX19XX0_, /mypath/, .cNameAssociatedWithMyDistribution.com, true
|
||||
// CloudFront-Signature: Yco06vgowwvSYgTSY9XbXpBcTlUlqpyyYXgRhus3nfnC74A7oQ~fMBH0we-rGxvph8ZyHnTxC5ubbPKSzo3EHUm2IcQeEo4p6WCgZZMzCuLlkpeMKhMAkCqX7rmUfkXhTslBHe~ylcmaZqo-hdnOiWrXk2U974ZQbbt5cOjwQG0_, /mypath/, .cNameAssociatedWithMyDistribution.com, true
|
||||
// CloudFront-Key-Pair-Id: keyID, /mypath/, .cNameAssociatedWithMyDistribution.com, true
|
||||
}
|
||||
|
||||
func printExampleCookies(cookies []*http.Cookie) {
|
||||
fmt.Println("Cookies:")
|
||||
for _, c := range cookies {
|
||||
fmt.Printf("%s: %s, %s, %s, %t\n", c.Name, c.Value, c.Path, c.Domain, c.Secure)
|
||||
}
|
||||
}
|
83
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/sign_cookie_test.go
generated
vendored
Normal file
83
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/sign_cookie_test.go
generated
vendored
Normal file
|
@ -0,0 +1,83 @@
|
|||
package sign
|
||||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestNewCookieSigner(t *testing.T) {
|
||||
privKey, err := rsa.GenerateKey(randReader, 1024)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected priv key error, %#v", err)
|
||||
}
|
||||
|
||||
signer := NewCookieSigner("keyID", privKey)
|
||||
assert.Equal(t, "keyID", signer.keyID)
|
||||
assert.Equal(t, privKey, signer.privKey)
|
||||
}
|
||||
|
||||
func TestSignCookie(t *testing.T) {
|
||||
privKey, err := rsa.GenerateKey(randReader, 1024)
|
||||
assert.NoError(t, err)
|
||||
|
||||
signer := NewCookieSigner("keyID", privKey)
|
||||
cookies, err := signer.Sign("http*://*", time.Now().Add(1*time.Hour))
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, CookiePolicyName, cookies[0].Name)
|
||||
assert.Equal(t, CookieSignatureName, cookies[1].Name)
|
||||
assert.Equal(t, CookieKeyIDName, cookies[2].Name)
|
||||
}
|
||||
|
||||
func TestSignCookie_WithPolicy(t *testing.T) {
|
||||
privKey, err := rsa.GenerateKey(randReader, 1024)
|
||||
assert.NoError(t, err)
|
||||
|
||||
p := &Policy{
|
||||
Statements: []Statement{
|
||||
{
|
||||
Resource: "*",
|
||||
Condition: Condition{
|
||||
DateLessThan: &AWSEpochTime{time.Now().Add(1 * time.Hour)},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
signer := NewCookieSigner("keyID", privKey)
|
||||
cookies, err := signer.SignWithPolicy(p)
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, CookiePolicyName, cookies[0].Name)
|
||||
assert.Equal(t, CookieSignatureName, cookies[1].Name)
|
||||
assert.Equal(t, CookieKeyIDName, cookies[2].Name)
|
||||
}
|
||||
|
||||
func TestSignCookie_WithCookieOptions(t *testing.T) {
|
||||
privKey, err := rsa.GenerateKey(randReader, 1024)
|
||||
assert.NoError(t, err)
|
||||
|
||||
expires := time.Now().Add(1 * time.Hour)
|
||||
|
||||
signer := NewCookieSigner("keyID", privKey)
|
||||
cookies, err := signer.Sign("https://example.com/*", expires, func(o *CookieOptions) {
|
||||
o.Path = "/"
|
||||
o.Domain = ".example.com"
|
||||
o.Secure = true
|
||||
|
||||
})
|
||||
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, CookiePolicyName, cookies[0].Name)
|
||||
assert.Equal(t, CookieSignatureName, cookies[1].Name)
|
||||
assert.Equal(t, CookieKeyIDName, cookies[2].Name)
|
||||
|
||||
for _, c := range cookies {
|
||||
assert.Equal(t, "/", c.Path)
|
||||
assert.Equal(t, ".example.com", c.Domain)
|
||||
assert.True(t, c.Secure)
|
||||
}
|
||||
}
|
205
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/sign_url.go
generated
vendored
Normal file
205
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/sign_url.go
generated
vendored
Normal file
|
@ -0,0 +1,205 @@
|
|||
// Package sign provides utilities to generate signed URLs for Amazon CloudFront.
|
||||
//
|
||||
// More information about signed URLs and their structure can be found at:
|
||||
// http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-canned-policy.html
|
||||
//
|
||||
// To sign a URL create a URLSigner with your private key and credential pair key ID.
|
||||
// Once you have a URLSigner instance you can call Sign or SignWithPolicy to
|
||||
// sign the URLs.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// // Sign URL to be valid for 1 hour from now.
|
||||
// signer := sign.NewURLSigner(keyID, privKey)
|
||||
// signedURL, err := signer.Sign(rawURL, time.Now().Add(1*time.Hour))
|
||||
// if err != nil {
|
||||
// log.Fatalf("Failed to sign url, err: %s\n", err.Error())
|
||||
// }
|
||||
//
|
||||
package sign
|
||||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// An URLSigner provides URL signing utilities to sign URLs for Amazon CloudFront
|
||||
// resources. Using a private key and Credential Key Pair key ID the URLSigner
|
||||
// only needs to be created once per Credential Key Pair key ID and private key.
|
||||
//
|
||||
// The signer is safe to use concurrently.
|
||||
type URLSigner struct {
|
||||
keyID string
|
||||
privKey *rsa.PrivateKey
|
||||
}
|
||||
|
||||
// NewURLSigner constructs and returns a new URLSigner to be used to for signing
|
||||
// Amazon CloudFront URL resources with.
|
||||
func NewURLSigner(keyID string, privKey *rsa.PrivateKey) *URLSigner {
|
||||
return &URLSigner{
|
||||
keyID: keyID,
|
||||
privKey: privKey,
|
||||
}
|
||||
}
|
||||
|
||||
// Sign will sign a single URL to expire at the time of expires sign using the
|
||||
// Amazon CloudFront default Canned Policy. The URL will be signed with the
|
||||
// private key and Credential Key Pair Key ID previously provided to URLSigner.
|
||||
//
|
||||
// This is the default method of signing Amazon CloudFront URLs. If extra policy
|
||||
// conditions are need other than URL expiry use SignWithPolicy instead.
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// // Sign URL to be valid for 1 hour from now.
|
||||
// signer := sign.NewURLSigner(keyID, privKey)
|
||||
// signedURL, err := signer.Sign(rawURL, time.Now().Add(1*time.Hour))
|
||||
// if err != nil {
|
||||
// log.Fatalf("Failed to sign url, err: %s\n", err.Error())
|
||||
// }
|
||||
//
|
||||
func (s URLSigner) Sign(url string, expires time.Time) (string, error) {
|
||||
scheme, cleanedURL, err := cleanURLScheme(url)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
resource, err := CreateResource(scheme, url)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return signURL(scheme, cleanedURL, s.keyID, NewCannedPolicy(resource, expires), false, s.privKey)
|
||||
}
|
||||
|
||||
// SignWithPolicy will sign a URL with the Policy provided. The URL will be
|
||||
// signed with the private key and Credential Key Pair Key ID previously provided to URLSigner.
|
||||
//
|
||||
// Use this signing method if you are looking to sign a URL with more than just
|
||||
// the URL's expiry time, or reusing Policies between multiple URL signings.
|
||||
// If only the expiry time is needed you can use Sign and provide just the
|
||||
// URL's expiry time. A minimum of at least one policy statement is required for a signed URL.
|
||||
//
|
||||
// Note: It is not safe to use Polices between multiple signers concurrently
|
||||
//
|
||||
// Example:
|
||||
//
|
||||
// // Sign URL to be valid for 30 minutes from now, expires one hour from now, and
|
||||
// // restricted to the 192.0.2.0/24 IP address range.
|
||||
// policy := &sign.Policy{
|
||||
// Statements: []sign.Statement{
|
||||
// {
|
||||
// Resource: rawURL,
|
||||
// Condition: sign.Condition{
|
||||
// // Optional IP source address range
|
||||
// IPAddress: &sign.IPAddress{SourceIP: "192.0.2.0/24"},
|
||||
// // Optional date URL is not valid until
|
||||
// DateGreaterThan: &sign.AWSEpochTime{time.Now().Add(30 * time.Minute)},
|
||||
// // Required date the URL will expire after
|
||||
// DateLessThan: &sign.AWSEpochTime{time.Now().Add(1 * time.Hour)},
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
//
|
||||
// signer := sign.NewURLSigner(keyID, privKey)
|
||||
// signedURL, err := signer.SignWithPolicy(rawURL, policy)
|
||||
// if err != nil {
|
||||
// log.Fatalf("Failed to sign url, err: %s\n", err.Error())
|
||||
// }
|
||||
//
|
||||
func (s URLSigner) SignWithPolicy(url string, p *Policy) (string, error) {
|
||||
scheme, cleanedURL, err := cleanURLScheme(url)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return signURL(scheme, cleanedURL, s.keyID, p, true, s.privKey)
|
||||
}
|
||||
|
||||
func signURL(scheme, url, keyID string, p *Policy, customPolicy bool, privKey *rsa.PrivateKey) (string, error) {
|
||||
// Validation URL elements
|
||||
if err := validateURL(url); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
b64Signature, b64Policy, err := p.Sign(privKey)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
// build and return signed URL
|
||||
builtURL := buildSignedURL(url, keyID, p, customPolicy, b64Policy, b64Signature)
|
||||
if scheme == "rtmp" {
|
||||
return buildRTMPURL(builtURL)
|
||||
}
|
||||
|
||||
return builtURL, nil
|
||||
}
|
||||
|
||||
func buildSignedURL(baseURL, keyID string, p *Policy, customPolicy bool, b64Policy, b64Signature []byte) string {
|
||||
pred := "?"
|
||||
if strings.Contains(baseURL, "?") {
|
||||
pred = "&"
|
||||
}
|
||||
signedURL := baseURL + pred
|
||||
|
||||
if customPolicy {
|
||||
signedURL += "Policy=" + string(b64Policy)
|
||||
} else {
|
||||
signedURL += fmt.Sprintf("Expires=%d", p.Statements[0].Condition.DateLessThan.UTC().Unix())
|
||||
}
|
||||
signedURL += fmt.Sprintf("&Signature=%s&Key-Pair-Id=%s", string(b64Signature), keyID)
|
||||
|
||||
return signedURL
|
||||
}
|
||||
|
||||
func buildRTMPURL(u string) (string, error) {
|
||||
parsed, err := url.Parse(u)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("unable to parse rtmp signed URL, err: %s", err)
|
||||
}
|
||||
|
||||
rtmpURL := strings.TrimLeft(parsed.Path, "/")
|
||||
if parsed.RawQuery != "" {
|
||||
rtmpURL = fmt.Sprintf("%s?%s", rtmpURL, parsed.RawQuery)
|
||||
}
|
||||
|
||||
return rtmpURL, nil
|
||||
}
|
||||
|
||||
func cleanURLScheme(u string) (scheme, cleanedURL string, err error) {
|
||||
parts := strings.SplitN(u, "://", 2)
|
||||
if len(parts) != 2 {
|
||||
return "", "", fmt.Errorf("invalid URL, missing scheme and domain/path")
|
||||
}
|
||||
scheme = strings.Replace(parts[0], "*", "", 1)
|
||||
cleanedURL = fmt.Sprintf("%s://%s", scheme, parts[1])
|
||||
|
||||
return strings.ToLower(scheme), cleanedURL, nil
|
||||
}
|
||||
|
||||
var illegalQueryParms = []string{"Expires", "Policy", "Signature", "Key-Pair-Id"}
|
||||
|
||||
func validateURL(u string) error {
|
||||
parsed, err := url.Parse(u)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to parse URL, err: %s", err.Error())
|
||||
}
|
||||
|
||||
if parsed.Scheme == "" {
|
||||
return fmt.Errorf("URL missing valid scheme, %s", u)
|
||||
}
|
||||
|
||||
q := parsed.Query()
|
||||
for _, p := range illegalQueryParms {
|
||||
if _, ok := q[p]; ok {
|
||||
return fmt.Errorf("%s cannot be a query parameter for a signed URL", p)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
149
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/sign_url_test.go
generated
vendored
Normal file
149
vendor/github.com/aws/aws-sdk-go/service/cloudfront/sign/sign_url_test.go
generated
vendored
Normal file
|
@ -0,0 +1,149 @@
|
|||
package sign
|
||||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
var testSignTime = time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
|
||||
|
||||
var testSignURL = []struct {
|
||||
u string
|
||||
p *Policy
|
||||
t time.Time
|
||||
customPolicy bool
|
||||
expectErr bool
|
||||
out string
|
||||
}{
|
||||
{
|
||||
"http://example.com/a", NewCannedPolicy("http://example.com/a", testSignTime), time.Time{}, true, false,
|
||||
"http://example.com/a?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL2V4YW1wbGUuY29tL2EiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTQwMDB9fX1dfQ__&Signature=Y6qvWOZNl99uNPMGprvrKXEmXpLWJ-xXKVHL~nmF0BR1jPb2XA2jor0MUYKBE4ViTkWZZ1dz46zSFMsEEfw~n6-SVYXZ2QHBBTkSAoxGtH6dH33Ph9pz~f9Wy7aYXq~9I-Ah0E6yC~BMiQuXe5qAOucuMPorKgPfC0dvLMw2EF0_&Key-Pair-Id=KeyID",
|
||||
},
|
||||
{
|
||||
"http://example.com/a", nil, testSignTime, false, false,
|
||||
"http://example.com/a?Expires=1257894000&Signature=Y6qvWOZNl99uNPMGprvrKXEmXpLWJ-xXKVHL~nmF0BR1jPb2XA2jor0MUYKBE4ViTkWZZ1dz46zSFMsEEfw~n6-SVYXZ2QHBBTkSAoxGtH6dH33Ph9pz~f9Wy7aYXq~9I-Ah0E6yC~BMiQuXe5qAOucuMPorKgPfC0dvLMw2EF0_&Key-Pair-Id=KeyID",
|
||||
},
|
||||
{
|
||||
"http://example.com/Ƿ", nil, testSignTime, false, true,
|
||||
"http://example.com/Ƿ?Expires=1257894000&Signature=Y6qvWOZNl99uNPMGprvrKXEmXpLWJ-xXKVHL~nmF0BR1jPb2XA2jor0MUYKBE4ViTkWZZ1dz46zSFMsEEfw~n6-SVYXZ2QHBBTkSAoxGtH6dH33Ph9pz~f9Wy7aYXq~9I-Ah0E6yC~BMiQuXe5qAOucuMPorKgPfC0dvLMw2EF0_&Key-Pair-Id=KeyID",
|
||||
},
|
||||
{
|
||||
"http://example.com/a", &Policy{}, time.Time{}, true, true,
|
||||
"http://example.com/a?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL2V4YW1wbGUuY29tL2EiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTQwMDB9fX1dfQ__&Signature=Y6qvWOZNl99uNPMGprvrKXEmXpLWJ-xXKVHL~nmF0BR1jPb2XA2jor0MUYKBE4ViTkWZZ1dz46zSFMsEEfw~n6-SVYXZ2QHBBTkSAoxGtH6dH33Ph9pz~f9Wy7aYXq~9I-Ah0E6yC~BMiQuXe5qAOucuMPorKgPfC0dvLMw2EF0_&Key-Pair-Id=KeyID",
|
||||
},
|
||||
{
|
||||
"http://example.com/a", NewCannedPolicy("", testSignTime), time.Time{}, true, true,
|
||||
"http://example.com/a?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDovL2V4YW1wbGUuY29tL2EiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEyNTc4OTQwMDB9fX1dfQ__&Signature=Y6qvWOZNl99uNPMGprvrKXEmXpLWJ-xXKVHL~nmF0BR1jPb2XA2jor0MUYKBE4ViTkWZZ1dz46zSFMsEEfw~n6-SVYXZ2QHBBTkSAoxGtH6dH33Ph9pz~f9Wy7aYXq~9I-Ah0E6yC~BMiQuXe5qAOucuMPorKgPfC0dvLMw2EF0_&Key-Pair-Id=KeyID",
|
||||
},
|
||||
{
|
||||
"rtmp://example.com/a", nil, testSignTime, false, false,
|
||||
"a?Expires=1257894000&Signature=Ds9NbpGwIcDKG1iZDyjfPXp0ZFYSIzfvGzJj-x28XlXfrarHrJbTOQj3bec~aAyb8NAqghBYRdKF9~RdjNrdyxyiequo-SCjFgFHnRNIk0FiqH0fVt2NO63f0X8-Kbur9cPtJoHR9Jzk0I1CQnECqhL6A0OgPhijTfKUITocmzA_&Key-Pair-Id=KeyID",
|
||||
},
|
||||
{
|
||||
"rtmp://example.com/a", NewCannedPolicy("a", testSignTime), time.Time{}, true, false,
|
||||
"a?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiYSIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTI1Nzg5NDAwMH19fV19&Signature=Ds9NbpGwIcDKG1iZDyjfPXp0ZFYSIzfvGzJj-x28XlXfrarHrJbTOQj3bec~aAyb8NAqghBYRdKF9~RdjNrdyxyiequo-SCjFgFHnRNIk0FiqH0fVt2NO63f0X8-Kbur9cPtJoHR9Jzk0I1CQnECqhL6A0OgPhijTfKUITocmzA_&Key-Pair-Id=KeyID",
|
||||
},
|
||||
}
|
||||
|
||||
// TODO Sign URL HTTP
|
||||
// TODO Sign URL RMTP
|
||||
func TestSignURL(t *testing.T) {
|
||||
origRandReader := randReader
|
||||
randReader = newRandomReader(rand.New(rand.NewSource(1)))
|
||||
defer func() {
|
||||
randReader = origRandReader
|
||||
}()
|
||||
|
||||
privKey, err := rsa.GenerateKey(randReader, 1024)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected priv key error, %#v", err)
|
||||
}
|
||||
|
||||
s := NewURLSigner("KeyID", privKey)
|
||||
|
||||
for i, v := range testSignURL {
|
||||
var u string
|
||||
var err error
|
||||
|
||||
if v.customPolicy {
|
||||
u, err = s.SignWithPolicy(v.u, v.p)
|
||||
} else {
|
||||
u, err = s.Sign(v.u, v.t)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
if v.expectErr {
|
||||
continue
|
||||
}
|
||||
t.Errorf("%d, Unexpected error, %s", i, err.Error())
|
||||
continue
|
||||
} else if v.expectErr {
|
||||
t.Errorf("%d Expected error, but got none", i)
|
||||
continue
|
||||
}
|
||||
|
||||
if u != v.out {
|
||||
t.Errorf("%d, Unexpected URL\nexpect: %s\nactual: %s\n", i, v.out, u)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var testBuildSignedURL = []struct {
|
||||
u, keyID string
|
||||
p *Policy
|
||||
customPolicy bool
|
||||
b64Policy, b64Sig []byte
|
||||
out string
|
||||
}{
|
||||
{
|
||||
"https://example.com/a?b=1", "KeyID", NewCannedPolicy("", testSignTime), true, []byte("b64Policy"), []byte("b64Sig"),
|
||||
"https://example.com/a?b=1&Policy=b64Policy&Signature=b64Sig&Key-Pair-Id=KeyID",
|
||||
},
|
||||
{
|
||||
"https://example.com/a", "KeyID", NewCannedPolicy("", testSignTime), true, []byte("b64Policy"), []byte("b64Sig"),
|
||||
"https://example.com/a?Policy=b64Policy&Signature=b64Sig&Key-Pair-Id=KeyID",
|
||||
},
|
||||
{
|
||||
"https://example.com/a?b=1", "KeyID", NewCannedPolicy("https://example.com/a?b=1", testSignTime), false, []byte("b64Policy"), []byte("b64Sig"),
|
||||
"https://example.com/a?b=1&Expires=1257894000&Signature=b64Sig&Key-Pair-Id=KeyID",
|
||||
},
|
||||
}
|
||||
|
||||
func TestBuildSignedURL(t *testing.T) {
|
||||
for i, v := range testBuildSignedURL {
|
||||
u := buildSignedURL(v.u, v.keyID, v.p, v.customPolicy, v.b64Policy, v.b64Sig)
|
||||
if u != v.out {
|
||||
t.Errorf("%d, Unexpected URL\nexpect: %s\nactual: %s\n", i, v.out, u)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var testValidURL = []struct {
|
||||
in, errPrefix string
|
||||
}{
|
||||
{"https://example.com/a?b=1&else=b", ""},
|
||||
{"https://example.com/a?b=1&Policy=something&else=b", "Policy"},
|
||||
{"https://example.com/a?b=1&Signature=something&else=b", "Signature"},
|
||||
{"https://example.com/a?b=1&Key-Pair-Id=something&else=b", "Key-Pair-Id"},
|
||||
{"http?://example.com/a?b=1", "URL missing valid scheme"},
|
||||
}
|
||||
|
||||
func TestValidateURL(t *testing.T) {
|
||||
for i, v := range testValidURL {
|
||||
err := validateURL(v.in)
|
||||
if err != nil {
|
||||
if v.errPrefix == "" {
|
||||
t.Errorf("%d, Unexpected error %s", i, err.Error())
|
||||
}
|
||||
if !strings.HasPrefix(err.Error(), v.errPrefix) {
|
||||
t.Errorf("%d, Expected to find prefix\nexpect: %s\nactual: %s", i, v.errPrefix, err.Error())
|
||||
}
|
||||
} else if v.errPrefix != "" {
|
||||
t.Errorf("%d, Expected error %s", i, v.errPrefix)
|
||||
}
|
||||
}
|
||||
}
|
148
vendor/github.com/aws/aws-sdk-go/service/cloudfront/waiters.go
generated
vendored
Normal file
148
vendor/github.com/aws/aws-sdk-go/service/cloudfront/waiters.go
generated
vendored
Normal file
|
@ -0,0 +1,148 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudfront
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
)
|
||||
|
||||
// WaitUntilDistributionDeployed uses the CloudFront API operation
|
||||
// GetDistribution to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *CloudFront) WaitUntilDistributionDeployed(input *GetDistributionInput) error {
|
||||
return c.WaitUntilDistributionDeployedWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilDistributionDeployedWithContext is an extended version of WaitUntilDistributionDeployed.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *CloudFront) WaitUntilDistributionDeployedWithContext(ctx aws.Context, input *GetDistributionInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilDistributionDeployed",
|
||||
MaxAttempts: 25,
|
||||
Delay: request.ConstantWaiterDelay(60 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "Distribution.Status",
|
||||
Expected: "Deployed",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *GetDistributionInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.GetDistributionRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilInvalidationCompleted uses the CloudFront API operation
|
||||
// GetInvalidation to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *CloudFront) WaitUntilInvalidationCompleted(input *GetInvalidationInput) error {
|
||||
return c.WaitUntilInvalidationCompletedWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilInvalidationCompletedWithContext is an extended version of WaitUntilInvalidationCompleted.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *CloudFront) WaitUntilInvalidationCompletedWithContext(ctx aws.Context, input *GetInvalidationInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilInvalidationCompleted",
|
||||
MaxAttempts: 30,
|
||||
Delay: request.ConstantWaiterDelay(20 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "Invalidation.Status",
|
||||
Expected: "Completed",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *GetInvalidationInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.GetInvalidationRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
||||
|
||||
// WaitUntilStreamingDistributionDeployed uses the CloudFront API operation
|
||||
// GetStreamingDistribution to wait for a condition to be met before returning.
|
||||
// If the condition is not meet within the max attempt window an error will
|
||||
// be returned.
|
||||
func (c *CloudFront) WaitUntilStreamingDistributionDeployed(input *GetStreamingDistributionInput) error {
|
||||
return c.WaitUntilStreamingDistributionDeployedWithContext(aws.BackgroundContext(), input)
|
||||
}
|
||||
|
||||
// WaitUntilStreamingDistributionDeployedWithContext is an extended version of WaitUntilStreamingDistributionDeployed.
|
||||
// With the support for passing in a context and options to configure the
|
||||
// Waiter and the underlying request options.
|
||||
//
|
||||
// The context must be non-nil and will be used for request cancellation. If
|
||||
// the context is nil a panic will occur. In the future the SDK may create
|
||||
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
|
||||
// for more information on using Contexts.
|
||||
func (c *CloudFront) WaitUntilStreamingDistributionDeployedWithContext(ctx aws.Context, input *GetStreamingDistributionInput, opts ...request.WaiterOption) error {
|
||||
w := request.Waiter{
|
||||
Name: "WaitUntilStreamingDistributionDeployed",
|
||||
MaxAttempts: 25,
|
||||
Delay: request.ConstantWaiterDelay(60 * time.Second),
|
||||
Acceptors: []request.WaiterAcceptor{
|
||||
{
|
||||
State: request.SuccessWaiterState,
|
||||
Matcher: request.PathWaiterMatch, Argument: "StreamingDistribution.Status",
|
||||
Expected: "Deployed",
|
||||
},
|
||||
},
|
||||
Logger: c.Config.Logger,
|
||||
NewRequest: func(opts []request.Option) (*request.Request, error) {
|
||||
var inCpy *GetStreamingDistributionInput
|
||||
if input != nil {
|
||||
tmp := *input
|
||||
inCpy = &tmp
|
||||
}
|
||||
req, _ := c.GetStreamingDistributionRequest(inCpy)
|
||||
req.SetContext(ctx)
|
||||
req.ApplyOptions(opts...)
|
||||
return req, nil
|
||||
},
|
||||
}
|
||||
w.ApplyOptions(opts...)
|
||||
|
||||
return w.WaitWithContext(ctx)
|
||||
}
|
3693
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/api.go
generated
vendored
Normal file
3693
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
144
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/cloudhsmiface/interface.go
generated
vendored
Normal file
144
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/cloudhsmiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,144 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudhsmiface provides an interface to enable mocking the Amazon CloudHSM 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 cloudhsmiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/cloudhsm"
|
||||
)
|
||||
|
||||
// CloudHSMAPI provides an interface to enable mocking the
|
||||
// cloudhsm.CloudHSM 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 CloudHSM.
|
||||
// func myFunc(svc cloudhsmiface.CloudHSMAPI) bool {
|
||||
// // Make svc.AddTagsToResource request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := cloudhsm.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockCloudHSMClient struct {
|
||||
// cloudhsmiface.CloudHSMAPI
|
||||
// }
|
||||
// func (m *mockCloudHSMClient) AddTagsToResource(input *cloudhsm.AddTagsToResourceInput) (*cloudhsm.AddTagsToResourceOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockCloudHSMClient{}
|
||||
//
|
||||
// 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 CloudHSMAPI interface {
|
||||
AddTagsToResource(*cloudhsm.AddTagsToResourceInput) (*cloudhsm.AddTagsToResourceOutput, error)
|
||||
AddTagsToResourceWithContext(aws.Context, *cloudhsm.AddTagsToResourceInput, ...request.Option) (*cloudhsm.AddTagsToResourceOutput, error)
|
||||
AddTagsToResourceRequest(*cloudhsm.AddTagsToResourceInput) (*request.Request, *cloudhsm.AddTagsToResourceOutput)
|
||||
|
||||
CreateHapg(*cloudhsm.CreateHapgInput) (*cloudhsm.CreateHapgOutput, error)
|
||||
CreateHapgWithContext(aws.Context, *cloudhsm.CreateHapgInput, ...request.Option) (*cloudhsm.CreateHapgOutput, error)
|
||||
CreateHapgRequest(*cloudhsm.CreateHapgInput) (*request.Request, *cloudhsm.CreateHapgOutput)
|
||||
|
||||
CreateHsm(*cloudhsm.CreateHsmInput) (*cloudhsm.CreateHsmOutput, error)
|
||||
CreateHsmWithContext(aws.Context, *cloudhsm.CreateHsmInput, ...request.Option) (*cloudhsm.CreateHsmOutput, error)
|
||||
CreateHsmRequest(*cloudhsm.CreateHsmInput) (*request.Request, *cloudhsm.CreateHsmOutput)
|
||||
|
||||
CreateLunaClient(*cloudhsm.CreateLunaClientInput) (*cloudhsm.CreateLunaClientOutput, error)
|
||||
CreateLunaClientWithContext(aws.Context, *cloudhsm.CreateLunaClientInput, ...request.Option) (*cloudhsm.CreateLunaClientOutput, error)
|
||||
CreateLunaClientRequest(*cloudhsm.CreateLunaClientInput) (*request.Request, *cloudhsm.CreateLunaClientOutput)
|
||||
|
||||
DeleteHapg(*cloudhsm.DeleteHapgInput) (*cloudhsm.DeleteHapgOutput, error)
|
||||
DeleteHapgWithContext(aws.Context, *cloudhsm.DeleteHapgInput, ...request.Option) (*cloudhsm.DeleteHapgOutput, error)
|
||||
DeleteHapgRequest(*cloudhsm.DeleteHapgInput) (*request.Request, *cloudhsm.DeleteHapgOutput)
|
||||
|
||||
DeleteHsm(*cloudhsm.DeleteHsmInput) (*cloudhsm.DeleteHsmOutput, error)
|
||||
DeleteHsmWithContext(aws.Context, *cloudhsm.DeleteHsmInput, ...request.Option) (*cloudhsm.DeleteHsmOutput, error)
|
||||
DeleteHsmRequest(*cloudhsm.DeleteHsmInput) (*request.Request, *cloudhsm.DeleteHsmOutput)
|
||||
|
||||
DeleteLunaClient(*cloudhsm.DeleteLunaClientInput) (*cloudhsm.DeleteLunaClientOutput, error)
|
||||
DeleteLunaClientWithContext(aws.Context, *cloudhsm.DeleteLunaClientInput, ...request.Option) (*cloudhsm.DeleteLunaClientOutput, error)
|
||||
DeleteLunaClientRequest(*cloudhsm.DeleteLunaClientInput) (*request.Request, *cloudhsm.DeleteLunaClientOutput)
|
||||
|
||||
DescribeHapg(*cloudhsm.DescribeHapgInput) (*cloudhsm.DescribeHapgOutput, error)
|
||||
DescribeHapgWithContext(aws.Context, *cloudhsm.DescribeHapgInput, ...request.Option) (*cloudhsm.DescribeHapgOutput, error)
|
||||
DescribeHapgRequest(*cloudhsm.DescribeHapgInput) (*request.Request, *cloudhsm.DescribeHapgOutput)
|
||||
|
||||
DescribeHsm(*cloudhsm.DescribeHsmInput) (*cloudhsm.DescribeHsmOutput, error)
|
||||
DescribeHsmWithContext(aws.Context, *cloudhsm.DescribeHsmInput, ...request.Option) (*cloudhsm.DescribeHsmOutput, error)
|
||||
DescribeHsmRequest(*cloudhsm.DescribeHsmInput) (*request.Request, *cloudhsm.DescribeHsmOutput)
|
||||
|
||||
DescribeLunaClient(*cloudhsm.DescribeLunaClientInput) (*cloudhsm.DescribeLunaClientOutput, error)
|
||||
DescribeLunaClientWithContext(aws.Context, *cloudhsm.DescribeLunaClientInput, ...request.Option) (*cloudhsm.DescribeLunaClientOutput, error)
|
||||
DescribeLunaClientRequest(*cloudhsm.DescribeLunaClientInput) (*request.Request, *cloudhsm.DescribeLunaClientOutput)
|
||||
|
||||
GetConfig(*cloudhsm.GetConfigInput) (*cloudhsm.GetConfigOutput, error)
|
||||
GetConfigWithContext(aws.Context, *cloudhsm.GetConfigInput, ...request.Option) (*cloudhsm.GetConfigOutput, error)
|
||||
GetConfigRequest(*cloudhsm.GetConfigInput) (*request.Request, *cloudhsm.GetConfigOutput)
|
||||
|
||||
ListAvailableZones(*cloudhsm.ListAvailableZonesInput) (*cloudhsm.ListAvailableZonesOutput, error)
|
||||
ListAvailableZonesWithContext(aws.Context, *cloudhsm.ListAvailableZonesInput, ...request.Option) (*cloudhsm.ListAvailableZonesOutput, error)
|
||||
ListAvailableZonesRequest(*cloudhsm.ListAvailableZonesInput) (*request.Request, *cloudhsm.ListAvailableZonesOutput)
|
||||
|
||||
ListHapgs(*cloudhsm.ListHapgsInput) (*cloudhsm.ListHapgsOutput, error)
|
||||
ListHapgsWithContext(aws.Context, *cloudhsm.ListHapgsInput, ...request.Option) (*cloudhsm.ListHapgsOutput, error)
|
||||
ListHapgsRequest(*cloudhsm.ListHapgsInput) (*request.Request, *cloudhsm.ListHapgsOutput)
|
||||
|
||||
ListHsms(*cloudhsm.ListHsmsInput) (*cloudhsm.ListHsmsOutput, error)
|
||||
ListHsmsWithContext(aws.Context, *cloudhsm.ListHsmsInput, ...request.Option) (*cloudhsm.ListHsmsOutput, error)
|
||||
ListHsmsRequest(*cloudhsm.ListHsmsInput) (*request.Request, *cloudhsm.ListHsmsOutput)
|
||||
|
||||
ListLunaClients(*cloudhsm.ListLunaClientsInput) (*cloudhsm.ListLunaClientsOutput, error)
|
||||
ListLunaClientsWithContext(aws.Context, *cloudhsm.ListLunaClientsInput, ...request.Option) (*cloudhsm.ListLunaClientsOutput, error)
|
||||
ListLunaClientsRequest(*cloudhsm.ListLunaClientsInput) (*request.Request, *cloudhsm.ListLunaClientsOutput)
|
||||
|
||||
ListTagsForResource(*cloudhsm.ListTagsForResourceInput) (*cloudhsm.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceWithContext(aws.Context, *cloudhsm.ListTagsForResourceInput, ...request.Option) (*cloudhsm.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceRequest(*cloudhsm.ListTagsForResourceInput) (*request.Request, *cloudhsm.ListTagsForResourceOutput)
|
||||
|
||||
ModifyHapg(*cloudhsm.ModifyHapgInput) (*cloudhsm.ModifyHapgOutput, error)
|
||||
ModifyHapgWithContext(aws.Context, *cloudhsm.ModifyHapgInput, ...request.Option) (*cloudhsm.ModifyHapgOutput, error)
|
||||
ModifyHapgRequest(*cloudhsm.ModifyHapgInput) (*request.Request, *cloudhsm.ModifyHapgOutput)
|
||||
|
||||
ModifyHsm(*cloudhsm.ModifyHsmInput) (*cloudhsm.ModifyHsmOutput, error)
|
||||
ModifyHsmWithContext(aws.Context, *cloudhsm.ModifyHsmInput, ...request.Option) (*cloudhsm.ModifyHsmOutput, error)
|
||||
ModifyHsmRequest(*cloudhsm.ModifyHsmInput) (*request.Request, *cloudhsm.ModifyHsmOutput)
|
||||
|
||||
ModifyLunaClient(*cloudhsm.ModifyLunaClientInput) (*cloudhsm.ModifyLunaClientOutput, error)
|
||||
ModifyLunaClientWithContext(aws.Context, *cloudhsm.ModifyLunaClientInput, ...request.Option) (*cloudhsm.ModifyLunaClientOutput, error)
|
||||
ModifyLunaClientRequest(*cloudhsm.ModifyLunaClientInput) (*request.Request, *cloudhsm.ModifyLunaClientOutput)
|
||||
|
||||
RemoveTagsFromResource(*cloudhsm.RemoveTagsFromResourceInput) (*cloudhsm.RemoveTagsFromResourceOutput, error)
|
||||
RemoveTagsFromResourceWithContext(aws.Context, *cloudhsm.RemoveTagsFromResourceInput, ...request.Option) (*cloudhsm.RemoveTagsFromResourceOutput, error)
|
||||
RemoveTagsFromResourceRequest(*cloudhsm.RemoveTagsFromResourceInput) (*request.Request, *cloudhsm.RemoveTagsFromResourceOutput)
|
||||
}
|
||||
|
||||
var _ CloudHSMAPI = (*cloudhsm.CloudHSM)(nil)
|
80
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/doc.go
generated
vendored
Normal file
80
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudhsm provides the client and types for making API
|
||||
// requests to Amazon CloudHSM.
|
||||
//
|
||||
// AWS CloudHSM Service
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/cloudhsm-2014-05-30 for more information on this service.
|
||||
//
|
||||
// See cloudhsm package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsm/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon CloudHSM 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 := cloudhsm.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 CloudHSM client CloudHSM for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudhsm/#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.AddTagsToResource(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("AddTagsToResource 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.AddTagsToResourceWithContext(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 cloudhsm
|
24
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/errors.go
generated
vendored
Normal file
24
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudhsm
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeCloudHsmInternalException for service response error code
|
||||
// "CloudHsmInternalException".
|
||||
//
|
||||
// Indicates that an internal error occurred.
|
||||
ErrCodeCloudHsmInternalException = "CloudHsmInternalException"
|
||||
|
||||
// ErrCodeCloudHsmServiceException for service response error code
|
||||
// "CloudHsmServiceException".
|
||||
//
|
||||
// Indicates that an exception occurred in the AWS CloudHSM service.
|
||||
ErrCodeCloudHsmServiceException = "CloudHsmServiceException"
|
||||
|
||||
// ErrCodeInvalidRequestException for service response error code
|
||||
// "InvalidRequestException".
|
||||
//
|
||||
// Indicates that one or more of the request parameters are not valid.
|
||||
ErrCodeInvalidRequestException = "InvalidRequestException"
|
||||
)
|
471
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/examples_test.go
generated
vendored
Normal file
471
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,471 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudhsm_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/cloudhsm"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCloudHSM_AddTagsToResource() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.AddTagsToResourceInput{
|
||||
ResourceArn: aws.String("String"), // Required
|
||||
TagList: []*cloudhsm.Tag{ // Required
|
||||
{ // Required
|
||||
Key: aws.String("TagKey"), // Required
|
||||
Value: aws.String("TagValue"), // Required
|
||||
},
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.AddTagsToResource(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 ExampleCloudHSM_CreateHapg() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.CreateHapgInput{
|
||||
Label: aws.String("Label"), // Required
|
||||
}
|
||||
resp, err := svc.CreateHapg(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 ExampleCloudHSM_CreateHsm() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.CreateHsmInput{
|
||||
IamRoleArn: aws.String("IamRoleArn"), // Required
|
||||
SshKey: aws.String("SshKey"), // Required
|
||||
SubnetId: aws.String("SubnetId"), // Required
|
||||
SubscriptionType: aws.String("SubscriptionType"), // Required
|
||||
ClientToken: aws.String("ClientToken"),
|
||||
EniIp: aws.String("IpAddress"),
|
||||
ExternalId: aws.String("ExternalId"),
|
||||
SyslogIp: aws.String("IpAddress"),
|
||||
}
|
||||
resp, err := svc.CreateHsm(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 ExampleCloudHSM_CreateLunaClient() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.CreateLunaClientInput{
|
||||
Certificate: aws.String("Certificate"), // Required
|
||||
Label: aws.String("ClientLabel"),
|
||||
}
|
||||
resp, err := svc.CreateLunaClient(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 ExampleCloudHSM_DeleteHapg() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.DeleteHapgInput{
|
||||
HapgArn: aws.String("HapgArn"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteHapg(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 ExampleCloudHSM_DeleteHsm() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.DeleteHsmInput{
|
||||
HsmArn: aws.String("HsmArn"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteHsm(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 ExampleCloudHSM_DeleteLunaClient() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.DeleteLunaClientInput{
|
||||
ClientArn: aws.String("ClientArn"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteLunaClient(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 ExampleCloudHSM_DescribeHapg() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.DescribeHapgInput{
|
||||
HapgArn: aws.String("HapgArn"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeHapg(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 ExampleCloudHSM_DescribeHsm() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.DescribeHsmInput{
|
||||
HsmArn: aws.String("HsmArn"),
|
||||
HsmSerialNumber: aws.String("HsmSerialNumber"),
|
||||
}
|
||||
resp, err := svc.DescribeHsm(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 ExampleCloudHSM_DescribeLunaClient() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.DescribeLunaClientInput{
|
||||
CertificateFingerprint: aws.String("CertificateFingerprint"),
|
||||
ClientArn: aws.String("ClientArn"),
|
||||
}
|
||||
resp, err := svc.DescribeLunaClient(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 ExampleCloudHSM_GetConfig() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.GetConfigInput{
|
||||
ClientArn: aws.String("ClientArn"), // Required
|
||||
ClientVersion: aws.String("ClientVersion"), // Required
|
||||
HapgList: []*string{ // Required
|
||||
aws.String("HapgArn"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.GetConfig(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 ExampleCloudHSM_ListAvailableZones() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
var params *cloudhsm.ListAvailableZonesInput
|
||||
resp, err := svc.ListAvailableZones(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 ExampleCloudHSM_ListHapgs() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.ListHapgsInput{
|
||||
NextToken: aws.String("PaginationToken"),
|
||||
}
|
||||
resp, err := svc.ListHapgs(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 ExampleCloudHSM_ListHsms() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.ListHsmsInput{
|
||||
NextToken: aws.String("PaginationToken"),
|
||||
}
|
||||
resp, err := svc.ListHsms(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 ExampleCloudHSM_ListLunaClients() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.ListLunaClientsInput{
|
||||
NextToken: aws.String("PaginationToken"),
|
||||
}
|
||||
resp, err := svc.ListLunaClients(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 ExampleCloudHSM_ListTagsForResource() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.ListTagsForResourceInput{
|
||||
ResourceArn: aws.String("String"), // Required
|
||||
}
|
||||
resp, err := svc.ListTagsForResource(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 ExampleCloudHSM_ModifyHapg() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.ModifyHapgInput{
|
||||
HapgArn: aws.String("HapgArn"), // Required
|
||||
Label: aws.String("Label"),
|
||||
PartitionSerialList: []*string{
|
||||
aws.String("PartitionSerial"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.ModifyHapg(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 ExampleCloudHSM_ModifyHsm() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.ModifyHsmInput{
|
||||
HsmArn: aws.String("HsmArn"), // Required
|
||||
EniIp: aws.String("IpAddress"),
|
||||
ExternalId: aws.String("ExternalId"),
|
||||
IamRoleArn: aws.String("IamRoleArn"),
|
||||
SubnetId: aws.String("SubnetId"),
|
||||
SyslogIp: aws.String("IpAddress"),
|
||||
}
|
||||
resp, err := svc.ModifyHsm(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 ExampleCloudHSM_ModifyLunaClient() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.ModifyLunaClientInput{
|
||||
Certificate: aws.String("Certificate"), // Required
|
||||
ClientArn: aws.String("ClientArn"), // Required
|
||||
}
|
||||
resp, err := svc.ModifyLunaClient(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 ExampleCloudHSM_RemoveTagsFromResource() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudhsm.New(sess)
|
||||
|
||||
params := &cloudhsm.RemoveTagsFromResourceInput{
|
||||
ResourceArn: aws.String("String"), // Required
|
||||
TagKeyList: []*string{ // Required
|
||||
aws.String("TagKey"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.RemoveTagsFromResource(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)
|
||||
}
|
95
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/service.go
generated
vendored
Normal file
95
vendor/github.com/aws/aws-sdk-go/service/cloudhsm/service.go
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudhsm
|
||||
|
||||
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/jsonrpc"
|
||||
)
|
||||
|
||||
// CloudHSM provides the API operation methods for making requests to
|
||||
// Amazon CloudHSM. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// CloudHSM methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CloudHSM 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 = "cloudhsm" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the CloudHSM 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 CloudHSM client from just a session.
|
||||
// svc := cloudhsm.New(mySession)
|
||||
//
|
||||
// // Create a CloudHSM client with additional configuration
|
||||
// svc := cloudhsm.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudHSM {
|
||||
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) *CloudHSM {
|
||||
svc := &CloudHSM{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2014-05-30",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "CloudHsmFrontendService",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a CloudHSM operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CloudHSM) 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
|
||||
}
|
6430
vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go
generated
vendored
Normal file
6430
vendor/github.com/aws/aws-sdk-go/service/cloudsearch/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
160
vendor/github.com/aws/aws-sdk-go/service/cloudsearch/cloudsearchiface/interface.go
generated
vendored
Normal file
160
vendor/github.com/aws/aws-sdk-go/service/cloudsearch/cloudsearchiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,160 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudsearchiface provides an interface to enable mocking the Amazon CloudSearch 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 cloudsearchiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/cloudsearch"
|
||||
)
|
||||
|
||||
// CloudSearchAPI provides an interface to enable mocking the
|
||||
// cloudsearch.CloudSearch 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 CloudSearch.
|
||||
// func myFunc(svc cloudsearchiface.CloudSearchAPI) bool {
|
||||
// // Make svc.BuildSuggesters request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := cloudsearch.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockCloudSearchClient struct {
|
||||
// cloudsearchiface.CloudSearchAPI
|
||||
// }
|
||||
// func (m *mockCloudSearchClient) BuildSuggesters(input *cloudsearch.BuildSuggestersInput) (*cloudsearch.BuildSuggestersOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockCloudSearchClient{}
|
||||
//
|
||||
// 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 CloudSearchAPI interface {
|
||||
BuildSuggesters(*cloudsearch.BuildSuggestersInput) (*cloudsearch.BuildSuggestersOutput, error)
|
||||
BuildSuggestersWithContext(aws.Context, *cloudsearch.BuildSuggestersInput, ...request.Option) (*cloudsearch.BuildSuggestersOutput, error)
|
||||
BuildSuggestersRequest(*cloudsearch.BuildSuggestersInput) (*request.Request, *cloudsearch.BuildSuggestersOutput)
|
||||
|
||||
CreateDomain(*cloudsearch.CreateDomainInput) (*cloudsearch.CreateDomainOutput, error)
|
||||
CreateDomainWithContext(aws.Context, *cloudsearch.CreateDomainInput, ...request.Option) (*cloudsearch.CreateDomainOutput, error)
|
||||
CreateDomainRequest(*cloudsearch.CreateDomainInput) (*request.Request, *cloudsearch.CreateDomainOutput)
|
||||
|
||||
DefineAnalysisScheme(*cloudsearch.DefineAnalysisSchemeInput) (*cloudsearch.DefineAnalysisSchemeOutput, error)
|
||||
DefineAnalysisSchemeWithContext(aws.Context, *cloudsearch.DefineAnalysisSchemeInput, ...request.Option) (*cloudsearch.DefineAnalysisSchemeOutput, error)
|
||||
DefineAnalysisSchemeRequest(*cloudsearch.DefineAnalysisSchemeInput) (*request.Request, *cloudsearch.DefineAnalysisSchemeOutput)
|
||||
|
||||
DefineExpression(*cloudsearch.DefineExpressionInput) (*cloudsearch.DefineExpressionOutput, error)
|
||||
DefineExpressionWithContext(aws.Context, *cloudsearch.DefineExpressionInput, ...request.Option) (*cloudsearch.DefineExpressionOutput, error)
|
||||
DefineExpressionRequest(*cloudsearch.DefineExpressionInput) (*request.Request, *cloudsearch.DefineExpressionOutput)
|
||||
|
||||
DefineIndexField(*cloudsearch.DefineIndexFieldInput) (*cloudsearch.DefineIndexFieldOutput, error)
|
||||
DefineIndexFieldWithContext(aws.Context, *cloudsearch.DefineIndexFieldInput, ...request.Option) (*cloudsearch.DefineIndexFieldOutput, error)
|
||||
DefineIndexFieldRequest(*cloudsearch.DefineIndexFieldInput) (*request.Request, *cloudsearch.DefineIndexFieldOutput)
|
||||
|
||||
DefineSuggester(*cloudsearch.DefineSuggesterInput) (*cloudsearch.DefineSuggesterOutput, error)
|
||||
DefineSuggesterWithContext(aws.Context, *cloudsearch.DefineSuggesterInput, ...request.Option) (*cloudsearch.DefineSuggesterOutput, error)
|
||||
DefineSuggesterRequest(*cloudsearch.DefineSuggesterInput) (*request.Request, *cloudsearch.DefineSuggesterOutput)
|
||||
|
||||
DeleteAnalysisScheme(*cloudsearch.DeleteAnalysisSchemeInput) (*cloudsearch.DeleteAnalysisSchemeOutput, error)
|
||||
DeleteAnalysisSchemeWithContext(aws.Context, *cloudsearch.DeleteAnalysisSchemeInput, ...request.Option) (*cloudsearch.DeleteAnalysisSchemeOutput, error)
|
||||
DeleteAnalysisSchemeRequest(*cloudsearch.DeleteAnalysisSchemeInput) (*request.Request, *cloudsearch.DeleteAnalysisSchemeOutput)
|
||||
|
||||
DeleteDomain(*cloudsearch.DeleteDomainInput) (*cloudsearch.DeleteDomainOutput, error)
|
||||
DeleteDomainWithContext(aws.Context, *cloudsearch.DeleteDomainInput, ...request.Option) (*cloudsearch.DeleteDomainOutput, error)
|
||||
DeleteDomainRequest(*cloudsearch.DeleteDomainInput) (*request.Request, *cloudsearch.DeleteDomainOutput)
|
||||
|
||||
DeleteExpression(*cloudsearch.DeleteExpressionInput) (*cloudsearch.DeleteExpressionOutput, error)
|
||||
DeleteExpressionWithContext(aws.Context, *cloudsearch.DeleteExpressionInput, ...request.Option) (*cloudsearch.DeleteExpressionOutput, error)
|
||||
DeleteExpressionRequest(*cloudsearch.DeleteExpressionInput) (*request.Request, *cloudsearch.DeleteExpressionOutput)
|
||||
|
||||
DeleteIndexField(*cloudsearch.DeleteIndexFieldInput) (*cloudsearch.DeleteIndexFieldOutput, error)
|
||||
DeleteIndexFieldWithContext(aws.Context, *cloudsearch.DeleteIndexFieldInput, ...request.Option) (*cloudsearch.DeleteIndexFieldOutput, error)
|
||||
DeleteIndexFieldRequest(*cloudsearch.DeleteIndexFieldInput) (*request.Request, *cloudsearch.DeleteIndexFieldOutput)
|
||||
|
||||
DeleteSuggester(*cloudsearch.DeleteSuggesterInput) (*cloudsearch.DeleteSuggesterOutput, error)
|
||||
DeleteSuggesterWithContext(aws.Context, *cloudsearch.DeleteSuggesterInput, ...request.Option) (*cloudsearch.DeleteSuggesterOutput, error)
|
||||
DeleteSuggesterRequest(*cloudsearch.DeleteSuggesterInput) (*request.Request, *cloudsearch.DeleteSuggesterOutput)
|
||||
|
||||
DescribeAnalysisSchemes(*cloudsearch.DescribeAnalysisSchemesInput) (*cloudsearch.DescribeAnalysisSchemesOutput, error)
|
||||
DescribeAnalysisSchemesWithContext(aws.Context, *cloudsearch.DescribeAnalysisSchemesInput, ...request.Option) (*cloudsearch.DescribeAnalysisSchemesOutput, error)
|
||||
DescribeAnalysisSchemesRequest(*cloudsearch.DescribeAnalysisSchemesInput) (*request.Request, *cloudsearch.DescribeAnalysisSchemesOutput)
|
||||
|
||||
DescribeAvailabilityOptions(*cloudsearch.DescribeAvailabilityOptionsInput) (*cloudsearch.DescribeAvailabilityOptionsOutput, error)
|
||||
DescribeAvailabilityOptionsWithContext(aws.Context, *cloudsearch.DescribeAvailabilityOptionsInput, ...request.Option) (*cloudsearch.DescribeAvailabilityOptionsOutput, error)
|
||||
DescribeAvailabilityOptionsRequest(*cloudsearch.DescribeAvailabilityOptionsInput) (*request.Request, *cloudsearch.DescribeAvailabilityOptionsOutput)
|
||||
|
||||
DescribeDomains(*cloudsearch.DescribeDomainsInput) (*cloudsearch.DescribeDomainsOutput, error)
|
||||
DescribeDomainsWithContext(aws.Context, *cloudsearch.DescribeDomainsInput, ...request.Option) (*cloudsearch.DescribeDomainsOutput, error)
|
||||
DescribeDomainsRequest(*cloudsearch.DescribeDomainsInput) (*request.Request, *cloudsearch.DescribeDomainsOutput)
|
||||
|
||||
DescribeExpressions(*cloudsearch.DescribeExpressionsInput) (*cloudsearch.DescribeExpressionsOutput, error)
|
||||
DescribeExpressionsWithContext(aws.Context, *cloudsearch.DescribeExpressionsInput, ...request.Option) (*cloudsearch.DescribeExpressionsOutput, error)
|
||||
DescribeExpressionsRequest(*cloudsearch.DescribeExpressionsInput) (*request.Request, *cloudsearch.DescribeExpressionsOutput)
|
||||
|
||||
DescribeIndexFields(*cloudsearch.DescribeIndexFieldsInput) (*cloudsearch.DescribeIndexFieldsOutput, error)
|
||||
DescribeIndexFieldsWithContext(aws.Context, *cloudsearch.DescribeIndexFieldsInput, ...request.Option) (*cloudsearch.DescribeIndexFieldsOutput, error)
|
||||
DescribeIndexFieldsRequest(*cloudsearch.DescribeIndexFieldsInput) (*request.Request, *cloudsearch.DescribeIndexFieldsOutput)
|
||||
|
||||
DescribeScalingParameters(*cloudsearch.DescribeScalingParametersInput) (*cloudsearch.DescribeScalingParametersOutput, error)
|
||||
DescribeScalingParametersWithContext(aws.Context, *cloudsearch.DescribeScalingParametersInput, ...request.Option) (*cloudsearch.DescribeScalingParametersOutput, error)
|
||||
DescribeScalingParametersRequest(*cloudsearch.DescribeScalingParametersInput) (*request.Request, *cloudsearch.DescribeScalingParametersOutput)
|
||||
|
||||
DescribeServiceAccessPolicies(*cloudsearch.DescribeServiceAccessPoliciesInput) (*cloudsearch.DescribeServiceAccessPoliciesOutput, error)
|
||||
DescribeServiceAccessPoliciesWithContext(aws.Context, *cloudsearch.DescribeServiceAccessPoliciesInput, ...request.Option) (*cloudsearch.DescribeServiceAccessPoliciesOutput, error)
|
||||
DescribeServiceAccessPoliciesRequest(*cloudsearch.DescribeServiceAccessPoliciesInput) (*request.Request, *cloudsearch.DescribeServiceAccessPoliciesOutput)
|
||||
|
||||
DescribeSuggesters(*cloudsearch.DescribeSuggestersInput) (*cloudsearch.DescribeSuggestersOutput, error)
|
||||
DescribeSuggestersWithContext(aws.Context, *cloudsearch.DescribeSuggestersInput, ...request.Option) (*cloudsearch.DescribeSuggestersOutput, error)
|
||||
DescribeSuggestersRequest(*cloudsearch.DescribeSuggestersInput) (*request.Request, *cloudsearch.DescribeSuggestersOutput)
|
||||
|
||||
IndexDocuments(*cloudsearch.IndexDocumentsInput) (*cloudsearch.IndexDocumentsOutput, error)
|
||||
IndexDocumentsWithContext(aws.Context, *cloudsearch.IndexDocumentsInput, ...request.Option) (*cloudsearch.IndexDocumentsOutput, error)
|
||||
IndexDocumentsRequest(*cloudsearch.IndexDocumentsInput) (*request.Request, *cloudsearch.IndexDocumentsOutput)
|
||||
|
||||
ListDomainNames(*cloudsearch.ListDomainNamesInput) (*cloudsearch.ListDomainNamesOutput, error)
|
||||
ListDomainNamesWithContext(aws.Context, *cloudsearch.ListDomainNamesInput, ...request.Option) (*cloudsearch.ListDomainNamesOutput, error)
|
||||
ListDomainNamesRequest(*cloudsearch.ListDomainNamesInput) (*request.Request, *cloudsearch.ListDomainNamesOutput)
|
||||
|
||||
UpdateAvailabilityOptions(*cloudsearch.UpdateAvailabilityOptionsInput) (*cloudsearch.UpdateAvailabilityOptionsOutput, error)
|
||||
UpdateAvailabilityOptionsWithContext(aws.Context, *cloudsearch.UpdateAvailabilityOptionsInput, ...request.Option) (*cloudsearch.UpdateAvailabilityOptionsOutput, error)
|
||||
UpdateAvailabilityOptionsRequest(*cloudsearch.UpdateAvailabilityOptionsInput) (*request.Request, *cloudsearch.UpdateAvailabilityOptionsOutput)
|
||||
|
||||
UpdateScalingParameters(*cloudsearch.UpdateScalingParametersInput) (*cloudsearch.UpdateScalingParametersOutput, error)
|
||||
UpdateScalingParametersWithContext(aws.Context, *cloudsearch.UpdateScalingParametersInput, ...request.Option) (*cloudsearch.UpdateScalingParametersOutput, error)
|
||||
UpdateScalingParametersRequest(*cloudsearch.UpdateScalingParametersInput) (*request.Request, *cloudsearch.UpdateScalingParametersOutput)
|
||||
|
||||
UpdateServiceAccessPolicies(*cloudsearch.UpdateServiceAccessPoliciesInput) (*cloudsearch.UpdateServiceAccessPoliciesOutput, error)
|
||||
UpdateServiceAccessPoliciesWithContext(aws.Context, *cloudsearch.UpdateServiceAccessPoliciesInput, ...request.Option) (*cloudsearch.UpdateServiceAccessPoliciesOutput, error)
|
||||
UpdateServiceAccessPoliciesRequest(*cloudsearch.UpdateServiceAccessPoliciesInput) (*request.Request, *cloudsearch.UpdateServiceAccessPoliciesOutput)
|
||||
}
|
||||
|
||||
var _ CloudSearchAPI = (*cloudsearch.CloudSearch)(nil)
|
85
vendor/github.com/aws/aws-sdk-go/service/cloudsearch/doc.go
generated
vendored
Normal file
85
vendor/github.com/aws/aws-sdk-go/service/cloudsearch/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,85 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudsearch provides the client and types for making API
|
||||
// requests to Amazon CloudSearch.
|
||||
//
|
||||
// You use the Amazon CloudSearch configuration service to create, configure,
|
||||
// and manage search domains. Configuration service requests are submitted using
|
||||
// the AWS Query protocol. AWS Query requests are HTTP or HTTPS requests submitted
|
||||
// via HTTP GET or POST with a query parameter named Action.
|
||||
//
|
||||
// The endpoint for configuration service requests is region-specific: cloudsearch.region.amazonaws.com.
|
||||
// For example, cloudsearch.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#cloudsearch_region).
|
||||
//
|
||||
// See cloudsearch package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearch/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon CloudSearch 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 := cloudsearch.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 CloudSearch client CloudSearch for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearch/#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.BuildSuggesters(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("BuildSuggesters 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.BuildSuggestersWithContext(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 cloudsearch
|
44
vendor/github.com/aws/aws-sdk-go/service/cloudsearch/errors.go
generated
vendored
Normal file
44
vendor/github.com/aws/aws-sdk-go/service/cloudsearch/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudsearch
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeBaseException for service response error code
|
||||
// "BaseException".
|
||||
//
|
||||
// An error occurred while processing the request.
|
||||
ErrCodeBaseException = "BaseException"
|
||||
|
||||
// ErrCodeDisabledOperationException for service response error code
|
||||
// "DisabledAction".
|
||||
//
|
||||
// The request was rejected because it attempted an operation which is not enabled.
|
||||
ErrCodeDisabledOperationException = "DisabledAction"
|
||||
|
||||
// ErrCodeInternalException for service response error code
|
||||
// "InternalException".
|
||||
//
|
||||
// An internal error occurred while processing the request. If this problem
|
||||
// persists, report an issue from the Service Health Dashboard (http://status.aws.amazon.com/).
|
||||
ErrCodeInternalException = "InternalException"
|
||||
|
||||
// ErrCodeInvalidTypeException for service response error code
|
||||
// "InvalidType".
|
||||
//
|
||||
// The request was rejected because it specified an invalid type definition.
|
||||
ErrCodeInvalidTypeException = "InvalidType"
|
||||
|
||||
// ErrCodeLimitExceededException for service response error code
|
||||
// "LimitExceeded".
|
||||
//
|
||||
// The request was rejected because a resource limit has already been met.
|
||||
ErrCodeLimitExceededException = "LimitExceeded"
|
||||
|
||||
// ErrCodeResourceNotFoundException for service response error code
|
||||
// "ResourceNotFound".
|
||||
//
|
||||
// The request was rejected because it attempted to reference a resource that
|
||||
// does not exist.
|
||||
ErrCodeResourceNotFoundException = "ResourceNotFound"
|
||||
)
|
664
vendor/github.com/aws/aws-sdk-go/service/cloudsearch/examples_test.go
generated
vendored
Normal file
664
vendor/github.com/aws/aws-sdk-go/service/cloudsearch/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,664 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudsearch_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/cloudsearch"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCloudSearch_BuildSuggesters() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.BuildSuggestersInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.BuildSuggesters(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 ExampleCloudSearch_CreateDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.CreateDomainInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.CreateDomain(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 ExampleCloudSearch_DefineAnalysisScheme() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DefineAnalysisSchemeInput{
|
||||
AnalysisScheme: &cloudsearch.AnalysisScheme{ // Required
|
||||
AnalysisSchemeLanguage: aws.String("AnalysisSchemeLanguage"), // Required
|
||||
AnalysisSchemeName: aws.String("StandardName"), // Required
|
||||
AnalysisOptions: &cloudsearch.AnalysisOptions{
|
||||
AlgorithmicStemming: aws.String("AlgorithmicStemming"),
|
||||
JapaneseTokenizationDictionary: aws.String("String"),
|
||||
StemmingDictionary: aws.String("String"),
|
||||
Stopwords: aws.String("String"),
|
||||
Synonyms: aws.String("String"),
|
||||
},
|
||||
},
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DefineAnalysisScheme(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 ExampleCloudSearch_DefineExpression() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DefineExpressionInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Expression: &cloudsearch.Expression{ // Required
|
||||
ExpressionName: aws.String("StandardName"), // Required
|
||||
ExpressionValue: aws.String("ExpressionValue"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.DefineExpression(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 ExampleCloudSearch_DefineIndexField() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DefineIndexFieldInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
IndexField: &cloudsearch.IndexField{ // Required
|
||||
IndexFieldName: aws.String("DynamicFieldName"), // Required
|
||||
IndexFieldType: aws.String("IndexFieldType"), // Required
|
||||
DateArrayOptions: &cloudsearch.DateArrayOptions{
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SourceFields: aws.String("FieldNameCommaList"),
|
||||
},
|
||||
DateOptions: &cloudsearch.DateOptions{
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
DoubleArrayOptions: &cloudsearch.DoubleArrayOptions{
|
||||
DefaultValue: aws.Float64(1.0),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SourceFields: aws.String("FieldNameCommaList"),
|
||||
},
|
||||
DoubleOptions: &cloudsearch.DoubleOptions{
|
||||
DefaultValue: aws.Float64(1.0),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
IntArrayOptions: &cloudsearch.IntArrayOptions{
|
||||
DefaultValue: aws.Int64(1),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SourceFields: aws.String("FieldNameCommaList"),
|
||||
},
|
||||
IntOptions: &cloudsearch.IntOptions{
|
||||
DefaultValue: aws.Int64(1),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
LatLonOptions: &cloudsearch.LatLonOptions{
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
LiteralArrayOptions: &cloudsearch.LiteralArrayOptions{
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SourceFields: aws.String("FieldNameCommaList"),
|
||||
},
|
||||
LiteralOptions: &cloudsearch.LiteralOptions{
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
FacetEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SearchEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
TextArrayOptions: &cloudsearch.TextArrayOptions{
|
||||
AnalysisScheme: aws.String("Word"),
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
HighlightEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SourceFields: aws.String("FieldNameCommaList"),
|
||||
},
|
||||
TextOptions: &cloudsearch.TextOptions{
|
||||
AnalysisScheme: aws.String("Word"),
|
||||
DefaultValue: aws.String("FieldValue"),
|
||||
HighlightEnabled: aws.Bool(true),
|
||||
ReturnEnabled: aws.Bool(true),
|
||||
SortEnabled: aws.Bool(true),
|
||||
SourceField: aws.String("FieldName"),
|
||||
},
|
||||
},
|
||||
}
|
||||
resp, err := svc.DefineIndexField(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 ExampleCloudSearch_DefineSuggester() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DefineSuggesterInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Suggester: &cloudsearch.Suggester{ // Required
|
||||
DocumentSuggesterOptions: &cloudsearch.DocumentSuggesterOptions{ // Required
|
||||
SourceField: aws.String("FieldName"), // Required
|
||||
FuzzyMatching: aws.String("SuggesterFuzzyMatching"),
|
||||
SortExpression: aws.String("String"),
|
||||
},
|
||||
SuggesterName: aws.String("StandardName"), // Required
|
||||
},
|
||||
}
|
||||
resp, err := svc.DefineSuggester(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 ExampleCloudSearch_DeleteAnalysisScheme() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DeleteAnalysisSchemeInput{
|
||||
AnalysisSchemeName: aws.String("StandardName"), // Required
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteAnalysisScheme(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 ExampleCloudSearch_DeleteDomain() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DeleteDomainInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteDomain(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 ExampleCloudSearch_DeleteExpression() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DeleteExpressionInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
ExpressionName: aws.String("StandardName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteExpression(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 ExampleCloudSearch_DeleteIndexField() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DeleteIndexFieldInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
IndexFieldName: aws.String("DynamicFieldName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteIndexField(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 ExampleCloudSearch_DeleteSuggester() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DeleteSuggesterInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
SuggesterName: aws.String("StandardName"), // Required
|
||||
}
|
||||
resp, err := svc.DeleteSuggester(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 ExampleCloudSearch_DescribeAnalysisSchemes() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeAnalysisSchemesInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
AnalysisSchemeNames: []*string{
|
||||
aws.String("StandardName"), // Required
|
||||
// More values...
|
||||
},
|
||||
Deployed: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.DescribeAnalysisSchemes(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 ExampleCloudSearch_DescribeAvailabilityOptions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeAvailabilityOptionsInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Deployed: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.DescribeAvailabilityOptions(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 ExampleCloudSearch_DescribeDomains() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeDomainsInput{
|
||||
DomainNames: []*string{
|
||||
aws.String("DomainName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeDomains(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 ExampleCloudSearch_DescribeExpressions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeExpressionsInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Deployed: aws.Bool(true),
|
||||
ExpressionNames: []*string{
|
||||
aws.String("StandardName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeExpressions(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 ExampleCloudSearch_DescribeIndexFields() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeIndexFieldsInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Deployed: aws.Bool(true),
|
||||
FieldNames: []*string{
|
||||
aws.String("DynamicFieldName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeIndexFields(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 ExampleCloudSearch_DescribeScalingParameters() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeScalingParametersInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.DescribeScalingParameters(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 ExampleCloudSearch_DescribeServiceAccessPolicies() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeServiceAccessPoliciesInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Deployed: aws.Bool(true),
|
||||
}
|
||||
resp, err := svc.DescribeServiceAccessPolicies(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 ExampleCloudSearch_DescribeSuggesters() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.DescribeSuggestersInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
Deployed: aws.Bool(true),
|
||||
SuggesterNames: []*string{
|
||||
aws.String("StandardName"), // Required
|
||||
// More values...
|
||||
},
|
||||
}
|
||||
resp, err := svc.DescribeSuggesters(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 ExampleCloudSearch_IndexDocuments() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.IndexDocumentsInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.IndexDocuments(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 ExampleCloudSearch_ListDomainNames() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
var params *cloudsearch.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 ExampleCloudSearch_UpdateAvailabilityOptions() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.UpdateAvailabilityOptionsInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
MultiAZ: aws.Bool(true), // Required
|
||||
}
|
||||
resp, err := svc.UpdateAvailabilityOptions(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 ExampleCloudSearch_UpdateScalingParameters() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.UpdateScalingParametersInput{
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
ScalingParameters: &cloudsearch.ScalingParameters{ // Required
|
||||
DesiredInstanceType: aws.String("PartitionInstanceType"),
|
||||
DesiredPartitionCount: aws.Int64(1),
|
||||
DesiredReplicationCount: aws.Int64(1),
|
||||
},
|
||||
}
|
||||
resp, err := svc.UpdateScalingParameters(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 ExampleCloudSearch_UpdateServiceAccessPolicies() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearch.New(sess)
|
||||
|
||||
params := &cloudsearch.UpdateServiceAccessPoliciesInput{
|
||||
AccessPolicies: aws.String("PolicyDocument"), // Required
|
||||
DomainName: aws.String("DomainName"), // Required
|
||||
}
|
||||
resp, err := svc.UpdateServiceAccessPolicies(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/cloudsearch/service.go
generated
vendored
Normal file
93
vendor/github.com/aws/aws-sdk-go/service/cloudsearch/service.go
generated
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudsearch
|
||||
|
||||
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/query"
|
||||
)
|
||||
|
||||
// CloudSearch provides the API operation methods for making requests to
|
||||
// Amazon CloudSearch. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// CloudSearch methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CloudSearch 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 = "cloudsearch" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the CloudSearch 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 CloudSearch client from just a session.
|
||||
// svc := cloudsearch.New(mySession)
|
||||
//
|
||||
// // Create a CloudSearch client with additional configuration
|
||||
// svc := cloudsearch.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudSearch {
|
||||
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) *CloudSearch {
|
||||
svc := &CloudSearch{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2013-01-01",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(query.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a CloudSearch operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CloudSearch) 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
|
||||
}
|
1434
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/api.go
generated
vendored
Normal file
1434
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/api.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
76
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/cloudsearchdomainiface/interface.go
generated
vendored
Normal file
76
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/cloudsearchdomainiface/interface.go
generated
vendored
Normal file
|
@ -0,0 +1,76 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudsearchdomainiface provides an interface to enable mocking the Amazon CloudSearch Domain 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 cloudsearchdomainiface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/cloudsearchdomain"
|
||||
)
|
||||
|
||||
// CloudSearchDomainAPI provides an interface to enable mocking the
|
||||
// cloudsearchdomain.CloudSearchDomain 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 CloudSearch Domain.
|
||||
// func myFunc(svc cloudsearchdomainiface.CloudSearchDomainAPI) bool {
|
||||
// // Make svc.Search request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := cloudsearchdomain.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockCloudSearchDomainClient struct {
|
||||
// cloudsearchdomainiface.CloudSearchDomainAPI
|
||||
// }
|
||||
// func (m *mockCloudSearchDomainClient) Search(input *cloudsearchdomain.SearchInput) (*cloudsearchdomain.SearchOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockCloudSearchDomainClient{}
|
||||
//
|
||||
// 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 CloudSearchDomainAPI interface {
|
||||
Search(*cloudsearchdomain.SearchInput) (*cloudsearchdomain.SearchOutput, error)
|
||||
SearchWithContext(aws.Context, *cloudsearchdomain.SearchInput, ...request.Option) (*cloudsearchdomain.SearchOutput, error)
|
||||
SearchRequest(*cloudsearchdomain.SearchInput) (*request.Request, *cloudsearchdomain.SearchOutput)
|
||||
|
||||
Suggest(*cloudsearchdomain.SuggestInput) (*cloudsearchdomain.SuggestOutput, error)
|
||||
SuggestWithContext(aws.Context, *cloudsearchdomain.SuggestInput, ...request.Option) (*cloudsearchdomain.SuggestOutput, error)
|
||||
SuggestRequest(*cloudsearchdomain.SuggestInput) (*request.Request, *cloudsearchdomain.SuggestOutput)
|
||||
|
||||
UploadDocuments(*cloudsearchdomain.UploadDocumentsInput) (*cloudsearchdomain.UploadDocumentsOutput, error)
|
||||
UploadDocumentsWithContext(aws.Context, *cloudsearchdomain.UploadDocumentsInput, ...request.Option) (*cloudsearchdomain.UploadDocumentsOutput, error)
|
||||
UploadDocumentsRequest(*cloudsearchdomain.UploadDocumentsInput) (*request.Request, *cloudsearchdomain.UploadDocumentsOutput)
|
||||
}
|
||||
|
||||
var _ CloudSearchDomainAPI = (*cloudsearchdomain.CloudSearchDomain)(nil)
|
49
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/customizations_test.go
generated
vendored
Normal file
49
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/customizations_test.go
generated
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
package cloudsearchdomain_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/awstesting/unit"
|
||||
"github.com/aws/aws-sdk-go/service/cloudsearchdomain"
|
||||
)
|
||||
|
||||
func TestRequireEndpointIfRegionProvided(t *testing.T) {
|
||||
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
|
||||
Region: aws.String("mock-region"),
|
||||
DisableParamValidation: aws.Bool(true),
|
||||
})
|
||||
req, _ := svc.SearchRequest(nil)
|
||||
err := req.Build()
|
||||
|
||||
assert.Equal(t, "", svc.Endpoint)
|
||||
assert.Error(t, err)
|
||||
assert.Equal(t, aws.ErrMissingEndpoint, err)
|
||||
}
|
||||
|
||||
func TestRequireEndpointIfNoRegionProvided(t *testing.T) {
|
||||
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
|
||||
DisableParamValidation: aws.Bool(true),
|
||||
})
|
||||
req, _ := svc.SearchRequest(nil)
|
||||
err := req.Build()
|
||||
|
||||
assert.Equal(t, "", svc.Endpoint)
|
||||
assert.Error(t, err)
|
||||
assert.Equal(t, aws.ErrMissingEndpoint, err)
|
||||
}
|
||||
|
||||
func TestRequireEndpointUsed(t *testing.T) {
|
||||
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
|
||||
Region: aws.String("mock-region"),
|
||||
DisableParamValidation: aws.Bool(true),
|
||||
Endpoint: aws.String("https://endpoint"),
|
||||
})
|
||||
req, _ := svc.SearchRequest(nil)
|
||||
err := req.Build()
|
||||
|
||||
assert.Equal(t, "https://endpoint", svc.Endpoint)
|
||||
assert.NoError(t, err)
|
||||
}
|
87
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/doc.go
generated
vendored
Normal file
87
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/doc.go
generated
vendored
Normal file
|
@ -0,0 +1,87 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package cloudsearchdomain provides the client and types for making API
|
||||
// requests to Amazon CloudSearch Domain.
|
||||
//
|
||||
// You use the AmazonCloudSearch2013 API to upload documents to a search domain
|
||||
// and search those documents.
|
||||
//
|
||||
// The endpoints for submitting UploadDocuments, Search, and Suggest requests
|
||||
// are domain-specific. To get the endpoints for your domain, use the Amazon
|
||||
// CloudSearch configuration service DescribeDomains action. The domain endpoints
|
||||
// are also displayed on the domain dashboard in the Amazon CloudSearch console.
|
||||
// You submit suggest requests to the search endpoint.
|
||||
//
|
||||
// For more information, see the Amazon CloudSearch Developer Guide (http://docs.aws.amazon.com/cloudsearch/latest/developerguide).
|
||||
//
|
||||
// See cloudsearchdomain package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearchdomain/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To use the client for Amazon CloudSearch Domain 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 := cloudsearchdomain.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 CloudSearch Domain client CloudSearchDomain for more
|
||||
// information on creating the service's client.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudsearchdomain/#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.Search(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("Search 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.SearchWithContext(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 cloudsearchdomain
|
18
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/errors.go
generated
vendored
Normal file
18
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/errors.go
generated
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudsearchdomain
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeDocumentServiceException for service response error code
|
||||
// "DocumentServiceException".
|
||||
//
|
||||
// Information about any problems encountered while processing an upload request.
|
||||
ErrCodeDocumentServiceException = "DocumentServiceException"
|
||||
|
||||
// ErrCodeSearchException for service response error code
|
||||
// "SearchException".
|
||||
//
|
||||
// Information about any problems encountered while processing a search request.
|
||||
ErrCodeSearchException = "SearchException"
|
||||
)
|
95
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/examples_test.go
generated
vendored
Normal file
95
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/examples_test.go
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudsearchdomain_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/cloudsearchdomain"
|
||||
)
|
||||
|
||||
var _ time.Duration
|
||||
var _ bytes.Buffer
|
||||
|
||||
func ExampleCloudSearchDomain_Search() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearchdomain.New(sess)
|
||||
|
||||
params := &cloudsearchdomain.SearchInput{
|
||||
Query: aws.String("Query"), // Required
|
||||
Cursor: aws.String("Cursor"),
|
||||
Expr: aws.String("Expr"),
|
||||
Facet: aws.String("Facet"),
|
||||
FilterQuery: aws.String("FilterQuery"),
|
||||
Highlight: aws.String("Highlight"),
|
||||
Partial: aws.Bool(true),
|
||||
QueryOptions: aws.String("QueryOptions"),
|
||||
QueryParser: aws.String("QueryParser"),
|
||||
Return: aws.String("Return"),
|
||||
Size: aws.Int64(1),
|
||||
Sort: aws.String("Sort"),
|
||||
Start: aws.Int64(1),
|
||||
Stats: aws.String("Stat"),
|
||||
}
|
||||
resp, err := svc.Search(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 ExampleCloudSearchDomain_Suggest() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearchdomain.New(sess)
|
||||
|
||||
params := &cloudsearchdomain.SuggestInput{
|
||||
Query: aws.String("Query"), // Required
|
||||
Suggester: aws.String("Suggester"), // Required
|
||||
Size: aws.Int64(1),
|
||||
}
|
||||
resp, err := svc.Suggest(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 ExampleCloudSearchDomain_UploadDocuments() {
|
||||
sess := session.Must(session.NewSession())
|
||||
|
||||
svc := cloudsearchdomain.New(sess)
|
||||
|
||||
params := &cloudsearchdomain.UploadDocumentsInput{
|
||||
ContentType: aws.String("ContentType"), // Required
|
||||
Documents: bytes.NewReader([]byte("PAYLOAD")), // Required
|
||||
}
|
||||
resp, err := svc.UploadDocuments(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)
|
||||
}
|
102
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/service.go
generated
vendored
Normal file
102
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/service.go
generated
vendored
Normal file
|
@ -0,0 +1,102 @@
|
|||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package cloudsearchdomain
|
||||
|
||||
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"
|
||||
)
|
||||
|
||||
// CloudSearchDomain provides the API operation methods for making requests to
|
||||
// Amazon CloudSearch Domain. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// CloudSearchDomain methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type CloudSearchDomain 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 = "cloudsearchdomain" // Service endpoint prefix API calls made to.
|
||||
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
|
||||
)
|
||||
|
||||
// New creates a new instance of the CloudSearchDomain 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 CloudSearchDomain client from just a session.
|
||||
// svc := cloudsearchdomain.New(mySession)
|
||||
//
|
||||
// // Create a CloudSearchDomain client with additional configuration
|
||||
// svc := cloudsearchdomain.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudSearchDomain {
|
||||
var c client.Config
|
||||
if v, ok := p.(client.ConfigNoResolveEndpointProvider); ok {
|
||||
c = v.ClientConfigNoResolveEndpoint(cfgs...)
|
||||
} else {
|
||||
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) *CloudSearchDomain {
|
||||
if len(signingName) == 0 {
|
||||
signingName = "cloudsearch"
|
||||
}
|
||||
svc := &CloudSearchDomain{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2013-01-01",
|
||||
JSONVersion: "1.1",
|
||||
},
|
||||
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 CloudSearchDomain operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *CloudSearchDomain) 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
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue